[212] | 1 | unit TXAN;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
| 6 | _FileTypes;
|
---|
| 7 |
|
---|
| 8 | type
|
---|
| 9 | TFile_TXAN = class(TFile)
|
---|
| 10 | protected
|
---|
| 11 | procedure InitDatLinks; override;
|
---|
| 12 | procedure InitDataFields; override;
|
---|
| 13 | procedure InitRawList; override;
|
---|
| 14 | end;
|
---|
| 15 |
|
---|
| 16 | implementation
|
---|
| 17 |
|
---|
| 18 | uses
|
---|
| 19 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes;
|
---|
| 20 |
|
---|
| 21 | procedure TFile_TXAN.InitDataFields;
|
---|
| 22 | var
|
---|
| 23 | tempi: Integer;
|
---|
| 24 | temps: String;
|
---|
| 25 | templist: TStringList;
|
---|
| 26 | begin
|
---|
| 27 | FDataFields := TBlock.Create(Self, nil, 0, 'Base', '', nil);
|
---|
| 28 | templist := TStringList.Create;
|
---|
| 29 | with FDataFields do
|
---|
| 30 | begin
|
---|
| 31 | AddField(TFileID, $00, 'FileID', '', nil);
|
---|
| 32 |
|
---|
| 33 | AddField(TLevelID, $04, 'LevelID', '', nil);
|
---|
| 34 |
|
---|
| 35 | tempi := 12;
|
---|
| 36 | AddField(TUnused, $08, 'Unused data', '', @tempi);
|
---|
| 37 |
|
---|
| 38 | tempi := 2;
|
---|
| 39 | AddField(TInt, $14, 'Loop speed', '', @tempi);
|
---|
| 40 |
|
---|
| 41 | tempi := 2;
|
---|
| 42 | AddField(TInt, $16, 'Unknown', '', @tempi);
|
---|
| 43 |
|
---|
| 44 | tempi := 2;
|
---|
| 45 | AddField(TInt, $18, 'Unknown', '', @tempi);
|
---|
| 46 |
|
---|
| 47 | tempi := 2;
|
---|
| 48 | AddField(TUnused, $1A, 'Unused', '', @tempi);
|
---|
| 49 |
|
---|
| 50 | with AddField(TArray, $1C, 'AnimTextures array', '', @tempi) do
|
---|
| 51 | begin
|
---|
| 52 | AddField(TLinkByID, $00, 'Texture', '', nil);
|
---|
| 53 | end;
|
---|
| 54 | end;
|
---|
| 55 | templist.Free;
|
---|
| 56 | end;
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | procedure TFile_TXAN.InitDatLinks;
|
---|
| 60 | var
|
---|
| 61 | links: Integer;
|
---|
| 62 | i: Integer;
|
---|
| 63 | begin
|
---|
| 64 | ConManager.Connection[FConnectionID].LoadDatFilePart(FFileID, $1C, SizeOf(links), @links);
|
---|
| 65 | SetLength(FDatLinks, links);
|
---|
| 66 | for i := 0 to links - 1 do
|
---|
| 67 | begin
|
---|
| 68 | FDatLinks[i].SrcOffset := $20 + $4 * i;
|
---|
| 69 | FDatLinks[i].DestID := GetDatLinkValue(FFileStream, FDatLinks[i].SrcOffset);
|
---|
| 70 | FDatLinks[i].PosDestExts := 'TXMP';
|
---|
| 71 | end;
|
---|
| 72 | end;
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 | procedure TFile_TXAN.InitRawList;
|
---|
| 76 | begin
|
---|
| 77 | SetLength(FRawParts, 0);
|
---|
| 78 | end;
|
---|
| 79 |
|
---|
| 80 | end.
|
---|
| 81 |
|
---|