[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
|
---|
| 18 | ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls;
|
---|
| 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;
|
---|
| 44 | end;
|
---|
| 45 |
|
---|
| 46 |
|
---|
| 47 | procedure TFile_SUBT.InitEditor;
|
---|
| 48 | var
|
---|
| 49 | lab: TLabel;
|
---|
| 50 | begin
|
---|
| 51 | FEditor := TFrame.Create(nil);
|
---|
| 52 | lab := TLabel.Create(FEditor);
|
---|
| 53 | lab.Left := 0;
|
---|
| 54 | lab.Top := 0;
|
---|
| 55 | lab.Caption := 'Hello World';
|
---|
| 56 | FEditor.InsertControl(lab);
|
---|
| 57 | end;
|
---|
| 58 |
|
---|
| 59 | end.
|
---|
| 60 |
|
---|