source: oup/current/Data.pas@ 43

Last change on this file since 43 was 43, checked in by alloc, 18 years ago

DevTree 0.33a.

File size: 3.1 KB
Line 
1unit Data;
2
3interface
4
5uses Classes, Graphics;
6
7const
8 Version: String = 'v0.33a';
9 DBVersion: String = '0.3';
10 CrLf: String[2] = #13 + #10;
11
12type
13 TData = array of Byte;
14
15 THeader = packed record
16 Ident: array[0..$13] of Byte;
17 Files: LongWord;
18 NamedFiles: LongWord;
19 Extensions: LongWord;
20 DataAddr: LongWord;
21 DataSize: LongWord;
22 NamesAddr: LongWord;
23 NamesSize: LongWord;
24 Ident2: array[0..$F] of Byte;
25 end;
26 TFilesMap = array of packed record
27 Extension: array[0..$3] of Char;
28 DataAddr: LongWord;
29 NameAddr: LongWord;
30 FileSize: LongWord;
31 FileType: LongWord;
32 end;
33
34 TFileInfo = packed record
35 ID: Integer;
36 FileName: String;
37 FileNameHex: String;
38 Extension: String[4];
39 Name: String;
40 Size: LongWord;
41 FileType: LongWord;
42 DatAddr: LongWord;
43 opened: Boolean;
44 end;
45 TFiles = array of TFileInfo;
46
47 TNamedFilesMap = array of packed record
48 FileNumber: LongWord;
49 blubb: LongWord;
50 end;
51 TExtensionsMap = array of packed record
52 Ident: array[0..$7] of Byte;
53 Extension: array[0..$3] of Char;
54 ExtCount: LongWord;
55 end;
56
57 TLevelInfo = record
58 Ident: array[0..$13] of Byte;
59 LevelNumber: Byte;
60 end;
61
62 TAppSettings = record
63 DatPath: String[250];
64 ExtractPath: String[250];
65 FilenumbersAsHex: Boolean;
66 CharSet: TFontCharSet;
67 HideUnusedData: Boolean;
68 end;
69
70 TExportHandlers = record
71 Ext: String[4];
72 needed: Boolean;
73 Handler: function(fileid: LongWord; filename: String; convert: Boolean): Integer;
74 end;
75
76 TStringArray = array of String;
77 TExtList = array of record
78 Ext: String;
79 Count: LongWord;
80 end;
81
82 TRawInfo = record
83 src_id: LongWord;
84 src_offset: LongWord;
85 raw_addr: LongWord;
86 raw_size: LongWord;
87 loc_sep: Boolean;
88 end;
89 TRawList = array of TRawInfo;
90
91 TDatLinks = array of record
92 Src_Offset: LongWord;
93 Target: LongWord;
94 end;
95
96var
97{
98 opened_state:Byte=0;
99 dat_filename:String='';
100 raw_filename:String='';
101 dat_os_mac:Boolean=False;
102 dat_header:Theader;
103 dat_filesmap:Tfilesmap;
104 dat_files:Tfiles;
105 dat_namedfilesmap:Tnamedfilesmap;
106 dat_extensionsmap:Textensionsmap;
107}
108 AppSettings: TAppSettings;
109 AppSettingsFile: file of TAppSettings;
110{
111 database_level:LongWord;
112 database_ident:Array[0..$13] of Byte;
113}
114const
115{ header_ident1_pc:Array[0..$13] of Byte=
116 ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
117 header_ident1_mac:Array[0..$13] of Byte=
118 ($61,$30,$C1,$23,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
119 header_ident2:Array[0..$F] of Byte=
120 ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
121}
122 export_noerror: Integer = 0;
123 export_nohandler: Integer = 1;
124 export_handlererror: Integer = 2;
125 export_error: Integer = 3;
126{
127 opened_nothing:Byte=0;
128 opened_dat:Byte=1;
129 opened_db:Byte=2;
130}
131implementation
132
133end.
Note: See TracBrowser for help on using the repository browser.