source: oup/current/FileClasses/TXMP.pas@ 428

Last change on this file since 428 was 248, checked in by alloc, 17 years ago
File size: 2.5 KB
Line 
1unit TXMP;
2
3interface
4
5uses
6 _FileTypes;
7
8type
9 TFile_TXMP = class(TResource)
10 public
11 procedure InitDataFields; override;
12 procedure InitEditor; override;
13 end;
14
15implementation
16
17uses
18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls,
19 Controls, Forms;
20
21{ TFile_TXMP }
22
23procedure TFile_TXMP.InitDataFields;
24begin
25 inherited;
26 FDataFields := TBlock.Create(Self, nil, 'Base', '', []);
27 with FDataFields do
28 begin
29 AddField(TResourceID, '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;
64end;
65
66
67procedure TFile_TXMP.InitEditor;
68var
69 group: TGroupBox;
70 splitter: TSplitter;
71begin
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;
93end;
94
95end.
Note: See TracBrowser for help on using the repository browser.