1 | unit AKVA;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | _FileTypes;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TFile_AKVA = class(TFile)
|
---|
10 | public
|
---|
11 | procedure InitDataFields; override;
|
---|
12 | end;
|
---|
13 |
|
---|
14 | implementation
|
---|
15 |
|
---|
16 | uses
|
---|
17 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls;
|
---|
18 |
|
---|
19 | procedure TFile_AKVA.InitDataFields;
|
---|
20 | begin
|
---|
21 | inherited;
|
---|
22 | FDataFields := TBlock.Create(Self, nil, 'Base', '', []);
|
---|
23 | with FDataFields do
|
---|
24 | begin
|
---|
25 | AddField(TFileID, '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;
|
---|
78 | end;
|
---|
79 |
|
---|
80 |
|
---|
81 | end.
|
---|