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 |
TDatOSIdent = array[0..3] of Byte; |
26 |
TDatGlobalIdent = array[0..15] of Byte; |
27 |
|
28 |
THeader = packed record |
29 |
OSIdent: TDatOSIdent; |
30 |
GlobalIdent:TDatGlobalIdent; |
31 |
Files: Integer; |
32 |
NamedFiles: Integer; |
33 |
Extensions: Integer; |
34 |
DataAddr: Integer; |
35 |
DataSize: Integer; |
36 |
NamesAddr: Integer; |
37 |
NamesSize: Integer; |
38 |
Ident2: array[0..$F] of Byte; |
39 |
end; |
40 |
TFilesMap = array of packed record |
41 |
Extension: array[0..$3] of Char; |
42 |
DataAddr: Integer; |
43 |
NameAddr: Integer; |
44 |
FileSize: Integer; |
45 |
FileType: LongWord; |
46 |
end; |
47 |
TNamedFilesMap = array of packed record |
48 |
FileNumber: Integer; |
49 |
blubb: Integer; |
50 |
end; |
51 |
|
52 |
TTypeIdent = array[0..7] of Byte; |
53 |
TFileType = record |
54 |
Extension: String[4]; |
55 |
StructID: Integer; |
56 |
Name: String; |
57 |
IdentWin: TTypeIdent; |
58 |
IdentMac: TTypeIdent; |
59 |
end; |
60 |
|
61 |
TExtensionsMap = array of packed record |
62 |
Ident: TTypeIdent; |
63 |
Extension: array[0..$3] of Char; |
64 |
ExtCount: Integer; |
65 |
end; |
66 |
|
67 |
TFileInfo = packed record |
68 |
ID: Integer; |
69 |
Name: String; |
70 |
Extension: String[4]; |
71 |
Size: Integer; |
72 |
FileType: LongWord; |
73 |
DatAddr: Integer; |
74 |
end; |
75 |
TFiles = array of TFileInfo; |
76 |
|
77 |
TRawDataInfo = record |
78 |
Name: String; |
79 |
SrcID: Integer; |
80 |
SrcOffset: Integer; |
81 |
RawAddr: Integer; |
82 |
RawSize: Integer; |
83 |
LocSep: Boolean; |
84 |
end; |
85 |
TRawDataList = array of TRawDataInfo; |
86 |
|
87 |
TSortType = ( |
88 |
ST_IDAsc, |
89 |
ST_IDDesc, |
90 |
ST_NameAsc, |
91 |
ST_NameDesc, |
92 |
ST_ExtAsc, |
93 |
ST_ExtDesc, |
94 |
ST_ExtNameAsc, |
95 |
ST_ExtNameDesc |
96 |
); |
97 |
|
98 |
TExtensionFormat = ( |
99 |
EF_ExtOnly, |
100 |
EF_ExtCount |
101 |
); |
102 |
|
103 |
TByteData = array of Byte; |
104 |
|
105 |
TAppSettings = record |
106 |
DatPath: String[250]; |
107 |
ExtractPath: String[250]; |
108 |
CharSet: TFontCharSet; |
109 |
HideUnusedData: Boolean; |
110 |
end; |
111 |
|
112 |
TToolList = array of record |
113 |
context: String; |
114 |
name: String; |
115 |
exts: String; |
116 |
end; |
117 |
|
118 |
|
119 |
TLinkByName = record |
120 |
SrcOffset: Integer; |
121 |
Destination: String; |
122 |
end; |
123 |
TLinkByID = record |
124 |
SrcOffset: Integer; |
125 |
Destination: Integer; |
126 |
end; |
127 |
TLinks = record |
128 |
ByName: array of TLinkByName; |
129 |
ByID: array of TLinkByID; |
130 |
end; |
131 |
|
132 |
TDatLink = record |
133 |
SrcOffset: Integer; |
134 |
DestID: Integer; |
135 |
PosDestExts: String; |
136 |
end; |
137 |
TDatLinkList = array of TDatLink; |
138 |
|
139 |
{ |
140 |
TLevelInfo = record |
141 |
Ident: array[0..$13] of Byte; |
142 |
LevelNumber: Byte; |
143 |
end; |
144 |
|
145 |
TDatLinks = array of record |
146 |
Src_Offset: Integer; |
147 |
Target: Integer; |
148 |
end; |
149 |
} |
150 |
|
151 |
const |
152 |
CrLf: String[2] = #13#10; |
153 |
|
154 |
implementation |
155 |
|
156 |
end. |