--- oup/current/Tools/TxmpReplace.pas 2007/06/12 17:35:56 214 +++ oup/current/Tools/TxmpReplace.pas 2007/12/18 20:48:24 255 @@ -1,26 +1,29 @@ unit TxmpReplace; + interface + uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, Template, StdCtrls, ExtCtrls, - Functions, Data, OniImgClass, Menus, Buttons, TypeDefs; + Dialogs, _TemplateFileList, Menus, StdCtrls, Buttons, ComCtrls, ExtCtrls, + OniImgClass, TypeDefs, VirtualTrees; type - TForm_TxmpReplace = class(TForm_ToolTemplate) + TForm_TxmpReplace = class(TForm_TemplateFileList) group_options: TGroupBox; btn_replace: TButton; check_transparency: TCheckBox; check_fading: TCheckBox; - panel_txmppreview: TPanel; - btn_save: TButton; - image_txmppreview: TImage; - splitter_txmp: TSplitter; + group_txmp: TGroupBox; + Splitter1: TSplitter; group_bmpselect: TGroupBox; image_bmppreview: TImage; panel_load: TPanel; btn_load: TButton; - opend: TOpenDialog; + image_txmppreview: TImage; + panel_txmppreview: TPanel; + btn_save: TButton; saved: TSaveDialog; + opend: TOpenDialog; procedure SelectFile(fileinfo: TFileInfo); procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); @@ -36,14 +39,10 @@ type public end; -var - Form_TxmpReplace: TForm_TxmpReplace; - implementation {$R *.dfm} -uses Main, ConnectionManager, ImagingTypes, TXMP; - - +uses + _TemplateFile, ConnectionManager, ImagingTypes; procedure TForm_TxmpReplace.SelectFile(fileinfo: TFileInfo); var @@ -177,7 +176,7 @@ begin newsize := mem.Size; mem.Seek(0, soFromBeginning); - if (newsize > old_size) and (ConManager.Connection[ConnectionID].Backend = DB_ONI) then + if (newsize > old_size) and (ConManager.Connection[ConnectionID].Backend in [DB_ONI, DB_ONISPLIT]) then new_rawaddr := ConManager.Connection[ConnectionID].AppendRawFile( not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN), mem) else @@ -190,7 +189,7 @@ begin oldfading := oldfading or $01 else oldfading := oldfading and (not Byte($01)); - ConManager.Connection[ConnectionID].UpdateDatFilePart(fileid, $88, 1, @datbyte); + ConManager.Connection[ConnectionID].UpdateDatFilePart(fileid, $88, 1, @oldfading); datbyte := $10; // if check_transparency.Checked then // datbyte := datbyte or $04; @@ -244,4 +243,5 @@ end; begin AddToolListEntry('txmpreplace', 'TXMP Replacer', 'TXMP'); -end. \ No newline at end of file +end. +