[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
|
---|
[232] | 18 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls,
|
---|
| 19 | Controls, Forms;
|
---|
[206] | 20 |
|
---|
[209] | 21 | { TFile_TXMP }
|
---|
[206] | 22 |
|
---|
| 23 | procedure TFile_TXMP.InitDataFields;
|
---|
| 24 | var
|
---|
| 25 | tempi: Integer;
|
---|
| 26 | temps: String;
|
---|
[207] | 27 | templist: TStringList;
|
---|
[206] | 28 | begin
|
---|
[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] | 107 | end;
|
---|
| 108 |
|
---|
| 109 |
|
---|
[232] | 110 | procedure TFile_TXMP.InitEditor;
|
---|
| 111 | var
|
---|
| 112 | group: TGroupBox;
|
---|
| 113 | splitter: TSplitter;
|
---|
| 114 | begin
|
---|
| 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;
|
---|
| 136 | end;
|
---|
| 137 |
|
---|
[206] | 138 | end.
|
---|
| 139 |
|
---|