Changeset 92 for oup/current/Tools/TxmpReplace.pas
- Timestamp:
- Jan 16, 2007, 12:35:04 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/TxmpReplace.pas
r86 r92 52 52 begin 53 53 fileid := fileinfo.ID; 54 OniDataConnection.LoadDatFilePart(fileid, $88, SizeOf(fadingbyte), @fadingbyte);55 OniDataConnection.LoadDatFilePart(fileid, $89, SizeOf(depthbyte), @depthbyte);56 OniDataConnection.LoadDatFilePart(fileid, $90, SizeOf(storebyte), @storebyte);54 Connection.LoadDatFilePart(fileid, $88, SizeOf(fadingbyte), @fadingbyte); 55 Connection.LoadDatFilePart(fileid, $89, SizeOf(depthbyte), @depthbyte); 56 Connection.LoadDatFilePart(fileid, $90, SizeOf(storebyte), @storebyte); 57 57 check_fading.Checked := (fadingbyte and $01) > 0; 58 58 check_transparency.Checked := (depthbyte and $04) > 0; … … 103 103 if filelist.ItemIndex >= 0 then 104 104 begin 105 OniDataConnection.LoadDatFilePart(fileid, $88, 1, @oldfading);106 if OniDataConnection.OSisMac then107 OniDataConnection.UpdateDatFilePart(fileid, $A0, 4, @old_rawaddr)105 Connection.LoadDatFilePart(fileid, $88, 1, @oldfading); 106 if Connection.OSisMac then 107 Connection.UpdateDatFilePart(fileid, $A0, 4, @old_rawaddr) 108 108 else 109 OniDataConnection.LoadDatFilePart(fileid, $9C, 4, @old_rawaddr);109 Connection.LoadDatFilePart(fileid, $9C, 4, @old_rawaddr); 110 110 111 111 if (OniImage_Old.Width <> OniImage_New.Width) or … … 138 138 newsize := OniImage_New.GetImageDataSize(check_fading.Checked); 139 139 140 if (newsize > old_size) and ( OniDataConnection.Backend = ODB_Dat) then141 new_rawaddr := OniDataConnection.AppendRawFile(142 OniDataConnection.OSisMac, Length(tempd), tempd)140 if (newsize > old_size) and (Connection.Backend = ODB_Dat) then 141 new_rawaddr := Connection.AppendRawFile( 142 Connection.OSisMac, Length(tempd), tempd) 143 143 else 144 144 begin 145 145 new_rawaddr := old_rawaddr; 146 OniDataConnection.UpdateRawFile(fileid, $9C, Length(tempd), tempd);146 Connection.UpdateRawFile(fileid, $9C, Length(tempd), tempd); 147 147 end; 148 148 … … 150 150 if check_fading.Checked then 151 151 datbyte := datbyte or $01; 152 OniDataConnection.UpdateDatFilePart(fileid, $88, 1, @datbyte);152 Connection.UpdateDatFilePart(fileid, $88, 1, @datbyte); 153 153 datbyte := $10; 154 154 if check_transparency.Checked then 155 155 datbyte := datbyte or $04; 156 OniDataConnection.UpdateDatFilePart(fileid, $89, 1, @datbyte);157 OniDataConnection.UpdateDatFilePart(fileid, $8C, 2, @OniImage_New.Width);158 OniDataConnection.UpdateDatFilePart(fileid, $8E, 2, @OniImage_New.Height);156 Connection.UpdateDatFilePart(fileid, $89, 1, @datbyte); 157 Connection.UpdateDatFilePart(fileid, $8C, 2, @OniImage_New.Width); 158 Connection.UpdateDatFilePart(fileid, $8E, 2, @OniImage_New.Height); 159 159 datbyte := $08; 160 OniDataConnection.UpdateDatFilePart(fileid, $90, 1, @datbyte);161 if OniDataConnection.OSisMac then162 OniDataConnection.UpdateDatFilePart(fileid, $A0, 4, @new_rawaddr)160 Connection.UpdateDatFilePart(fileid, $90, 1, @datbyte); 161 if Connection.OSisMac then 162 Connection.UpdateDatFilePart(fileid, $A0, 4, @new_rawaddr) 163 163 else 164 OniDataConnection.UpdateDatFilePart(fileid, $9C, 4, @new_rawaddr);164 Connection.UpdateDatFilePart(fileid, $9C, 4, @new_rawaddr); 165 165 166 166 ShowMessage('TXMP-image replaced');
Note:
See TracChangeset
for help on using the changeset viewer.