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