[206] | 1 | unit TXMP;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
[209] | 6 | _FileTypes;
|
---|
[206] | 7 |
|
---|
| 8 | type
|
---|
| 9 | TFile_TXMP = class(TFile)
|
---|
[214] | 10 | public
|
---|
[206] | 11 | procedure InitDataFields; override;
|
---|
[232] | 12 | procedure InitEditor; override;
|
---|
[206] | 13 | end;
|
---|
| 14 |
|
---|
| 15 | implementation
|
---|
| 16 |
|
---|
| 17 | uses
|
---|
[233] | 18 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls,
|
---|
[232] | 19 | Controls, Forms;
|
---|
[206] | 20 |
|
---|
[209] | 21 | { TFile_TXMP }
|
---|
[206] | 22 |
|
---|
| 23 | procedure TFile_TXMP.InitDataFields;
|
---|
| 24 | begin
|
---|
[213] | 25 | inherited;
|
---|
[236] | 26 | FDataFields := TBlock.Create(Self, nil, 'Base', '', []);
|
---|
[206] | 27 | with FDataFields do
|
---|
| 28 | begin
|
---|
[236] | 29 | AddField(TFileID, 'FileID', '', []);
|
---|
| 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]);
|
---|
| 55 | AddField(TLinkByID, 'TXAN', '', ['*']);
|
---|
| 56 | AddField(TLinkByID, 'TXMP', '', ['TXMP']);
|
---|
| 57 | AddField(TRawLink, 'RawLink', '', []);
|
---|
| 58 | AddField(TRawLink, 'SepLink', '', []);
|
---|
| 59 | AddField(TUnused, 'Unused', '', [$1C]);
|
---|
[206] | 60 | end;
|
---|
[236] | 61 | FDataFields.Update(0, -1);
|
---|
[233] | 62 | FFileStream.Free;
|
---|
| 63 | FFileStream := nil;
|
---|
[206] | 64 | end;
|
---|
| 65 |
|
---|
| 66 |
|
---|
[232] | 67 | procedure TFile_TXMP.InitEditor;
|
---|
| 68 | var
|
---|
| 69 | group: TGroupBox;
|
---|
| 70 | splitter: TSplitter;
|
---|
| 71 | begin
|
---|
| 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;
|
---|
| 93 | end;
|
---|
| 94 |
|
---|
[206] | 95 | end.
|
---|