source: oup/releases/0.30a/Unit3_data.pas@ 776

Last change on this file since 776 was 33, checked in by alloc, 18 years ago
File size: 2.7 KB
Line 
1unit Unit3_data;
2interface
3uses Classes;
4
5const
6 Version:String='v0.29a';
7 DBVersion:String='0.2';
8 CrLf:String[2]=#13+#10;
9
10type
11 TData=Array of Byte;
12 THeader=packed Record
13 Ident:Array[0..$13] of Byte;
14 Files:LongWord;
15 NamedFiles:LongWord;
16 Extensions:LongWord;
17 DataAddr:LongWord;
18 DataSize:LongWord;
19 NamesAddr:LongWord;
20 NamesSize:LongWord;
21 Ident2:Array[0..$F] of Byte;
22 end;
23 TFilesMap=Array of packed Record
24 Extension:Array[0..$3] of Char;
25 DataAddr:LongWord;
26 NameAddr:LongWord;
27 FileSize:LongWord;
28 FileType:LongWord;
29 end;
30 TFileInfo=packed Record
31 ID:Integer;
32 FileName:String;
33 FileNameHex:String;
34 Extension:String[4];
35 Name:String;
36 Size:LongWord;
37 FileType:LongWord;
38 DatAddr:LongWord;
39 opened:Boolean;
40 end;
41 TFiles=Array of TFileInfo;
42
43 TNamedFilesMap=Array of packed Record
44 FileNumber:LongWord;
45 blubb:LongWord;
46 end;
47 TExtensionsMap=Array of packed Record
48 Ident:Array[0..$7] of Byte;
49 Extension:Array[0..$3] of Char;
50 ExtCount:LongWord;
51 end;
52
53 TLevelInfo=Record
54 Ident:Array[0..$13] of Byte;
55 LevelNumber:Byte;
56 end;
57
58 TAppSettings=Record
59 DatPath:String[250];
60 ExtractPath:String[250];
61 FilenumbersAsHex:Boolean;
62 end;
63
64 TExportHandlers=Record
65 Ext:String[4];
66 needed:Boolean;
67 Handler:Function(fileid:LongWord; filename:String; convert:Boolean):Integer;
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
85var
86
87 opened_state:Byte=0;
88 dat_filename:String='';
89 raw_filename:String='';
90 dat_os_mac:Boolean=False;
91 dat_header:Theader;
92 dat_filesmap:Tfilesmap;
93 dat_files:Tfiles;
94 dat_namedfilesmap:Tnamedfilesmap;
95 dat_extensionsmap:Textensionsmap;
96 AppSettings:TAppSettings;
97 AppSettingsFile:File of TAppSettings;
98
99 database_level:LongWord;
100 database_ident:Array[0..$13] of Byte;
101
102const
103 header_ident1_pc:Array[0..$13] of Byte=
104 ($1F,$27,$DC,$33,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
105 header_ident1_mac:Array[0..$13] of Byte=
106 ($61,$30,$C1,$23,$DF,$BC,$03,$00,$31,$33,$52,$56,$40,$00,$14,$00,$10,$00,$08,$00);
107 header_ident2:Array[0..$F] of Byte=
108 ($99,$CF,$40,$00,$90,$4F,$63,$00,$F4,$55,$5F,$00,$90,$4F,$63,$00);
109
110 export_noerror:Integer=0;
111 export_nohandler:Integer=1;
112 export_handlererror:Integer=2;
113 export_error:Integer=3;
114
115 opened_nothing:Byte=0;
116 opened_dat:Byte=1;
117 opened_db:Byte=2;
118
119implementation
120
121end.
122
Note: See TracBrowser for help on using the repository browser.