1 |
unit TypeDefs; |
2 |
interface |
3 |
|
4 |
uses |
5 |
Graphics, SysUtils; |
6 |
|
7 |
type |
8 |
ENotImplemented = class(Exception); |
9 |
|
10 |
TDataBackend = (DB_ONI, DB_ADB); |
11 |
TDataOS = (DOS_WIN, DOS_WINDEMO, DOS_MAC, DOS_MACBETA); |
12 |
|
13 |
TChangeRights = set of (CR_EditDat, CR_EditRaw, CR_ResizeDat, CR_ResizeRaw, CR_AppendRaw); |
14 |
|
15 |
TStatusMessages = ( |
16 |
SM_OK, |
17 |
SM_AlreadyOpened, |
18 |
SM_FileNotFound, |
19 |
SM_UnknownExtension, |
20 |
SM_IncompatibleFile, |
21 |
SM_IncompatibleDBVersion, |
22 |
SM_UnknownError |
23 |
); |
24 |
|
25 |
THeader = packed record |
26 |
Ident: array[0..$13] of Byte; |
27 |
Files: Integer; |
28 |
NamedFiles: Integer; |
29 |
Extensions: Integer; |
30 |
DataAddr: Integer; |
31 |
DataSize: Integer; |
32 |
NamesAddr: Integer; |
33 |
NamesSize: Integer; |
34 |
Ident2: array[0..$F] of Byte; |
35 |
end; |
36 |
TFilesMap = array of packed record |
37 |
Extension: array[0..$3] of Char; |
38 |
DataAddr: Integer; |
39 |
NameAddr: Integer; |
40 |
FileSize: Integer; |
41 |
FileType: LongWord; |
42 |
end; |
43 |
TNamedFilesMap = array of packed record |
44 |
FileNumber: Integer; |
45 |
blubb: Integer; |
46 |
end; |
47 |
|
48 |
TTypeIdent = array[0..7] of Byte; |
49 |
TFileType = record |
50 |
Extension: String[4]; |
51 |
StructID: Integer; |
52 |
Description: String; |
53 |
IdentWin: TTypeIdent; |
54 |
IdentMac: TTypeIdent; |
55 |
end; |
56 |
|
57 |
TExtensionsMap = array of packed record |
58 |
Ident: TTypeIdent; |
59 |
Extension: array[0..$3] of Char; |
60 |
ExtCount: Integer; |
61 |
end; |
62 |
|
63 |
TFileInfo = packed record |
64 |
ID: Integer; |
65 |
Name: String; |
66 |
Extension: String[4]; |
67 |
Size: Integer; |
68 |
FileType: LongWord; |
69 |
DatAddr: Integer; |
70 |
end; |
71 |
TFiles = array of TFileInfo; |
72 |
|
73 |
TRawDataInfo = record |
74 |
SrcID: Integer; |
75 |
SrcOffset: Integer; |
76 |
RawAddr: Integer; |
77 |
RawSize: Integer; |
78 |
LocSep: Boolean; |
79 |
end; |
80 |
TRawDataList = array of TRawDataInfo; |
81 |
|
82 |
TSortType = ( |
83 |
ST_IDAsc, |
84 |
ST_IDDesc, |
85 |
ST_NameAsc, |
86 |
ST_NameDesc, |
87 |
ST_ExtAsc, |
88 |
ST_ExtDesc, |
89 |
ST_ExtNameAsc, |
90 |
ST_ExtNameDesc |
91 |
); |
92 |
|
93 |
TExtensionFormat = ( |
94 |
EF_ExtOnly, |
95 |
EF_ExtCount |
96 |
); |
97 |
|
98 |
TByteData = array of Byte; |
99 |
|
100 |
TAppSettings = record |
101 |
DatPath: String[250]; |
102 |
ExtractPath: String[250]; |
103 |
CharSet: TFontCharSet; |
104 |
HideUnusedData: Boolean; |
105 |
end; |
106 |
|
107 |
TToolList = array of record |
108 |
context: String; |
109 |
name: String; |
110 |
exts: String; |
111 |
end; |
112 |
|
113 |
TLinkByName = record |
114 |
SrcOffset: Integer; |
115 |
Destination: String; |
116 |
end; |
117 |
TLinkByID = record |
118 |
SrcOffset: Integer; |
119 |
Destination: Integer; |
120 |
end; |
121 |
TLinks = record |
122 |
ByName: array of TLinkByName; |
123 |
ByID: array of TLinkByID; |
124 |
end; |
125 |
|
126 |
{ |
127 |
TLevelInfo = record |
128 |
Ident: array[0..$13] of Byte; |
129 |
LevelNumber: Byte; |
130 |
end; |
131 |
|
132 |
TDatLinks = array of record |
133 |
Src_Offset: Integer; |
134 |
Target: Integer; |
135 |
end; |
136 |
} |
137 |
|
138 |
const |
139 |
CrLf: String[2] = #13#10; |
140 |
|
141 |
implementation |
142 |
|
143 |
end. |