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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
/* 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_VARS_H
#define CRUISE_VARS_H
#include "common/file.h"
namespace Cruise {
struct menuElementSubStruct {
struct menuElementSubStruct *pNext;
int16 var2;
int16 var4;
};
struct menuElementStruct {
struct menuElementStruct *next;
const char *string;
int x;
int y;
int varA;
int varC;
unsigned char color;
gfxEntryStruct *gfx;
menuElementSubStruct *ptrSub;
};
typedef int32(*opcodeTypeFunction) (void);
typedef int16(*opcodeFunction) (void);
extern uint8 *_systemFNT;
extern int16 fontFileIndex;
extern uint8 video2;
extern uint8 video3;
extern uint8 video4;
extern uint8 colorOfSelectedSaveDrive;
extern int16 initVar1;
extern int16 initVar2;
extern int16 initVar3;
extern uint8 initVar4[90];
extern int16 currentActiveBackgroundPlane;
extern int16 main5;
extern int16 var22;
struct mediumVarStruct {
uint8 name[16];
int16 field_10;
int16 field_12;
int16 field_14;
int16 field_16;
uint8 *ptr;
int16 field_1C;
int16 field_1E;
int16 field_20;
};
struct filesDataStruct {
uint8 *field_0;
uint8 *field_4;
};
struct filesData2Struct {
int16 field_0;
int16 field_2;
};
struct fileName {
uint8 name[13];
};
struct setHeaderEntry {
int16 field_0; // offset ptr part 1
int16 field_2; // offset ptr part 2
int16 width;
int16 height;
int16 type; // resource type, ie. sprites 0,1,4,5 and 8
int16 transparency;
int16 field_C;
int16 field_E;
};
struct volumeDataStruct {
char ident[10];
fileName *ptr;
int16 diskNumber;
int32 size;
};
struct fileEntry {
uint8 name[14];
int32 offset;
int32 size;
int32 extSize;
int32 unk3; // unused
};
struct dataFileEntrySub {
uint8 *ptr;
int16 index; // sprite index
char name[14];
int16 transparency; // sprite transparency
uint8 *ptr2;
uint8 resourceType; // sprite and image type 2,4,8 , fnt = 7, spl = 6
uint8 field_1B;
int16 field_1C;
};
struct dataFileEntry {
int16 widthInColumn;
int16 width;
int16 resType;
int16 height;
dataFileEntrySub subData;
};
struct systemStringsStruct {
int8 param;
uint8 string[12];
uint8 bootScriptName[8];
};
extern filesDataStruct filesData[90];
extern filesData2Struct filesData2[90];
extern mediumVarStruct mediumVar[64];
extern volumeDataStruct volumeData[20];
extern int32 volumeDataLoaded;
extern int16 numOfDisks;
extern uint8 scriptNameBuffer[15];
extern int16 currentActiveMenu;
extern int16 main14;
extern int16 linkedRelation;
extern int16 main21;
extern int16 main22;
extern int16 main7;
extern int16 main8;
extern int16 currentDiskNumber;
#ifdef PALMOS_MODE
extern Common::File *_currentVolumeFile;
#define currentVolumeFile (*_currentVolumeFile)
#else
extern Common::File currentVolumeFile;
#endif
extern int16 volumeNumEntry;
extern fileEntry *volumePtrToFileDescriptor;
extern uint32 volumeFileDescriptorSize;
extern int16 volumeSizeOfEntry;
extern int16 volumeNumberOfEntry;
extern int16 affichePasMenuJoueur;
extern int16 globalVars[2000];
extern dataFileEntry filesDatabase[257];
extern int16 bootOverlayNumber;
extern int16 initVar5[12];
extern opcodeTypeFunction opcodeTypeTable[64];
extern int16 positionInStack;
extern actorStruct actorHead;
extern int16 setup1;
extern uint8 *currentData3DataPtr;
extern uint8 *scriptDataPtrTable[7];
extern int16 currentScriptOpcodeType;
extern int16 saveOpcodeVar;
extern int16 var30;
extern int16 var31;
extern int16 var1;
extern int16 var2;
extern int16 var3;
extern int16 var4;
extern int16 userEnabled;
extern int16 var5;
extern int16 dialogueEnabled;
extern int16 var7;
extern int16 var8;
extern int16 userDelay;
extern int16 sysKey;
extern int16 sysX;
extern int16 sysY;
extern int16 var13;
extern int16 var14;
extern int16 var20;
extern int16 var23;
extern int16 var24;
extern int16 automaticMode;
extern int16 aniX;
extern int16 aniY;
extern bool animationStart;
extern int16 main17;
extern int16 var39;
extern int16 entrerMenuJoueur;
extern int16 var39;
extern int16 var41;
extern int16 var42;
extern int16 var45;
extern int16 var46;
extern int16 var47;
extern int16 var48;
extern int16 flagCt;
extern int8 var50[64];
extern int16 palette[256 * 3];
extern systemStringsStruct systemStrings;
extern uint8 currentCtpName[40];
extern int16 saveVar1;
extern uint8 saveVar2[97]; // recheck size
extern int16 numberOfWalkboxes; // saveVar3
extern int16 walkboxType[15]; // saveVar4 // Type: 0x00 - non walkable, 0x01 - walkable, 0x02 - exit zone
extern int16 walkboxChange[15]; // saveVar5 // walkbox can change its type: 0x00 - not changeable, 0x01 - changeable
// Assumption: To change the type: walkboxType[i] -= walkboxChane[i] and vice versa
extern uint8 saveVar6[16];
extern int32 loadFileVar1;
extern int16 ctpVar1;
extern int16 ctp_routeCoordCount; // ctpVar2 // number of path-finding coordinates
extern int16 ctp_routeCoords[20][2]; // ctpVar3 // path-finding coordinates array
/* ctp_routeCoords:
correct size would be: ctp_routes[routeCoordCount * 4]
coordinate information with x (2 bytes) and y (2 bytes)
*/
extern int16 ctp_routes[20][10]; // path-finding line information
/* ctp_routes:
correct size would be: ctp_routes[routeCoordCount * 20 * 2]
array is seperate in 20 * 2 bytes slices.
first 2 bytes of the slice indicate how many coordinates/lines are following (lineCount)
after that there are lineCount * 2 bytes following with indexes pointing on the routeCoords table
the root x,y for the lines is the coordinate in the routeCoords array, which fits to the current slice
for the 20 * i slice the root x,y is routeCoords[i], routeCoords[i+2]
the unused rest of the slice if filled up with 0xFF
*/
extern uint16 ctp_walkboxTable[15 * 40]; // ctpVar5 // walkboxes coordinates and lines
extern int8 ctpVar6[32];
extern int16 ctp_scale[15]; // ctpVar7 // scaling information for walkboxes
extern int16 ctpVar8[200];
extern int16 ctpVar14;
extern int16 bgVar1;
extern int16 bgVar2;
extern int16 bgVar3;
extern uint8 globalScreen[320 * 200];
extern uint8 scaledScreen[640 * 400];
//extern OSystem *osystem;
} // End of namespace Cruise
#endif
|