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

Last change on this file since 212 was 212, checked in by alloc, 17 years ago
File size: 1.7 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 InitDataFields; override;
13 procedure InitRawList; override;
14 end;
15
16implementation
17
18uses
19 ConnectionManager, Math, Classes, TypeDefs, _DataTypes;
20
21procedure TFile_TXAN.InitDataFields;
22var
23 tempi: Integer;
24 temps: String;
25 templist: TStringList;
26begin
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;
56end;
57
58
59procedure TFile_TXAN.InitDatLinks;
60var
61 links: Integer;
62 i: Integer;
63begin
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;
72end;
73
74
75procedure TFile_TXAN.InitRawList;
76begin
77 SetLength(FRawParts, 0);
78end;
79
80end.
81
Note: See TracBrowser for help on using the repository browser.