source: oup/_old_/Data.pas@ 149

Last change on this file since 149 was 108, checked in by alloc, 18 years ago
File size: 3.1 KB
Line 
1unit Data;
2
3interface
4
5uses Classes, Graphics;
6
7const
8 Version: String = 'v0.34a';
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 TStringArray = array of String;
71 TExtList = array of record
72 Ext: String;
73 Count: LongWord;
74 end;
75
76 TRawInfo = record
77 src_id: LongWord;
78 src_offset: LongWord;
79 raw_addr: LongWord;
80 raw_size: LongWord;
81 loc_sep: Boolean;
82 end;
83 TRawList = array of TRawInfo;
84
85 TDatLinks = array of record
86 Src_Offset: LongWord;
87 Target: LongWord;
88 end;
89
90 TToolList = array of record
91 context: String;
92 name: String;
93 exts: String;
94 end;
95
96 TSortType = (stIDAsc, stIDDesc, stNameAsc, stNameDesc, stExtAsc, stExtDesc);
97
98var
99{
100 opened_state:Byte=0;
101 dat_filename:String='';
102 raw_filename:String='';
103 dat_os_mac:Boolean=False;
104 dat_header:Theader;
105 dat_filesmap:Tfilesmap;
106 dat_files:Tfiles;
107 dat_namedfilesmap:Tnamedfilesmap;
108 dat_extensionsmap:Textensionsmap;
109}
110 AppSettings: TAppSettings;
111 AppSettingsFile: file of TAppSettings;
112{
113 database_level:LongWord;
114 database_ident:Array[0..$13] of Byte;
115}
116const
117{ header_ident1_pc:Array[0..$13] of Byte=
118 ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
119 header_ident1_mac:Array[0..$13] of Byte=
120 ($61,$30,$C1,$23,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
121 header_ident2:Array[0..$F] of Byte=
122 ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
123}
124 export_noerror: Integer = 0;
125 export_nohandler: Integer = 1;
126 export_handlererror: Integer = 2;
127 export_error: Integer = 3;
128{
129 opened_nothing:Byte=0;
130 opened_dat:Byte=1;
131 opened_db:Byte=2;
132}
133implementation
134
135end.
Note: See TracBrowser for help on using the repository browser.