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

Comparing oup/rewrite/Tools/Preview.pas (file contents):
Revision 96 by alloc, Thu Jan 18 17:18:19 2007 UTC vs.
Revision 97 by alloc, Mon Jan 22 23:05:45 2007 UTC

# Line 3 | Line 3 | interface
3   uses
4    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
5    Dialogs, StdCtrls, Template, ExtCtrls, Math, StrUtils,
6 <  ConnectionManager, {OniImgClass,} Data, TypeDefs, Menus, Buttons;
6 >  ConnectionManager, OniImgClass, Data, TypeDefs, Menus, Buttons;
7  
8   type
9    TForm_Preview = class(TForm_ToolTemplate)
# Line 83 | Line 83 | end;
83  
84   procedure TForm_Preview.LoadImage(fileid, index: Integer);
85   var
86 <  Data:      TByteArray;
86 >  Data:      TByteData;
87    memstream: TMemoryStream;
88    OniImage:  TOniImage;
89  
90   begin
91    OniImage := TOniImage.Create;
92 <  OniImage.Load(Connection, fileid);
93 <  Data := OniImage.GetAsBMP;
92 >  OniImage.Load(ConnectionID, fileid);
93 >  OniImage.GetAsBMP(Data);
94    OniImage.Free;
95  
96    memstream := TMemoryStream.Create;
# Line 146 | Line 146 | var
146    link: LongWord;
147    i:    Byte;
148   begin
149 <  Connection.LoadDatFilePart(_fileid, $14, SizeOf(loop_speed), @loop_speed);
150 <  Connection.LoadDatFilePart(_fileid, $1C, SizeOf(linkcount), @linkcount);
149 >  ConManager.Connection[ConnectionID].LoadDatFilePart(_fileid, $14, SizeOf(loop_speed), @loop_speed);
150 >  ConManager.Connection[ConnectionID].LoadDatFilePart(_fileid, $1C, SizeOf(linkcount), @linkcount);
151    SetBitmapCount(linkcount);
152    for i := 0 to linkcount - 1 do
153    begin
154 <    Connection.LoadDatFilePart(_fileid, $20 + i * 4, SizeOf(link), @link);
154 >    ConManager.Connection[ConnectionID].LoadDatFilePart(_fileid, $20 + i * 4, SizeOf(link), @link);
155      link := link div 256;
156      if link = 0 then
157        link := _fileid - 1;
# Line 189 | Line 189 | begin
189      Dec(actualimg)
190    else
191      actualimg := High(bitmaps);
192 <  Self.Caption := 'Preview ' + Connection.GetFileInfo(_fileid).FileName +
192 >  Self.Caption := 'Preview ' + ConManager.Connection[ConnectionID].GetFileInfo(_fileid).Name +
193      ' (' + IntToStr(actualimg + 1) + '/' + IntToStr(Length(bitmaps)) + ')';
194    DrawImage(actualimg);
195   end;
# Line 201 | Line 201 | begin
201      Inc(actualimg)
202    else
203      actualimg := 0;
204 <  Self.Caption := 'Preview ' + Connection.GetFileInfo(_fileid).FileName +
204 >  Self.Caption := 'Preview ' + ConManager.Connection[ConnectionID].GetFileInfo(_fileid).Name +
205      ' (' + IntToStr(actualimg + 1) + '/' + IntToStr(Length(bitmaps)) + ')';
206    DrawImage(actualimg);
207   end;

Diff Legend

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