Changeset 113


Ignore:
Timestamp:
Feb 25, 2007, 6:20:22 PM (14 years ago)
Author:
alloc
Message:
 
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • VisualSwapcodes/templates.txt.gz

    r98 r113  
    10451045                db SWAPC_FIXARR_S       ; Counter follows.
    10461046                db 0Ch
    1047                 db 2
     1047                db SWAPC_4BYTE
    10481048                db SWAPC_FIXARR_E
    10491049                db SWAPC_2BYTE
     
    24912491                db SWAPC_FIXARR_S       ; Counter follows.
    24922492                db 0FFh
    2493                 db 9
     2493                db SWAPC_TMPL_PTR       ; x
    24942494                dd 'TSGA'
    24952495                db SWAPC_FIXARR_E
  • oup/current/DataAccess/Access_OUP_ADB.pas

    r112 r113  
    3232    procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: TStream); overload; override;
    3333
     34    function GetDatLinks(FileID: Integer): TDatLinkList; override;
    3435    function GetRawList(FileID: Integer): TRawDataList; override;
    3536    function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override;
     
    5657
    5758constructor TAccess_OUP_ADB.Create(DBFilename: String; ConnectionID: Integer; var Msg: TStatusMessages);
    58 var
    59   i: Integer;
    6059begin
    6160  Msg := SM_UnknownError;
     
    142141      Fdat_files[i].Extension := FQuery.FieldByName('extension').AsString;
    143142      Fdat_files[i].Size := FQuery.FieldByName('size').AsInteger;
    144       Fdat_files[i].FileType := HexToLong(FQuery.FieldByName('contenttype').AsString);
     143      Fdat_files[i].FileType := StrToInt('$'+FQuery.FieldByName('contenttype').AsString);
    145144      Fdat_files[i].DatAddr := 0;
    146145      Inc(i);
     
    294293    end;
    295294  end;
    296   Result := TStringList.Create;
     295  if not Assigned(Result) then
     296    Result := TStringList.Create;
    297297  if list.Count > 0 then
    298298  begin
     
    328328  i: Integer;
    329329begin
    330   Result := TStringList.Create;
     330  if not Assigned(Result) then
     331    Result := TStringList.Create;
     332  if Result is TStringList then
     333    TStringList(Result).Sorted := True;
    331334  for i := 0 to Length(Fdat_extensionsmap) - 1 do
    332335  begin
  • oup/current/DataAccess/Access_OniArchive.pas

    r112 r113  
    3434    procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: TStream); overload; override;
    3535
     36    function GetDatLinks(FileID: Integer): TDatLinkList; override;
    3637    function GetRawList(FileID: Integer): TRawDataList; override;
    3738    function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; override;
     
    6061
    6162constructor TAccess_OniArchive.Create(DatFilename: String; ConnectionID: Integer; var Msg: TStatusMessages);
    62 const
    63   header_ident1_pc: array[0..$13] of Byte =
    64     ($1F, $27, $DC, $33, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00,
    65     $14, $00, $10, $00, $08, $00);
    66   header_ident1_mac: array[0..$13] of Byte =
    67     ($61, $30, $C1, $23, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00,
    68     $14, $00, $10, $00, $08, $00);
    69   header_ident1_macbeta: array[0..$13] of Byte =
    70     ($81, $11, $8D, $23, $DF, $BC, $03, $00, $31, $33, $52, $56, $40, $00,
    71     $14, $00, $10, $00, $08, $00);
    72   header_ident2: array[0..$F] of Byte =
    73     ($99, $CF, $40, $00, $90, $4F, $63, $00, $F4, $55, $5F, $00, $90, $4F, $63, $00);
    7463var
    7564  i: Integer;
     
    9483  header_mac := True;
    9584  header_macbeta := True;
    96   for i := 0 to High(Fdat_header.Ident) do
    97   begin
    98 //    FLevelInfo.Ident[i] := Fdat_header.Ident[i];
    99     if Fdat_header.Ident[i] <> header_ident1_pc[i] then
     85  for i := 0 to High(Fdat_header.GlobalIdent) do
     86    if Fdat_header.GlobalIdent[i] <> HeaderGlobalIdent[i] then
     87    begin
     88      Msg := SM_IncompatibleFile;
     89      Exit;
     90    end;
     91
     92  for i := 0 to High(Fdat_header.OSIdent) do
     93  begin
     94    if Fdat_header.OSIdent[i] <> HeaderOSIdentWin[i] then
    10095      header_pc := False;
    101     if Fdat_header.Ident[i] <> header_ident1_mac[i] then
     96    if Fdat_header.OSIdent[i] <> HeaderOSIdentMac[i] then
    10297      header_mac := False;
    103     if Fdat_header.Ident[i] <> header_ident1_macbeta[i] then
     98    if Fdat_header.OSIdent[i] <> HeaderOSIdentMacBeta[i] then
    10499      header_macbeta := False;
    105100  end;
     
    259254    end;
    260255  end;
    261   Result := TStringList.Create;
     256  if not Assigned(Result) then
     257    Result := TStringList.Create;
    262258  if list.Count > 0 then
    263259  begin
     
    295291  i: Integer;
    296292begin
    297   Result := TStringList.Create;
     293  if not Assigned(Result) then
     294    Result := TStringList.Create;
     295  if Result is TStringList then
     296    TStringList(Result).Sorted := True;
    298297  for i := 0 to Length(Fdat_extensionsmap) - 1 do
    299298  begin
  • oup/current/DataAccess/DataAccess.pas

    r105 r113  
    4444    procedure UpdateDatFilePart(FileID, Offset, Size: Integer; Src: Pointer); overload;
    4545
     46    function GetDatLinks(FileID: Integer): TDatLinkList; virtual; abstract;
    4647    function GetRawList(FileID: Integer): TRawDataList; virtual; abstract;
    4748    function GetRawInfo(FileID, DatOffset: Integer): TRawDataInfo; virtual; abstract;
     
    272273  data.Write(Src[0], Length(Src));
    273274  data.Seek(0, soFromBeginning);
    274   AppendRawFile(LocSep, data);
     275  Result := AppendRawFile(LocSep, data);
    275276  data.Free;
    276277end;
     
    283284  data.Write(Src^, Size);
    284285  data.Seek(0, soFromBeginning);
    285   AppendRawFile(LocSep, data);
     286  Result := AppendRawFile(LocSep, data);
    286287  data.Free;
    287288end;
  • oup/current/Global/DatStructureLoader.pas

    r112 r113  
    6969    100..300:
    7070      Result := datatype - 100;
     71    500..614:
     72      Result := 4;
    7173    1000..9999:
    7274      Result := datatype - 1000;
     
    129131function LoadStructureDefinition(ConnectionID, FileID: Integer): TStructDef;
    130132var
    131   i:      Integer;
    132133  current_type: Byte; //0: Global, 1: Undynamic, 2: Dynamic
    133134  current_base, current_package, current_package_size: Integer;
     
    178179              begin
    179180                current_type := 1;
    180                 current_base := HexToLong(fields[2]);
     181                current_base := StrToInt(fields[2]);
    181182                SetLength(Result.Subs, Length(Result.Subs) + 1);
    182183                Result.Subs[High(Result.Subs)].SubName :=
     
    187188              begin
    188189                current_type    := 2;
    189                 current_base    := HexToLong(fields[2]);
     190                current_base    := StrToInt(fields[2]);
    190191                current_package := 0;
    191192                current_package_size := StrToInt(fields[5]);
     
    194195                  case StrToInt(fields[4]) of
    195196                    1:
    196                       packages := Data[HexToLong(fields[3])];
     197                      packages := Data[StrToInt(fields[3])];
    197198                    2:
    198                       packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] * 256;
     199                      packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] * 256;
    199200                    4:
    200                       packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] *
    201                         256 + Data[HexToLong(fields[3]) + 2] * 256 * 256 + Data[HexToLong(fields[3]) + 3] * 256 * 256 * 256;
     201                      packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] *
     202                        256 + Data[StrToInt(fields[3]) + 2] * 256 * 256 + Data[StrToInt(fields[3]) + 3] * 256 * 256 * 256;
    202203                  end;
    203204                end
    204205                else
    205206                begin
    206                   packages := HexToLong(fields[4]);
     207                  packages := StrToInt(fields[4]);
    207208                end;
    208209                SetLength(Result.Subs, Length(Result.Subs) + packages);
     
    238239                if current_type in [0, 1] then
    239240                begin
    240                   structentry.offset := HexToLong(fields[1]) + current_base;
     241                  structentry.offset := StrToInt(fields[1]) + current_base;
    241242                  if Length(Result.Subs) = 0 then
    242243                  begin
     
    257258                  begin
    258259                    structentry.offset :=
    259                       current_base + current_package * current_package_size + HexToLong(fields[1]);
     260                      current_base + current_package * current_package_size + StrToInt(fields[1]);
    260261                    with Result.Subs[High(Result.Subs) - packages + current_package + 1] do
    261262                    begin
  • oup/current/Global/Data.pas

    r112 r113  
    1212  AppSettingsFile: file of TAppSettings;
    1313
    14 {
    15 const
    16   header_ident1_pc:Array[0..$13] of Byte=
    17       ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
    18   header_ident1_mac:Array[0..$13] of Byte=
    19       ($61,$30,$C1,$23,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
    20   header_ident2:Array[0..$F] of Byte=
    21       ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
    22 }
    2314
    2415const
     16  HeaderOSIdentWin:     TDatOSIdent = ($1F, $27, $DC, $33);
     17  HeaderOSIdentMac:     TDatOSIdent = ($61, $30, $C1, $23);
     18  HeaderOSIdentMacBeta: TDatOSIdent = ($81, $11, $8D, $23);
     19  HeaderGlobalIdent: TDatGlobalIdent = ($DF, $BC, $03, $00, $31, $33, $52, $56,
     20                                        $40, $00, $14, $00, $10, $00, $08, $00);
     21
    2522        FileTypes: array[0..113] of TFileType = (
    26                 (Extension: 'AISA';  StructID: 501; Description: 'AI Character Setup Array';  IdentWin:($E9,$6B,$4C,$22,$2A,$00,$00,$00);  IdentMac:($E9,$6B,$4C,$22,$2A,$00,$00,$00)),
    27                 (Extension: 'AITR';  StructID: 502; Description: 'AI script trigger array';  IdentWin:($55,$EA,$1A,$00,$00,$00,$00,$00);  IdentMac:($55,$EA,$1A,$00,$00,$00,$00,$00)),
    28                 (Extension: 'AIWA';  StructID: 503; Description: 'AI Imported Waypoint Array';  IdentWin:($03,$7F,$10,$00,$00,$00,$00,$00);  IdentMac:($03,$7F,$10,$00,$00,$00,$00,$00)),
    29                 (Extension: 'AKAA';  StructID: 504; Description: 'Adjacency Array';  IdentWin:($77,$DE,$11,$00,$00,$00,$00,$00);  IdentMac:($77,$DE,$11,$00,$00,$00,$00,$00)),
    30                 (Extension: 'ABNA';  StructID: 505; Description: 'BSP tree node Array';  IdentWin:($A0,$6D,$12,$00,$00,$00,$00,$00);  IdentMac:($A0,$6D,$12,$00,$00,$00,$00,$00)),
    31                 (Extension: 'AKVA';  StructID: 506; Description: 'BNV Node Array';  IdentWin:($E0,$05,$DF,$00,$00,$00,$00,$00);  IdentMac:($E0,$05,$DF,$00,$00,$00,$00,$00)),
    32                 (Extension: 'AKBA';  StructID: 507; Description: 'Side Array';  IdentWin:($84,$28,$3A,$00,$00,$00,$00,$00);  IdentMac:($84,$28,$3A,$00,$00,$00,$00,$00)),
    33                 (Extension: 'AKBP';  StructID: 508; Description: 'BSP node Array';  IdentWin:($49,$F4,$0C,$00,$00,$00,$00,$00);  IdentMac:($49,$F4,$0C,$00,$00,$00,$00,$00)),
    34                 (Extension: 'AKDA';  StructID: 509; Description: 'Door Frame Array';  IdentWin:($64,$54,$2E,$00,$00,$00,$00,$00);  IdentMac:($64,$54,$2E,$00,$00,$00,$00,$00)),
    35                 (Extension: 'AKEV';  StructID: 510; Description: 'Akira Environment';  IdentWin:($75,$DE,$14,$30,$88,$00,$00,$00);  IdentMac:($75,$DE,$14,$30,$88,$00,$00,$00)),
    36                 (Extension: 'AGQC';  StructID: 511; Description: 'Gunk Quad Collision Array';  IdentWin:($91,$CB,$1C,$00,$00,$00,$00,$00);  IdentMac:($91,$CB,$1C,$00,$00,$00,$00,$00)),
    37                 (Extension: 'AGDB';  StructID: 512; Description: 'Gunk Quad Debug Array';  IdentWin:($17,$2E,$07,$00,$00,$00,$00,$00);  IdentMac:($17,$2E,$07,$00,$00,$00,$00,$00)),
    38                 (Extension: 'AGQG';  StructID: 513; Description: 'Gunk Quad General Array';  IdentWin:($D2,$03,$1C,$00,$00,$00,$00,$00);  IdentMac:($D2,$03,$1C,$00,$00,$00,$00,$00)),
    39                 (Extension: 'AGQM';  StructID: 514; Description: 'Gunk Quad Material';  IdentWin:($A6,$4A,$04,$00,$00,$00,$00,$00);  IdentMac:($A6,$4A,$04,$00,$00,$00,$00,$00)),
    40                 (Extension: 'AGQR';  StructID: 515; Description: 'Gunk Quad Render Array';  IdentWin:($3B,$3A,$08,$00,$00,$00,$00,$00);  IdentMac:($3B,$3A,$08,$00,$00,$00,$00,$00)),
    41                 (Extension: 'AKOT';  StructID: 516; Description: 'Oct tree';  IdentWin:($08,$DA,$B8,$E7,$11,$00,$00,$00);  IdentMac:($08,$DA,$B8,$E7,$11,$00,$00,$00)),
    42                 (Extension: 'OTIT';  StructID: 517; Description: 'Oct tree interior node Array';  IdentWin:($D2,$51,$0A,$00,$00,$00,$00,$00);  IdentMac:($D2,$51,$0A,$00,$00,$00,$00,$00)),
    43                 (Extension: 'OTLF';  StructID: 518; Description: 'Oct tree leaf node Array';  IdentWin:($0B,$AC,$1E,$00,$00,$00,$00,$00);  IdentMac:($0B,$AC,$1E,$00,$00,$00,$00,$00)),
    44                 (Extension: 'QTNA';  StructID: 519; Description: 'Quad tree node Array';  IdentWin:($CC,$6E,$06,$00,$00,$00,$00,$00);  IdentMac:($CC,$6E,$06,$00,$00,$00,$00,$00)),
    45                 (Extension: 'BINA';  StructID: 520; Description: 'Binary Data';  IdentWin:($41,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($11,$5E,$01,$00,$00,$00,$00,$00)),
    46                 (Extension: 'ENVP';  StructID: 521; Description: 'Env Particle Array';  IdentWin:($C3,$C1,$67,$00,$00,$00,$00,$00);  IdentMac:($C3,$C1,$67,$00,$00,$00,$00,$00)),
    47                 (Extension: 'FXLR';  StructID: 522; Description: 'FX Laser effect';  IdentWin:($A9,$F8,$83,$95,$06,$00,$00,$00);  IdentMac:($A9,$F8,$83,$95,$06,$00,$00,$00)),
    48                 (Extension: '3CLA';  StructID: 523; Description: 'RGB Color Array';  IdentWin:($BE,$E6,$04,$00,$00,$00,$00,$00);  IdentMac:($BE,$E6,$04,$00,$00,$00,$00,$00)),
    49                 (Extension: 'EDIA';  StructID: 524; Description: 'Edge Index Array';  IdentWin:($F7,$B6,$07,$00,$00,$00,$00,$00);  IdentMac:($F7,$B6,$07,$00,$00,$00,$00,$00)),
    50                 (Extension: 'M3GM';  StructID: 525; Description: 'Geometry';  IdentWin:($36,$E4,$78,$A0,$27,$00,$00,$00);  IdentMac:($36,$E4,$78,$A0,$27,$00,$00,$00)),
    51                 (Extension: 'GMAN';  StructID: 526; Description: 'Geometry Animation';  IdentWin:($A5,$F5,$72,$A6,$09,$00,$00,$00);  IdentMac:($A5,$F5,$72,$A6,$09,$00,$00,$00)),
    52                 (Extension: 'M3GA';  StructID: 527; Description: 'GeometryArray';  IdentWin:($B2,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($B2,$20,$6B,$20,$05,$00,$00,$00)),
    53                 (Extension: 'PLEA';  StructID: 528; Description: 'Plane Equation Array';  IdentWin:($38,$BC,$07,$00,$00,$00,$00,$00);  IdentMac:($38,$BC,$07,$00,$00,$00,$00,$00)),
    54                 (Extension: 'PNTA';  StructID: 529; Description: '3D Point Array';  IdentWin:($6C,$67,$37,$00,$00,$00,$00,$00);  IdentMac:($6C,$67,$37,$00,$00,$00,$00,$00)),
    55                 (Extension: 'QUDA';  StructID: 530; Description: 'Quad array';  IdentWin:($6A,$5E,$03,$00,$00,$00,$00,$00);  IdentMac:($6A,$5E,$03,$00,$00,$00,$00,$00)),
    56                 (Extension: 'TXCA';  StructID: 531; Description: 'Texture Coordinate Array';  IdentWin:($1A,$14,$09,$00,$00,$00,$00,$00);  IdentMac:($1A,$14,$09,$00,$00,$00,$00,$00)),
    57                 (Extension: 'TXMP';  StructID: 532; Description: 'Texture Map';  IdentWin:($81,$75,$18,$91,$08,$00,$00,$00);  IdentMac:($5F,$EB,$1E,$91,$08,$00,$00,$00)),
    58                 (Extension: 'TXAN';  StructID: 533; Description: 'Texture Map Animation';  IdentWin:($87,$43,$13,$8B,$0A,$00,$00,$00);  IdentMac:($87,$43,$13,$8B,$0A,$00,$00,$00)),
    59                 (Extension: 'TXMA';  StructID: 534; Description: 'Texture map array';  IdentWin:($90,$7F,$DE,$99,$05,$00,$00,$00);  IdentMac:($90,$7F,$DE,$99,$05,$00,$00,$00)),
    60                 (Extension: 'TXMB';  StructID: 535; Description: 'Texture Map Big';  IdentWin:($52,$6A,$16,$8B,$0A,$00,$00,$00);  IdentMac:($52,$6A,$16,$8B,$0A,$00,$00,$00)),
    61                 (Extension: 'TXPC';  StructID: 536; Description: 'Texture Procedure Data';  IdentWin:($7E,$A7,$0B,$00,$00,$00,$00,$00);  IdentMac:($7E,$A7,$0B,$00,$00,$00,$00,$00)),
    62                 (Extension: 'M3TA';  StructID: 537; Description: 'Triangle array';  IdentWin:($C1,$F7,$02,$00,$00,$00,$00,$00);  IdentMac:($C1,$F7,$02,$00,$00,$00,$00,$00)),
    63                 (Extension: 'VCRA';  StructID: 538; Description: '3D Vector Array';  IdentWin:($39,$47,$05,$00,$00,$00,$00,$00);  IdentMac:($39,$47,$05,$00,$00,$00,$00,$00)),
    64                 (Extension: 'Impt';  StructID: 539; Description: 'Impact';  IdentWin:($16,$4F,$04,$00,$00,$00,$00,$00);  IdentMac:($16,$4F,$04,$00,$00,$00,$00,$00)),
    65                 (Extension: 'Mtrl';  StructID: 540; Description: 'Material';  IdentWin:($0D,$8E,$02,$00,$00,$00,$00,$00);  IdentMac:($0D,$8E,$02,$00,$00,$00,$00,$00)),
    66                 (Extension: 'NMSA';  StructID: 541; Description: 'Network Spawn Point Array';  IdentWin:($9C,$09,$0C,$00,$00,$00,$00,$00);  IdentMac:($9C,$09,$0C,$00,$00,$00,$00,$00)),
    67                 (Extension: 'CONS';  StructID: 542; Description: 'Console';  IdentWin:($DD,$0B,$8B,$DA,$13,$00,$00,$00);  IdentMac:($DD,$0B,$8B,$DA,$13,$00,$00,$00)),
    68                 (Extension: 'DOOR';  StructID: 543; Description: 'Door';  IdentWin:($67,$FD,$72,$31,$06,$00,$00,$00);  IdentMac:($67,$FD,$72,$31,$06,$00,$00,$00)),
    69                 (Extension: 'OFGA';  StructID: 544; Description: 'Object Furn Geom Array';  IdentWin:($62,$C3,$FA,$74,$13,$00,$00,$00);  IdentMac:($62,$C3,$FA,$74,$13,$00,$00,$00)),
    70                 (Extension: 'OBLS';  StructID: 545; Description: 'Object LS Data';  IdentWin:($3D,$70,$0B,$00,$00,$00,$00,$00);  IdentMac:($3D,$70,$0B,$00,$00,$00,$00,$00)),
    71                 (Extension: 'TRIG';  StructID: 546; Description: 'Trigger';  IdentWin:($2C,$CD,$D0,$DC,$21,$00,$00,$00);  IdentMac:($2C,$CD,$D0,$DC,$21,$00,$00,$00)),
    72                 (Extension: 'TRGE';  StructID: 547; Description: 'Trigger Emitter';  IdentWin:($3C,$B9,$A6,$71,$08,$00,$00,$00);  IdentMac:($3C,$B9,$A6,$71,$08,$00,$00,$00)),
    73                 (Extension: 'TURR';  StructID: 548; Description: 'Turret';  IdentWin:($BE,$05,$58,$C8,$49,$00,$00,$00);  IdentMac:($BE,$05,$58,$C8,$49,$00,$00,$00)),
    74                 (Extension: 'OBAN';  StructID: 549; Description: 'Object animation';  IdentWin:($24,$0C,$4E,$00,$00,$00,$00,$00);  IdentMac:($24,$0C,$4E,$00,$00,$00,$00,$00)),
    75                 (Extension: 'OBDC';  StructID: 550; Description: 'Door class array';  IdentWin:($0B,$CA,$9E,$BD,$07,$00,$00,$00);  IdentMac:($0B,$CA,$9E,$BD,$07,$00,$00,$00)),
    76                 (Extension: 'OBOA';  StructID: 551; Description: 'Starting Object Array';  IdentWin:($E1,$86,$89,$4F,$13,$00,$00,$00);  IdentMac:($E1,$86,$89,$4F,$13,$00,$00,$00)),
    77                 (Extension: 'CBPI';  StructID: 552; Description: 'Character Body Part Impacts';  IdentWin:($C2,$D6,$F9,$0B,$0C,$00,$00,$00);  IdentMac:($C2,$D6,$F9,$0B,$0C,$00,$00,$00)),
    78                 (Extension: 'CBPM';  StructID: 553; Description: 'Character Body Part Material';  IdentWin:($1F,$35,$A4,$6B,$02,$00,$00,$00);  IdentMac:($1F,$35,$A4,$6B,$02,$00,$00,$00)),
    79                 (Extension: 'ONCC';  StructID: 554; Description: 'Oni Character Class';  IdentWin:($EF,$59,$C7,$AA,$A5,$04,$00,$00);  IdentMac:($EF,$59,$C7,$AA,$A5,$04,$00,$00)),
    80                 (Extension: 'ONIA';  StructID: 555; Description: 'Oni Character Impact Array';  IdentWin:($9A,$2F,$2B,$00,$00,$00,$00,$00);  IdentMac:($9A,$2F,$2B,$00,$00,$00,$00,$00)),
    81                 (Extension: 'ONCP';  StructID: 556; Description: 'Oni Character Particle Array';  IdentWin:($21,$73,$2F,$00,$00,$00,$00,$00);  IdentMac:($21,$73,$2F,$00,$00,$00,$00,$00)),
    82                 (Extension: 'ONCV';  StructID: 557; Description: 'Oni Character Variant';  IdentWin:($F5,$99,$02,$00,$00,$00,$00,$00);  IdentMac:($F5,$99,$02,$00,$00,$00,$00,$00)),
    83                 (Extension: 'CRSA';  StructID: 558; Description: 'Corpse Array';  IdentWin:($CC,$D4,$43,$15,$0C,$00,$00,$00);  IdentMac:($CC,$D4,$43,$15,$0C,$00,$00,$00)),
    84                 (Extension: 'DPge';  StructID: 559; Description: 'Diary Page';  IdentWin:($6B,$68,$8A,$BA,$07,$00,$00,$00);  IdentMac:($6B,$68,$8A,$BA,$07,$00,$00,$00)),
    85                 (Extension: 'FILM';  StructID: 560; Description: 'Film';  IdentWin:($AD,$62,$1B,$33,$0B,$00,$00,$00);  IdentMac:($AD,$62,$1B,$33,$0B,$00,$00,$00)),
    86                 (Extension: 'ONFA';  StructID: 561; Description: 'Imported Flag Node Array';  IdentWin:($E7,$0C,$1B,$00,$00,$00,$00,$00);  IdentMac:($E7,$0C,$1B,$00,$00,$00,$00,$00)),
    87                 (Extension: 'ONGS';  StructID: 562; Description: 'Oni Game Settings';  IdentWin:($B6,$EB,$26,$02,$00,$00,$00,$00);  IdentMac:($B6,$EB,$26,$02,$00,$00,$00,$00)),
    88                 (Extension: 'HPge';  StructID: 563; Description: 'Help Page';  IdentWin:($3B,$71,$2F,$4B,$04,$00,$00,$00);  IdentMac:($3B,$71,$2F,$4B,$04,$00,$00,$00)),
    89                 (Extension: 'IGHH';  StructID: 564; Description: 'IGUI HUD Help';  IdentWin:($DE,$58,$8E,$E5,$08,$00,$00,$00);  IdentMac:($DE,$58,$8E,$E5,$08,$00,$00,$00)),
    90                 (Extension: 'IGPG';  StructID: 565; Description: 'IGUI Page';  IdentWin:($7D,$88,$67,$CE,$11,$00,$00,$00);  IdentMac:($7D,$88,$67,$CE,$11,$00,$00,$00)),
    91                 (Extension: 'IGPA';  StructID: 566; Description: 'IGUI Page Array';  IdentWin:($05,$09,$BE,$DD,$04,$00,$00,$00);  IdentMac:($05,$09,$BE,$DD,$04,$00,$00,$00)),
    92                 (Extension: 'IGSt';  StructID: 567; Description: 'IGUI String';  IdentWin:($25,$77,$A4,$A2,$02,$00,$00,$00);  IdentMac:($25,$77,$A4,$A2,$02,$00,$00,$00)),
    93                 (Extension: 'IGSA';  StructID: 568; Description: 'IGUI String Array';  IdentWin:($08,$A4,$BE,$DD,$04,$00,$00,$00);  IdentMac:($08,$A4,$BE,$DD,$04,$00,$00,$00)),
    94                 (Extension: 'IPge';  StructID: 569; Description: 'Item Page';  IdentWin:($BA,$69,$83,$93,$02,$00,$00,$00);  IdentMac:($BA,$69,$83,$93,$02,$00,$00,$00)),
    95                 (Extension: 'KeyI';  StructID: 570; Description: 'Key Icons';  IdentWin:($AD,$57,$47,$3F,$40,$00,$00,$00);  IdentMac:($AD,$57,$47,$3F,$40,$00,$00,$00)),
    96                 (Extension: 'ONLV';  StructID: 571; Description: 'Oni Game Level';  IdentWin:($A3,$2E,$9A,$B7,$7D,$00,$00,$00);  IdentMac:($A3,$2E,$9A,$B7,$7D,$00,$00,$00)),
    97                 (Extension: 'ONLD';  StructID: 572; Description: 'Oni Game Level Descriptor';  IdentWin:($A1,$12,$04,$00,$00,$00,$00,$00);  IdentMac:($A1,$12,$04,$00,$00,$00,$00,$00)),
    98                 (Extension: 'ONMA';  StructID: 573; Description: 'Imported Marker Node Array';  IdentWin:($79,$47,$12,$00,$00,$00,$00,$00);  IdentMac:($79,$47,$12,$00,$00,$00,$00,$00)),
    99                 (Extension: 'ONOA';  StructID: 574; Description: 'Object Gunk Array';  IdentWin:($7C,$5C,$E7,$4B,$06,$00,$00,$00);  IdentMac:($7C,$5C,$E7,$4B,$06,$00,$00,$00)),
    100                 (Extension: 'OPge';  StructID: 575; Description: 'Objective Page';  IdentWin:($FB,$BB,$30,$4B,$04,$00,$00,$00);  IdentMac:($FB,$BB,$30,$4B,$04,$00,$00,$00)),
    101                 (Extension: 'ONSK';  StructID: 576; Description: 'Oni Sky class';  IdentWin:($67,$10,$26,$C2,$14,$00,$00,$00);  IdentMac:($67,$10,$26,$C2,$14,$00,$00,$00)),
    102                 (Extension: 'ONSA';  StructID: 577; Description: 'Imported Spawn Array';  IdentWin:($34,$46,$04,$00,$00,$00,$00,$00);  IdentMac:($34,$46,$04,$00,$00,$00,$00,$00)),
    103                 (Extension: 'TxtC';  StructID: 578; Description: 'Text Console';  IdentWin:($27,$8B,$AC,$B7,$01,$00,$00,$00);  IdentMac:($27,$8B,$AC,$B7,$01,$00,$00,$00)),
    104                 (Extension: 'ONTA';  StructID: 579; Description: 'Trigger Array';  IdentWin:($C0,$FC,$A0,$00,$00,$00,$00,$00);  IdentMac:($C0,$FC,$A0,$00,$00,$00,$00,$00)),
    105                 (Extension: 'ONVL';  StructID: 580; Description: 'Oni Variant List';  IdentWin:($8A,$C5,$34,$44,$05,$00,$00,$00);  IdentMac:($8A,$C5,$34,$44,$05,$00,$00,$00)),
    106                 (Extension: 'WPge';  StructID: 581; Description: 'Weapon Page';  IdentWin:($B5,$89,$58,$6F,$04,$00,$00,$00);  IdentMac:($B5,$89,$58,$6F,$04,$00,$00,$00)),
    107                 (Extension: 'OSBD';  StructID: 582; Description: 'Oni Sound Binary Data';  IdentWin:($6C,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($3C,$5E,$01,$00,$00,$00,$00,$00)),
    108                 (Extension: 'PSpc';  StructID: 583; Description: 'Part Specification';  IdentWin:($48,$26,$08,$00,$00,$00,$00,$00);  IdentMac:($48,$26,$08,$00,$00,$00,$00,$00)),
    109                 (Extension: 'PSpL';  StructID: 584; Description: 'Part Specification List';  IdentWin:($05,$CC,$0C,$00,$00,$00,$00,$00);  IdentMac:($05,$CC,$0C,$00,$00,$00,$00,$00)),
    110                 (Extension: 'PSUI';  StructID: 585; Description: 'Part Specifications UI';  IdentWin:($FB,$96,$4E,$54,$CD,$03,$00,$00);  IdentMac:($FB,$96,$4E,$54,$CD,$03,$00,$00)),
    111                 (Extension: 'SNDD';  StructID: 586; Description: 'Sound Data';  IdentWin:($78,$05,$37,$00,$00,$00,$00,$00);  IdentMac:($EB,$11,$04,$00,$00,$00,$00,$00)),
    112                 (Extension: 'SUBT';  StructID: 587; Description: 'Subtitle Array';  IdentWin:($68,$6C,$04,$00,$00,$00,$00,$00);  IdentMac:($68,$6C,$04,$00,$00,$00,$00,$00)),
    113                 (Extension: 'UUEA';  StructID: 588; Description: 'Error Binding Array';  IdentWin:($BC,$EE,$0A,$00,$00,$00,$00,$00);  IdentMac:($BC,$EE,$0A,$00,$00,$00,$00,$00)),
    114                 (Extension: 'TMFA';  StructID: 589; Description: 'Float Array';  IdentWin:($24,$53,$02,$00,$00,$00,$00,$00);  IdentMac:($24,$53,$02,$00,$00,$00,$00,$00)),
    115                 (Extension: 'IDXA';  StructID: 590; Description: 'Index Array';  IdentWin:($8F,$70,$02,$00,$00,$00,$00,$00);  IdentMac:($8F,$70,$02,$00,$00,$00,$00,$00)),
    116                 (Extension: 'TStr';  StructID: 591; Description: 'String';  IdentWin:($A0,$64,$00,$00,$00,$00,$00,$00);  IdentMac:($A0,$64,$00,$00,$00,$00,$00,$00)),
    117                 (Extension: 'StNA';  StructID: 592; Description: 'String Array';  IdentWin:($20,$B5,$8C,$99,$05,$00,$00,$00);  IdentMac:($20,$B5,$8C,$99,$05,$00,$00,$00)),
    118                 (Extension: 'TMRA';  StructID: 593; Description: 'Template Reference Array';  IdentWin:($21,$35,$07,$00,$00,$00,$00,$00);  IdentMac:($21,$35,$07,$00,$00,$00,$00,$00)),
    119                 (Extension: 'TRAS';  StructID: 594; Description: 'Totoro Aiming Screen';  IdentWin:($30,$A9,$21,$FA,$01,$00,$00,$00);  IdentMac:($30,$A9,$21,$FA,$01,$00,$00,$00)),
    120                 (Extension: 'TRAM';  StructID: 595; Description: 'Totoro Animation Sequence';  IdentWin:($18,$C9,$3C,$7E,$10,$00,$00,$00);  IdentMac:($18,$C9,$3C,$7E,$10,$00,$00,$00)),
    121                 (Extension: 'TRAC';  StructID: 596; Description: 'Animation Collection';  IdentWin:($2F,$FB,$E9,$26,$0F,$00,$00,$00);  IdentMac:($2F,$FB,$E9,$26,$0F,$00,$00,$00)),
    122                 (Extension: 'TRCM';  StructID: 597; Description: 'Totoro Quaternion Body';  IdentWin:($4E,$05,$DE,$92,$23,$00,$00,$00);  IdentMac:($4E,$05,$DE,$92,$23,$00,$00,$00)),
    123                 (Extension: 'TRBS';  StructID: 598; Description: 'Totoro Body Set';  IdentWin:($39,$42,$92,$A2,$02,$00,$00,$00);  IdentMac:($39,$42,$92,$A2,$02,$00,$00,$00)),
    124                 (Extension: 'TRMA';  StructID: 599; Description: 'Texture Map Array';  IdentWin:($57,$6D,$DE,$99,$05,$00,$00,$00);  IdentMac:($57,$6D,$DE,$99,$05,$00,$00,$00)),
    125                 (Extension: 'TRFT';  StructID: 600; Description: 'Totoro Facing Table';  IdentWin:($AF,$21,$02,$00,$00,$00,$00,$00);  IdentMac:($AF,$21,$02,$00,$00,$00,$00,$00)),
    126                 (Extension: 'TRGA';  StructID: 601; Description: 'Totoro Quaternion Body Geometry Array';  IdentWin:($F8,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($F8,$20,$6B,$20,$05,$00,$00,$00)),
    127                 (Extension: 'TRIA';  StructID: 602; Description: 'Totoro Quaternion Body Index Array';  IdentWin:($82,$C4,$0A,$00,$00,$00,$00,$00);  IdentMac:($82,$C4,$0A,$00,$00,$00,$00,$00)),
    128                 (Extension: 'TRSC';  StructID: 603; Description: 'Screen (aiming) Collection';  IdentWin:($17,$6B,$78,$99,$05,$00,$00,$00);  IdentMac:($17,$6B,$78,$99,$05,$00,$00,$00)),
    129                 (Extension: 'TRTA';  StructID: 604; Description: 'Totoro Quaternion Body Translation Array';  IdentWin:($E8,$59,$07,$00,$00,$00,$00,$00);  IdentMac:($E8,$59,$07,$00,$00,$00,$00,$00)),
    130                 (Extension: 'TSFT';  StructID: 605; Description: 'Font';  IdentWin:($EA,$DE,$91,$BA,$16,$00,$00,$00);  IdentMac:($EA,$DE,$91,$BA,$16,$00,$00,$00)),
    131                 (Extension: 'TSFF';  StructID: 606; Description: 'Font Family';  IdentWin:($8A,$48,$6C,$8A,$0A,$00,$00,$00);  IdentMac:($8A,$48,$6C,$8A,$0A,$00,$00,$00)),
    132                 (Extension: 'TSFL';  StructID: 607; Description: 'Font Language';  IdentWin:($29,$DE,$08,$00,$00,$00,$00,$00);  IdentMac:($29,$DE,$08,$00,$00,$00,$00,$00)),
    133                 (Extension: 'TSGA';  StructID: 608; Description: 'Glyph Array';  IdentWin:($98,$4E,$2A,$00,$00,$00,$00,$00);  IdentMac:($98,$4E,$2A,$00,$00,$00,$00,$00)),
    134                 (Extension: 'UVDL';  StructID: 609; Description: 'UV Data List';  IdentWin:($E5,$16,$0A,$00,$00,$00,$00,$00);  IdentMac:($E5,$16,$0A,$00,$00,$00,$00,$00)),
    135                 (Extension: 'WMCL';  StructID: 610; Description: 'WM Cursor List';  IdentWin:($76,$D0,$09,$00,$00,$00,$00,$00);  IdentMac:($76,$D0,$09,$00,$00,$00,$00,$00)),
    136                 (Extension: 'WMDD';  StructID: 611; Description: 'WM Dialog Data';  IdentWin:($C4,$F3,$1D,$00,$1C,$00,$00,$00);  IdentMac:($C4,$F3,$1D,$00,$1C,$00,$00,$00)),
    137                 (Extension: 'WMMB';  StructID: 612; Description: 'WM Menu Bar';  IdentWin:($37,$67,$0C,$D2,$06,$00,$00,$00);  IdentMac:($37,$67,$0C,$D2,$06,$00,$00,$00)),
    138                 (Extension: 'WMM_';  StructID: 613; Description: 'WM Menu';  IdentWin:($38,$1A,$0C,$00,$00,$00,$00,$00);  IdentMac:($38,$1A,$0C,$00,$00,$00,$00,$00)),
    139                 (Extension: 'ONWC';  StructID: 614; Description: 'Oni Weapon Class';  IdentWin:($B5,$EE,$E0,$A3,$93,$01,$00,$00);  IdentMac:($B5,$EE,$E0,$A3,$93,$01,$00,$00))
     23                (Extension: 'AISA';  StructID: 501; Name: 'AI Character Setup Array';  IdentWin:($E9,$6B,$4C,$22,$2A,$00,$00,$00);  IdentMac:($E9,$6B,$4C,$22,$2A,$00,$00,$00)),
     24                (Extension: 'AITR';  StructID: 502; Name: 'AI script trigger array';  IdentWin:($55,$EA,$1A,$00,$00,$00,$00,$00);  IdentMac:($55,$EA,$1A,$00,$00,$00,$00,$00)),
     25                (Extension: 'AIWA';  StructID: 503; Name: 'AI Imported Waypoint Array';  IdentWin:($03,$7F,$10,$00,$00,$00,$00,$00);  IdentMac:($03,$7F,$10,$00,$00,$00,$00,$00)),
     26                (Extension: 'AKAA';  StructID: 504; Name: 'Adjacency Array';  IdentWin:($77,$DE,$11,$00,$00,$00,$00,$00);  IdentMac:($77,$DE,$11,$00,$00,$00,$00,$00)),
     27                (Extension: 'ABNA';  StructID: 505; Name: 'BSP tree node Array';  IdentWin:($A0,$6D,$12,$00,$00,$00,$00,$00);  IdentMac:($A0,$6D,$12,$00,$00,$00,$00,$00)),
     28                (Extension: 'AKVA';  StructID: 506; Name: 'BNV Node Array';  IdentWin:($E0,$05,$DF,$00,$00,$00,$00,$00);  IdentMac:($E0,$05,$DF,$00,$00,$00,$00,$00)),
     29                (Extension: 'AKBA';  StructID: 507; Name: 'Side Array';  IdentWin:($84,$28,$3A,$00,$00,$00,$00,$00);  IdentMac:($84,$28,$3A,$00,$00,$00,$00,$00)),
     30                (Extension: 'AKBP';  StructID: 508; Name: 'BSP node Array';  IdentWin:($49,$F4,$0C,$00,$00,$00,$00,$00);  IdentMac:($49,$F4,$0C,$00,$00,$00,$00,$00)),
     31                (Extension: 'AKDA';  StructID: 509; Name: 'Door Frame Array';  IdentWin:($64,$54,$2E,$00,$00,$00,$00,$00);  IdentMac:($64,$54,$2E,$00,$00,$00,$00,$00)),
     32                (Extension: 'AKEV';  StructID: 510; Name: 'Akira Environment';  IdentWin:($75,$DE,$14,$30,$88,$00,$00,$00);  IdentMac:($75,$DE,$14,$30,$88,$00,$00,$00)),
     33                (Extension: 'AGQC';  StructID: 511; Name: 'Gunk Quad Collision Array';  IdentWin:($91,$CB,$1C,$00,$00,$00,$00,$00);  IdentMac:($91,$CB,$1C,$00,$00,$00,$00,$00)),
     34                (Extension: 'AGDB';  StructID: 512; Name: 'Gunk Quad Debug Array';  IdentWin:($17,$2E,$07,$00,$00,$00,$00,$00);  IdentMac:($17,$2E,$07,$00,$00,$00,$00,$00)),
     35                (Extension: 'AGQG';  StructID: 513; Name: 'Gunk Quad General Array';  IdentWin:($D2,$03,$1C,$00,$00,$00,$00,$00);  IdentMac:($D2,$03,$1C,$00,$00,$00,$00,$00)),
     36                (Extension: 'AGQM';  StructID: 514; Name: 'Gunk Quad Material';  IdentWin:($A6,$4A,$04,$00,$00,$00,$00,$00);  IdentMac:($A6,$4A,$04,$00,$00,$00,$00,$00)),
     37                (Extension: 'AGQR';  StructID: 515; Name: 'Gunk Quad Render Array';  IdentWin:($3B,$3A,$08,$00,$00,$00,$00,$00);  IdentMac:($3B,$3A,$08,$00,$00,$00,$00,$00)),
     38                (Extension: 'AKOT';  StructID: 516; Name: 'Oct tree';  IdentWin:($08,$DA,$B8,$E7,$11,$00,$00,$00);  IdentMac:($08,$DA,$B8,$E7,$11,$00,$00,$00)),
     39                (Extension: 'OTIT';  StructID: 517; Name: 'Oct tree interior node Array';  IdentWin:($D2,$51,$0A,$00,$00,$00,$00,$00);  IdentMac:($D2,$51,$0A,$00,$00,$00,$00,$00)),
     40                (Extension: 'OTLF';  StructID: 518; Name: 'Oct tree leaf node Array';  IdentWin:($0B,$AC,$1E,$00,$00,$00,$00,$00);  IdentMac:($0B,$AC,$1E,$00,$00,$00,$00,$00)),
     41                (Extension: 'QTNA';  StructID: 519; Name: 'Quad tree node Array';  IdentWin:($CC,$6E,$06,$00,$00,$00,$00,$00);  IdentMac:($CC,$6E,$06,$00,$00,$00,$00,$00)),
     42                (Extension: 'BINA';  StructID: 520; Name: 'Binary Data';  IdentWin:($41,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($11,$5E,$01,$00,$00,$00,$00,$00)),
     43                (Extension: 'ENVP';  StructID: 521; Name: 'Env Particle Array';  IdentWin:($C3,$C1,$67,$00,$00,$00,$00,$00);  IdentMac:($C3,$C1,$67,$00,$00,$00,$00,$00)),
     44                (Extension: 'FXLR';  StructID: 522; Name: 'FX Laser effect';  IdentWin:($A9,$F8,$83,$95,$06,$00,$00,$00);  IdentMac:($A9,$F8,$83,$95,$06,$00,$00,$00)),
     45                (Extension: '3CLA';  StructID: 523; Name: 'RGB Color Array';  IdentWin:($BE,$E6,$04,$00,$00,$00,$00,$00);  IdentMac:($BE,$E6,$04,$00,$00,$00,$00,$00)),
     46                (Extension: 'EDIA';  StructID: 524; Name: 'Edge Index Array';  IdentWin:($F7,$B6,$07,$00,$00,$00,$00,$00);  IdentMac:($F7,$B6,$07,$00,$00,$00,$00,$00)),
     47                (Extension: 'M3GM';  StructID: 525; Name: 'Geometry';  IdentWin:($36,$E4,$78,$A0,$27,$00,$00,$00);  IdentMac:($36,$E4,$78,$A0,$27,$00,$00,$00)),
     48                (Extension: 'GMAN';  StructID: 526; Name: 'Geometry Animation';  IdentWin:($A5,$F5,$72,$A6,$09,$00,$00,$00);  IdentMac:($A5,$F5,$72,$A6,$09,$00,$00,$00)),
     49                (Extension: 'M3GA';  StructID: 527; Name: 'GeometryArray';  IdentWin:($B2,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($B2,$20,$6B,$20,$05,$00,$00,$00)),
     50                (Extension: 'PLEA';  StructID: 528; Name: 'Plane Equation Array';  IdentWin:($38,$BC,$07,$00,$00,$00,$00,$00);  IdentMac:($38,$BC,$07,$00,$00,$00,$00,$00)),
     51                (Extension: 'PNTA';  StructID: 529; Name: '3D Point Array';  IdentWin:($6C,$67,$37,$00,$00,$00,$00,$00);  IdentMac:($6C,$67,$37,$00,$00,$00,$00,$00)),
     52                (Extension: 'QUDA';  StructID: 530; Name: 'Quad array';  IdentWin:($6A,$5E,$03,$00,$00,$00,$00,$00);  IdentMac:($6A,$5E,$03,$00,$00,$00,$00,$00)),
     53                (Extension: 'TXCA';  StructID: 531; Name: 'Texture Coordinate Array';  IdentWin:($1A,$14,$09,$00,$00,$00,$00,$00);  IdentMac:($1A,$14,$09,$00,$00,$00,$00,$00)),
     54                (Extension: 'TXMP';  StructID: 532; Name: 'Texture Map';  IdentWin:($81,$75,$18,$91,$08,$00,$00,$00);  IdentMac:($5F,$EB,$1E,$91,$08,$00,$00,$00)),
     55                (Extension: 'TXAN';  StructID: 533; Name: 'Texture Map Animation';  IdentWin:($87,$43,$13,$8B,$0A,$00,$00,$00);  IdentMac:($87,$43,$13,$8B,$0A,$00,$00,$00)),
     56                (Extension: 'TXMA';  StructID: 534; Name: 'Texture map array';  IdentWin:($90,$7F,$DE,$99,$05,$00,$00,$00);  IdentMac:($90,$7F,$DE,$99,$05,$00,$00,$00)),
     57                (Extension: 'TXMB';  StructID: 535; Name: 'Texture Map Big';  IdentWin:($52,$6A,$16,$8B,$0A,$00,$00,$00);  IdentMac:($52,$6A,$16,$8B,$0A,$00,$00,$00)),
     58                (Extension: 'TXPC';  StructID: 536; Name: 'Texture Procedure Data';  IdentWin:($7E,$A7,$0B,$00,$00,$00,$00,$00);  IdentMac:($7E,$A7,$0B,$00,$00,$00,$00,$00)),
     59                (Extension: 'M3TA';  StructID: 537; Name: 'Triangle array';  IdentWin:($C1,$F7,$02,$00,$00,$00,$00,$00);  IdentMac:($C1,$F7,$02,$00,$00,$00,$00,$00)),
     60                (Extension: 'VCRA';  StructID: 538; Name: '3D Vector Array';  IdentWin:($39,$47,$05,$00,$00,$00,$00,$00);  IdentMac:($39,$47,$05,$00,$00,$00,$00,$00)),
     61                (Extension: 'Impt';  StructID: 539; Name: 'Impact';  IdentWin:($16,$4F,$04,$00,$00,$00,$00,$00);  IdentMac:($16,$4F,$04,$00,$00,$00,$00,$00)),
     62                (Extension: 'Mtrl';  StructID: 540; Name: 'Material';  IdentWin:($0D,$8E,$02,$00,$00,$00,$00,$00);  IdentMac:($0D,$8E,$02,$00,$00,$00,$00,$00)),
     63                (Extension: 'NMSA';  StructID: 541; Name: 'Network Spawn Point Array';  IdentWin:($9C,$09,$0C,$00,$00,$00,$00,$00);  IdentMac:($9C,$09,$0C,$00,$00,$00,$00,$00)),
     64                (Extension: 'CONS';  StructID: 542; Name: 'Console';  IdentWin:($DD,$0B,$8B,$DA,$13,$00,$00,$00);  IdentMac:($DD,$0B,$8B,$DA,$13,$00,$00,$00)),
     65                (Extension: 'DOOR';  StructID: 543; Name: 'Door';  IdentWin:($67,$FD,$72,$31,$06,$00,$00,$00);  IdentMac:($67,$FD,$72,$31,$06,$00,$00,$00)),
     66                (Extension: 'OFGA';  StructID: 544; Name: 'Object Furn Geom Array';  IdentWin:($62,$C3,$FA,$74,$13,$00,$00,$00);  IdentMac:($62,$C3,$FA,$74,$13,$00,$00,$00)),
     67                (Extension: 'OBLS';  StructID: 545; Name: 'Object LS Data';  IdentWin:($3D,$70,$0B,$00,$00,$00,$00,$00);  IdentMac:($3D,$70,$0B,$00,$00,$00,$00,$00)),
     68                (Extension: 'TRIG';  StructID: 546; Name: 'Trigger';  IdentWin:($2C,$CD,$D0,$DC,$21,$00,$00,$00);  IdentMac:($2C,$CD,$D0,$DC,$21,$00,$00,$00)),
     69                (Extension: 'TRGE';  StructID: 547; Name: 'Trigger Emitter';  IdentWin:($3C,$B9,$A6,$71,$08,$00,$00,$00);  IdentMac:($3C,$B9,$A6,$71,$08,$00,$00,$00)),
     70                (Extension: 'TURR';  StructID: 548; Name: 'Turret';  IdentWin:($BE,$05,$58,$C8,$49,$00,$00,$00);  IdentMac:($BE,$05,$58,$C8,$49,$00,$00,$00)),
     71                (Extension: 'OBAN';  StructID: 549; Name: 'Object animation';  IdentWin:($24,$0C,$4E,$00,$00,$00,$00,$00);  IdentMac:($24,$0C,$4E,$00,$00,$00,$00,$00)),
     72                (Extension: 'OBDC';  StructID: 550; Name: 'Door class array';  IdentWin:($0B,$CA,$9E,$BD,$07,$00,$00,$00);  IdentMac:($0B,$CA,$9E,$BD,$07,$00,$00,$00)),
     73                (Extension: 'OBOA';  StructID: 551; Name: 'Starting Object Array';  IdentWin:($E1,$86,$89,$4F,$13,$00,$00,$00);  IdentMac:($E1,$86,$89,$4F,$13,$00,$00,$00)),
     74                (Extension: 'CBPI';  StructID: 552; Name: 'Character Body Part Impacts';  IdentWin:($C2,$D6,$F9,$0B,$0C,$00,$00,$00);  IdentMac:($C2,$D6,$F9,$0B,$0C,$00,$00,$00)),
     75                (Extension: 'CBPM';  StructID: 553; Name: 'Character Body Part Material';  IdentWin:($1F,$35,$A4,$6B,$02,$00,$00,$00);  IdentMac:($1F,$35,$A4,$6B,$02,$00,$00,$00)),
     76                (Extension: 'ONCC';  StructID: 554; Name: 'Oni Character Class';  IdentWin:($EF,$59,$C7,$AA,$A5,$04,$00,$00);  IdentMac:($EF,$59,$C7,$AA,$A5,$04,$00,$00)),
     77                (Extension: 'ONIA';  StructID: 555; Name: 'Oni Character Impact Array';  IdentWin:($9A,$2F,$2B,$00,$00,$00,$00,$00);  IdentMac:($9A,$2F,$2B,$00,$00,$00,$00,$00)),
     78                (Extension: 'ONCP';  StructID: 556; Name: 'Oni Character Particle Array';  IdentWin:($21,$73,$2F,$00,$00,$00,$00,$00);  IdentMac:($21,$73,$2F,$00,$00,$00,$00,$00)),
     79                (Extension: 'ONCV';  StructID: 557; Name: 'Oni Character Variant';  IdentWin:($F5,$99,$02,$00,$00,$00,$00,$00);  IdentMac:($F5,$99,$02,$00,$00,$00,$00,$00)),
     80                (Extension: 'CRSA';  StructID: 558; Name: 'Corpse Array';  IdentWin:($CC,$D4,$43,$15,$0C,$00,$00,$00);  IdentMac:($CC,$D4,$43,$15,$0C,$00,$00,$00)),
     81                (Extension: 'DPge';  StructID: 559; Name: 'Diary Page';  IdentWin:($6B,$68,$8A,$BA,$07,$00,$00,$00);  IdentMac:($6B,$68,$8A,$BA,$07,$00,$00,$00)),
     82                (Extension: 'FILM';  StructID: 560; Name: 'Film';  IdentWin:($AD,$62,$1B,$33,$0B,$00,$00,$00);  IdentMac:($AD,$62,$1B,$33,$0B,$00,$00,$00)),
     83                (Extension: 'ONFA';  StructID: 561; Name: 'Imported Flag Node Array';  IdentWin:($E7,$0C,$1B,$00,$00,$00,$00,$00);  IdentMac:($E7,$0C,$1B,$00,$00,$00,$00,$00)),
     84                (Extension: 'ONGS';  StructID: 562; Name: 'Oni Game Settings';  IdentWin:($B6,$EB,$26,$02,$00,$00,$00,$00);  IdentMac:($B6,$EB,$26,$02,$00,$00,$00,$00)),
     85                (Extension: 'HPge';  StructID: 563; Name: 'Help Page';  IdentWin:($3B,$71,$2F,$4B,$04,$00,$00,$00);  IdentMac:($3B,$71,$2F,$4B,$04,$00,$00,$00)),
     86                (Extension: 'IGHH';  StructID: 564; Name: 'IGUI HUD Help';  IdentWin:($DE,$58,$8E,$E5,$08,$00,$00,$00);  IdentMac:($DE,$58,$8E,$E5,$08,$00,$00,$00)),
     87                (Extension: 'IGPG';  StructID: 565; Name: 'IGUI Page';  IdentWin:($7D,$88,$67,$CE,$11,$00,$00,$00);  IdentMac:($7D,$88,$67,$CE,$11,$00,$00,$00)),
     88                (Extension: 'IGPA';  StructID: 566; Name: 'IGUI Page Array';  IdentWin:($05,$09,$BE,$DD,$04,$00,$00,$00);  IdentMac:($05,$09,$BE,$DD,$04,$00,$00,$00)),
     89                (Extension: 'IGSt';  StructID: 567; Name: 'IGUI String';  IdentWin:($25,$77,$A4,$A2,$02,$00,$00,$00);  IdentMac:($25,$77,$A4,$A2,$02,$00,$00,$00)),
     90                (Extension: 'IGSA';  StructID: 568; Name: 'IGUI String Array';  IdentWin:($08,$A4,$BE,$DD,$04,$00,$00,$00);  IdentMac:($08,$A4,$BE,$DD,$04,$00,$00,$00)),
     91                (Extension: 'IPge';  StructID: 569; Name: 'Item Page';  IdentWin:($BA,$69,$83,$93,$02,$00,$00,$00);  IdentMac:($BA,$69,$83,$93,$02,$00,$00,$00)),
     92                (Extension: 'KeyI';  StructID: 570; Name: 'Key Icons';  IdentWin:($AD,$57,$47,$3F,$40,$00,$00,$00);  IdentMac:($AD,$57,$47,$3F,$40,$00,$00,$00)),
     93                (Extension: 'ONLV';  StructID: 571; Name: 'Oni Game Level';  IdentWin:($A3,$2E,$9A,$B7,$7D,$00,$00,$00);  IdentMac:($A3,$2E,$9A,$B7,$7D,$00,$00,$00)),
     94                (Extension: 'ONLD';  StructID: 572; Name: 'Oni Game Level Descriptor';  IdentWin:($A1,$12,$04,$00,$00,$00,$00,$00);  IdentMac:($A1,$12,$04,$00,$00,$00,$00,$00)),
     95                (Extension: 'ONMA';  StructID: 573; Name: 'Imported Marker Node Array';  IdentWin:($79,$47,$12,$00,$00,$00,$00,$00);  IdentMac:($79,$47,$12,$00,$00,$00,$00,$00)),
     96                (Extension: 'ONOA';  StructID: 574; Name: 'Object Gunk Array';  IdentWin:($7C,$5C,$E7,$4B,$06,$00,$00,$00);  IdentMac:($7C,$5C,$E7,$4B,$06,$00,$00,$00)),
     97                (Extension: 'OPge';  StructID: 575; Name: 'Objective Page';  IdentWin:($FB,$BB,$30,$4B,$04,$00,$00,$00);  IdentMac:($FB,$BB,$30,$4B,$04,$00,$00,$00)),
     98                (Extension: 'ONSK';  StructID: 576; Name: 'Oni Sky class';  IdentWin:($67,$10,$26,$C2,$14,$00,$00,$00);  IdentMac:($67,$10,$26,$C2,$14,$00,$00,$00)),
     99                (Extension: 'ONSA';  StructID: 577; Name: 'Imported Spawn Array';  IdentWin:($34,$46,$04,$00,$00,$00,$00,$00);  IdentMac:($34,$46,$04,$00,$00,$00,$00,$00)),
     100                (Extension: 'TxtC';  StructID: 578; Name: 'Text Console';  IdentWin:($27,$8B,$AC,$B7,$01,$00,$00,$00);  IdentMac:($27,$8B,$AC,$B7,$01,$00,$00,$00)),
     101                (Extension: 'ONTA';  StructID: 579; Name: 'Trigger Array';  IdentWin:($C0,$FC,$A0,$00,$00,$00,$00,$00);  IdentMac:($C0,$FC,$A0,$00,$00,$00,$00,$00)),
     102                (Extension: 'ONVL';  StructID: 580; Name: 'Oni Variant List';  IdentWin:($8A,$C5,$34,$44,$05,$00,$00,$00);  IdentMac:($8A,$C5,$34,$44,$05,$00,$00,$00)),
     103                (Extension: 'WPge';  StructID: 581; Name: 'Weapon Page';  IdentWin:($B5,$89,$58,$6F,$04,$00,$00,$00);  IdentMac:($B5,$89,$58,$6F,$04,$00,$00,$00)),
     104                (Extension: 'OSBD';  StructID: 582; Name: 'Oni Sound Binary Data';  IdentWin:($6C,$DB,$00,$00,$00,$00,$00,$00);  IdentMac:($3C,$5E,$01,$00,$00,$00,$00,$00)),
     105                (Extension: 'PSpc';  StructID: 583; Name: 'Part Specification';  IdentWin:($48,$26,$08,$00,$00,$00,$00,$00);  IdentMac:($48,$26,$08,$00,$00,$00,$00,$00)),
     106                (Extension: 'PSpL';  StructID: 584; Name: 'Part Specification List';  IdentWin:($05,$CC,$0C,$00,$00,$00,$00,$00);  IdentMac:($05,$CC,$0C,$00,$00,$00,$00,$00)),
     107                (Extension: 'PSUI';  StructID: 585; Name: 'Part Specifications UI';  IdentWin:($FB,$96,$4E,$54,$CD,$03,$00,$00);  IdentMac:($FB,$96,$4E,$54,$CD,$03,$00,$00)),
     108                (Extension: 'SNDD';  StructID: 586; Name: 'Sound Data';  IdentWin:($78,$05,$37,$00,$00,$00,$00,$00);  IdentMac:($EB,$11,$04,$00,$00,$00,$00,$00)),
     109                (Extension: 'SUBT';  StructID: 587; Name: 'Subtitle Array';  IdentWin:($68,$6C,$04,$00,$00,$00,$00,$00);  IdentMac:($68,$6C,$04,$00,$00,$00,$00,$00)),
     110                (Extension: 'UUEA';  StructID: 588; Name: 'Error Binding Array';  IdentWin:($BC,$EE,$0A,$00,$00,$00,$00,$00);  IdentMac:($BC,$EE,$0A,$00,$00,$00,$00,$00)),
     111                (Extension: 'TMFA';  StructID: 589; Name: 'Float Array';  IdentWin:($24,$53,$02,$00,$00,$00,$00,$00);  IdentMac:($24,$53,$02,$00,$00,$00,$00,$00)),
     112                (Extension: 'IDXA';  StructID: 590; Name: 'Index Array';  IdentWin:($8F,$70,$02,$00,$00,$00,$00,$00);  IdentMac:($8F,$70,$02,$00,$00,$00,$00,$00)),
     113                (Extension: 'TStr';  StructID: 591; Name: 'String';  IdentWin:($A0,$64,$00,$00,$00,$00,$00,$00);  IdentMac:($A0,$64,$00,$00,$00,$00,$00,$00)),
     114                (Extension: 'StNA';  StructID: 592; Name: 'String Array';  IdentWin:($20,$B5,$8C,$99,$05,$00,$00,$00);  IdentMac:($20,$B5,$8C,$99,$05,$00,$00,$00)),
     115                (Extension: 'TMRA';  StructID: 593; Name: 'Template Reference Array';  IdentWin:($21,$35,$07,$00,$00,$00,$00,$00);  IdentMac:($21,$35,$07,$00,$00,$00,$00,$00)),
     116                (Extension: 'TRAS';  StructID: 594; Name: 'Totoro Aiming Screen';  IdentWin:($30,$A9,$21,$FA,$01,$00,$00,$00);  IdentMac:($30,$A9,$21,$FA,$01,$00,$00,$00)),
     117                (Extension: 'TRAM';  StructID: 595; Name: 'Totoro Animation Sequence';  IdentWin:($18,$C9,$3C,$7E,$10,$00,$00,$00);  IdentMac:($18,$C9,$3C,$7E,$10,$00,$00,$00)),
     118                (Extension: 'TRAC';  StructID: 596; Name: 'Animation Collection';  IdentWin:($2F,$FB,$E9,$26,$0F,$00,$00,$00);  IdentMac:($2F,$FB,$E9,$26,$0F,$00,$00,$00)),
     119                (Extension: 'TRCM';  StructID: 597; Name: 'Totoro Quaternion Body';  IdentWin:($4E,$05,$DE,$92,$23,$00,$00,$00);  IdentMac:($4E,$05,$DE,$92,$23,$00,$00,$00)),
     120                (Extension: 'TRBS';  StructID: 598; Name: 'Totoro Body Set';  IdentWin:($39,$42,$92,$A2,$02,$00,$00,$00);  IdentMac:($39,$42,$92,$A2,$02,$00,$00,$00)),
     121                (Extension: 'TRMA';  StructID: 599; Name: 'Texture Map Array';  IdentWin:($57,$6D,$DE,$99,$05,$00,$00,$00);  IdentMac:($57,$6D,$DE,$99,$05,$00,$00,$00)),
     122                (Extension: 'TRFT';  StructID: 600; Name: 'Totoro Facing Table';  IdentWin:($AF,$21,$02,$00,$00,$00,$00,$00);  IdentMac:($AF,$21,$02,$00,$00,$00,$00,$00)),
     123                (Extension: 'TRGA';  StructID: 601; Name: 'Totoro Quaternion Body Geometry Array';  IdentWin:($F8,$20,$6B,$20,$05,$00,$00,$00);  IdentMac:($F8,$20,$6B,$20,$05,$00,$00,$00)),
     124                (Extension: 'TRIA';  StructID: 602; Name: 'Totoro Quaternion Body Index Array';  IdentWin:($82,$C4,$0A,$00,$00,$00,$00,$00);  IdentMac:($82,$C4,$0A,$00,$00,$00,$00,$00)),
     125                (Extension: 'TRSC';  StructID: 603; Name: 'Screen (aiming) Collection';  IdentWin:($17,$6B,$78,$99,$05,$00,$00,$00);  IdentMac:($17,$6B,$78,$99,$05,$00,$00,$00)),
     126                (Extension: 'TRTA';  StructID: 604; Name: 'Totoro Quaternion Body Translation Array';  IdentWin:($E8,$59,$07,$00,$00,$00,$00,$00);  IdentMac:($E8,$59,$07,$00,$00,$00,$00,$00)),
     127                (Extension: 'TSFT';  StructID: 605; Name: 'Font';  IdentWin:($EA,$DE,$91,$BA,$16,$00,$00,$00);  IdentMac:($EA,$DE,$91,$BA,$16,$00,$00,$00)),
     128                (Extension: 'TSFF';  StructID: 606; Name: 'Font Family';  IdentWin:($8A,$48,$6C,$8A,$0A,$00,$00,$00);  IdentMac:($8A,$48,$6C,$8A,$0A,$00,$00,$00)),
     129                (Extension: 'TSFL';  StructID: 607; Name: 'Font Language';  IdentWin:($29,$DE,$08,$00,$00,$00,$00,$00);  IdentMac:($29,$DE,$08,$00,$00,$00,$00,$00)),
     130                (Extension: 'TSGA';  StructID: 608; Name: 'Glyph Array';  IdentWin:($98,$4E,$2A,$00,$00,$00,$00,$00);  IdentMac:($98,$4E,$2A,$00,$00,$00,$00,$00)),
     131                (Extension: 'UVDL';  StructID: 609; Name: 'UV Data List';  IdentWin:($E5,$16,$0A,$00,$00,$00,$00,$00);  IdentMac:($E5,$16,$0A,$00,$00,$00,$00,$00)),
     132                (Extension: 'WMCL';  StructID: 610; Name: 'WM Cursor List';  IdentWin:($76,$D0,$09,$00,$00,$00,$00,$00);  IdentMac:($76,$D0,$09,$00,$00,$00,$00,$00)),
     133                (Extension: 'WMDD';  StructID: 611; Name: 'WM Dialog Data';  IdentWin:($C4,$F3,$1D,$00,$1C,$00,$00,$00);  IdentMac:($C4,$F3,$1D,$00,$1C,$00,$00,$00)),
     134                (Extension: 'WMMB';  StructID: 612; Name: 'WM Menu Bar';  IdentWin:($37,$67,$0C,$D2,$06,$00,$00,$00);  IdentMac:($37,$67,$0C,$D2,$06,$00,$00,$00)),
     135                (Extension: 'WMM_';  StructID: 613; Name: 'WM Menu';  IdentWin:($38,$1A,$0C,$00,$00,$00,$00,$00);  IdentMac:($38,$1A,$0C,$00,$00,$00,$00,$00)),
     136                (Extension: 'ONWC';  StructID: 614; Name: 'Oni Weapon Class';  IdentWin:($B5,$EE,$E0,$A3,$93,$01,$00,$00);  IdentMac:($B5,$EE,$E0,$A3,$93,$01,$00,$00))
    140137        );
    141138
  • oup/current/Global/Exporters.pas

    r111 r113  
    7474    for i := 0 to High(ExportHandlers) do
    7575      if ExportHandlers[i].Ext = fileinfo.Extension then
    76         ExportHandlers[i].Handler(ConnectionID, FileID, filename);
     76        Result := ExportHandlers[i].Handler(ConnectionID, FileID, filename);
    7777end;
    7878
  • oup/current/Global/Functions.pas

    r111 r113  
    66
    77function BoolToStr(bool: Boolean): String;
    8 function HexToLong(hex: String): LongWord;
    98function Decode_Int(buffer: TByteData): LongWord;
    109function Encode_Int(input: LongWord): TByteData;
     
    1413function DataToBin(Data: TByteData): String;
    1514function BinToInt(bin: String): Byte;
     15function MakeDatLink(FileID: Integer): Integer;
    1616
    1717function StringSmaller(string1, string2: String): Boolean;
     
    4646  else
    4747    Result := 'false';
    48 end;
    49 
    50 
    51 function HexToLong(hex: String): LongWord;
    52 
    53   function NormalizeHexString(var hex: String): Boolean;
    54   var
    55     i: Byte;
    56   begin
    57     Result := True;
    58     if hex[1] = '$' then
    59     begin
    60       for i := 1 to Length(hex) - 1 do
    61         hex[i] := hex[i + 1];
    62       SetLength(hex, Length(hex) - 1);
    63     end;
    64     if (hex[1] = '0') and (UpCase(hex[2]) = 'X') then
    65     begin
    66       for i := 1 to Length(hex) - 2 do
    67         hex[i] := hex[i + 2];
    68       SetLength(hex, Length(hex) - 2);
    69     end;
    70     if Length(hex) = 0 then
    71       Result := False;
    72   end;
    73 
    74 begin
    75   if NormalizeHexString(hex) then
    76     Result := StrToInt(hex)
    77   else
    78     Result := 0;
    7948end;
    8049
     
    167136    Add := Add shl 1;
    168137  end;
     138end;
     139
     140
     141function MakeDatLink(FileID: Integer): Integer;
     142begin
     143  Result := FileID * 256 + 1;
    169144end;
    170145
  • oup/current/Global/OniImgClass.pas

    r105 r113  
    141141    SetLength(tempd, Self.FWidth * Self.FHeight * 4);
    142142    case Self.FStoreType of
    143       0:
     143      0: // 16bit, RGB444, A4?
    144144      begin
    145145        for y := 0 to Self.FHeight - 1 do
     
    160160        end;
    161161      end;
    162       1, 2:
     162      1, 2: // 16bit, RGB555, A1?
    163163      begin
    164164        for y := 0 to Self.FHeight - 1 do
     
    179179        end;
    180180      end;
    181       9:
     181      8: // 32bit, RGB888, A8?
     182      begin end;
     183      9: // Compressed, RGB565
    182184      begin
    183185        DecompressImage;
     
    310312var
    311313  FileInfo: TFileInfo;
    312   ext:      String;
    313314begin
    314315  FileInfo := ConManager.Connection[ConnectionID].GetFileInfo(fileid);
     
    620621procedure TOniImage.GetAsData(var Target: TStream);
    621622var
    622   i:      Integer;
    623623  revert: Boolean;
    624624begin
  • oup/current/Global/RawList.pas

    r105 r113  
    11unit RawList;
    2 
    32interface
    4 
    53uses TypeDefs;
    64
     
    143141  baselink, lastlink: Integer;
    144142  links: Integer;
    145   j, k:  Integer;
    146 //  Data:  TByteData;
    147143  Data:  TStream;
    148144begin
  • oup/current/Global/TypeDefs.pas

    r112 r113  
    2121      SM_IncompatibleDBVersion,
    2222      SM_UnknownError
    23   );
     23  );
     24
     25  TDatOSIdent = array[0..3] of Byte;
     26  TDatGlobalIdent = array[0..15] of Byte;
    2427
    2528  THeader = packed record
    26     Ident:      array[0..$13] of Byte;
     29    OSIdent:    TDatOSIdent;
     30    GlobalIdent:TDatGlobalIdent;
    2731    Files:      Integer;
    2832    NamedFiles: Integer;
     
    4852        TTypeIdent = array[0..7] of Byte;
    4953        TFileType = record
    50                 Extension:   String[4];
    51                 StructID:    Integer;
    52     Description: String;
    53                 IdentWin:    TTypeIdent;
    54     IdentMac:    TTypeIdent;
     54                Extension: String[4];
     55                StructID:  Integer;
     56    Name:      String;
     57                IdentWin:  TTypeIdent;
     58    IdentMac:  TTypeIdent;
    5559        end;
    5660
     
    123127      ByID: array of TLinkByID;
    124128  end;
     129
     130  TDatLink = record
     131      SrcOffset: Integer;
     132      DestID:    Integer;
     133      PosDestExts:   String;
     134  end;
     135  TDatLinkList = array of TDatLink;
    125136 
    126137{
  • oup/current/Helper/LevelDB.pas

    r112 r113  
    11unit LevelDB;
    2 
    32interface
    4 
    53uses
    64  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
     
    2826
    2927implementation
    30 
    3128{$R *.dfm}
    32 
    3329uses ABSMain, ABSDecUtil, Main,
    34     ConnectionManager, TypeDefs, DataAccess, OniImgClass;
     30    ConnectionManager, TypeDefs, DataAccess, OniImgClass, Data;
    3531
    3632type
     
    7066  Stream_Dat, Stream_Raw, Stream_Sep: TFileStream;
    7167
    72 //  FileCount: Integer;
    73 //  temps, temps2: String;
    7468//  Data, rawdata: Tdata;
    7569  BeginTime, FileTime: Double;
    7670  Step:     Integer;
    7771//  rawlist:  TRawDataList;
    78 //  extlist:  TExtensionsMap;
    79 //  fileinfo: TFileInfo;
    8072//  datlinks: TDatLinks;
    8173  OniImage:   TOniImage;
     
    8981  Strings:    TStrings;
    9082  i, j:       Integer;
     83  temps:      String;
     84  FileInfo:   TFileInfo;
     85
     86  DatFileStream, RawFileStream: TMemoryStream;
    9187const
    9288  Steps: Byte = 3;
     
    209205  end;
    210206
    211  
    212   extlist := OniDataConnection.GetExtendedExtensionsList;
    213   for i := 0 to High(DatHeader.Ident) do
    214     DatHeader.Ident[i] := OniDataConnection.LevelInfo.Ident[i];
    215   DatHeader.Files := OniDataConnection.GetFilesCount;
     207  for i := 0 to High(DatHeader.OSIdent) do
     208    case Connection.DataOS of
     209      DOS_WIN: DatHeader.OSIdent[i] := HeaderOSIdentWin[i];
     210      DOS_MAC: DatHeader.OSIdent[i] := HeaderOSIdentMac[i];
     211      DOS_MACBETA: DatHeader.OSIdent[i] := HeaderOSIdentMacBeta[i];
     212    end;
     213  for i := 0 to High(DatHeader.GlobalIdent) do
     214    DatHeader.GlobalIdent[i] := HeaderGlobalIdent[i];
     215  DatHeader.Files := Connection.GetFileCount;
    216216  DatHeader.NamedFiles := Length(NamedFilesHeader);
    217   DatHeader.Extensions := Length(extlist);
     217
     218  Strings := Connection.GetExtensionsList(EF_ExtCount);
     219
     220  DatHeader.Extensions := Strings.Count;
    218221  DatHeader.DataAddr   := 0;
    219222  DatHeader.DataSize   := 0;
     
    227230
    228231  DoStep('Writing extensions-header');
    229   progress.Max := Length(OniDataConnection.GetExtensionsList);
     232  progress.Max := Strings.Count;
    230233  Application.ProcessMessages;
    231 
    232   for i := 0 to High(ExtensionsHeader) do
    233   begin
    234     ExtensionsHeader[i].Ident     := extlist[i].Ident;
    235     ExtensionsHeader[i].Extension := extlist[i].Extension;
    236     SetLength(temps, 4);
     234  for i := 0 to Strings.Count - 1 do
     235  begin
     236    temps := Strings.Strings[i];
     237    ExtensionsHeader[i].ExtCount := StrToInt( MidStr(
     238            temps,
     239            Pos('(', temps) + 1,
     240            Pos(')', temps) - Pos('(', temps) - 1 ) );
     241    temps := MidStr(temps, 1, 4);
    237242    for j := 0 to 3 do
    238       temps[j + 1] := ExtensionsHeader[i].Extension[3 - j];
    239     ExtensionsHeader[i].ExtCount :=
    240       Length(OniDataConnection.GetFilesList(temps, '', False, stIDAsc));
     243      ExtensionsHeader[i].Extension[j] := temps[4-j];
     244    for j := 0 to High(FileTypes) do
     245      if FileTypes[j].Extension = temps then
     246        Break;
     247    if j < Length(FileTypes) then
     248    begin
     249      case Connection.DataOS of
     250        DOS_WIN:     ExtensionsHeader[i].Ident := FileTypes[j].IdentWin;
     251        DOS_WINDEMO: ExtensionsHeader[i].Ident := FileTypes[j].IdentMac;
     252        DOS_MAC:     ExtensionsHeader[i].Ident := FileTypes[j].IdentMac;
     253        DOS_MACBETA: ExtensionsHeader[i].Ident := FileTypes[j].IdentMac;
     254      end;
     255    end else begin
     256      ShowMessage('Unknown Extension: ' + Strings.Strings[i]);
     257      Exit;
     258    end;
    241259    progress.Position    := i + 1;
    242260    lbl_progress.Caption := 'Extensions done: ' + IntToStr(i + 1) + '/' +
    243       IntToStr(Length(extlist));
     261      IntToStr(Strings.Count);
    244262    Application.ProcessMessages;
    245263  end;
    246 
    247264
    248265  DoStep('Storing files-data');
     
    253270  Application.ProcessMessages;
    254271
    255   begintime := Time;
     272  FileTime := Time;
    256273  for i := 0 to DatHeader.Files - 1 do
    257274  begin
    258     fileinfo := OniDataConnection.GetFileInfo(i);
     275    FileInfo := Connection.GetFileInfo(i);
    259276    for j := 0 to 3 do
    260       FilesHeader[i].Extension[j] := fileinfo.Extension[4 - j];
    261     if fileinfo.Size > 0 then
     277      FilesHeader[i].Extension[j] := FileInfo.Extension[4 - j];
     278    if FileInfo.Size > 0 then
    262279    begin
    263280      //        DatLinks:=;
    264281      FilesHeader[i].DataAddr := Stream_Body.Size + 8;
    265       Data    := OniDataConnection.LoadDatFile(i);
    266       Data[4] := (levelid) and $FF;
    267       Data[5] := (levelid shr 8) and $FF;
    268       Data[6] := (levelid shr 16) and $FF;
    269       Data[7] := (levelid shr 24) and $FF;
     282      DatFileStream := TMemoryStream.Create;
     283      Connection.LoadDatFile(i, DatFileStream);
     284      DatFileStream.Seek(4, soFromBeginning);
     285      DatFileStream.Write(LevelID, 4);
    270286
    271287      if (Pos(UpperCase(fileinfo.Extension), UpperCase(raws)) mod 4) = 1 then
     
    337353    if ((i mod 10) = 0) and (i >= 100) then
    338354      lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr(
    339         (Time - begintime) / i * (progress.Max - i + 1) * 1.1, timeformat );
     355        (Time - FileTime) / i * (progress.Max - i + 1) * 1.1, TimeFormat );
    340356    progress.Position := i + 1;
    341357    lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max);
     
    373389  lbl_progress.Caption   := 'Files done: ' + IntToStr(progress.Max) + '/' +
    374390    IntToStr(progress.Max);
    375   lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')';
     391  lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - Begintime, TimeFormat) + ')';
    376392
    377393  DoStep('FIN');
  • oup/current/Main.pas

    r112 r113  
    170170  toolform: TForm_ToolTemplate;
    171171begin
     172  Result := True;
    172173  if MDITab.MDIChildCount > 0 then
    173174  begin
     
    180181        begin
    181182          if not toolform.Closeable then
    182             ShowMessage('Can not close toolwindow: ' + toolform.Caption);
     183          begin
     184            ShowMessage('Can not close toolwindow: ' + toolform.Caption);
     185            Result := False;
     186          end;
    183187        end;
    184188      end;
     
    235239
    236240procedure TForm_Main.FormCreate(Sender: TObject);
    237 var
    238   RepMsg: TStatusMessages;
    239241begin
    240242  Self.Caption := 'Oni Un/Packer ' + version;
     
    441443  mode: TTBItemDisplayMode;
    442444  i: Integer;
    443   isEnabled: Boolean;
    444445begin
    445446  toolbar := TTBToolbar(Sender);
     
    674675var
    675676  name: String;
    676   i: Integer;
    677677  index: Integer;
    678678  RepMsg: TStatusMessages;
     
    743743  iconindex := -1;
    744744  caption_end := IntToStr(tag) + '       ';
     745
     746  toolform := nil;
    745747
    746748  if window_context = 'binedit' then
  • oup/current/OniUnPacker.bdsproj

    r112 r113  
    176176                        <Language Name="ProjectLang">$00000000</Language>
    177177                        <Language Name="RootDir"></Language>
    178                 </Language>  <Excluded_Packages>
     178                </Language> 
     179   
     180   
     181    <Excluded_Packages>
    179182      <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages>
    180183    </Excluded_Packages>
  • oup/current/OniUnPacker.dpr

    r110 r113  
    2626  Extractor in 'Tools\Extractor.pas' {Form_Extractor},
    2727  TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace},
    28   WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere};
     28  WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere},
     29  DatLinks in 'Global\DatLinks.pas';
    2930
    3031{$R *.res}
  • oup/current/Tools/BinEdit.pas

    r111 r113  
    140140var
    141141  mem:  TMemoryStream;
    142   Data: TByteData;
    143142begin
    144143  if ConID <> -1 then
     
    183182  Data: TByteData;
    184183  i:    Word;
     184  tempi: Integer;
    185185  floatformat: TFormatSettings;
    186186begin
     
    218218      Result := IntToBin(hex.Data[offset]);
    219219    11:
    220       Result := '0x' + IntToHex(ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr, 8);
     220    begin
     221      tempi := ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr;
     222      if tempi >= 0 then
     223        Result := '0x' + IntToHex(tempi, 8)
     224      else
     225        Result := 'unused';
     226    end;
    221227    12:
    222       Result := FormatNumber(hex.Data[offset + 1] + hex.Data[offset + 2] * 256 +
    223         hex.Data[offset + 3] * 256 * 256, 5, '0');
     228      if hex.Data[offset] = 1 then
     229        Result := FormatNumber(hex.Data[offset + 1] + hex.Data[offset + 2] * 256 +
     230          hex.Data[offset + 3] * 256 * 256, 5, '0')
     231      else
     232        Result := 'no link';
    224233    13:
    225234      Result := IntToStr(hex.Data[offset]);
     
    308317              if Pos('#', SubName) > 0 then
    309318              begin
    310                 Data.Offset  := HexToLong(MidStr(SubName, Pos('#', SubName) + 1, 8));
    311                 Data.Value   :=
     319                Data.Offset  := StrToInt('$'+MidStr(SubName, Pos('#', SubName) + 1, 8));
     320                Data.Value   := '$' +
    312321                  MidStr(SubName, PosEx('#', SubName, Pos('#', SubName) + 1) + 1, 8);
    313322                Data.Caption := MidStr(SubName, 1, Pos('#', SubName) - 1);
     
    749758    else
    750759    begin
    751       if nodedata.DataType = 11 then
     760      if (nodedata.DataType = 11) and (nodedata.Value <> 'unused') then
    752761      begin
    753762        if ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset).RawSize > 0 then
    754763          Form_Main.open_child('rawedit', ConID, fileid);
    755764      end;
    756       if nodedata.DataType = 12 then
     765      if (nodedata.DataType = 12) and (nodedata.Value <> 'no link') then
    757766      begin
    758767        if (StrToInt(nodedata.Value) < ConManager.Connection[ConID].GetFileCount) and
     
    794803  begin
    795804    hex.SelStart := Data.Offset;
    796     hex.SelEnd   := Data.Offset + HexToLong(Data.Value) - 1;
     805    hex.SelEnd   := Data.Offset + StrToInt(Data.Value) - 1;
    797806  end;
    798807end;
     
    825834          CellText := Data.Value //GetValue(data.DataType, data.Offset)
    826835        else if Length(Data.Value) > 0 then
    827           CellText := IntToStr(HexToLong(Data.Value)) + ' Bytes';
     836          CellText := IntToStr(StrToInt(Data.Value)) + ' Bytes';
    828837      4:
    829838        CellText := Data.Description;
  • oup/current/Tools/RawEdit.pas

    r111 r113  
    5454    procedure hexChange(Sender: TObject);
    5555  private
    56     ConID, fileid, datoffset: Integer;
     56    fileid, datoffset: Integer;
    5757  public
    5858  end;
     
    115115    for i := 0 to filelist.Count - 1 do
    116116    begin
    117       if ConManager.Connection[ConID].ExtractFileIDOfName(filelist.Items.Strings[i]) = Raw_Info.SrcID then
     117      if ConManager.Connection[ConnectionID].ExtractFileIDOfName(filelist.Items.Strings[i]) = Raw_Info.SrcID then
    118118      begin
    119119        filelist.ItemIndex := i;
     
    132132  end;
    133133  mem := nil;
    134   ConManager.Connection[ConID].LoadRawFile(raw_info.SrcID, raw_info.SrcOffset, TStream(mem));
     134  ConManager.Connection[ConnectionID].LoadRawFile(raw_info.SrcID, raw_info.SrcOffset, TStream(mem));
    135135  hex.LoadFromStream(mem);
    136136  ClearValues;
     
    148148  datoffset := StrToInt('$' + MidStr(
    149149    list_offset.Items.Strings[list_offset.ItemIndex], 3, 8));
    150   LoadRaw(ConManager.Connection[ConID].GetRawInfo(fileid, datoffset));
     150  LoadRaw(ConManager.Connection[ConnectionID].GetRawInfo(fileid, datoffset));
    151151end;
    152152
     
    391391begin
    392392  case MessageBox(Self.Handle, PChar('Save changes to .raw-part of file ' +
    393       ConManager.Connection[ConID].GetFileInfo(fileid).Name + '?'), PChar('Data changed...'),
     393      ConManager.Connection[ConnectionID].GetFileInfo(fileid).Name + '?'), PChar('Data changed...'),
    394394      MB_YESNOCANCEL) of
    395395    idYes:
     
    398398      hex.SaveToStream(mem);
    399399      mem.Seek(0, soFromBeginning);
    400       ConManager.Connection[ConID].UpdateRawFile(fileid, datoffset, mem);
     400      ConManager.Connection[ConnectionID].UpdateRawFile(fileid, datoffset, mem);
    401401      mem.Free;
    402402      hex.Modified := False;
     
    506506begin
    507507  saved.Filter     := 'Files of matching extension (*.' +
    508     ConManager.Connection[ConID].GetFileInfo(fileid).Extension + ')|*.' +
    509     ConManager.Connection[ConID].GetFileInfo(fileid).Extension +
     508    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension + ')|*.' +
     509    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension +
    510510    '|All files|*.*';
    511   saved.DefaultExt := ConManager.Connection[ConID].GetFileInfo(fileid).Extension;
     511  saved.DefaultExt := ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension;
    512512  if saved.Execute then
    513513  begin
     
    525525//  Data: Tdata;
    526526  fs:   TFileStream;
    527   data: TByteData;
    528527  i: Integer;
    529528  rawinfo: TRawDataInfo;
    530529begin
    531530  opend.Filter := 'Files of matching extension (*.' +
    532     ConManager.Connection[ConID].GetFileInfo(fileid).Extension + ')|*.' +
    533     ConManager.Connection[ConID].GetFileInfo(fileid).Extension +
     531    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension + ')|*.' +
     532    ConManager.Connection[ConnectionID].GetFileInfo(fileid).Extension +
    534533    '|All files|*.*';
    535534  if opend.Execute then
     
    538537    if fs.Size <> hex.DataSize then
    539538    begin
    540       if (not (CR_ResizeRaw in ConManager.Connection[ConID].ChangeRights)) and (not (CR_AppendRaw in ConManager.Connection[ConnectionID].ChangeRights)) then
     539      if (not (CR_ResizeRaw in ConManager.Connection[ConnectionID].ChangeRights)) and (not (CR_AppendRaw in ConManager.Connection[ConnectionID].ChangeRights)) then
    541540      begin
    542541        ShowMessage('Can''t import ' + ExtractFilename(importd.FileName) +
     
    558557        end;
    559558      end;
    560       rawinfo := ConManager.Connection[ConID].GetRawInfo(fileid, datoffset);
    561       if CR_ResizeRaw in ConManager.Connection[ConID].ChangeRights then
    562         ConManager.Connection[ConID].UpdateRawFile(fileid, datoffset, fs)
    563       else if CR_AppendRaw in ConManager.Connection[ConID].ChangeRights then
    564         i := ConManager.Connection[ConID].AppendRawFile(rawinfo.LocSep, fs);
    565         ConManager.Connection[ConID].UpdateDatFilePart(fileid, datoffset, 4, @i);
     559      rawinfo := ConManager.Connection[ConnectionID].GetRawInfo(fileid, datoffset);
     560      if CR_ResizeRaw in ConManager.Connection[ConnectionID].ChangeRights then
     561        ConManager.Connection[ConnectionID].UpdateRawFile(fileid, datoffset, fs)
     562      else if CR_AppendRaw in ConManager.Connection[ConnectionID].ChangeRights then
     563        i := ConManager.Connection[ConnectionID].AppendRawFile(rawinfo.LocSep, fs);
     564        ConManager.Connection[ConnectionID].UpdateDatFilePart(fileid, datoffset, 4, @i);
    566565    end else begin
    567       ConManager.Connection[ConID].UpdateRawFile(fileid, datoffset, fs);
     566      ConManager.Connection[ConnectionID].UpdateRawFile(fileid, datoffset, fs);
    568567    end;
    569568    fs.Seek(0, soFromBeginning);
  • oup/current/Tools/Template.pas

    r106 r113  
    153153    combo_extension.Items.Add('_All files_ (' +
    154154      IntToStr(ConManager.Connection[FConnectionID].GetFileCount) + ')');
     155    exts := nil;
    155156    exts := ConManager.Connection[FConnectionID].GetExtensionsList(EF_ExtCount);
    156157    for i := 0 to exts.Count - 1 do
     
    177178  pattern: String;
    178179  files: TStrings;
    179   i: Integer;
    180180begin
    181181  if FConnectionID > -1 then
     
    192192        Extension := '';
    193193
     194    files := nil;
    194195    files := ConManager.Connection[FConnectionID].GetFilesList(extension, pattern, no_zero_bytes, FSortBy);
    195196
     
    283284var
    284285  name: String;
    285   nstart, nend: Integer;
    286   i: Integer;
    287286begin
    288287  if combo_connection.ItemIndex >= 0 then
Note: See TracChangeset for help on using the changeset viewer.