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 | FFileStream.Free;
|
---|
108 | FFileStream := nil;
|
---|
109 | end;
|
---|
110 |
|
---|
111 |
|
---|
112 | procedure TFile_TXMP.InitEditor;
|
---|
113 | var
|
---|
114 | group: TGroupBox;
|
---|
115 | splitter: TSplitter;
|
---|
116 | begin
|
---|
117 | inherited;
|
---|
118 | FEditor := TFrame.Create(nil);
|
---|
119 | group := TGroupBox.Create(FEditor);
|
---|
120 | group.Align := alTop;
|
---|
121 | group.Height := 150;
|
---|
122 | group.Caption := '1. ';
|
---|
123 | group.Parent := FEditor;
|
---|
124 |
|
---|
125 | splitter := TSplitter.Create(FEditor);
|
---|
126 | splitter.Align := alTop;
|
---|
127 | splitter.Top := group.Height + 10;
|
---|
128 | splitter.AutoSnap := False;
|
---|
129 | splitter.MinSize := 100;
|
---|
130 | splitter.Beveled := True;
|
---|
131 | splitter.Height := 8;
|
---|
132 | splitter.Parent := FEditor;
|
---|
133 |
|
---|
134 | group := TGroupBox.Create(FEditor);
|
---|
135 | group.Align := alClient;
|
---|
136 | group.Caption := '2. ';
|
---|
137 | group.Parent := FEditor;
|
---|
138 | end;
|
---|
139 |
|
---|
140 | end.
|
---|