2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2007-04-27 12:58:35 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* 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.
|
2007-04-27 12:58:35 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
#ifndef CRUISE_VARS_H
|
|
|
|
#define CRUISE_VARS_H
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
#include "common/file.h"
|
|
|
|
|
|
|
|
namespace Cruise {
|
|
|
|
|
2007-12-24 01:05:36 +00:00
|
|
|
#define NBCOLORS 256
|
|
|
|
#define NBSCREENS 8
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct menuElementSubStruct {
|
|
|
|
struct menuElementSubStruct *pNext;
|
2007-10-29 20:56:19 +00:00
|
|
|
int16 ovlIdx;
|
|
|
|
int16 header;
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct menuElementStruct {
|
|
|
|
struct menuElementStruct *next;
|
|
|
|
const char *string;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int varA;
|
2009-05-17 05:12:10 +00:00
|
|
|
bool selected;
|
2007-04-27 22:33:45 +00:00
|
|
|
unsigned char color;
|
|
|
|
gfxEntryStruct *gfx;
|
|
|
|
menuElementSubStruct *ptrSub;
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
typedef int32(*opcodeTypeFunction)();
|
|
|
|
typedef int16(*opcodeFunction)();
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
extern uint8 *_systemFNT;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 fontFileIndex;
|
|
|
|
|
2007-12-18 20:12:42 +00:00
|
|
|
extern uint8 itemColor;
|
|
|
|
extern uint8 selectColor;
|
|
|
|
extern uint8 titleColor;
|
|
|
|
extern uint8 subColor;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-12-18 20:12:42 +00:00
|
|
|
extern int16 lowMemory;
|
|
|
|
extern int16 scroll;
|
2007-11-10 17:15:48 +00:00
|
|
|
extern int16 switchPal;
|
2007-12-18 20:12:42 +00:00
|
|
|
extern char cmdLine[90];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-12-24 16:57:14 +00:00
|
|
|
extern int16 masterScreen;
|
2007-12-18 20:12:42 +00:00
|
|
|
extern int16 doFade;
|
|
|
|
extern int16 fadeFlag;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-12-18 20:12:42 +00:00
|
|
|
struct preloadStruct {
|
2007-11-10 17:15:48 +00:00
|
|
|
char name[15];
|
2007-11-08 22:59:29 +00:00
|
|
|
int32 size;
|
|
|
|
int32 sourceSize;
|
2007-04-27 22:33:45 +00:00
|
|
|
uint8 *ptr;
|
2007-11-08 22:59:29 +00:00
|
|
|
int16 nofree;
|
|
|
|
int16 protect;
|
|
|
|
int16 ovl;
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct filesData2Struct {
|
2007-04-27 12:58:35 +00:00
|
|
|
int16 field_0;
|
|
|
|
int16 field_2;
|
|
|
|
};
|
|
|
|
|
2008-09-08 14:00:26 +00:00
|
|
|
struct dataFileName {
|
2007-11-10 17:15:48 +00:00
|
|
|
char name[13];
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct setHeaderEntry {
|
2009-03-22 09:37:49 +00:00
|
|
|
int32 offset; // offset ptr
|
2007-04-27 12:58:35 +00:00
|
|
|
int16 width;
|
|
|
|
int16 height;
|
2007-04-27 22:33:45 +00:00
|
|
|
int16 type; // resource type, ie. sprites 0,1,4,5 and 8
|
2007-04-27 12:58:35 +00:00
|
|
|
int16 transparency;
|
2009-03-22 09:37:49 +00:00
|
|
|
int16 hotspotY;
|
|
|
|
int16 hotspotX;
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct volumeDataStruct {
|
2007-04-27 12:58:35 +00:00
|
|
|
char ident[10];
|
2008-09-08 14:00:26 +00:00
|
|
|
dataFileName *ptr;
|
2007-04-27 12:58:35 +00:00
|
|
|
int16 diskNumber;
|
|
|
|
int32 size;
|
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct fileEntry {
|
2007-11-10 17:15:48 +00:00
|
|
|
char name[14];
|
2007-04-27 12:58:35 +00:00
|
|
|
int32 offset;
|
|
|
|
int32 size;
|
|
|
|
int32 extSize;
|
2007-04-27 22:33:45 +00:00
|
|
|
int32 unk3; // unused
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct dataFileEntrySub {
|
|
|
|
uint8 *ptr;
|
|
|
|
int16 index; // sprite index
|
2007-11-08 22:59:29 +00:00
|
|
|
char name[13];
|
2007-04-27 22:33:45 +00:00
|
|
|
int16 transparency; // sprite transparency
|
2007-11-05 20:24:20 +00:00
|
|
|
uint8 *ptrMask;
|
2007-04-27 22:33:45 +00:00
|
|
|
uint8 resourceType; // sprite and image type 2,4,8 , fnt = 7, spl = 6
|
2007-11-08 22:59:29 +00:00
|
|
|
int16 compression;
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
struct dataFileEntry {
|
2007-11-08 22:59:29 +00:00
|
|
|
uint16 widthInColumn;
|
|
|
|
uint16 width;
|
|
|
|
uint16 resType;
|
|
|
|
uint16 height;
|
2007-04-27 12:58:35 +00:00
|
|
|
dataFileEntrySub subData;
|
|
|
|
};
|
2009-02-09 11:30:18 +00:00
|
|
|
|
|
|
|
struct SoundEntry {
|
|
|
|
int16 frameNum;
|
|
|
|
uint16 frequency;
|
|
|
|
int16 volume;
|
|
|
|
};
|
|
|
|
|
2007-12-20 14:30:51 +00:00
|
|
|
/*
|
2007-04-27 22:33:45 +00:00
|
|
|
struct systemStringsStruct {
|
2007-04-27 12:58:35 +00:00
|
|
|
int8 param;
|
2007-11-10 17:15:48 +00:00
|
|
|
char string[12];
|
|
|
|
char bootScriptName[8];
|
2007-04-27 12:58:35 +00:00
|
|
|
};
|
2007-12-20 14:30:51 +00:00
|
|
|
*/
|
2007-12-18 20:12:42 +00:00
|
|
|
extern preloadStruct preloadData[64];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern volumeDataStruct volumeData[20];
|
|
|
|
|
|
|
|
extern int32 volumeDataLoaded;
|
|
|
|
|
|
|
|
extern int16 numOfDisks;
|
|
|
|
|
2010-10-15 08:57:18 +00:00
|
|
|
extern char lastOverlay[38];
|
|
|
|
extern char nextOverlay[38];
|
2007-12-20 14:30:51 +00:00
|
|
|
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 currentActiveMenu;
|
2007-10-29 22:03:55 +00:00
|
|
|
extern int16 autoMsg;
|
2007-10-29 20:56:19 +00:00
|
|
|
extern menuElementSubStruct* linkedRelation;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 main21;
|
|
|
|
extern int16 main22;
|
2007-10-29 22:03:55 +00:00
|
|
|
extern int16 userWait;
|
|
|
|
extern int16 autoTrack;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern int16 currentDiskNumber;
|
|
|
|
|
|
|
|
extern int16 volumeNumEntry;
|
2007-04-27 22:33:45 +00:00
|
|
|
extern fileEntry *volumePtrToFileDescriptor;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern uint32 volumeFileDescriptorSize;
|
|
|
|
extern int16 volumeSizeOfEntry;
|
|
|
|
extern int16 volumeNumberOfEntry;
|
|
|
|
|
2007-12-18 20:12:42 +00:00
|
|
|
extern int16 displayOn;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2009-06-10 12:15:50 +00:00
|
|
|
extern int16 protectionCode;
|
|
|
|
|
2009-02-09 11:30:18 +00:00
|
|
|
#define NUM_FILE_ENTRIES 257
|
|
|
|
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 globalVars[2000];
|
2009-02-09 11:30:18 +00:00
|
|
|
extern dataFileEntry filesDatabase[NUM_FILE_ENTRIES];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern int16 bootOverlayNumber;
|
|
|
|
|
2009-02-09 11:30:18 +00:00
|
|
|
extern SoundEntry soundList[4];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern opcodeTypeFunction opcodeTypeTable[64];
|
|
|
|
|
|
|
|
extern int16 positionInStack;
|
|
|
|
extern actorStruct actorHead;
|
|
|
|
|
2007-11-10 23:20:47 +00:00
|
|
|
extern int16 stateID;
|
2007-11-11 01:04:40 +00:00
|
|
|
extern int16 xdial;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
extern uint8 *currentData3DataPtr;
|
|
|
|
extern uint8 *scriptDataPtrTable[7];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern int16 currentScriptOpcodeType;
|
|
|
|
|
|
|
|
extern int16 saveOpcodeVar;
|
|
|
|
|
2007-10-29 20:56:19 +00:00
|
|
|
extern int16 narratorOvl;
|
|
|
|
extern int16 narratorIdx;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-12-18 20:12:42 +00:00
|
|
|
extern int16 songLoaded;
|
|
|
|
extern int16 songPlayed;
|
|
|
|
extern int16 songLoop;
|
|
|
|
extern int16 activeMouse;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 userEnabled;
|
|
|
|
extern int16 var5;
|
2007-10-27 18:15:38 +00:00
|
|
|
extern int16 dialogueEnabled;
|
2007-11-11 01:04:40 +00:00
|
|
|
extern int16 dialogueOvl;
|
|
|
|
extern int16 dialogueObj;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 userDelay;
|
|
|
|
extern int16 sysKey;
|
2007-10-27 18:15:38 +00:00
|
|
|
extern int16 sysX;
|
|
|
|
extern int16 sysY;
|
2007-12-18 20:12:42 +00:00
|
|
|
extern int16 automoveInc;
|
|
|
|
extern int16 automoveMax;
|
|
|
|
extern int16 isMessage;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 automaticMode;
|
2007-10-27 18:15:38 +00:00
|
|
|
extern int16 aniX;
|
|
|
|
extern int16 aniY;
|
2007-04-27 20:31:43 +00:00
|
|
|
extern bool animationStart;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-10-29 22:03:55 +00:00
|
|
|
extern int16 autoOvl;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 var39;
|
2009-04-18 10:16:08 +00:00
|
|
|
extern int16 playerMenuEnabled;
|
2007-04-27 12:58:35 +00:00
|
|
|
extern int16 var39;
|
|
|
|
extern int16 var41;
|
|
|
|
extern int16 var42;
|
|
|
|
extern int16 var45;
|
|
|
|
extern int16 var46;
|
|
|
|
extern int16 var47;
|
|
|
|
extern int16 var48;
|
|
|
|
extern int16 flagCt;
|
|
|
|
|
2007-12-24 01:05:36 +00:00
|
|
|
extern uint8 newPal[NBCOLORS*3];
|
|
|
|
extern uint8 workpal[NBCOLORS*3];
|
|
|
|
extern uint8 palScreen[NBSCREENS][NBCOLORS*3];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-12-20 14:30:51 +00:00
|
|
|
//extern systemStringsStruct systemStrings;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-11-10 17:15:48 +00:00
|
|
|
extern char currentCtpName[40];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern int16 saveVar1;
|
2007-04-27 22:33:45 +00:00
|
|
|
extern uint8 saveVar2[97]; // recheck size
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
extern int16 numberOfWalkboxes; // saveVar3
|
2007-12-27 12:05:43 +00:00
|
|
|
extern int16 walkboxColor[15]; // saveVar4 // Type: 0x00 - non walkable, 0x01 - walkable, 0x02 - exit zone
|
|
|
|
extern int16 walkboxState[15]; // saveVar5 // walkbox can change its type: 0x00 - not changeable, 0x01 - changeable
|
2009-01-16 02:43:41 +00:00
|
|
|
// Assumption: To change the type: walkboxColor[i] -= walkboxChane[i] and vice versa
|
2007-11-10 17:15:48 +00:00
|
|
|
extern uint8 lastAni[16];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
extern int32 loadFileVar1;
|
|
|
|
|
2007-12-27 12:05:43 +00:00
|
|
|
extern int16 loadCtFromSave;
|
2007-04-27 22:33:45 +00:00
|
|
|
extern int16 ctp_routeCoordCount; // ctpVar2 // number of path-finding coordinates
|
|
|
|
extern int16 ctp_routeCoords[20][2]; // ctpVar3 // path-finding coordinates array
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
/* ctp_routeCoords:
|
|
|
|
|
|
|
|
correct size would be: ctp_routes[routeCoordCount * 4]
|
|
|
|
coordinate information with x (2 bytes) and y (2 bytes)
|
|
|
|
*/
|
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
extern int16 ctp_routes[20][10]; // path-finding line information
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
/* ctp_routes:
|
2008-01-27 19:47:41 +00:00
|
|
|
|
2007-04-27 12:58:35 +00:00
|
|
|
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
|
|
|
|
*/
|
2007-12-27 12:05:43 +00:00
|
|
|
extern int16 ctp_walkboxTable[15][40]; // ctpVar5 // walkboxes coordinates and lines
|
|
|
|
extern int16 walkboxColorIndex[16];
|
|
|
|
extern int16 walkboxZoom[15]; // ctpVar7 // scaling information for walkboxes
|
2007-12-27 17:37:38 +00:00
|
|
|
extern int16 distanceTable[20][10];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-12-24 01:05:36 +00:00
|
|
|
extern int16 flagSpeed;
|
|
|
|
extern int16 speedGame;
|
|
|
|
extern int16 oldSpeedGame;
|
2007-04-27 12:58:35 +00:00
|
|
|
|
2007-04-27 22:33:45 +00:00
|
|
|
extern uint8 globalScreen[320 * 200];
|
2007-04-27 12:58:35 +00:00
|
|
|
|
|
|
|
//extern OSystem *osystem;
|
|
|
|
|
|
|
|
} // End of namespace Cruise
|
|
|
|
|
2007-04-27 15:35:28 +00:00
|
|
|
#endif
|