source: oup/current/FileClasses/AKVA.pas@ 319

Last change on this file since 319 was 248, checked in by alloc, 17 years ago
File size: 3.1 KB
Line 
1unit AKVA;
2
3interface
4
5uses
6 _FileTypes;
7
8type
9 TFile_AKVA = class(TResource)
10 public
11 procedure InitDataFields; override;
12 end;
13
14implementation
15
16uses
17 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls;
18
19procedure TFile_AKVA.InitDataFields;
20begin
21 inherited;
22 FDataFields := TBlock.Create(Self, nil, 'Base', '', []);
23 with FDataFields do
24 begin
25 AddField(TResourceID, 'FileID', '', []);
26 AddField(TLevelID, 'LevelID', '', []);
27
28 AddField(TUnused, 'Unused data', '', [20]);
29
30 with TArray(Addfield(TArray, 'BNV nodes', '', [4])) do
31 begin
32 AddField(TInt, 'AKBP index', 'BSP tree for this BNV', [4]);
33 AddField(TInt, 'AKVA index', 'index of this BNV', [4]);
34 AddField(TInt, 'AKBA index', '"side" range start', [4]);
35 AddField(TInt, 'AKBA index', '"side" range end', [4]);
36 AddField(TInt, 'AKVA index', 'first child BNV', [4]);
37 AddField(TInt, 'AKVA index', 'next sibling BNV', [4]);
38 AddField(TInt, 'Unknown', 'always -1', [4]);
39 with TBlock(AddField(TBlock, 'RAW link', '', [])) do
40 begin
41 AddField(TInt, 'X-tiles', 'size of pathfinding grid', [4]);
42 AddField(TInt, 'Z-tiles', 'size of pathfinding grid', [4]);
43 AddField(TRawLink, 'RAW offset', 'offset of grid data', ['AKVA']);
44 AddField(TInt, 'RAW size', 'size of grid data', [4]);
45 AddField(TFloat, 'Tile size', 'usually 4 world units', []);
46 end;
47 AddField(TFloat, 'AABB X-', 'BNV AABB', []);
48 AddField(TFloat, 'AABB Y-', 'BNV AABB', []);
49 AddField(TFloat, 'AABB Z-', 'BNV AABB', []);
50 AddField(TFloat, 'AABB X+', 'BNV AABB', []);
51 AddField(TFloat, 'AABB Y+', 'BNV AABB', []);
52 AddField(TFloat, 'AABB Z+', 'BNV AABB', []);
53 AddField(TInt, 'Unknown', 'always -2', [2]);
54 AddField(TInt, 'Unknown', 'always -2', [2]);
55 AddField(TInt, 'AKVA index', 'index of this BNV again', [4]);
56 AddField(TInt, 'Unknown', 'always 0', [4]);
57 AddField(TInt, 'Unknown', 'always 0', [4]);
58 AddField(TInt, 'Unknown', 'always 0 (was a RAW offset once?)', [4]);
59 AddField(TBitSet, 'Bitset', '', ['sloped', 'unknown', 'unknown, always set',
60 'unknown', 'unknown, "no raw data"', 'unknown', 'unknown', 'unknown']);
61 AddField(TBitSet, 'Bitset', '', ['unknown', 'unknown', 'unknown', 'unknown',
62 'unknown', 'unknown', 'unknown', 'unknown']);
63 AddField(TBitSet, 'Bitset', '', ['unknown', 'unknown', 'unknown', 'unknown',
64 'unknown', 'unknown', 'unknown', 'unknown']);
65 AddField(TBitSet, 'Bitset', '', ['unknown', 'unknown', 'unknown', 'unknown',
66 'unknown', 'unknown', 'unknown', 'unknown']);
67 AddField(TFloat, 'Plane X', 'floor and ceiling normal', []);
68 AddField(TFloat, 'Plane Y', 'floor and ceiling normal', []);
69 AddField(TFloat, 'Plane Z', 'floor and ceiling normal', []);
70 AddField(TFloat, 'Plane D', 'distance of floor to origin', []);
71 AddField(TFloat, 'Plane D', 'distance of ceiling to origin', []);
72 SetCount;
73 end;
74 end;
75 FDataFields.Update(0, -1);
76 FFileStream.Free;
77 FFileStream := nil;
78end;
79
80
81end.
Note: See TracBrowser for help on using the repository browser.