source: oup/releases/0.33a/Data.pas@ 1009

Last change on this file since 1009 was 74, checked in by alloc, 18 years ago
File size: 3.2 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): 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
96 TToolList = array of record
97 context: String;
98 name: String;
99 exts: String;
100 end;
101
102 TSortType = (stIDAsc, stIDDesc, stNameAsc, stNameDesc, stExtAsc, stExtDesc);
103
104var
105{
106 opened_state:Byte=0;
107 dat_filename:String='';
108 raw_filename:String='';
109 dat_os_mac:Boolean=False;
110 dat_header:Theader;
111 dat_filesmap:Tfilesmap;
112 dat_files:Tfiles;
113 dat_namedfilesmap:Tnamedfilesmap;
114 dat_extensionsmap:Textensionsmap;
115}
116 AppSettings: TAppSettings;
117 AppSettingsFile: file of TAppSettings;
118{
119 database_level:LongWord;
120 database_ident:Array[0..$13] of Byte;
121}
122const
123{ header_ident1_pc:Array[0..$13] of Byte=
124 ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
125 header_ident1_mac:Array[0..$13] of Byte=
126 ($61,$30,$C1,$23,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
127 header_ident2:Array[0..$F] of Byte=
128 ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
129}
130 export_noerror: Integer = 0;
131 export_nohandler: Integer = 1;
132 export_handlererror: Integer = 2;
133 export_error: Integer = 3;
134{
135 opened_nothing:Byte=0;
136 opened_dat:Byte=1;
137 opened_db:Byte=2;
138}
139implementation
140
141end.
Note: See TracBrowser for help on using the repository browser.