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 | var
|
---|
25 | tempi: Integer;
|
---|
26 | temps: String;
|
---|
27 | templist: TStringList;
|
---|
28 | begin
|
---|
29 | inherited;
|
---|
30 | FDataFields := TBlock.Create(Self, nil, 0, 'Base', '', nil);
|
---|
31 | templist := TStringList.Create;
|
---|
32 | with FDataFields do
|
---|
33 | begin
|
---|
34 | AddField(TFileID, $00, 'FileID', '', nil);
|
---|
35 |
|
---|
36 | AddField(TLevelID, $04, 'LevelID', '', nil);
|
---|
37 |
|
---|
38 | tempi := 128;
|
---|
39 | AddField(TString, $08, 'FileName', '', @tempi);
|
---|
40 |
|
---|
41 | templist.Add('MipMapping enabled');
|
---|
42 | templist.Add('unknown');
|
---|
43 | templist.Add('U wrapping disabled');
|
---|
44 | templist.Add('V wrapping disabled');
|
---|
45 | templist.Add('EnvMapped/EnvMap');
|
---|
46 | templist.Add('unused');
|
---|
47 | templist.Add('Play anim back to back');
|
---|
48 | templist.Add('Random anim order + frame time');
|
---|
49 | AddField(TBitSet, $88, 'Flags1', '', @templist);
|
---|
50 |
|
---|
51 | templist.Clear;
|
---|
52 | templist.Add('Random anim time offset');
|
---|
53 | templist.Add('High byte as EnvMap');
|
---|
54 | templist.Add('High byte as alpha');
|
---|
55 | templist.Add('Different alpha formula');
|
---|
56 | templist.Add('Data swapping (always set)');
|
---|
57 | templist.Add('used at runtime');
|
---|
58 | templist.Add('TXAN looping on/off');
|
---|
59 | templist.Add('16 bit blue');
|
---|
60 | AddField(TBitSet, $89, 'Flags2', '', @templist);
|
---|
61 |
|
---|
62 | templist.Clear;
|
---|
63 | templist.Add('16 bit alpha');
|
---|
64 | templist.Add('16 bit red');
|
---|
65 | templist.Add('unknown');
|
---|
66 | templist.Add('unknown');
|
---|
67 | templist.Add('unknown');
|
---|
68 | templist.Add('unknown');
|
---|
69 | templist.Add('unknown');
|
---|
70 | templist.Add('unknown');
|
---|
71 | AddField(TBitSet, $8A, 'Flags3', '', @templist);
|
---|
72 |
|
---|
73 | templist.Clear;
|
---|
74 | templist.Add('unknown');
|
---|
75 | templist.Add('unknown');
|
---|
76 | templist.Add('unknown');
|
---|
77 | templist.Add('unknown');
|
---|
78 | templist.Add('unknown');
|
---|
79 | templist.Add('unknown');
|
---|
80 | templist.Add('unknown');
|
---|
81 | templist.Add('unknown');
|
---|
82 | AddField(TBitSet, $8B, 'Flags4', '', @templist);
|
---|
83 |
|
---|
84 | tempi := 2;
|
---|
85 | AddField(TInt, $8C, 'Width', '', @tempi);
|
---|
86 |
|
---|
87 | tempi := 2;
|
---|
88 | AddField(TInt, $8E, 'Height', '', @tempi);
|
---|
89 |
|
---|
90 | tempi := 4;
|
---|
91 | AddField(TInt, $90, 'StoreType', '', @tempi);
|
---|
92 |
|
---|
93 | temps := '*';
|
---|
94 | AddField(TLinkByID, $94, 'TXAN', '', @temps);
|
---|
95 |
|
---|
96 | temps := 'TXMP';
|
---|
97 | AddField(TLinkByID, $98, 'TXMP', '', @temps);
|
---|
98 |
|
---|
99 | AddField(TRawLink, $9C, 'RawLink', '', nil);
|
---|
100 |
|
---|
101 | AddField(TRawLink, $A0, 'SepLink', '', nil);
|
---|
102 |
|
---|
103 | tempi := $1C;
|
---|
104 | AddField(TUnused, $A4, 'Unused', '', @tempi);
|
---|
105 | end;
|
---|
106 | templist.Free;
|
---|
107 | end;
|
---|
108 |
|
---|
109 |
|
---|
110 | procedure TFile_TXMP.InitEditor;
|
---|
111 | var
|
---|
112 | group: TGroupBox;
|
---|
113 | splitter: TSplitter;
|
---|
114 | begin
|
---|
115 | inherited;
|
---|
116 | FEditor := TFrame.Create(nil);
|
---|
117 | group := TGroupBox.Create(FEditor);
|
---|
118 | group.Align := alTop;
|
---|
119 | group.Height := 150;
|
---|
120 | group.Caption := '1. ';
|
---|
121 | group.Parent := FEditor;
|
---|
122 |
|
---|
123 | splitter := TSplitter.Create(FEditor);
|
---|
124 | splitter.Align := alTop;
|
---|
125 | splitter.Top := group.Height + 10;
|
---|
126 | splitter.AutoSnap := False;
|
---|
127 | splitter.MinSize := 100;
|
---|
128 | splitter.Beveled := True;
|
---|
129 | splitter.Height := 8;
|
---|
130 | splitter.Parent := FEditor;
|
---|
131 |
|
---|
132 | group := TGroupBox.Create(FEditor);
|
---|
133 | group.Align := alClient;
|
---|
134 | group.Caption := '2. ';
|
---|
135 | group.Parent := FEditor;
|
---|
136 | end;
|
---|
137 |
|
---|
138 | end.
|
---|
139 |
|
---|