source: oup/current/FileClasses/SUBT.pas@ 225

Last change on this file since 225 was 215, checked in by alloc, 17 years ago
File size: 1.1 KB
RevLine 
[215]1unit SUBT;
2
3interface
4
5uses
6 _FileTypes;
7
8type
9 TFile_SUBT = class(TFile)
10 public
11 procedure InitDataFields; override;
12 procedure InitEditor; override;
13 end;
14
15implementation
16
17uses
18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls;
19
20procedure TFile_SUBT.InitDataFields;
21var
22 tempi: Integer;
23begin
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;
44end;
45
46
47procedure TFile_SUBT.InitEditor;
48var
49 lab: TLabel;
50begin
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);
57end;
58
59end.
60
Note: See TracBrowser for help on using the repository browser.