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

Comparing oup/current/DataAccess/Access_OniArchive.pas (file contents):
Revision 113 by alloc, Sun Feb 25 17:20:22 2007 UTC vs.
Revision 116 by alloc, Mon Feb 26 22:57:02 2007 UTC

# Line 34 | Line 34 | type
34      procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: TStream); overload; override;
35  
36      function GetDatLinks(FileID: Integer): TDatLinkList; override;
37 +    function GetDatLink(FileID, DatOffset: Integer): TDatLink; override;
38      function GetRawList(FileID: Integer): TRawDataList; override;
39      function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override;
40  
# Line 50 | Line 51 | type
51   implementation
52  
53   uses
54 <  SysUtils, StrUtils, Data, Functions, RawList;
54 >  SysUtils, StrUtils, Data, Functions, RawList, DatLinks;
55  
56  
57   (*
# Line 397 | Line 398 | end;
398  
399  
400  
401 + function TAccess_OniArchive.GetDatLink(FileID, DatOffset: Integer): TDatLink;
402 + var
403 +  link: Integer;
404 + begin
405 +  Result := DatLinksManager.GetDatLink(FConnectionID, FileID, DatOffset);
406 +  LoadDatFilePart(fileid, Result.SrcOffset, 4, @link);
407 +  if link > 0 then
408 +    Result.DestID := link div 256
409 +  else
410 +    Result.DestID := -1;
411 + end;
412 +
413 +
414 + function TAccess_OniArchive.GetDatLinks(FileID: Integer): TDatLinkList;
415 + var
416 +  i: Integer;
417 +  link: Integer;
418 + begin
419 +  Result := DatLinksManager.GetDatLinks(FConnectionID, FileID);
420 +  if Length(Result) > 0 then
421 +  begin
422 +    for i := 0 to High(Result) do
423 +    begin
424 +      LoadDatFilePart(fileid, Result[i].SrcOffset, 4, @link);
425 +      if link > 0 then
426 +        Result[i].DestID := link div 256
427 +      else
428 +        Result[i].DestID := -1;
429 +    end;
430 +  end;
431 + end;
432 +
433 +
434   function TAccess_OniArchive.GetRawList(FileID: Integer): TRawDataList;
435   begin
436    Result := RawLists.GetRawList(FConnectionID, FileID);

Diff Legend

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