[215] | 1 | unit SUBT;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
| 6 | _FileTypes;
|
---|
| 7 |
|
---|
| 8 | type
|
---|
| 9 | TFile_SUBT = class(TFile)
|
---|
| 10 | public
|
---|
| 11 | procedure InitDataFields; override;
|
---|
| 12 | procedure InitEditor; override;
|
---|
| 13 | end;
|
---|
| 14 |
|
---|
| 15 | implementation
|
---|
| 16 |
|
---|
| 17 | uses
|
---|
[233] | 18 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls, Grids;
|
---|
[215] | 19 |
|
---|
| 20 | procedure TFile_SUBT.InitDataFields;
|
---|
| 21 | var
|
---|
| 22 | tempi: Integer;
|
---|
| 23 | begin
|
---|
| 24 | inherited;
|
---|
| 25 | FDataFields := TBlock.Create(Self, nil, 0, 'Base', '', nil);
|
---|
| 26 | with FDataFields do
|
---|
| 27 | begin
|
---|
| 28 | AddField(TFileID, $00, 'FileID', '', nil);
|
---|
| 29 |
|
---|
| 30 | AddField(TLevelID, $04, 'LevelID', '', nil);
|
---|
| 31 |
|
---|
| 32 | tempi := 16;
|
---|
| 33 | AddField(TUnused, $08, 'Unused data', '', @tempi);
|
---|
| 34 |
|
---|
| 35 | AddField(TRawLink, $18, 'Raw Address', '', nil);
|
---|
| 36 |
|
---|
| 37 | tempi := 4;
|
---|
| 38 | with AddField(TArray, $1C, 'SUBT offsets array', '', @tempi) do
|
---|
| 39 | begin
|
---|
| 40 | tempi := 4;
|
---|
| 41 | AddField(TInt, $00, 'Offset', '', @tempi);
|
---|
| 42 | end;
|
---|
| 43 | end;
|
---|
[233] | 44 | FFileStream.Free;
|
---|
| 45 | FFileStream := nil;
|
---|
[215] | 46 | end;
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 | procedure TFile_SUBT.InitEditor;
|
---|
| 50 | var
|
---|
[233] | 51 | grid: TStringGrid;
|
---|
[215] | 52 | begin
|
---|
| 53 | FEditor := TFrame.Create(nil);
|
---|
[233] | 54 | grid := TStringGrid.Create(FEditor);
|
---|
| 55 | grid.Parent := FEditor;
|
---|
[215] | 56 | end;
|
---|
| 57 |
|
---|
| 58 | end.
|
---|