ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/Tools/TxmpReplace.pas
(Generate patch)

Comparing oup/current/Tools/TxmpReplace.pas (file contents):
Revision 46 by alloc, Sat Dec 23 16:26:43 2006 UTC vs.
Revision 54 by alloc, Mon Dec 25 03:04:47 2006 UTC

# Line 30 | Line 30 | type
30    private
31      OniImage_Old: TOniImage;
32      OniImage_New: TOniImage;
33 +    old_size: Integer;
34      fileid: Integer;
35    public
36    end;
# Line 57 | Line 58 | begin
58    check_transparency.Checked := (depthbyte and $04) > 0;
59  
60    OniImage_Old.LoadFromTXMP(fileid);
61 +  old_size := OniImage_Old.GetImageDataSize((fadingbyte and $01) > 0);
62    Data := OniImage_Old.GetAsBMP;
63    mem  := TMemoryStream.Create;
64    mem.Write(Data[0], Length(Data));
# Line 91 | Line 93 | end;
93  
94   procedure TForm_TxmpReplace.btn_replaceClick(Sender: TObject);
95   var
96 <  oldsize, newsize: LongWord;
96 >  newsize: LongWord;
97    old_rawaddr, new_rawaddr: LongWord;
98    oldfading: Byte;
99    tempd:     Tdata;
# Line 120 | Line 122 | begin
122          Exit;
123      end;
124  
123    oldsize := OniImage_Old.GetImageDataSize((oldfading and $01) > 0);
124
125      if check_fading.Checked then
126        if not OniImage_New.GetMipMappedImage(tempd) then
127          if MessageBox(Self.Handle,
# Line 136 | Line 136 | begin
136        tempd := OniImage_New.GetAsData;
137  
138      newsize := OniImage_New.GetImageDataSize(check_fading.Checked);
139    ShowMessage(IntToStr(newsize));
139  
140 <    if (newsize > oldsize) and (OniDataConnection.Backend = ODB_Dat) then
140 >    if (newsize > old_size) and (OniDataConnection.Backend = ODB_Dat) then
141        new_rawaddr := OniDataConnection.AppendRawFile(
142          OniDataConnection.OSisMac, Length(tempd), tempd)
143      else

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)