2007-05-30 21:56:52 +00:00
|
|
|
/* 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.
|
2007-01-14 21:29:12 +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.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PARALLACTION_H
|
|
|
|
#define PARALLACTION_H
|
|
|
|
|
2007-04-09 10:03:15 +00:00
|
|
|
#include "common/str.h"
|
2007-08-16 19:47:22 +00:00
|
|
|
#include "common/stack.h"
|
2007-08-24 20:14:51 +00:00
|
|
|
#include "common/array.h"
|
2007-12-10 20:29:51 +00:00
|
|
|
#include "common/savefile.h"
|
2007-04-09 10:03:15 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
#include "engines/engine.h"
|
2007-04-09 10:03:15 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
#include "parallaction/inventory.h"
|
2007-02-19 22:34:00 +00:00
|
|
|
#include "parallaction/parser.h"
|
2007-08-24 20:14:51 +00:00
|
|
|
#include "parallaction/objects.h"
|
2007-02-25 20:35:47 +00:00
|
|
|
#include "parallaction/disk.h"
|
2007-04-09 10:03:15 +00:00
|
|
|
#include "parallaction/walk.h"
|
2007-02-11 21:17:37 +00:00
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
#define PATH_LEN 200
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2007-07-13 20:50:57 +00:00
|
|
|
extern OSystem *g_system;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
|
|
|
namespace Parallaction {
|
|
|
|
|
2007-04-07 10:02:59 +00:00
|
|
|
enum {
|
|
|
|
kDebugDisk = 1 << 0,
|
|
|
|
kDebugWalk = 1 << 1,
|
2007-09-16 08:43:34 +00:00
|
|
|
kDebugParser = 1 << 2,
|
2007-04-07 10:02:59 +00:00
|
|
|
kDebugDialogue = 1 << 3,
|
|
|
|
kDebugGraphics = 1 << 4,
|
2007-09-16 08:43:34 +00:00
|
|
|
kDebugExec = 1 << 5,
|
2007-05-12 12:56:35 +00:00
|
|
|
kDebugInput = 1 << 6,
|
2007-05-13 12:41:42 +00:00
|
|
|
kDebugAudio = 1 << 7,
|
2007-10-21 13:10:36 +00:00
|
|
|
kDebugMenu = 1 << 8,
|
|
|
|
kDebugInventory = 1 << 9
|
2007-04-07 10:02:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2007-06-13 20:00:39 +00:00
|
|
|
GF_DEMO = 1 << 0,
|
|
|
|
GF_LANG_EN = 1 << 1,
|
2007-07-01 16:12:21 +00:00
|
|
|
GF_LANG_FR = 1 << 2,
|
2007-06-13 20:00:39 +00:00
|
|
|
GF_LANG_DE = 1 << 3,
|
2007-06-16 02:43:31 +00:00
|
|
|
GF_LANG_IT = 1 << 4,
|
|
|
|
GF_LANG_MULT = 1 << 5
|
2007-04-07 10:02:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
// high values mean high priority
|
|
|
|
|
2007-02-04 08:12:33 +00:00
|
|
|
enum {
|
2007-02-17 15:37:49 +00:00
|
|
|
kPriority0 = 0,
|
|
|
|
kPriority1 = 1,
|
|
|
|
kPriority2 = 2,
|
|
|
|
kPriority3 = 3,
|
|
|
|
kPriority4 = 4,
|
|
|
|
kPriority5 = 5,
|
|
|
|
kPriority6 = 6,
|
|
|
|
kPriority7 = 7,
|
|
|
|
kPriority8 = 8,
|
|
|
|
kPriority9 = 9,
|
|
|
|
kPriority10 = 10,
|
|
|
|
kPriority11 = 11,
|
|
|
|
kPriority12 = 12,
|
|
|
|
kPriority13 = 13,
|
|
|
|
kPriority14 = 14,
|
|
|
|
kPriority15 = 15,
|
|
|
|
kPriority16 = 16,
|
|
|
|
kPriority17 = 17,
|
|
|
|
kPriority18 = 18,
|
|
|
|
kPriority19 = 19,
|
|
|
|
kPriority20 = 20,
|
2007-11-21 20:04:14 +00:00
|
|
|
kPriority21 = 21
|
2007-02-04 08:12:33 +00:00
|
|
|
};
|
2007-01-14 21:29:12 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
kMouseNone = 0,
|
|
|
|
kMouseLeftUp = 1,
|
|
|
|
kMouseLeftDown = 2,
|
|
|
|
kMouseRightUp = 3,
|
2008-01-28 00:14:17 +00:00
|
|
|
kMouseRightDown = 4
|
2007-01-14 21:29:12 +00:00
|
|
|
};
|
|
|
|
|
2007-04-07 16:40:27 +00:00
|
|
|
enum EngineFlags {
|
2008-01-28 00:14:17 +00:00
|
|
|
kEngineQuit = (1 << 0),
|
2008-01-06 20:57:46 +00:00
|
|
|
kEnginePauseJobs = (1 << 1),
|
|
|
|
kEngineInventory = (1 << 2),
|
|
|
|
kEngineWalking = (1 << 3),
|
2007-04-07 16:40:27 +00:00
|
|
|
kEngineChangeLocation = (1 << 4),
|
2008-01-06 20:57:46 +00:00
|
|
|
kEngineBlockInput = (1 << 5),
|
2008-01-28 00:14:17 +00:00
|
|
|
kEngineDragging = (1 << 6),
|
2008-02-05 10:24:22 +00:00
|
|
|
kEngineTransformedDonna = (1 << 7),
|
|
|
|
|
|
|
|
// BRA specific
|
|
|
|
kEngineReturn = (1 << 10)
|
2007-04-07 16:40:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2008-01-06 20:57:46 +00:00
|
|
|
kEvNone = 0,
|
|
|
|
kEvEnterZone = 1,
|
|
|
|
kEvExitZone = 2,
|
|
|
|
kEvAction = 3,
|
2007-04-07 16:40:27 +00:00
|
|
|
kEvOpenInventory = 4,
|
|
|
|
kEvCloseInventory = 5,
|
|
|
|
kEvHoverInventory = 6,
|
2008-01-06 20:57:46 +00:00
|
|
|
kEvWalk = 7,
|
|
|
|
kEvQuitGame = 1000,
|
|
|
|
kEvSaveGame = 2000,
|
|
|
|
kEvLoadGame = 4000
|
2007-04-07 16:40:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
kCursorArrow = -1
|
|
|
|
};
|
2007-01-14 21:29:12 +00:00
|
|
|
|
|
|
|
enum ParallactionGameType {
|
|
|
|
GType_Nippon = 1,
|
|
|
|
GType_BRA
|
|
|
|
};
|
|
|
|
|
2007-01-21 20:24:38 +00:00
|
|
|
struct PARALLACTIONGameDescription;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2007-04-07 16:40:27 +00:00
|
|
|
|
|
|
|
|
2008-04-28 09:42:29 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
extern uint16 _mouseButtons;
|
2007-10-13 21:49:38 +00:00
|
|
|
extern char _password[8];
|
2008-01-28 00:14:17 +00:00
|
|
|
extern uint16 _score;
|
|
|
|
extern uint16 _language;
|
|
|
|
extern uint32 _engineFlags;
|
|
|
|
extern char _saveData1[];
|
|
|
|
extern uint32 _commandFlags;
|
|
|
|
extern const char *_dinoName;
|
|
|
|
extern const char *_donnaName;
|
|
|
|
extern const char *_doughName;
|
|
|
|
extern const char *_drkiName;
|
|
|
|
extern const char *_minidinoName;
|
|
|
|
extern const char *_minidonnaName;
|
|
|
|
extern const char *_minidoughName;
|
|
|
|
extern const char *_minidrkiName;
|
2007-03-10 22:13:47 +00:00
|
|
|
|
2007-03-10 22:55:09 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
void waitUntilLeftClick();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-06 10:31:17 +00:00
|
|
|
class Debugger;
|
2007-03-12 20:41:25 +00:00
|
|
|
class Gfx;
|
2007-04-27 20:06:42 +00:00
|
|
|
class SoundMan;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2007-04-07 15:18:26 +00:00
|
|
|
|
2007-03-11 14:14:08 +00:00
|
|
|
struct Location {
|
|
|
|
|
2007-03-18 17:17:21 +00:00
|
|
|
Common::Point _startPosition;
|
2007-04-09 10:03:15 +00:00
|
|
|
uint16 _startFrame;
|
|
|
|
char _name[100];
|
2007-03-11 14:14:08 +00:00
|
|
|
|
2007-04-07 15:18:26 +00:00
|
|
|
CommandList _aCommands;
|
|
|
|
CommandList _commands;
|
2007-03-11 14:14:08 +00:00
|
|
|
char *_comment;
|
|
|
|
char *_endComment;
|
|
|
|
|
2008-05-05 11:02:40 +00:00
|
|
|
ZoneList _zones;
|
|
|
|
AnimationList _animations;
|
|
|
|
ProgramList _programs;
|
|
|
|
|
|
|
|
bool _hasSound;
|
|
|
|
char _soundFile[50];
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
// NS specific
|
|
|
|
WalkNodeList _walkNodes;
|
2008-05-09 01:35:43 +00:00
|
|
|
char _slideText[2][MAX_TOKEN_LEN];
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
// BRA specific
|
2008-05-05 11:02:40 +00:00
|
|
|
int _zeta0;
|
|
|
|
int _zeta1;
|
|
|
|
int _zeta2;
|
2007-08-24 20:14:51 +00:00
|
|
|
CommandList _escapeCommands;
|
2007-03-11 14:14:08 +00:00
|
|
|
};
|
|
|
|
|
2007-09-22 18:45:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-03-17 07:52:47 +00:00
|
|
|
struct Character {
|
2007-09-22 18:45:43 +00:00
|
|
|
Parallaction *_vm;
|
|
|
|
|
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
AnimationPtr _ani;
|
2007-11-22 21:51:33 +00:00
|
|
|
Frames *_head;
|
2008-01-06 20:57:46 +00:00
|
|
|
Frames *_talk;
|
2008-01-28 00:14:17 +00:00
|
|
|
Frames *_objs;
|
2007-04-09 10:03:15 +00:00
|
|
|
PathBuilder _builder;
|
2007-11-19 20:23:01 +00:00
|
|
|
WalkNodeList *_walkPath;
|
2007-03-17 17:52:30 +00:00
|
|
|
|
2007-09-22 18:45:43 +00:00
|
|
|
Character(Parallaction *vm);
|
|
|
|
void getFoot(Common::Point &foot);
|
|
|
|
void setFoot(const Common::Point &foot);
|
|
|
|
void scheduleWalk(int16 x, int16 y);
|
2007-03-17 17:52:30 +00:00
|
|
|
|
2007-09-22 18:45:43 +00:00
|
|
|
void free();
|
2007-08-28 14:30:17 +00:00
|
|
|
|
2007-09-22 18:45:43 +00:00
|
|
|
protected:
|
|
|
|
const char *_prefix;
|
|
|
|
const char *_suffix;
|
2007-08-28 14:30:17 +00:00
|
|
|
|
2007-10-30 19:41:55 +00:00
|
|
|
bool _dummy;
|
|
|
|
|
2007-09-22 18:45:43 +00:00
|
|
|
char _name[30];
|
|
|
|
char _baseName[30];
|
|
|
|
char _fullName[30];
|
|
|
|
static const char _prefixMini[];
|
|
|
|
static const char _suffixTras[];
|
|
|
|
static const char _empty[];
|
2007-08-28 14:30:17 +00:00
|
|
|
|
2007-09-22 18:45:43 +00:00
|
|
|
public:
|
|
|
|
void setName(const char *name);
|
|
|
|
const char *getName() const;
|
|
|
|
const char *getBaseName() const;
|
|
|
|
const char *getFullName() const;
|
2007-10-30 19:41:55 +00:00
|
|
|
bool dummy() const;
|
2007-03-17 07:52:47 +00:00
|
|
|
};
|
|
|
|
|
2007-03-24 21:18:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-08-14 05:38:27 +00:00
|
|
|
#define DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sig) void instParse_##sig()
|
2007-08-13 22:59:13 +00:00
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
#define DECLARE_UNQUALIFIED_COMMAND_OPCODE(op) void cmdOp_##op()
|
2007-08-14 05:38:27 +00:00
|
|
|
#define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op()
|
2007-08-13 22:59:13 +00:00
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2007-08-25 16:45:06 +00:00
|
|
|
#define NUM_LOCATIONS 120
|
2007-08-13 22:59:13 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
class Parallaction : public Engine {
|
2007-05-06 08:52:27 +00:00
|
|
|
friend class Debugger;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2007-11-03 21:06:58 +00:00
|
|
|
Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gameDesc);
|
2007-01-14 21:29:12 +00:00
|
|
|
~Parallaction();
|
|
|
|
|
|
|
|
int init();
|
|
|
|
|
2007-11-01 14:47:33 +00:00
|
|
|
virtual bool loadGame() = 0;
|
|
|
|
virtual bool saveGame() = 0;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
uint16 readInput();
|
2007-11-17 09:39:20 +00:00
|
|
|
void updateInput();
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void waitTime(uint32 t);
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2007-11-22 21:19:44 +00:00
|
|
|
enum {
|
|
|
|
kInputModeGame = 0,
|
|
|
|
kInputModeComment = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
int _inputMode;
|
|
|
|
|
|
|
|
void updateGameInput();
|
|
|
|
void updateCommentInput();
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
OpcodeSet _commandOpcodes;
|
2007-08-13 22:59:13 +00:00
|
|
|
|
2008-04-07 10:29:18 +00:00
|
|
|
struct ParallactionStruct1 {
|
2008-04-06 05:40:02 +00:00
|
|
|
CommandPtr cmd;
|
|
|
|
ZonePtr z;
|
2007-08-13 22:59:13 +00:00
|
|
|
} _cmdRunCtxt;
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
OpcodeSet _instructionOpcodes;
|
2007-08-13 22:59:13 +00:00
|
|
|
|
2008-04-07 10:29:18 +00:00
|
|
|
struct ParallactionStruct2 {
|
2008-04-06 05:40:02 +00:00
|
|
|
AnimationPtr anim;
|
|
|
|
ProgramPtr program;
|
2007-08-13 22:59:13 +00:00
|
|
|
InstructionList::iterator inst;
|
|
|
|
uint16 modCounter;
|
|
|
|
bool suspend;
|
|
|
|
} _instRunCtxt;
|
|
|
|
|
2007-08-14 18:58:47 +00:00
|
|
|
|
2007-06-18 20:11:49 +00:00
|
|
|
void showCursor(bool visible);
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void pauseJobs();
|
|
|
|
void resumeJobs();
|
2007-02-19 22:34:00 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void finalizeWalk(WalkNodeList *list);
|
2008-04-17 09:32:57 +00:00
|
|
|
int16 selectWalkFrame(const Common::Point& pos, const WalkNodePtr from);
|
|
|
|
void clipMove(Common::Point& pos, const WalkNodePtr from);
|
2007-05-13 14:38:05 +00:00
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
ZonePtr findZone(const char *name);
|
|
|
|
ZonePtr hitZone(uint32 type, uint16 x, uint16 y);
|
2008-04-17 09:32:57 +00:00
|
|
|
uint16 runZone(ZonePtr z);
|
2008-01-28 00:14:17 +00:00
|
|
|
void freeZones();
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void runDialogue(SpeakData*);
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
void runCommands(CommandList& list, ZonePtr z = nullZonePtr);
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-04-17 09:32:57 +00:00
|
|
|
AnimationPtr findAnimation(const char *name);
|
2008-01-28 00:14:17 +00:00
|
|
|
void freeAnimations();
|
2007-02-19 22:34:00 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void setBackground(const char *background, const char *mask, const char *path);
|
|
|
|
void freeBackground();
|
2007-08-11 13:07:21 +00:00
|
|
|
|
2007-03-24 21:18:08 +00:00
|
|
|
Table *_globalTable;
|
|
|
|
Table *_objectsNames;
|
|
|
|
Table *_callableNames;
|
|
|
|
Table *_localFlagNames;
|
2007-03-24 19:55:34 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
public:
|
2007-01-21 20:24:38 +00:00
|
|
|
int getGameType() const;
|
|
|
|
uint32 getFeatures() const;
|
|
|
|
Common::Language getLanguage() const;
|
|
|
|
Common::Platform getPlatform() const;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
const PARALLACTIONGameDescription *_gameDescription;
|
|
|
|
|
|
|
|
public:
|
2007-07-26 18:30:27 +00:00
|
|
|
// info
|
|
|
|
int32 _screenWidth;
|
2008-01-28 00:14:17 +00:00
|
|
|
int32 _screenHeight;
|
|
|
|
int32 _screenSize;
|
2007-07-26 18:30:27 +00:00
|
|
|
|
2007-08-06 22:03:17 +00:00
|
|
|
PathBuffer *_pathBuffer;
|
2007-07-26 18:30:27 +00:00
|
|
|
|
2007-04-27 20:06:42 +00:00
|
|
|
SoundMan *_soundMan;
|
2007-02-21 21:42:37 +00:00
|
|
|
|
2007-04-07 16:40:27 +00:00
|
|
|
Gfx* _gfx;
|
|
|
|
Disk* _disk;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2007-04-07 16:40:27 +00:00
|
|
|
Character _char;
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2008-05-07 12:44:22 +00:00
|
|
|
void setLocationFlags(uint32 flags);
|
2008-05-07 12:34:40 +00:00
|
|
|
void clearLocationFlags(uint32 flags);
|
2008-05-07 12:44:22 +00:00
|
|
|
void toggleLocationFlags(uint32 flags);
|
|
|
|
uint32 getLocationFlags();
|
2008-05-05 11:02:40 +00:00
|
|
|
|
2007-08-25 16:45:06 +00:00
|
|
|
uint32 _localFlags[NUM_LOCATIONS];
|
|
|
|
char _locationNames[NUM_LOCATIONS][32];
|
2007-04-07 16:40:27 +00:00
|
|
|
int16 _currentLocationIndex;
|
|
|
|
uint16 _numLocations;
|
|
|
|
Location _location;
|
2007-03-11 14:14:08 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
InventoryItem _activeItem;
|
|
|
|
|
2007-03-18 17:22:07 +00:00
|
|
|
Common::Point _mousePos;
|
2007-11-21 20:04:14 +00:00
|
|
|
void getCursorPos(Common::Point& p) {
|
|
|
|
p = _mousePos;
|
|
|
|
}
|
2007-03-18 17:22:07 +00:00
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
ZonePtr _activeZone;
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2007-03-18 19:35:54 +00:00
|
|
|
|
2007-08-11 17:25:57 +00:00
|
|
|
Font *_labelFont;
|
|
|
|
Font *_menuFont;
|
2008-01-04 21:24:51 +00:00
|
|
|
Font *_introFont;
|
2007-08-11 17:25:57 +00:00
|
|
|
Font *_dialogueFont;
|
|
|
|
|
2007-09-19 13:55:05 +00:00
|
|
|
Common::RandomSource _rnd;
|
2007-08-25 16:45:06 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
protected: // data
|
|
|
|
|
2007-05-06 08:52:27 +00:00
|
|
|
Debugger *_debugger;
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
struct InputData {
|
2007-04-07 16:40:27 +00:00
|
|
|
uint16 _event;
|
|
|
|
Common::Point _mousePos;
|
2008-01-06 20:57:46 +00:00
|
|
|
int16 _inventoryIndex;
|
2008-04-06 05:40:02 +00:00
|
|
|
ZonePtr _zone;
|
2008-01-06 20:57:46 +00:00
|
|
|
Label* _label;
|
2007-01-14 21:29:12 +00:00
|
|
|
};
|
|
|
|
|
2008-01-06 20:57:46 +00:00
|
|
|
bool _mouseHidden;
|
2007-07-01 16:12:21 +00:00
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
// input-only
|
2008-01-06 20:57:46 +00:00
|
|
|
InputData _input;
|
2007-01-14 21:29:12 +00:00
|
|
|
bool _actionAfterWalk; // actived when the character needs to move before taking an action
|
|
|
|
|
|
|
|
// these two could/should be merged as they carry on the same duty in two member functions,
|
|
|
|
// respectively processInput and translateInput
|
|
|
|
int16 _procCurrentHoverItem;
|
|
|
|
int16 _transCurrentHoverItem;
|
|
|
|
|
|
|
|
uint32 _baseTime;
|
2008-01-28 00:14:17 +00:00
|
|
|
char _characterName1[50]; // only used in changeCharacter
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2008-01-06 20:57:46 +00:00
|
|
|
Common::String _saveFileName;
|
2007-05-13 14:38:05 +00:00
|
|
|
|
2007-07-08 08:13:32 +00:00
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
ZonePtr _hoverZone;
|
2007-11-04 10:45:10 +00:00
|
|
|
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
protected: // members
|
|
|
|
bool detectGame(void);
|
|
|
|
|
|
|
|
void initGlobals();
|
|
|
|
void runGame();
|
2007-11-14 22:24:26 +00:00
|
|
|
void updateView();
|
2007-05-13 14:38:05 +00:00
|
|
|
uint32 getElapsedTime();
|
|
|
|
void resetTimer();
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
InputData *translateInput();
|
|
|
|
bool translateGameInput();
|
|
|
|
bool translateInventoryInput();
|
2007-01-14 21:29:12 +00:00
|
|
|
void processInput(InputData*);
|
|
|
|
|
2007-11-14 22:24:26 +00:00
|
|
|
|
|
|
|
void scheduleLocationSwitch(const char *location);
|
2007-01-14 21:29:12 +00:00
|
|
|
void doLocationEnterTransition();
|
2007-08-25 20:34:10 +00:00
|
|
|
virtual void changeLocation(char *location) = 0;
|
|
|
|
virtual void changeCharacter(const char *name) = 0;
|
2008-02-02 22:45:31 +00:00
|
|
|
virtual void runPendingZones() = 0;
|
2007-08-16 17:28:18 +00:00
|
|
|
void allocateLocationSlot(const char *name);
|
2008-01-28 00:14:17 +00:00
|
|
|
void finalizeLocationParsing();
|
|
|
|
void freeLocation();
|
|
|
|
void showLocationComment(const char *text, bool end);
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void displayComment(ExamineData *data);
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
uint16 checkDoor();
|
2007-05-13 14:38:05 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void freeCharacter();
|
2007-04-07 16:40:27 +00:00
|
|
|
|
2008-04-17 09:32:57 +00:00
|
|
|
int16 pickupItem(ZonePtr z);
|
2007-07-29 15:21:33 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void callFunction(uint index, void* parm) { }
|
2007-08-11 20:44:22 +00:00
|
|
|
|
2007-09-23 20:17:50 +00:00
|
|
|
virtual void setArrowCursor() = 0;
|
|
|
|
virtual void setInventoryCursor(int pos) = 0;
|
2007-07-29 15:21:33 +00:00
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
virtual void parseLocation(const char* name) = 0;
|
|
|
|
|
2008-04-17 09:32:57 +00:00
|
|
|
void updateDoor(ZonePtr z);
|
2007-11-18 21:32:22 +00:00
|
|
|
|
2007-11-19 20:23:01 +00:00
|
|
|
virtual void runScripts() = 0;
|
|
|
|
virtual void walk() = 0;
|
2007-11-18 21:32:22 +00:00
|
|
|
virtual void drawAnimations() = 0;
|
2007-09-02 15:17:41 +00:00
|
|
|
|
2007-10-07 19:18:41 +00:00
|
|
|
void beep();
|
2007-09-02 15:17:41 +00:00
|
|
|
|
2007-07-29 16:29:41 +00:00
|
|
|
public:
|
2008-05-09 01:35:43 +00:00
|
|
|
// const char **_zoneFlagNamesRes;
|
|
|
|
// const char **_zoneTypeNamesRes;
|
|
|
|
// const char **_commandsNamesRes;
|
2007-07-29 16:29:41 +00:00
|
|
|
const char **_callableNamesRes;
|
|
|
|
const char **_instructionNamesRes;
|
|
|
|
|
2007-11-19 20:46:28 +00:00
|
|
|
void highlightInventoryItem(ItemPosition pos, byte color);
|
|
|
|
int16 getHoverInventoryItem(int16 x, int16 y);
|
|
|
|
int addInventoryItem(ItemName item);
|
|
|
|
int addInventoryItem(ItemName item, uint32 value);
|
|
|
|
void dropItem(uint16 v);
|
|
|
|
bool isItemInInventory(int32 v);
|
|
|
|
const InventoryItem* getInventoryItem(int16 pos);
|
|
|
|
int16 getInventoryItemIndex(int16 pos);
|
|
|
|
void initInventory();
|
|
|
|
void destroyInventory();
|
|
|
|
void cleanInventory(bool keepVerbs = true);
|
|
|
|
void openInventory();
|
|
|
|
void closeInventory();
|
|
|
|
|
|
|
|
Inventory *_inventory;
|
|
|
|
InventoryRenderer *_inventoryRenderer;
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
};
|
|
|
|
|
2007-08-13 22:59:13 +00:00
|
|
|
|
2007-11-01 13:47:18 +00:00
|
|
|
class LocationName {
|
|
|
|
|
|
|
|
Common::String _slide;
|
|
|
|
Common::String _character;
|
|
|
|
Common::String _location;
|
|
|
|
|
|
|
|
bool _hasCharacter;
|
|
|
|
bool _hasSlide;
|
|
|
|
char *_buf;
|
|
|
|
|
|
|
|
public:
|
|
|
|
LocationName();
|
|
|
|
~LocationName();
|
|
|
|
|
|
|
|
void bind(const char*);
|
|
|
|
|
|
|
|
const char *location() const {
|
|
|
|
return _location.c_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool hasCharacter() const {
|
|
|
|
return _hasCharacter;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *character() const {
|
|
|
|
return _character.c_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool hasSlide() const {
|
|
|
|
return _hasSlide;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *slide() const {
|
|
|
|
return _slide.c_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *c_str() const {
|
|
|
|
return _buf;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-07-27 23:41:43 +00:00
|
|
|
class Parallaction_ns : public Parallaction {
|
|
|
|
|
|
|
|
public:
|
2007-11-03 21:06:58 +00:00
|
|
|
Parallaction_ns(OSystem* syst, const PARALLACTIONGameDescription *gameDesc) : Parallaction(syst, gameDesc) { }
|
2007-08-11 17:25:57 +00:00
|
|
|
~Parallaction_ns();
|
2007-07-27 23:41:43 +00:00
|
|
|
|
2007-07-29 14:24:31 +00:00
|
|
|
int init();
|
2007-08-12 12:44:26 +00:00
|
|
|
int go();
|
2007-07-29 15:21:33 +00:00
|
|
|
|
|
|
|
public:
|
2007-07-29 21:14:17 +00:00
|
|
|
typedef void (Parallaction_ns::*Callable)(void*);
|
|
|
|
|
2007-07-29 15:21:33 +00:00
|
|
|
virtual void callFunction(uint index, void* parm);
|
2007-09-23 20:17:50 +00:00
|
|
|
void setMousePointer(uint32 value);
|
2007-08-11 17:25:57 +00:00
|
|
|
|
2007-11-01 14:47:33 +00:00
|
|
|
bool loadGame();
|
|
|
|
bool saveGame();
|
2007-08-31 18:34:46 +00:00
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
void switchBackground(const char* background, const char* mask);
|
2007-08-31 18:34:46 +00:00
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
private:
|
2008-05-09 01:35:43 +00:00
|
|
|
LocationParser_ns *_locationParser;
|
|
|
|
|
2007-08-11 17:25:57 +00:00
|
|
|
void initFonts();
|
|
|
|
void freeFonts();
|
2008-01-06 20:57:46 +00:00
|
|
|
void renameOldSavefiles();
|
|
|
|
Common::String genSaveFileName(uint slot, bool oldStyle = false);
|
|
|
|
Common::InSaveFile *getInSaveFile(uint slot);
|
|
|
|
Common::OutSaveFile *getOutSaveFile(uint slot);
|
|
|
|
bool allPartsComplete();
|
|
|
|
void setPartComplete(const Character& character);
|
2007-07-29 16:29:41 +00:00
|
|
|
|
|
|
|
private:
|
2007-08-25 20:34:10 +00:00
|
|
|
void changeLocation(char *location);
|
|
|
|
void changeCharacter(const char *name);
|
2008-02-02 22:45:31 +00:00
|
|
|
void runPendingZones();
|
2007-11-01 15:58:33 +00:00
|
|
|
void cleanupGame();
|
2007-08-25 20:34:10 +00:00
|
|
|
|
2007-09-23 20:17:50 +00:00
|
|
|
void setArrowCursor();
|
|
|
|
void setInventoryCursor(int pos);
|
|
|
|
|
|
|
|
|
2007-08-31 18:34:46 +00:00
|
|
|
void doLoadGame(uint16 slot);
|
|
|
|
void doSaveGame(uint16 slot, const char* name);
|
|
|
|
int buildSaveFileList(Common::StringList& l);
|
|
|
|
int selectSaveFile(uint16 arg_0, const char* caption, const char* button);
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
void initResources();
|
2007-08-11 20:44:22 +00:00
|
|
|
void initCursors();
|
2008-05-09 01:35:43 +00:00
|
|
|
void initParsers();
|
2007-08-11 20:44:22 +00:00
|
|
|
|
|
|
|
static byte _mouseArrow[256];
|
2007-11-22 21:51:33 +00:00
|
|
|
Frames *_mouseComposedArrow;
|
2007-07-29 16:29:41 +00:00
|
|
|
|
2007-07-29 21:14:17 +00:00
|
|
|
static const Callable _dosCallables[25];
|
|
|
|
static const Callable _amigaCallables[25];
|
2007-07-29 17:02:08 +00:00
|
|
|
|
2008-04-17 09:32:57 +00:00
|
|
|
/*
|
|
|
|
game callables data members
|
|
|
|
*/
|
|
|
|
|
|
|
|
ZonePtr _moveSarcZone0;
|
|
|
|
ZonePtr _moveSarcZone1;
|
|
|
|
uint16 num_foglie;
|
2008-04-28 09:42:29 +00:00
|
|
|
int16 _introSarcData1;
|
|
|
|
uint16 _introSarcData2; // sarcophagus stuff to be saved
|
|
|
|
uint16 _introSarcData3; // sarcophagus stuff to be saved
|
|
|
|
|
2008-04-17 09:32:57 +00:00
|
|
|
ZonePtr _moveSarcZones[5];
|
|
|
|
ZonePtr _moveSarcExaZones[5];
|
|
|
|
AnimationPtr _rightHandAnim;
|
|
|
|
|
2007-07-29 17:02:08 +00:00
|
|
|
// common callables
|
|
|
|
void _c_play_boogie(void*);
|
|
|
|
void _c_startIntro(void*);
|
|
|
|
void _c_endIntro(void*);
|
|
|
|
void _c_moveSheet(void*);
|
|
|
|
void _c_sketch(void*);
|
|
|
|
void _c_shade(void*);
|
|
|
|
void _c_score(void*);
|
|
|
|
void _c_fade(void*);
|
|
|
|
void _c_moveSarc(void*);
|
|
|
|
void _c_contaFoglie(void*);
|
|
|
|
void _c_zeroFoglie(void*);
|
|
|
|
void _c_trasformata(void*);
|
|
|
|
void _c_offMouse(void*);
|
|
|
|
void _c_onMouse(void*);
|
|
|
|
void _c_setMask(void*);
|
|
|
|
void _c_endComment(void*);
|
|
|
|
void _c_frankenstein(void*);
|
|
|
|
void _c_finito(void*);
|
|
|
|
void _c_ridux(void*);
|
|
|
|
void _c_testResult(void*);
|
|
|
|
|
|
|
|
// dos specific callables
|
|
|
|
void _c_null(void*);
|
|
|
|
|
|
|
|
// amiga specific callables
|
|
|
|
void _c_projector(void*);
|
|
|
|
void _c_HBOff(void*);
|
|
|
|
void _c_offSound(void*);
|
|
|
|
void _c_startMusic(void*);
|
|
|
|
void _c_closeMusic(void*);
|
|
|
|
void _c_HBOn(void*);
|
|
|
|
|
2007-07-29 21:14:17 +00:00
|
|
|
const Callable *_callables;
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
protected:
|
2007-11-19 20:23:01 +00:00
|
|
|
void runScripts();
|
|
|
|
void walk();
|
2007-11-18 21:32:22 +00:00
|
|
|
void drawAnimations();
|
|
|
|
|
2008-01-06 20:57:46 +00:00
|
|
|
void parseLocation(const char *filename);
|
2008-01-28 00:14:17 +00:00
|
|
|
void initOpcodes();
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2008-02-09 23:26:45 +00:00
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
// program parser
|
|
|
|
OpcodeSet _instructionParsers;
|
|
|
|
Table *_instructionNames;
|
|
|
|
|
|
|
|
struct {
|
2007-08-25 11:45:05 +00:00
|
|
|
bool end;
|
2008-04-06 05:40:02 +00:00
|
|
|
AnimationPtr a;
|
|
|
|
InstructionPtr inst;
|
2007-08-24 20:14:51 +00:00
|
|
|
LocalVariable *locals;
|
2008-04-06 05:40:02 +00:00
|
|
|
ProgramPtr program;
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
// BRA specific
|
2008-04-06 05:40:02 +00:00
|
|
|
InstructionPtr openIf;
|
2007-08-24 20:14:51 +00:00
|
|
|
} _instParseCtxt;
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(defLocal);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(animation);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(loop);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(x);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(y);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(z);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(f);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(inc);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(set);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(move);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(put);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(call);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sound);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(null);
|
2007-08-25 11:45:05 +00:00
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endscript);
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2008-04-17 09:32:57 +00:00
|
|
|
void parseInstruction(ProgramPtr program);
|
|
|
|
void loadProgram(AnimationPtr a, const char *filename);
|
2007-08-25 11:45:05 +00:00
|
|
|
void parseLValue(ScriptVar &var, const char *str);
|
|
|
|
virtual void parseRValue(ScriptVar &var, const char *str);
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(invalid);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(set);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(clear);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(start);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(speak);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(get);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(location);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(open);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(close);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(on);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(off);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(call);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(toggle);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(drop);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(quit);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(move);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(stop);
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(invalid);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(on);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(off);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(loop);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(endloop);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(null);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(call);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(inc);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(set);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(put);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(wait);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(start);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(sound);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(move);
|
2007-09-15 12:16:43 +00:00
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(endscript);
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2007-11-14 22:24:26 +00:00
|
|
|
void selectStartLocation();
|
2007-11-01 14:47:33 +00:00
|
|
|
|
2007-11-01 14:08:55 +00:00
|
|
|
void guiStart();
|
2007-11-01 14:47:33 +00:00
|
|
|
int guiSelectCharacter();
|
2008-01-28 00:14:17 +00:00
|
|
|
void guiSplash();
|
2007-11-01 14:47:33 +00:00
|
|
|
int guiNewGame();
|
2007-11-01 14:08:55 +00:00
|
|
|
uint16 guiChooseLanguage();
|
|
|
|
uint16 guiSelectGame();
|
2007-11-01 21:24:43 +00:00
|
|
|
int guiGetSelectedBlock(const Common::Point &p);
|
2007-11-04 10:45:10 +00:00
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void showSlide(const char *name);
|
2007-07-27 23:41:43 +00:00
|
|
|
};
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
|
2007-08-25 16:45:06 +00:00
|
|
|
#define NUM_ZONES 100
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
class Parallaction_br : public Parallaction_ns {
|
|
|
|
|
|
|
|
typedef Parallaction_ns Super;
|
2007-07-27 23:41:43 +00:00
|
|
|
|
|
|
|
public:
|
2007-11-03 21:06:58 +00:00
|
|
|
Parallaction_br(OSystem* syst, const PARALLACTIONGameDescription *gameDesc) : Parallaction_ns(syst, gameDesc) { }
|
2007-08-11 17:25:57 +00:00
|
|
|
~Parallaction_br();
|
2007-07-27 23:41:43 +00:00
|
|
|
|
2007-07-29 14:24:31 +00:00
|
|
|
int init();
|
2007-08-09 19:26:20 +00:00
|
|
|
int go();
|
2007-07-29 14:24:31 +00:00
|
|
|
|
2007-07-29 18:49:24 +00:00
|
|
|
public:
|
2007-07-29 21:14:17 +00:00
|
|
|
typedef void (Parallaction_br::*Callable)(void*);
|
2007-07-29 18:49:24 +00:00
|
|
|
virtual void callFunction(uint index, void* parm);
|
|
|
|
|
2007-07-29 16:29:41 +00:00
|
|
|
public:
|
2007-08-12 13:27:48 +00:00
|
|
|
Table *_countersNames;
|
|
|
|
|
2007-07-29 16:29:41 +00:00
|
|
|
const char **_audioCommandsNamesRes;
|
|
|
|
|
2007-08-12 13:10:04 +00:00
|
|
|
int _part;
|
2007-08-12 12:24:59 +00:00
|
|
|
int _progress;
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
int16 _lipSyncVal;
|
2008-01-28 00:14:17 +00:00
|
|
|
uint _subtitleLipSync;
|
2008-02-02 21:22:05 +00:00
|
|
|
int _subtitleY;
|
|
|
|
int _subtitle[2];
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
ZonePtr _activeZone2;
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
int32 _counters[32];
|
|
|
|
|
2007-08-25 16:45:06 +00:00
|
|
|
uint32 _zoneFlags[NUM_LOCATIONS][NUM_ZONES];
|
|
|
|
|
2007-07-29 16:29:41 +00:00
|
|
|
private:
|
2008-05-09 01:35:43 +00:00
|
|
|
LocationParser_br *_locationParser;
|
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void initResources();
|
|
|
|
void initFonts();
|
|
|
|
void freeFonts();
|
|
|
|
void initOpcodes();
|
|
|
|
void initParsers();
|
2007-09-23 20:17:50 +00:00
|
|
|
|
|
|
|
void setArrowCursor();
|
|
|
|
void setInventoryCursor(int pos);
|
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
void changeLocation(char *location);
|
2007-08-25 20:34:10 +00:00
|
|
|
void changeCharacter(const char *name);
|
2008-02-02 22:45:31 +00:00
|
|
|
void runPendingZones();
|
2007-07-29 16:29:41 +00:00
|
|
|
|
2007-08-12 13:10:04 +00:00
|
|
|
void initPart();
|
|
|
|
void freePart();
|
2007-08-12 13:54:01 +00:00
|
|
|
void startPart();
|
2007-08-12 13:10:04 +00:00
|
|
|
|
2007-08-11 20:44:22 +00:00
|
|
|
void setMousePointer(int16 index);
|
|
|
|
void initCursors();
|
|
|
|
|
2008-01-28 00:14:17 +00:00
|
|
|
Frames *_dinoCursor;
|
2007-11-22 21:51:33 +00:00
|
|
|
Frames *_dougCursor;
|
|
|
|
Frames *_donnaCursor;
|
2008-01-28 00:14:17 +00:00
|
|
|
Frames *_mouseArrow;
|
2007-08-11 21:08:08 +00:00
|
|
|
|
2007-08-11 20:44:22 +00:00
|
|
|
|
2008-02-02 12:36:06 +00:00
|
|
|
static const char *_partNames[];
|
2008-02-02 12:18:36 +00:00
|
|
|
|
2008-02-02 12:36:06 +00:00
|
|
|
void guiStart();
|
|
|
|
int guiShowMenu();
|
|
|
|
void guiSplash(const char *name);
|
|
|
|
Frames* guiRenderMenuItem(const char *text);
|
2007-08-11 14:18:00 +00:00
|
|
|
|
2007-07-29 21:14:17 +00:00
|
|
|
static const Callable _dosCallables[6];
|
2007-07-29 18:49:24 +00:00
|
|
|
|
|
|
|
void _c_blufade(void*);
|
|
|
|
void _c_resetpalette(void*);
|
|
|
|
void _c_ferrcycle(void*);
|
|
|
|
void _c_lipsinc(void*);
|
|
|
|
void _c_albcycle(void*);
|
|
|
|
void _c_password(void*);
|
2007-07-29 16:29:41 +00:00
|
|
|
|
2007-07-29 21:14:17 +00:00
|
|
|
const Callable *_callables;
|
2007-08-25 20:37:41 +00:00
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
void parseLocation(const char* name);
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(zone);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(color);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(mask);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(print);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(text);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(if_op);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endif);
|
|
|
|
|
2007-08-25 11:45:05 +00:00
|
|
|
virtual void parseRValue(ScriptVar &var, const char *str);
|
2007-08-24 20:14:51 +00:00
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(location);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(open);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(close);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(on);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(off);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(call);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(drop);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(move);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(start);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(stop);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(character);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(followme);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(onmouse);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(offmouse);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(add);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(leave);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(inc);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(dec);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(ifeq);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(iflt);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(ifgt);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(let);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(music);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(fix);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(unfix);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(zeta);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(scroll);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(swap);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(give);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(text);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(part);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(testsfx);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(ret);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(onsave);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_OPCODE(offsave);
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(on);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(off);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(loop);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(inc);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(dec);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(set);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(put);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(wait);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(start);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(process);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(move);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(color);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(mask);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(print);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(text);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(mul);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(div);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(ifeq);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(iflt);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(ifgt);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(endif);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(stop);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(endscript);
|
2007-08-25 20:37:41 +00:00
|
|
|
|
2007-09-02 19:00:22 +00:00
|
|
|
void setupSubtitles(char *s, char *s2, int y);
|
2008-02-02 22:45:31 +00:00
|
|
|
void clearSubtitles();
|
2008-01-28 13:10:49 +00:00
|
|
|
#if 0
|
2007-09-02 19:00:22 +00:00
|
|
|
void jobWaitRemoveLabelJob(void *parm, Job *job);
|
|
|
|
void jobPauseSfx(void *parm, Job *job);
|
|
|
|
void jobStopFollower(void *parm, Job *job);
|
|
|
|
void jobScroll(void *parm, Job *job);
|
2008-01-28 13:10:49 +00:00
|
|
|
#endif
|
2007-07-27 23:41:43 +00:00
|
|
|
};
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
// FIXME: remove global
|
|
|
|
extern Parallaction *_vm;
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Parallaction
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|