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

Last change on this file since 232 was 232, checked in by alloc, 17 years ago
File size: 3.4 KB
RevLine 
[206]1unit TXMP;
2
3interface
4
5uses
[209]6 _FileTypes;
[206]7
8type
9 TFile_TXMP = class(TFile)
[214]10 public
[206]11 procedure InitDataFields; override;
[232]12 procedure InitEditor; override;
[206]13 end;
14
15implementation
16
17uses
[232]18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls,
19 Controls, Forms;
[206]20
[209]21{ TFile_TXMP }
[206]22
23procedure TFile_TXMP.InitDataFields;
24var
25 tempi: Integer;
26 temps: String;
[207]27 templist: TStringList;
[206]28begin
[213]29 inherited;
[212]30 FDataFields := TBlock.Create(Self, nil, 0, 'Base', '', nil);
[207]31 templist := TStringList.Create;
[206]32 with FDataFields do
33 begin
34 AddField(TFileID, $00, 'FileID', '', nil);
[207]35
[206]36 AddField(TLevelID, $04, 'LevelID', '', nil);
[207]37
[206]38 tempi := 128;
39 AddField(TString, $08, 'FileName', '', @tempi);
[207]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
[206]84 tempi := 2;
85 AddField(TInt, $8C, 'Width', '', @tempi);
[207]86
[206]87 tempi := 2;
88 AddField(TInt, $8E, 'Height', '', @tempi);
[207]89
[206]90 tempi := 4;
91 AddField(TInt, $90, 'StoreType', '', @tempi);
[207]92
93 temps := '*';
[206]94 AddField(TLinkByID, $94, 'TXAN', '', @temps);
[207]95
[206]96 temps := 'TXMP';
97 AddField(TLinkByID, $98, 'TXMP', '', @temps);
[207]98
[206]99 AddField(TRawLink, $9C, 'RawLink', '', nil);
[207]100
[206]101 AddField(TRawLink, $A0, 'SepLink', '', nil);
[207]102
[206]103 tempi := $1C;
104 AddField(TUnused, $A4, 'Unused', '', @tempi);
105 end;
[207]106 templist.Free;
[206]107end;
108
109
[232]110procedure TFile_TXMP.InitEditor;
111var
112 group: TGroupBox;
113 splitter: TSplitter;
114begin
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;
136end;
137
[206]138end.
139
Note: See TracBrowser for help on using the repository browser.