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 231 by alloc, Wed Jun 20 22:24:04 2007 UTC vs.
Revision 241 by alloc, Tue Jul 17 22:27:16 2007 UTC

# Line 38 | Line 38 | type
38      function GetDatLink(FileID, DatOffset: Integer): TDatLink; override;
39      function GetRawList(FileID: Integer): TRawDataList; override;
40      function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override;
41 +    function GetRawsForType(RawType: String): TRawDataList; override;
42  
43      procedure LoadRawOffset(LocSep: Boolean; RawAddr, Size: Integer; var target: TStream); overload;
44      procedure LoadRawOffset(LocSep: Boolean; RawAddr, Size: Integer; target: Pointer); overload;
# Line 284 | Line 285 | var
285   begin
286    list := TStringList.Create;
287    list.Sorted := True;
288 +  if ext = '*' then
289 +    ext := '';
290    for i := 0 to GetFileCount - 1 do
291    begin
292      if ((Length(ext) = 0) or (Pos(Fdat_files[i].Extension, ext) > 0)) and
# Line 491 | Line 494 | begin
494   end;
495  
496  
497 + function TAccess_OniArchive.GetRawsForType(RawType: String): TRawDataList;
498 + var
499 +  i, j: Integer;
500 +  dats: TStrings;
501 +  list: TRawDataList;
502 + begin
503 +  dats := nil;
504 +  dats := GetFilesList(MidStr(RawType, 1, 4), '', True, ST_IDAsc);
505 +  for i := 0 to dats.Count - 1 do
506 +  begin
507 +    list := GetRawList(StrToInt(MidStr(dats.Strings[i], 1, 5)));
508 +    for j := 0 to Length(list) - 1 do
509 +    begin
510 +      if list[j].RawType = RawType then
511 +      begin
512 +        SetLength(Result, Length(Result)+1);
513 +        Result[High(Result)] := list[j];
514 +      end;
515 +    end;
516 +  end;
517 + end;
518 +
519 +
520   function TAccess_OniArchive.GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo;
521   begin
522    Result := RawLists.GetRawInfo(FConnectionID, FileID, DatOffset);

Diff Legend

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