source: oup/current/FileClasses/TXAN.pas@ 214

Last change on this file since 214 was 214, checked in by alloc, 17 years ago
File size: 1.6 KB
Line 
1unit TXAN;
2
3interface
4
5uses
6 _FileTypes;
7
8type
9 TFile_TXAN = class(TFile)
10 protected
11 procedure InitDatLinks; override;
12 procedure InitRawList; override;
13 public
14 procedure InitDataFields; override;
15 end;
16
17implementation
18
19uses
20 ConnectionManager, Math, Classes, TypeDefs, _DataTypes;
21
22procedure TFile_TXAN.InitDataFields;
23var
24 tempi: Integer;
25begin
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;
55end;
56
57
58procedure TFile_TXAN.InitDatLinks;
59var
60 links: Integer;
61 i: Integer;
62begin
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;
71end;
72
73
74procedure TFile_TXAN.InitRawList;
75begin
76 SetLength(FRawParts, 0);
77end;
78
79end.
80
Note: See TracBrowser for help on using the repository browser.