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

Last change on this file since 409 was 248, checked in by alloc, 17 years ago
File size: 2.5 KB
RevLine 
[206]1unit TXMP;
2
3interface
4
5uses
[209]6 _FileTypes;
[206]7
8type
[248]9 TFile_TXMP = class(TResource)
[214]10 public
[206]11 procedure InitDataFields; override;
[232]12 procedure InitEditor; override;
[206]13 end;
14
15implementation
16
17uses
[233]18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls,
[232]19 Controls, Forms;
[206]20
[209]21{ TFile_TXMP }
[206]22
23procedure TFile_TXMP.InitDataFields;
24begin
[213]25 inherited;
[236]26 FDataFields := TBlock.Create(Self, nil, 'Base', '', []);
[206]27 with FDataFields do
28 begin
[248]29 AddField(TResourceID, 'FileID', '', []);
[236]30 AddField(TLevelID, 'LevelID', '', []);
[207]31
[236]32 AddField(TString, 'FileName', '', [128]);
[207]33
[236]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']);
[207]38
[236]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']);
[207]43
[236]44 AddField(TBitSet, 'Flags3', '',
45 ['16 bit alpha', '16 bit red', 'unknown', 'unknown',
46 'unknown', 'unknown', 'unknown', 'unknown']);
[207]47
[236]48 AddField(TBitSet, 'Flags4', '',
49 ['unknown', 'unknown', 'unknown', 'unknown',
50 'unknown', 'unknown', 'unknown', 'unknown']);
[207]51
[236]52 AddField(TInt, 'Width', '', [2]);
53 AddField(TInt, 'Height', '', [2]);
54 AddField(TInt, 'StoreType', '', [4]);
[241]55 AddField(TLinkByID, 'TXAN', '', ['TXAN']);
[236]56 AddField(TLinkByID, 'TXMP', '', ['TXMP']);
[241]57 AddField(TRawLink, 'RawLink', '', ['TXMP']);
58 AddField(TRawLink, 'SepLink', '', ['TXMP']);
[236]59 AddField(TUnused, 'Unused', '', [$1C]);
[206]60 end;
[236]61 FDataFields.Update(0, -1);
[233]62 FFileStream.Free;
63 FFileStream := nil;
[206]64end;
65
66
[232]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
[206]95end.
Note: See TracBrowser for help on using the repository browser.