1 | unit TXMP;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | _FileTypes;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TFile_TXMP = class(TFile)
|
---|
10 | public
|
---|
11 | procedure InitDataFields; override;
|
---|
12 | procedure InitEditor; override;
|
---|
13 | end;
|
---|
14 |
|
---|
15 | implementation
|
---|
16 |
|
---|
17 | uses
|
---|
18 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls,
|
---|
19 | Controls, Forms;
|
---|
20 |
|
---|
21 | { TFile_TXMP }
|
---|
22 |
|
---|
23 | procedure TFile_TXMP.InitDataFields;
|
---|
24 | begin
|
---|
25 | inherited;
|
---|
26 | FDataFields := TBlock.Create(Self, nil, 'Base', '', []);
|
---|
27 | with FDataFields do
|
---|
28 | begin
|
---|
29 | AddField(TFileID, 'FileID', '', []);
|
---|
30 | AddField(TLevelID, 'LevelID', '', []);
|
---|
31 |
|
---|
32 | AddField(TString, 'FileName', '', [128]);
|
---|
33 |
|
---|
34 | AddField(TBitSet, 'Flags1', '',
|
---|
35 | ['MipMapping enabled', 'unknown', 'U wrapping disabled',
|
---|
36 | 'V wrapping disabled', 'EnvMapped/EnvMap', 'unused',
|
---|
37 | 'Play anim back to back', 'Random anim order + frame time']);
|
---|
38 |
|
---|
39 | AddField(TBitSet, 'Flags2', '',
|
---|
40 | ['Random anim time offset', 'High byte as EnvMap', 'High byte as alpha',
|
---|
41 | 'Different alpha formula', 'Data swapping (always set)', 'used at runtime',
|
---|
42 | 'TXAN looping on/off', '16 bit blue']);
|
---|
43 |
|
---|
44 | AddField(TBitSet, 'Flags3', '',
|
---|
45 | ['16 bit alpha', '16 bit red', 'unknown', 'unknown',
|
---|
46 | 'unknown', 'unknown', 'unknown', 'unknown']);
|
---|
47 |
|
---|
48 | AddField(TBitSet, 'Flags4', '',
|
---|
49 | ['unknown', 'unknown', 'unknown', 'unknown',
|
---|
50 | 'unknown', 'unknown', 'unknown', 'unknown']);
|
---|
51 |
|
---|
52 | AddField(TInt, 'Width', '', [2]);
|
---|
53 | AddField(TInt, 'Height', '', [2]);
|
---|
54 | AddField(TInt, 'StoreType', '', [4]);
|
---|
55 | AddField(TLinkByID, 'TXAN', '', ['TXAN']);
|
---|
56 | AddField(TLinkByID, 'TXMP', '', ['TXMP']);
|
---|
57 | AddField(TRawLink, 'RawLink', '', ['TXMP']);
|
---|
58 | AddField(TRawLink, 'SepLink', '', ['TXMP']);
|
---|
59 | AddField(TUnused, 'Unused', '', [$1C]);
|
---|
60 | end;
|
---|
61 | FDataFields.Update(0, -1);
|
---|
62 | FFileStream.Free;
|
---|
63 | FFileStream := nil;
|
---|
64 | end;
|
---|
65 |
|
---|
66 |
|
---|
67 | procedure TFile_TXMP.InitEditor;
|
---|
68 | var
|
---|
69 | group: TGroupBox;
|
---|
70 | splitter: TSplitter;
|
---|
71 | begin
|
---|
72 | inherited;
|
---|
73 | FEditor := TFrame.Create(nil);
|
---|
74 | group := TGroupBox.Create(FEditor);
|
---|
75 | group.Align := alTop;
|
---|
76 | group.Height := 150;
|
---|
77 | group.Caption := '1. ';
|
---|
78 | group.Parent := FEditor;
|
---|
79 |
|
---|
80 | splitter := TSplitter.Create(FEditor);
|
---|
81 | splitter.Align := alTop;
|
---|
82 | splitter.Top := group.Height + 10;
|
---|
83 | splitter.AutoSnap := False;
|
---|
84 | splitter.MinSize := 100;
|
---|
85 | splitter.Beveled := True;
|
---|
86 | splitter.Height := 8;
|
---|
87 | splitter.Parent := FEditor;
|
---|
88 |
|
---|
89 | group := TGroupBox.Create(FEditor);
|
---|
90 | group.Align := alClient;
|
---|
91 | group.Caption := '2. ';
|
---|
92 | group.Parent := FEditor;
|
---|
93 | end;
|
---|
94 |
|
---|
95 | end.
|
---|