blob: 7d9d7d0c9998631b38215a8bb0d8176cf8bab30c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
*
*/
#ifndef CRUISE_OVERLAY_H
#define CRUISE_OVERLAY_H
namespace Cruise {
struct importScriptStruct {
uint16 var0;
uint16 var1;
uint16 type;
uint16 offset;
uint16 offsetToName;
};
struct exportEntryStruct {
uint16 var0;
uint16 var2;
uint16 var4;
uint16 idx;
uint16 offsetToName;
};
struct ovlData3Struct {
uint8 *dataPtr; //0
short int sizeOfData; //4
short int offsetToSubData3; //6
short int offsetToImportData; //8
short int offsetToSubData2;
short int offsetToImportName;
short int offsetToSubData5;
short int sysKey;
short int var12;
short int numRelocGlob;
short int subData2Size;
short int var18;
short int var1A;
};
struct stringEntryStruct {
char *string;
short int length;
short int idx;
};
struct linkDataStruct {
uint16 type;
uint16 id;
uint16 offsetVerbeName;
uint16 verbOverlay;
uint16 verbNumber;
uint16 obj1Overlay;
uint16 obj1Number;
uint16 obj2Overlay;
uint16 obj2Number;
int16 field_12;
int16 field_14;
int16 field_16;
int16 field_18;
int16 field_1A;
int16 field_1C;
int16 field_1E;
int16 field_20;
};
struct importDataStruct {
uint16 var0; // 0
uint16 var1; // 2
uint16 linkType; // 4
uint16 linkIdx; // 6
uint16 nameOffset;
};
#define MULTIPLE 0
#define VARIABLE 1
#define UNIQUE 2
#define THEME 3
struct objDataStruct {
int16 var0;
int16 type;
int16 var2;
int16 var3;
int16 var4;
int16 var5;
int16 stateTableIdx;
};
struct objectParams {
int16 X;
int16 Y;
int16 Z;
int16 frame;
int16 scale;
int16 state;
};
struct ovlDataStruct {
ovlData3Struct *arrayProc;
uint8 *ptr1;
objDataStruct *arrayObject;
objectParams *arrayStates;
objectParams *arrayObjVar;
stringEntryStruct *stringTable;
exportEntryStruct *arraySymbGlob;
importDataStruct *arrayRelocGlob;
linkDataStruct *arrayMsgRelHeader;
uint8 *nameVerbGlob;
uint8 *arrayNameObj;
uint8 *arrayNameRelocGlob;
uint8 *arrayNameSymbGlob;
uint8 *data4Ptr;
uint8 *ptr8;
unsigned short int numProc;
unsigned short int numRel;
unsigned short int numSymbGlob;
unsigned short int numRelocGlob;
unsigned short int numMsgRelHeader;
unsigned short int numObj;
unsigned short int numStrings;
unsigned short int size8;
unsigned short int size9;
unsigned short int nameExportSize;
unsigned short int exportNamesSize;
unsigned short int specialString2Length;
unsigned short int sizeOfData4;
unsigned short int size12;
unsigned short int specialString1Length;
unsigned short int scriptNumber;
};
struct overlayStruct {
char overlayName[14];
ovlDataStruct *ovlData;
short int alreadyLoaded;
char state;
char field_15;
char field_16;
char field_17;
char field_18;
char field_19;
char field_1A;
char field_1B;
char field_1C;
char field_1D;
char field_1E;
char field_1F;
char field_20;
char field_21;
char field_22;
char field_23;
char field_24;
char field_25;
short int executeScripts;
};
extern overlayStruct overlayTable[90];
extern int numOfLoadedOverlay;
void initOverlayTable(void);
int loadOverlay(const uint8 * scriptName);
int32 findOverlayByName2(const uint8 * name);
int findOverlayByName(const char *overlayName);
int releaseOverlay(const char *name);
} // End of namespace Cruise
#endif
|