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.
|
2002-04-14 18:13:08 +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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-04-14 18:13:08 +00:00
|
|
|
*
|
2002-04-12 21:26:59 +00:00
|
|
|
*/
|
|
|
|
|
2006-09-29 08:14:27 +00:00
|
|
|
#ifndef AGOS_AGOS_H
|
|
|
|
#define AGOS_AGOS_H
|
2002-08-18 16:21:34 +00:00
|
|
|
|
2006-09-23 00:42:35 +00:00
|
|
|
#include "engines/engine.h"
|
2006-03-16 03:15:05 +00:00
|
|
|
|
2011-08-27 14:40:55 +00:00
|
|
|
#include "common/archive.h"
|
2007-07-25 11:29:47 +00:00
|
|
|
#include "common/array.h"
|
2011-04-24 08:34:27 +00:00
|
|
|
#include "common/error.h"
|
2007-06-30 22:21:29 +00:00
|
|
|
#include "common/keyboard.h"
|
2010-03-18 15:07:11 +00:00
|
|
|
#include "common/random.h"
|
2006-03-16 03:15:05 +00:00
|
|
|
#include "common/rect.h"
|
2009-03-08 08:45:21 +00:00
|
|
|
#include "common/stack.h"
|
2002-12-01 15:36:36 +00:00
|
|
|
#include "common/util.h"
|
2006-03-16 03:15:05 +00:00
|
|
|
|
2006-09-29 08:14:27 +00:00
|
|
|
#include "agos/sound.h"
|
|
|
|
#include "agos/vga.h"
|
2006-10-19 05:37:22 +00:00
|
|
|
|
2009-11-24 22:10:14 +00:00
|
|
|
/**
|
|
|
|
* This is the namespace of the AGOS engine.
|
|
|
|
*
|
|
|
|
* Status of this engine: ???
|
|
|
|
*
|
2010-10-15 12:48:19 +00:00
|
|
|
* Games using this engine:
|
|
|
|
* - Elvira: Mistress of the Dark
|
|
|
|
* - Elvira 2: The Jaws of Cerberus
|
|
|
|
* - The Feeble Files
|
|
|
|
* - Simon the Sorcerer
|
|
|
|
* - Simon the Sorcerer 2
|
|
|
|
* - Simon the Sorcerer Puzzle Pack
|
2009-11-24 22:10:14 +00:00
|
|
|
*/
|
2011-08-05 10:16:03 +00:00
|
|
|
|
|
|
|
namespace Common {
|
|
|
|
class File;
|
|
|
|
class SeekableReadStream;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Graphics {
|
2011-08-08 21:52:33 +00:00
|
|
|
struct Surface;
|
2011-08-05 10:16:03 +00:00
|
|
|
}
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
namespace AGOS {
|
2003-10-03 19:42:27 +00:00
|
|
|
|
2006-10-16 04:31:09 +00:00
|
|
|
uint fileReadItemID(Common::SeekableReadStream *in);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2003-03-06 19:16:24 +00:00
|
|
|
#define CHECK_BOUNDS(x, y) assert((uint)(x) < ARRAYSIZE(y))
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2011-02-09 00:13:42 +00:00
|
|
|
#ifdef ENABLE_AGOS2
|
|
|
|
class MoviePlayer;
|
|
|
|
#endif
|
|
|
|
|
2011-08-05 10:16:03 +00:00
|
|
|
class MidiPlayer;
|
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct Child;
|
2006-04-06 14:01:52 +00:00
|
|
|
struct SubObject;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct Item;
|
2006-04-05 02:45:28 +00:00
|
|
|
struct WindowBlock;
|
2002-08-18 16:21:34 +00:00
|
|
|
struct Subroutine;
|
|
|
|
struct SubroutineLine;
|
|
|
|
struct TimeEvent;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2004-03-14 17:50:40 +00:00
|
|
|
struct TextLocation {
|
|
|
|
int16 x, y, width;
|
|
|
|
TextLocation() { memset(this, 0, sizeof(*this)); }
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct HitArea {
|
|
|
|
uint16 x, y;
|
|
|
|
uint16 width, height;
|
|
|
|
uint16 flags;
|
|
|
|
uint16 id;
|
2006-04-09 04:53:31 +00:00
|
|
|
uint16 data;
|
2006-04-05 02:45:28 +00:00
|
|
|
WindowBlock *window;
|
2009-02-07 01:11:51 +00:00
|
|
|
Item *itemPtr;
|
2006-03-16 07:08:05 +00:00
|
|
|
uint16 verb;
|
|
|
|
uint16 priority;
|
2009-03-08 08:45:21 +00:00
|
|
|
|
|
|
|
// Personal Nightmare specific
|
|
|
|
uint16 msg1, msg2;
|
2003-05-20 14:34:07 +00:00
|
|
|
HitArea() { memset(this, 0, sizeof(*this)); }
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VgaPointersEntry {
|
|
|
|
byte *vgaFile1;
|
2006-04-20 00:42:54 +00:00
|
|
|
byte *vgaFile1End;
|
2002-04-12 21:26:59 +00:00
|
|
|
byte *vgaFile2;
|
2006-04-20 00:42:54 +00:00
|
|
|
byte *vgaFile2End;
|
2005-11-14 12:01:31 +00:00
|
|
|
byte *sfxFile;
|
2006-04-20 00:42:54 +00:00
|
|
|
byte *sfxFileEnd;
|
2003-05-20 14:34:07 +00:00
|
|
|
VgaPointersEntry() { memset(this, 0, sizeof(*this)); }
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VgaSprite {
|
|
|
|
uint16 id;
|
2007-05-09 15:36:05 +00:00
|
|
|
int16 image;
|
2005-10-05 11:37:26 +00:00
|
|
|
uint16 palette;
|
2007-05-09 15:36:05 +00:00
|
|
|
int16 x, y;
|
2005-05-06 12:23:19 +00:00
|
|
|
uint16 flags;
|
2002-11-28 00:22:24 +00:00
|
|
|
uint16 priority;
|
2007-06-09 05:30:20 +00:00
|
|
|
uint16 windowNum;
|
|
|
|
uint16 zoneNum;
|
2003-05-20 14:34:07 +00:00
|
|
|
VgaSprite() { memset(this, 0, sizeof(*this)); }
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VgaSleepStruct {
|
|
|
|
uint16 ident;
|
2009-02-07 01:11:51 +00:00
|
|
|
const byte *codePtr;
|
|
|
|
uint16 id;
|
|
|
|
uint16 zoneNum;
|
2003-05-20 14:34:07 +00:00
|
|
|
VgaSleepStruct() { memset(this, 0, sizeof(*this)); }
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VgaTimerEntry {
|
2006-04-20 08:58:30 +00:00
|
|
|
int16 delay;
|
2009-02-07 01:11:51 +00:00
|
|
|
const byte *codePtr;
|
|
|
|
uint16 id;
|
|
|
|
uint16 zoneNum;
|
2007-05-13 08:46:48 +00:00
|
|
|
uint8 type;
|
2003-05-20 14:34:07 +00:00
|
|
|
VgaTimerEntry() { memset(this, 0, sizeof(*this)); }
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
2007-05-09 15:36:05 +00:00
|
|
|
struct AnimTable {
|
|
|
|
const byte *srcPtr;
|
|
|
|
int16 x;
|
|
|
|
int16 y;
|
|
|
|
uint16 width;
|
|
|
|
uint16 height;
|
2007-06-09 05:30:20 +00:00
|
|
|
uint16 windowNum;
|
2007-05-09 15:36:05 +00:00
|
|
|
uint16 id;
|
2007-06-09 05:30:20 +00:00
|
|
|
uint16 zoneNum;
|
2007-05-09 15:36:05 +00:00
|
|
|
AnimTable() { memset(this, 0, sizeof(*this)); }
|
|
|
|
};
|
|
|
|
|
2006-03-28 13:33:18 +00:00
|
|
|
enum SIMONGameType {
|
2009-03-08 08:45:21 +00:00
|
|
|
GType_PN = 0,
|
2008-12-14 01:18:55 +00:00
|
|
|
GType_ELVIRA1 = 1,
|
|
|
|
GType_ELVIRA2 = 2,
|
|
|
|
GType_WW = 3,
|
|
|
|
GType_SIMON1 = 4,
|
|
|
|
GType_SIMON2 = 5,
|
2006-09-28 23:22:07 +00:00
|
|
|
GType_FF = 6,
|
|
|
|
GType_PP = 7
|
2005-11-12 06:01:24 +00:00
|
|
|
};
|
|
|
|
|
2007-05-26 13:23:06 +00:00
|
|
|
enum EventType {
|
|
|
|
ANIMATE_INT = 1 << 1,
|
|
|
|
ANIMATE_EVENT = 1 << 2,
|
|
|
|
SCROLL_EVENT = 1 << 3,
|
2008-04-16 08:50:25 +00:00
|
|
|
PLAYER_DAMAGE_EVENT = 1 << 4,
|
|
|
|
MONSTER_DAMAGE_EVENT = 1 << 5
|
2007-05-26 13:23:06 +00:00
|
|
|
};
|
|
|
|
|
2007-01-21 16:57:13 +00:00
|
|
|
struct AGOSGameDescription;
|
2006-10-02 23:31:14 +00:00
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
struct GameSpecificSettings;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2004-01-27 16:28:39 +00:00
|
|
|
class Debugger;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
// This is to help devices with small memory (PDA, smartphones, ...)
|
|
|
|
// to save a bit of memory used by opcode names in the AGOS engine.
|
|
|
|
|
|
|
|
#ifndef REDUCE_MEMORY_USAGE
|
|
|
|
# define _OPCODE(ver, x) { &ver::x, #x }
|
|
|
|
#else
|
|
|
|
# define _OPCODE(ver, x) { &ver::x, "" }
|
|
|
|
#endif
|
|
|
|
|
2011-08-27 14:40:55 +00:00
|
|
|
class ArchiveMan : public Common::SearchSet {
|
|
|
|
public:
|
|
|
|
ArchiveMan();
|
|
|
|
|
|
|
|
void enableFallback(bool val) { _fallBack = val; }
|
|
|
|
|
|
|
|
#ifdef ENABLE_AGOS2
|
|
|
|
void registerArchive(const Common::String &filename, int priority);
|
|
|
|
#endif
|
|
|
|
|
2012-01-27 19:04:40 +00:00
|
|
|
virtual bool hasFile(const Common::String &name) const;
|
2012-01-27 19:35:34 +00:00
|
|
|
virtual int listMatchingMembers(Common::ArchiveMemberList &list, const Common::String &pattern) const;
|
|
|
|
virtual int listMembers(Common::ArchiveMemberList &list) const;
|
|
|
|
|
|
|
|
virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
|
2012-01-27 19:30:02 +00:00
|
|
|
virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &filename) const;
|
2011-08-27 14:40:55 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool _fallBack;
|
|
|
|
};
|
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
class AGOSEngine : public Engine {
|
2011-05-17 13:32:41 +00:00
|
|
|
protected:
|
2004-01-27 16:28:39 +00:00
|
|
|
friend class Debugger;
|
|
|
|
|
2008-11-04 16:11:40 +00:00
|
|
|
// Engine APIs
|
2009-03-01 04:30:55 +00:00
|
|
|
Common::Error init();
|
2009-03-08 08:45:21 +00:00
|
|
|
virtual Common::Error go();
|
2009-03-01 04:30:55 +00:00
|
|
|
virtual Common::Error run() {
|
|
|
|
Common::Error err;
|
|
|
|
err = init();
|
2011-04-18 15:39:31 +00:00
|
|
|
if (err.getCode() != Common::kNoError)
|
2009-03-01 04:30:55 +00:00
|
|
|
return err;
|
|
|
|
return go();
|
|
|
|
}
|
2008-11-04 16:11:40 +00:00
|
|
|
virtual GUI::Debugger *getDebugger();
|
|
|
|
virtual bool hasFeature(EngineFeature f) const;
|
|
|
|
virtual void syncSoundSettings();
|
|
|
|
virtual void pauseEngineIntern(bool pause);
|
2005-11-05 18:47:03 +00:00
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _numOpcodes, _opcode;
|
2006-04-06 17:56:41 +00:00
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
typedef void (AGOSEngine::*VgaOpcodeProc) ();
|
2006-10-02 14:32:28 +00:00
|
|
|
|
2005-11-05 18:47:03 +00:00
|
|
|
void setupVgaOpcodes();
|
2006-10-08 00:41:29 +00:00
|
|
|
VgaOpcodeProc _vga_opcode_table[100];
|
2007-06-21 06:37:00 +00:00
|
|
|
uint8 _numVideoOpcodes;
|
2006-10-02 14:32:28 +00:00
|
|
|
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
2005-11-12 06:01:24 +00:00
|
|
|
|
2011-05-17 13:32:41 +00:00
|
|
|
const AGOSGameDescription * const _gameDescription;
|
2005-11-12 06:01:24 +00:00
|
|
|
|
2011-05-17 13:32:41 +00:00
|
|
|
public:
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2005-11-12 06:01:24 +00:00
|
|
|
|
2007-01-21 16:57:13 +00:00
|
|
|
int getGameId() const;
|
|
|
|
int getGameType() const;
|
|
|
|
uint32 getFeatures() const;
|
|
|
|
const char *getExtra() const;
|
|
|
|
Common::Language getLanguage() const;
|
|
|
|
Common::Platform getPlatform() const;
|
|
|
|
const char *getFileName(int type) const;
|
2005-11-12 06:01:24 +00:00
|
|
|
|
2003-06-15 11:52:42 +00:00
|
|
|
protected:
|
2007-06-21 06:37:00 +00:00
|
|
|
void playSting(uint16 a);
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
const byte *_vcPtr; /* video code ptr */
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _vcGetOutOfCode;
|
2004-12-18 01:33:21 +00:00
|
|
|
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
uint32 *_gameOffsetsPtr;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
uint8 _numMusic, _numSFX;
|
|
|
|
uint16 _numSpeech;
|
2011-10-06 13:03:47 +00:00
|
|
|
uint16 _numZone;
|
2006-10-05 01:17:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
uint8 _numBitArray1, _numBitArray2, _numBitArray3, _numItemStore;
|
|
|
|
uint16 _numVars;
|
2006-10-05 01:17:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
uint8 _vgaBaseDelay, _vgaPeriod;
|
|
|
|
|
|
|
|
uint16 _musicIndexBase;
|
|
|
|
uint16 _soundIndexBase;
|
|
|
|
uint16 _tableIndexBase;
|
|
|
|
uint16 _textIndexBase;
|
|
|
|
|
|
|
|
uint32 _itemMemSize;
|
|
|
|
uint32 _tableMemSize;
|
|
|
|
uint32 _vgaMemSize;
|
2006-10-05 01:17:59 +00:00
|
|
|
|
2002-04-12 21:26:59 +00:00
|
|
|
const GameSpecificSettings *gss;
|
|
|
|
|
2007-06-30 22:21:29 +00:00
|
|
|
Common::KeyState _keyPressed;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-10 22:56:25 +00:00
|
|
|
Common::File *_gameFile;
|
2005-07-30 21:11:48 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte *_strippedTxtMem;
|
2006-04-24 06:02:47 +00:00
|
|
|
byte *_textMem;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint32 _textSize;
|
|
|
|
uint32 _stringTabNum, _stringTabPos, _stringTabSize;
|
2005-05-06 11:37:33 +00:00
|
|
|
byte **_stringTabPtr;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
Item **_itemArrayPtr;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint32 _itemArraySize;
|
|
|
|
uint32 _itemArrayInited;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-07-25 11:29:47 +00:00
|
|
|
Common::Array<byte *> _itemHeap;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte *_iconFilePtr;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
const byte *_codePtr;
|
2002-07-07 19:06:48 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte **_localStringtable;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _stringIdLocalMin, _stringIdLocalMax;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2008-03-22 09:46:25 +00:00
|
|
|
RoomState *_roomStates;
|
|
|
|
uint16 _numRoomStates;
|
2007-05-27 11:32:19 +00:00
|
|
|
|
2006-10-15 04:15:48 +00:00
|
|
|
byte *_menuBase;
|
2006-09-20 06:39:27 +00:00
|
|
|
byte *_roomsList;
|
2008-03-22 09:46:25 +00:00
|
|
|
byte *_roomsListPtr;
|
2006-09-20 06:39:27 +00:00
|
|
|
|
2006-09-19 11:59:13 +00:00
|
|
|
byte *_xtblList;
|
|
|
|
byte *_xtablesHeapPtrOrg;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint32 _xtablesHeapCurPosOrg;
|
2006-09-19 11:59:13 +00:00
|
|
|
Subroutine *_xsubroutineListOrg;
|
|
|
|
|
|
|
|
byte *_tblList;
|
2005-05-06 11:37:33 +00:00
|
|
|
byte *_tablesHeapPtr, *_tablesHeapPtrOrg, *_tablesheapPtrNew;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint32 _tablesHeapSize, _tablesHeapCurPos, _tablesHeapCurPosOrg;
|
|
|
|
uint32 _tablesHeapCurPosNew;
|
2006-09-19 11:59:13 +00:00
|
|
|
Subroutine *_subroutineListOrg;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-09-19 11:59:13 +00:00
|
|
|
Subroutine *_subroutineList;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
uint8 _recursionDepth;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
uint32 _lastVgaTick;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-10-05 11:37:26 +00:00
|
|
|
uint16 _marks;
|
2009-03-08 08:45:21 +00:00
|
|
|
bool _scanFlag;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _scriptVar2;
|
|
|
|
bool _runScriptReturn1;
|
2006-04-07 09:37:44 +00:00
|
|
|
bool _runScriptCondition[40];
|
2009-02-07 03:36:36 +00:00
|
|
|
int16 _runScriptReturn[40];
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _skipVgaWait;
|
|
|
|
bool _noParentNotify;
|
2005-11-10 00:53:00 +00:00
|
|
|
bool _beardLoaded;
|
2006-10-24 08:11:43 +00:00
|
|
|
bool _litBoxFlag;
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _mortalFlag;
|
2010-03-23 00:42:42 +00:00
|
|
|
uint16 _displayFlag;
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _syncFlag2;
|
|
|
|
bool _inCallBack;
|
|
|
|
bool _cepeFlag;
|
|
|
|
bool _fastMode;
|
2007-05-09 15:36:05 +00:00
|
|
|
bool _backFlag;
|
|
|
|
|
2002-12-06 14:40:40 +00:00
|
|
|
uint16 _debugMode;
|
2011-08-20 17:30:18 +00:00
|
|
|
Common::Language _language;
|
2007-02-21 11:46:35 +00:00
|
|
|
bool _copyProtection;
|
2003-12-10 00:54:53 +00:00
|
|
|
bool _pause;
|
2009-02-07 03:36:36 +00:00
|
|
|
bool _dumpScripts;
|
|
|
|
bool _dumpOpcodes;
|
|
|
|
bool _dumpVgaScripts;
|
|
|
|
bool _dumpVgaOpcodes;
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _dumpImages;
|
2003-10-30 01:05:08 +00:00
|
|
|
bool _speech;
|
2003-03-07 12:29:33 +00:00
|
|
|
bool _subtitles;
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _vgaVar9;
|
2006-04-21 07:42:40 +00:00
|
|
|
int16 _chanceModifier;
|
2006-03-16 07:08:05 +00:00
|
|
|
bool _restoreWindow6;
|
2007-06-04 05:02:22 +00:00
|
|
|
int16 _scrollX, _scrollXMax;
|
|
|
|
int16 _scrollY, _scrollYMax;
|
|
|
|
int16 _scrollCount, _scrollFlag;
|
|
|
|
uint16 _scrollWidth, _scrollHeight;
|
2005-10-05 11:37:26 +00:00
|
|
|
const byte *_scrollImage;
|
2006-04-08 07:13:07 +00:00
|
|
|
byte _boxStarHeight;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-10-25 05:32:15 +00:00
|
|
|
SubroutineLine *_classLine;
|
2009-02-07 03:36:36 +00:00
|
|
|
int16 _classMask, _classMode1, _classMode2;
|
2006-10-25 05:32:15 +00:00
|
|
|
Item *_findNextPtr;
|
|
|
|
Subroutine *_currentTable;
|
|
|
|
SubroutineLine *_currentLine;
|
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
uint8 _agosMenu;
|
2006-10-07 03:02:56 +00:00
|
|
|
byte _textMenu[10];
|
2007-06-21 06:37:00 +00:00
|
|
|
uint16 _currentRoom, _superRoomNumber;
|
|
|
|
uint8 _wallOn;
|
2006-10-07 03:02:56 +00:00
|
|
|
|
|
|
|
uint16 _hyperLink, _newLines;
|
2008-01-28 00:14:17 +00:00
|
|
|
uint16 _oracleMaxScrollY, _noOracleScroll;
|
|
|
|
uint16 _interactY;
|
2006-04-07 01:46:43 +00:00
|
|
|
|
2005-11-18 22:34:41 +00:00
|
|
|
int16 _scriptVerb, _scriptNoun1, _scriptNoun2;
|
|
|
|
int16 _scriptAdj1, _scriptAdj2;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-10-19 11:32:25 +00:00
|
|
|
uint16 _curWindow;
|
2009-03-08 08:45:21 +00:00
|
|
|
WindowBlock *_inputWindow, *_textWindow;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
Item *_subjectItem, *_objectItem;
|
2006-04-19 11:54:38 +00:00
|
|
|
Item *_currentPlayer;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
Item *_hitAreaObjectItem;
|
|
|
|
HitArea *_lastHitArea;
|
2006-04-06 08:43:20 +00:00
|
|
|
HitArea *_lastNameOn;
|
2005-05-06 11:37:33 +00:00
|
|
|
HitArea *_lastHitArea3;
|
|
|
|
Item *_hitAreaSubjectItem;
|
2006-10-22 13:04:34 +00:00
|
|
|
HitArea *_currentBox, *_currentVerbBox, *_lastVerbOn;
|
2009-03-07 19:24:31 +00:00
|
|
|
uint16 _currentBoxNum;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _needHitAreaRecalc;
|
|
|
|
uint16 _verbHitArea;
|
2006-03-16 10:30:59 +00:00
|
|
|
uint16 _defaultVerb;
|
2009-02-07 03:36:36 +00:00
|
|
|
bool _iOverflow;
|
|
|
|
bool _nameLocked;
|
|
|
|
|
|
|
|
bool _dragAccept;
|
|
|
|
bool _dragEnd;
|
|
|
|
bool _dragFlag;
|
2009-03-09 04:16:27 +00:00
|
|
|
bool _dragMode;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint8 _dragCount;
|
2006-10-22 13:04:34 +00:00
|
|
|
HitArea *_lastClickRem;
|
|
|
|
|
2005-10-05 11:37:26 +00:00
|
|
|
uint16 _windowNum;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-04 05:02:22 +00:00
|
|
|
int16 _printCharCurPos, _printCharMaxPos, _printCharPixelCount;
|
|
|
|
uint16 _numLettersToPrint;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
uint8 _numTextBoxes;
|
2006-04-15 06:42:40 +00:00
|
|
|
|
2007-12-20 09:43:46 +00:00
|
|
|
uint32 getTime() const;
|
|
|
|
|
|
|
|
uint32 _lastMinute; // Used in processSpecialKeys()
|
|
|
|
uint32 _lastTime;
|
2009-03-09 04:37:31 +00:00
|
|
|
uint32 _clockStopped, _gameStoppedClock;
|
2007-12-20 09:43:46 +00:00
|
|
|
uint32 _timeStore;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
TimeEvent *_firstTimeStruct, *_pendingDeleteTimeEvent;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
bool _initMouse;
|
2007-03-18 13:29:12 +00:00
|
|
|
Common::Point _mouse;
|
|
|
|
Common::Point _mouseOld;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-09-30 06:47:41 +00:00
|
|
|
byte *_mouseData;
|
2010-07-04 07:32:12 +00:00
|
|
|
bool _animatePointer;
|
2006-09-30 06:47:41 +00:00
|
|
|
byte _maxCursorWidth, _maxCursorHeight;
|
|
|
|
byte _mouseAnim, _mouseAnimMax, _mouseCursor;
|
|
|
|
byte _currentMouseAnim, _currentMouseCursor;
|
|
|
|
byte _oldMouseAnimMax, _oldMouseCursor;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _mouseHideCount;
|
2006-04-30 06:10:14 +00:00
|
|
|
bool _mouseToggle;
|
2006-04-13 23:34:58 +00:00
|
|
|
|
2009-03-09 03:45:33 +00:00
|
|
|
bool _leftButtonDown, _rightButtonDown;
|
2006-10-22 13:04:34 +00:00
|
|
|
byte _leftButton, _leftButtonCount, _leftButtonOld;
|
2009-03-08 13:18:07 +00:00
|
|
|
byte _oneClick;
|
|
|
|
bool _clickOnly;
|
2009-03-08 08:45:21 +00:00
|
|
|
bool _leftClick, _rightClick;
|
2006-04-08 07:13:07 +00:00
|
|
|
bool _noRightClick;
|
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
Item *_dummyItem1;
|
|
|
|
Item *_dummyItem2;
|
|
|
|
Item *_dummyItem3;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-03-08 10:08:09 +00:00
|
|
|
volatile uint16 _videoLockOut;
|
2005-05-06 11:37:33 +00:00
|
|
|
uint16 _scrollUpHitArea;
|
|
|
|
uint16 _scrollDownHitArea;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-05-05 05:53:36 +00:00
|
|
|
bool _fastFadeOutFlag;
|
|
|
|
byte _paletteFlag;
|
2009-02-07 03:36:36 +00:00
|
|
|
bool _bottomPalette;
|
|
|
|
uint16 _fastFadeCount;
|
2006-05-05 05:53:36 +00:00
|
|
|
volatile uint16 _fastFadeInFlag;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _screenWidth, _screenHeight;
|
2005-10-07 07:36:09 +00:00
|
|
|
|
2006-04-20 00:54:30 +00:00
|
|
|
uint16 _noOverWrite;
|
2006-04-10 23:44:17 +00:00
|
|
|
bool _rejectBlock;
|
2006-04-20 00:54:30 +00:00
|
|
|
|
2006-09-30 13:02:31 +00:00
|
|
|
bool _exitCutscene, _picture8600;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _soundFileId;
|
2005-05-06 11:37:33 +00:00
|
|
|
int16 _lastMusicPlayed;
|
|
|
|
int16 _nextMusicToPlay;
|
|
|
|
bool _showPreposition;
|
|
|
|
bool _showMessageFlag;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-09 05:30:20 +00:00
|
|
|
bool _newDirtyClip;
|
2009-03-08 08:45:21 +00:00
|
|
|
bool _wiped;
|
2009-02-07 03:36:36 +00:00
|
|
|
uint16 _copyScnFlag, _vgaSpriteChanged;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-10-03 13:20:23 +00:00
|
|
|
byte *_block, *_blockEnd;
|
2006-05-13 08:24:47 +00:00
|
|
|
byte *_vgaMemPtr, *_vgaMemEnd, *_vgaMemBase;
|
|
|
|
byte *_vgaFrozenBase, *_vgaRealBase;
|
|
|
|
byte *_zoneBuffers;
|
2002-07-07 19:06:48 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte *_curVgaFile1;
|
|
|
|
byte *_curVgaFile2;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-10 04:14:53 +00:00
|
|
|
uint16 _syncCount;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-13 10:07:55 +00:00
|
|
|
uint16 _frameCount;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-10 23:44:17 +00:00
|
|
|
uint16 _zoneNumber;
|
2006-06-01 12:06:53 +00:00
|
|
|
uint16 _vgaWaitFor, _lastVgaWaitFor;
|
|
|
|
uint16 _vgaCurSpriteId, _vgaCurZoneNum;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-11-15 08:12:32 +00:00
|
|
|
int16 _baseY;
|
|
|
|
float _scale;
|
2006-03-16 03:15:05 +00:00
|
|
|
Common::Rect _feebleRect;
|
2007-06-21 06:37:00 +00:00
|
|
|
int16 _scaleX, _scaleY, _scaleWidth, _scaleHeight;
|
2005-11-15 08:12:32 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
VgaTimerEntry *_nextVgaTimerToProcess;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-26 13:23:06 +00:00
|
|
|
uint8 _opcode177Var1, _opcode177Var2;
|
|
|
|
uint8 _opcode178Var1, _opcode178Var2;
|
|
|
|
|
2006-10-04 03:29:14 +00:00
|
|
|
Item *_objectArray[50];
|
|
|
|
Item *_itemStore[50];
|
2002-07-07 19:06:48 +00:00
|
|
|
|
2006-09-29 00:50:22 +00:00
|
|
|
uint16 _shortText[40];
|
|
|
|
uint16 _shortTextX[40];
|
|
|
|
uint16 _shortTextY[40];
|
|
|
|
uint16 _longText[40];
|
|
|
|
uint16 _longSound[40];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-09-28 23:22:07 +00:00
|
|
|
uint16 _bitArray[128];
|
2006-04-21 06:37:28 +00:00
|
|
|
uint16 _bitArrayTwo[16];
|
|
|
|
uint16 _bitArrayThree[16];
|
2006-09-28 23:22:07 +00:00
|
|
|
int16 *_variableArray;
|
|
|
|
int16 *_variableArray2;
|
2006-04-15 22:14:39 +00:00
|
|
|
int16 *_variableArrayPtr;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-10-08 01:46:38 +00:00
|
|
|
WindowBlock *_dummyWindow;
|
2007-05-22 10:31:51 +00:00
|
|
|
WindowBlock *_windowArray[80];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte _fcsData1[8];
|
|
|
|
bool _fcsData2[8];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
TextLocation _textLocation1, _textLocation2, _textLocation3, _textLocation4;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-01-26 04:22:19 +00:00
|
|
|
byte _awaitTwoByteToken;
|
|
|
|
byte *_byteTokens;
|
|
|
|
byte *_byteTokenStrings;
|
|
|
|
byte *_twoByteTokens;
|
|
|
|
byte *_twoByteTokenStrings;
|
|
|
|
byte *_secondTwoByteTokenStrings;
|
|
|
|
byte *_thirdTwoByteTokenStrings;
|
|
|
|
byte _textBuffer[180];
|
|
|
|
int _textCount;
|
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
int _freeStringSlot;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
byte _stringReturnBuffer[2][180];
|
|
|
|
|
2006-04-15 06:35:40 +00:00
|
|
|
HitArea _hitAreas[250];
|
2009-03-08 08:45:21 +00:00
|
|
|
HitArea *_hitAreaList;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-09 05:30:20 +00:00
|
|
|
AnimTable _screenAnim1[90];
|
2005-10-09 12:12:24 +00:00
|
|
|
VgaPointersEntry _vgaBufferPointers[450];
|
2006-10-02 10:43:07 +00:00
|
|
|
VgaSprite _vgaSprites[200];
|
2009-03-08 08:45:21 +00:00
|
|
|
VgaSleepStruct _onStopTable[60];
|
2006-10-14 14:29:14 +00:00
|
|
|
VgaSleepStruct _waitEndTable[60];
|
2007-05-09 15:36:05 +00:00
|
|
|
VgaSleepStruct _waitSyncTable[60];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-11-14 10:31:19 +00:00
|
|
|
const uint16 *_pathFindArray[100];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-11-18 14:16:28 +00:00
|
|
|
uint8 _pathValues[400];
|
2006-05-03 06:07:26 +00:00
|
|
|
uint16 _PVCount;
|
|
|
|
uint16 _GPVCount;
|
2005-11-18 14:15:03 +00:00
|
|
|
|
2005-11-18 14:16:28 +00:00
|
|
|
uint8 _pathValues1[400];
|
2006-05-03 06:07:26 +00:00
|
|
|
uint16 _PVCount1;
|
|
|
|
uint16 _GPVCount1;
|
2005-11-18 14:15:03 +00:00
|
|
|
|
2011-02-15 22:22:30 +00:00
|
|
|
uint8 _currentPalette[768];
|
|
|
|
uint8 _displayPalette[768];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-02-08 23:37:17 +00:00
|
|
|
byte *_planarBuf;
|
2006-10-11 01:51:10 +00:00
|
|
|
byte _videoBuf1[32000];
|
2006-10-09 13:00:25 +00:00
|
|
|
uint16 _videoWindows[128];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
uint8 _window3Flag;
|
|
|
|
uint8 _window4Flag;
|
|
|
|
uint8 _window6Flag;
|
2007-05-09 15:36:05 +00:00
|
|
|
|
|
|
|
uint16 _moveXMin, _moveYMin;
|
|
|
|
uint16 _moveXMax, _moveYMax;
|
|
|
|
|
2006-10-02 10:43:07 +00:00
|
|
|
VgaTimerEntry _vgaTimerList[205];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-06 10:47:37 +00:00
|
|
|
WindowBlock *_windowList;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte _lettersToPrintBuf[80];
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2011-08-05 10:16:03 +00:00
|
|
|
MidiPlayer *_midi;
|
2007-06-07 02:43:03 +00:00
|
|
|
bool _midiEnabled;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
int _vgaTickCounter;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-10-23 01:37:59 +00:00
|
|
|
Audio::SoundHandle _modHandle;
|
2006-04-17 12:05:45 +00:00
|
|
|
|
2004-01-03 01:28:00 +00:00
|
|
|
Sound *_sound;
|
2002-04-14 18:13:08 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _effectsPaused;
|
|
|
|
bool _ambientPaused;
|
|
|
|
bool _musicPaused;
|
2002-11-17 17:15:29 +00:00
|
|
|
|
2004-01-27 16:28:39 +00:00
|
|
|
Debugger *_debugger;
|
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
uint8 _saveGameNameLen;
|
|
|
|
uint16 _saveLoadRowCurPos;
|
|
|
|
uint16 _numSaveGameRows;
|
2005-05-06 11:37:33 +00:00
|
|
|
bool _saveDialogFlag;
|
|
|
|
bool _saveOrLoad;
|
2006-06-02 08:06:50 +00:00
|
|
|
bool _saveLoadEdit;
|
2002-04-16 12:07:19 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
byte _saveLoadType, _saveLoadSlot;
|
2006-04-15 06:35:40 +00:00
|
|
|
char _saveLoadName[108];
|
2003-12-11 02:09:18 +00:00
|
|
|
|
2009-07-06 06:21:59 +00:00
|
|
|
Graphics::Surface *_backGroundBuf;
|
|
|
|
Graphics::Surface *_backBuf;
|
|
|
|
Graphics::Surface *_scaleBuf;
|
|
|
|
Graphics::Surface *_window4BackScn;
|
|
|
|
Graphics::Surface *_window6BackScn;
|
2002-08-18 16:21:34 +00:00
|
|
|
|
2003-10-04 11:50:21 +00:00
|
|
|
Common::RandomSource _rnd;
|
2003-05-21 15:47:51 +00:00
|
|
|
|
2005-05-06 11:37:33 +00:00
|
|
|
const byte *_vc10BasePtrOld;
|
2006-04-15 06:35:40 +00:00
|
|
|
byte _hebrewCharWidths[32];
|
2003-05-21 15:47:51 +00:00
|
|
|
|
2003-06-15 11:52:42 +00:00
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine(OSystem *system, const AGOSGameDescription *gd);
|
2006-09-29 09:44:30 +00:00
|
|
|
virtual ~AGOSEngine();
|
2002-08-18 16:21:34 +00:00
|
|
|
|
2011-08-27 14:40:55 +00:00
|
|
|
ArchiveMan _archives;
|
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
byte *_curSfxFile;
|
|
|
|
uint32 _curSfxFileSize;
|
|
|
|
uint16 _sampleEnd, _sampleWait;
|
|
|
|
|
2003-06-15 11:52:42 +00:00
|
|
|
protected:
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual uint16 to16Wrapper(uint value);
|
|
|
|
virtual uint16 readUint16Wrapper(const void *src);
|
|
|
|
virtual uint32 readUint32Wrapper(const void *src);
|
2005-10-12 00:35:54 +00:00
|
|
|
|
2011-08-27 14:40:55 +00:00
|
|
|
#ifdef ENABLE_AGOS2
|
|
|
|
void loadArchives();
|
|
|
|
#endif
|
|
|
|
|
2006-10-16 04:31:09 +00:00
|
|
|
int allocGamePcVars(Common::SeekableReadStream *in);
|
2006-04-06 14:01:52 +00:00
|
|
|
void createPlayer();
|
2002-04-12 21:26:59 +00:00
|
|
|
void allocateStringTable(int num);
|
|
|
|
void setupStringTable(byte *mem, int num);
|
|
|
|
void setupLocalStringTable(byte *mem, int num);
|
2006-10-16 04:31:09 +00:00
|
|
|
void readGamePcText(Common::SeekableReadStream *in);
|
2007-06-20 01:01:29 +00:00
|
|
|
virtual void readItemChildren(Common::SeekableReadStream *in, Item *item, uint tmp);
|
2006-10-16 04:31:09 +00:00
|
|
|
void readItemFromGamePc(Common::SeekableReadStream *in, Item *item);
|
2009-03-08 08:45:21 +00:00
|
|
|
virtual void loadGamePcFile();
|
2006-10-16 04:31:09 +00:00
|
|
|
void readGamePcFile(Common::SeekableReadStream *in);
|
2006-04-14 04:22:49 +00:00
|
|
|
void decompressData(const char *srcName, byte *dst, uint32 offset, uint32 srcSize, uint32 dstSize);
|
2009-03-08 08:45:21 +00:00
|
|
|
void decompressPN(Common::Stack<uint32> &dataList, uint8 *&dataOut, int &dataOutSize);
|
2006-03-22 06:21:17 +00:00
|
|
|
void loadOffsets(const char *filename, int number, uint32 &file, uint32 &offset, uint32 &compressedSize, uint32 &size);
|
2009-03-08 08:45:21 +00:00
|
|
|
void loadSound(uint16 sound, int16 pan, int16 vol, uint16 type);
|
|
|
|
void loadSound(uint16 sound, uint16 freq, uint16 flags);
|
2006-04-14 05:13:59 +00:00
|
|
|
void loadVoice(uint speechId);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-16 05:57:26 +00:00
|
|
|
void loadSoundFile(const char *filename);
|
|
|
|
|
2006-10-06 14:44:39 +00:00
|
|
|
int getUserFlag(Item *item, int a);
|
2006-10-24 07:44:37 +00:00
|
|
|
int getUserFlag1(Item *item, int a);
|
2006-10-06 14:44:39 +00:00
|
|
|
int getUserItem(Item *item, int n);
|
|
|
|
void setUserFlag(Item *item, int a, int b);
|
|
|
|
void setUserItem(Item *item, int n, int m);
|
|
|
|
|
2006-05-05 05:59:03 +00:00
|
|
|
void paletteFadeOut(byte *palPtr, uint num, uint size);
|
2008-01-27 19:47:41 +00:00
|
|
|
|
2009-07-01 20:51:34 +00:00
|
|
|
void *allocateItem(uint size);
|
|
|
|
void *allocateTable(uint size);
|
2002-04-13 21:06:48 +00:00
|
|
|
void alignTableMem();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
Child *findChildOfType(Item *i, uint child);
|
|
|
|
Child *allocateChildBlock(Item *i, uint type, uint size);
|
|
|
|
|
|
|
|
void allocItemHeap();
|
|
|
|
void allocTablesHeap();
|
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
Subroutine *createSubroutine(uint16 a);
|
2006-10-16 04:31:09 +00:00
|
|
|
void readSubroutine(Common::SeekableReadStream *in, Subroutine *sub);
|
2002-04-12 21:26:59 +00:00
|
|
|
SubroutineLine *createSubroutineLine(Subroutine *sub, int a);
|
2009-02-07 01:11:51 +00:00
|
|
|
void readSubroutineLine(Common::SeekableReadStream *in, SubroutineLine *newTable, Subroutine *sub);
|
2006-10-16 04:31:09 +00:00
|
|
|
byte *readSingleOpcode(Common::SeekableReadStream *in, byte *ptr);
|
|
|
|
void readSubroutineBlock(Common::SeekableReadStream *in);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
Subroutine *getSubroutineByID(uint subroutineId);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
/* used in debugger */
|
2006-10-27 11:39:04 +00:00
|
|
|
void dumpAllSubroutines();
|
2009-05-14 07:05:51 +00:00
|
|
|
void dumpAllVgaImageFiles();
|
|
|
|
void dumpAllVgaScriptFiles();
|
2002-04-12 21:26:59 +00:00
|
|
|
void dumpSubroutines();
|
|
|
|
void dumpSubroutine(Subroutine *sub);
|
|
|
|
void dumpSubroutineLine(SubroutineLine *sl, Subroutine *sub);
|
2004-12-18 02:08:32 +00:00
|
|
|
const byte *dumpOpcode(const byte *p);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
int startSubroutine(Subroutine *sub);
|
|
|
|
int startSubroutineEx(Subroutine *sub);
|
|
|
|
|
|
|
|
bool checkIfToRunSubroutineLine(SubroutineLine *sl, Subroutine *sub);
|
|
|
|
|
|
|
|
int runScript();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void executeOpcode(int opcode) = 0;
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
byte getByte();
|
|
|
|
int getNextWord();
|
|
|
|
|
|
|
|
uint getNextVarContents();
|
2006-09-28 23:22:07 +00:00
|
|
|
uint getVarWrapper();
|
2002-04-12 21:26:59 +00:00
|
|
|
uint getVarOrWord();
|
|
|
|
uint getVarOrByte();
|
2007-06-21 06:37:00 +00:00
|
|
|
uint readVariable(uint16 variable);
|
2002-04-12 21:26:59 +00:00
|
|
|
void writeNextVarContents(uint16 contents);
|
2007-06-21 06:37:00 +00:00
|
|
|
void writeVariable(uint16 variable, uint16 contents);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
Item *derefItem(uint item);
|
2006-10-21 01:51:59 +00:00
|
|
|
Item *getNextItemPtr();
|
|
|
|
uint getNextItemID();
|
|
|
|
uint getItem1ID() {return 1;}
|
|
|
|
uint itemPtrToID(Item *id);
|
|
|
|
Item *me();
|
|
|
|
Item *actor();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-01-26 04:22:19 +00:00
|
|
|
void uncompressText(byte *ptr);
|
|
|
|
byte *uncompressToken(byte a, byte *ptr);
|
|
|
|
|
2009-07-03 10:40:49 +00:00
|
|
|
void showMessageFormat(const char *s, ...) GCC_PRINTF(2, 3);
|
2008-12-13 07:38:37 +00:00
|
|
|
const byte *getStringPtrByID(uint16 stringId, bool upperCase = false);
|
2007-06-21 06:37:00 +00:00
|
|
|
const byte *getLocalStringByID(uint16 stringId);
|
2002-04-12 21:26:59 +00:00
|
|
|
uint getNextStringID();
|
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
void addTimeEvent(uint16 timeout, uint16 subroutineId);
|
2002-04-12 21:26:59 +00:00
|
|
|
void delTimeEvent(TimeEvent *te);
|
|
|
|
|
2006-10-21 01:51:59 +00:00
|
|
|
Item *findInByClass(Item *i, int16 m);
|
2006-10-25 05:32:15 +00:00
|
|
|
Item *nextInByClass(Item *i, int16 m);
|
2006-10-21 01:51:59 +00:00
|
|
|
Item *findMaster(int16 a, int16 n);
|
|
|
|
Item *nextMaster(Item *item, int16 a, int16 n);
|
|
|
|
int wordMatch(Item *item, int16 a, int16 n);
|
|
|
|
|
2005-11-10 00:53:00 +00:00
|
|
|
bool isRoom(Item *item);
|
|
|
|
bool isObject(Item *item);
|
2006-10-07 01:10:32 +00:00
|
|
|
bool isPlayer(Item *item);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
void itemChildrenChanged(Item *item);
|
|
|
|
void unlinkItem(Item *item);
|
|
|
|
void linkItem(Item *item, Item *parent);
|
|
|
|
|
2006-10-21 01:51:59 +00:00
|
|
|
void setItemParent(Item *item, Item *parent);
|
|
|
|
void setItemState(Item *item, int value);
|
|
|
|
|
2007-06-19 11:50:22 +00:00
|
|
|
void stopAnimate(uint16 a);
|
|
|
|
void stopAnimateSimon2(uint16 a, uint16 b);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-14 09:57:43 +00:00
|
|
|
void enableBox(uint hitarea);
|
|
|
|
void disableBox(uint hitarea);
|
2006-03-16 07:08:05 +00:00
|
|
|
void moveBox(uint hitarea, int x, int y);
|
2006-05-03 01:11:50 +00:00
|
|
|
bool isBoxDead(uint hitarea);
|
2006-04-14 09:57:43 +00:00
|
|
|
void undefineBox(uint hitarea);
|
2009-02-07 01:11:51 +00:00
|
|
|
void defineBox(int id, int x, int y, int width, int height, int flags, int verb, Item *itemPtr);
|
2009-03-08 08:45:21 +00:00
|
|
|
void defineBox(uint16 id, uint16 x, uint16 y, uint16 width, uint16 height, uint16 msg1, uint16 msg2, uint16 flags);
|
|
|
|
|
2002-04-12 21:26:59 +00:00
|
|
|
HitArea *findEmptyHitArea();
|
2006-04-21 00:18:23 +00:00
|
|
|
|
2007-04-15 05:33:21 +00:00
|
|
|
virtual void resetVerbs();
|
|
|
|
virtual void setVerb(HitArea * ha);
|
2007-04-15 14:12:08 +00:00
|
|
|
virtual void hitarea_leave(HitArea * ha, bool state = false);
|
2002-04-12 21:26:59 +00:00
|
|
|
void leaveHitAreaById(uint hitarea_id);
|
|
|
|
|
By now, it should be obvious that I'm trying to get rid of the o_ functions.
This is in preparation for the next stage of the cleanup.
By now, I have merged most of the o_ opcode functions into the corresponding
o1_ opcode function. There are a few pure o_ opcode functions left, but it
makes sense to keep them separate functions since they are part of groups of
other functions. Now, to get rid of the remaining o_ functions I have:
Dropped the "o_" prefix from the following functions: o_kill_sprite_simon1(),
o_kill_sprite_simon2(), o_waitForSync(), o_freezeBottom(), o_setTextColor(),
o_fadeToBlack(), o_waitForMark(), o_unk_132_helper_3(), o_unk_132_helper(),
o_clearCharacter(), o_fileError().
Renamed o_sync() to sendSync().
Renamed o_mouseOn() to scriptMouseOn(), and moved it to items.cpp
Renamed o_mouseOff() to scriptMouseOff(), and moved it to items.cpp
svn-id: r21760
2006-04-10 09:18:07 +00:00
|
|
|
void sendSync(uint a);
|
2006-05-03 01:11:50 +00:00
|
|
|
void waitForSync(uint a);
|
2002-07-07 19:06:48 +00:00
|
|
|
|
2006-04-06 14:01:52 +00:00
|
|
|
uint getOffsetOfChild2Param(SubObject *child, uint prop);
|
By now, it should be obvious that I'm trying to get rid of the o_ functions.
This is in preparation for the next stage of the cleanup.
By now, I have merged most of the o_ opcode functions into the corresponding
o1_ opcode function. There are a few pure o_ opcode functions left, but it
makes sense to keep them separate functions since they are part of groups of
other functions. Now, to get rid of the remaining o_ functions I have:
Dropped the "o_" prefix from the following functions: o_kill_sprite_simon1(),
o_kill_sprite_simon2(), o_waitForSync(), o_freezeBottom(), o_setTextColor(),
o_fadeToBlack(), o_waitForMark(), o_unk_132_helper_3(), o_unk_132_helper(),
o_clearCharacter(), o_fileError().
Renamed o_sync() to sendSync().
Renamed o_mouseOn() to scriptMouseOn(), and moved it to items.cpp
Renamed o_mouseOff() to scriptMouseOff(), and moved it to items.cpp
svn-id: r21760
2006-04-10 09:18:07 +00:00
|
|
|
void scriptMouseOff();
|
2006-05-03 01:11:50 +00:00
|
|
|
void freezeBottom();
|
By now, it should be obvious that I'm trying to get rid of the o_ functions.
This is in preparation for the next stage of the cleanup.
By now, I have merged most of the o_ opcode functions into the corresponding
o1_ opcode function. There are a few pure o_ opcode functions left, but it
makes sense to keep them separate functions since they are part of groups of
other functions. Now, to get rid of the remaining o_ functions I have:
Dropped the "o_" prefix from the following functions: o_kill_sprite_simon1(),
o_kill_sprite_simon2(), o_waitForSync(), o_freezeBottom(), o_setTextColor(),
o_fadeToBlack(), o_waitForMark(), o_unk_132_helper_3(), o_unk_132_helper(),
o_clearCharacter(), o_fileError().
Renamed o_sync() to sendSync().
Renamed o_mouseOn() to scriptMouseOn(), and moved it to items.cpp
Renamed o_mouseOff() to scriptMouseOff(), and moved it to items.cpp
svn-id: r21760
2006-04-10 09:18:07 +00:00
|
|
|
void unfreezeBottom();
|
2002-12-04 22:40:16 +00:00
|
|
|
|
2004-03-14 17:50:40 +00:00
|
|
|
TextLocation *getTextLocation(uint a);
|
2006-10-22 07:43:11 +00:00
|
|
|
|
|
|
|
uint setVerbText(HitArea *ha);
|
|
|
|
void waitForInput();
|
2002-04-12 21:26:59 +00:00
|
|
|
void setup_cond_c_helper();
|
|
|
|
|
2006-10-21 01:51:59 +00:00
|
|
|
uint16 getBackExit(int n);
|
|
|
|
uint16 getDoorState(Item *item, uint16 d);
|
|
|
|
uint16 getExitOf(Item *item, uint16 d);
|
|
|
|
void changeDoorState(SubRoom *r, uint16 d, uint16 n);
|
|
|
|
void setDoorState(Item *i, uint16 d, uint16 n);
|
2006-10-25 08:12:05 +00:00
|
|
|
|
|
|
|
// Elvira 1 specific
|
2006-11-06 13:59:11 +00:00
|
|
|
Item *getDoorOf(Item *item, uint16 d);
|
|
|
|
Item *getExitOf_e1(Item *item, uint16 d);
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void moveDirn(Item *i, uint x);
|
2006-10-21 01:51:59 +00:00
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual int canPlace(Item *x, Item *y);
|
2006-10-21 01:51:59 +00:00
|
|
|
int contains(Item *a, Item *b);
|
|
|
|
int sizeContents(Item *x);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual int sizeOfRec(Item *o, int d);
|
2006-10-21 01:51:59 +00:00
|
|
|
int sizeRec(Item *x, int d);
|
|
|
|
int weighUp(Item *x);
|
|
|
|
int weightRec(Item *x, int d);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual int weightOf(Item *x);
|
2006-10-21 01:51:59 +00:00
|
|
|
void xPlace(Item *x, Item *y);
|
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
void restoreMenu();
|
2006-10-24 07:44:37 +00:00
|
|
|
void drawMenuStrip(uint windowNum, uint menuNum);
|
|
|
|
void lightMenuStrip(int a);
|
|
|
|
void unlightMenuStrip();
|
|
|
|
void lightMenuBox(uint hitarea);
|
|
|
|
|
|
|
|
uint menuFor_e2(Item *item);
|
2006-10-16 11:20:20 +00:00
|
|
|
uint menuFor_ww(Item *item, uint id);
|
2006-10-16 08:41:50 +00:00
|
|
|
void clearMenuStrip();
|
|
|
|
void doMenuStrip(uint menuNum);
|
|
|
|
|
2005-12-08 06:12:04 +00:00
|
|
|
void mouseOff();
|
|
|
|
void mouseOn();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
bool loadRoomItems(uint16 item);
|
2007-05-27 11:32:19 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual bool loadTablesIntoMem(uint16 subrId);
|
|
|
|
bool loadXTablesIntoMem(uint16 subrId);
|
2007-06-21 06:37:00 +00:00
|
|
|
void loadTextIntoMem(uint16 stringId);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
uint loadTextFile(const char *filename, byte *dst);
|
2011-08-27 14:40:55 +00:00
|
|
|
Common::SeekableReadStream *openTablesFile(const char *filename);
|
|
|
|
void closeTablesFile(Common::SeekableReadStream *in);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
uint loadTextFile_simon1(const char *filename, byte *dst);
|
2011-08-27 14:40:55 +00:00
|
|
|
Common::SeekableReadStream *openTablesFile_simon1(const char *filename);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
uint loadTextFile_gme(const char *filename, byte *dst);
|
2011-08-27 14:40:55 +00:00
|
|
|
Common::SeekableReadStream *openTablesFile_gme(const char *filename);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
void invokeTimeEvent(TimeEvent *te);
|
|
|
|
bool kickoffTimeEvents();
|
2006-05-03 01:11:50 +00:00
|
|
|
void killAllTimers();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2005-12-13 00:20:11 +00:00
|
|
|
void endCutscene();
|
2009-05-16 05:34:16 +00:00
|
|
|
virtual void runSubroutine101();
|
2006-04-08 12:06:52 +00:00
|
|
|
|
2007-04-15 05:33:21 +00:00
|
|
|
virtual void inventoryUp(WindowBlock *window);
|
|
|
|
virtual void inventoryDown(WindowBlock *window);
|
2006-04-08 12:06:52 +00:00
|
|
|
|
2006-10-11 14:03:40 +00:00
|
|
|
WindowBlock *openWindow(uint x, uint y, uint w, uint h, uint flags, uint fillColor, uint textColor);
|
2006-04-08 07:13:07 +00:00
|
|
|
uint getWindowNum(WindowBlock *window);
|
2006-05-03 01:11:50 +00:00
|
|
|
void clearWindow(WindowBlock *window);
|
|
|
|
void changeWindow(uint a);
|
|
|
|
void closeWindow(uint a);
|
2006-11-06 13:59:11 +00:00
|
|
|
void setTextColor(uint color);
|
2009-05-04 12:55:04 +00:00
|
|
|
virtual void windowPutChar(WindowBlock *window, byte c, byte b = 0);
|
2006-11-15 13:11:53 +00:00
|
|
|
void waitWindow(WindowBlock *window);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-05-03 01:11:50 +00:00
|
|
|
HitArea *findBox(uint hitarea_id);
|
2009-03-05 21:38:17 +00:00
|
|
|
virtual void boxController(uint x, uint y, uint mode);
|
2006-05-03 01:11:50 +00:00
|
|
|
void handleVerbClicked(uint verb);
|
2007-04-15 05:33:21 +00:00
|
|
|
virtual void clearName();
|
2006-04-06 08:21:44 +00:00
|
|
|
void displayName(HitArea * ha);
|
2006-05-03 01:11:50 +00:00
|
|
|
void resetNameWindow();
|
2006-04-06 10:47:37 +00:00
|
|
|
void displayBoxStars();
|
2006-05-03 01:11:50 +00:00
|
|
|
void invertBox(HitArea * ha, byte a, byte b, byte c, byte d);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void initMouse();
|
2007-05-22 13:11:06 +00:00
|
|
|
virtual void handleMouseMoved();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void drawMousePointer();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
void drawArrow(uint16 x, uint16 y, int8 dir);
|
|
|
|
virtual void addArrows(WindowBlock *window, uint8 num);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void removeArrows(WindowBlock *window, uint num);
|
2006-04-08 12:06:52 +00:00
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual bool hasIcon(Item *item);
|
|
|
|
virtual uint itemGetIconNumber(Item *item);
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
|
2007-04-15 05:04:48 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void drawIconArray(uint i, Item *itemPtr, int line, int classMask);
|
2006-04-08 12:06:52 +00:00
|
|
|
void removeIconArray(uint num);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2008-01-27 19:47:41 +00:00
|
|
|
void loadIconData();
|
2002-04-12 21:26:59 +00:00
|
|
|
void loadIconFile();
|
2006-10-15 04:15:48 +00:00
|
|
|
void loadMenuFile();
|
2006-04-21 00:18:23 +00:00
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
virtual bool processSpecialKeys();
|
2002-04-12 21:26:59 +00:00
|
|
|
void hitarea_stuff_helper();
|
|
|
|
|
2006-04-06 10:47:37 +00:00
|
|
|
void permitInput();
|
2006-04-13 14:26:46 +00:00
|
|
|
|
|
|
|
uint getFeebleFontSize(byte chr);
|
2006-10-27 13:28:32 +00:00
|
|
|
void justifyStart();
|
2006-10-21 01:51:59 +00:00
|
|
|
void justifyOutPut(byte chr);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
void loadZone(uint16 zoneNum, bool useError = true);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-15 13:01:36 +00:00
|
|
|
void animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, int16 x, int16 y, uint16 palette, bool vgaScript = false);
|
2009-02-07 01:11:51 +00:00
|
|
|
void setImage(uint16 vgaSpriteId, bool vgaScript = false);
|
2009-03-08 08:45:21 +00:00
|
|
|
void setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCase = false);
|
|
|
|
virtual void setWindowImageEx(uint16 mode, uint16 vgaSpriteId);
|
|
|
|
void drawEdging();
|
2006-10-21 00:51:32 +00:00
|
|
|
|
2006-05-03 01:11:50 +00:00
|
|
|
void skipSpeech();
|
2002-07-07 19:06:48 +00:00
|
|
|
|
2009-06-08 14:50:34 +00:00
|
|
|
const char *getPixelLength(const char *string, uint16 maxWidth, uint16 &pixels);
|
2006-04-07 03:03:20 +00:00
|
|
|
bool printNameOf(Item *item, uint x, uint y);
|
2006-05-03 01:11:50 +00:00
|
|
|
bool printTextOf(uint a, uint x, uint y);
|
|
|
|
void printVerbOf(uint hitarea_id);
|
|
|
|
void showActionString(const byte *string);
|
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void printScreenText(uint vgaSpriteId, uint color, const char *stringPtr, int16 x, int16 y, int16 width);
|
2006-04-07 03:03:20 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
void renderStringAmiga(uint vgaSpriteId, uint color, uint width, uint height, const char *txt);
|
|
|
|
void renderString(uint vgaSpriteId, uint color, uint width, uint height, const char *txt);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-10-08 01:46:38 +00:00
|
|
|
void writeChar(WindowBlock *window, int x, int y, int offs, int val);
|
|
|
|
|
2006-04-10 23:44:17 +00:00
|
|
|
byte *allocBlock(uint32 size);
|
2009-04-19 01:28:27 +00:00
|
|
|
void checkNoOverWrite();
|
2006-10-03 13:20:23 +00:00
|
|
|
void checkRunningAnims();
|
2009-04-19 01:28:27 +00:00
|
|
|
void checkAnims(uint a);
|
|
|
|
void checkZonePtrs();
|
2006-05-03 01:11:50 +00:00
|
|
|
void setZoneBuffers();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-21 00:18:23 +00:00
|
|
|
void runVgaScript();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2003-06-15 11:52:42 +00:00
|
|
|
public:
|
2006-04-17 12:05:45 +00:00
|
|
|
bool getBitFlag(uint bit);
|
|
|
|
void setBitFlag(uint bit, bool value);
|
|
|
|
|
2006-10-27 12:55:48 +00:00
|
|
|
// Video Script Opcodes, Common
|
2005-10-05 12:16:49 +00:00
|
|
|
void vc1_fadeOut();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc2_call();
|
2009-02-07 04:32:33 +00:00
|
|
|
virtual void vc3_loadSprite();
|
2005-10-05 12:16:49 +00:00
|
|
|
void vc4_fadeIn();
|
2006-10-27 12:55:48 +00:00
|
|
|
void vc5_ifEqual();
|
|
|
|
void vc6_ifObjectHere();
|
|
|
|
void vc7_ifObjectNotHere();
|
|
|
|
void vc8_ifObjectIsAt();
|
|
|
|
void vc9_ifObjectStateIs();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc10_draw();
|
|
|
|
void vc12_delay();
|
|
|
|
void vc13_addToSpriteX();
|
|
|
|
void vc14_addToSpriteY();
|
2006-04-14 09:57:43 +00:00
|
|
|
void vc15_sync();
|
|
|
|
void vc16_waitSync();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc18_jump();
|
2006-10-13 12:55:53 +00:00
|
|
|
void vc19_loop();
|
2005-10-05 12:16:49 +00:00
|
|
|
void vc20_setRepeat();
|
|
|
|
void vc21_endRepeat();
|
2009-08-11 14:42:44 +00:00
|
|
|
virtual void vc22_setPalette();
|
2006-10-13 13:16:15 +00:00
|
|
|
void vc23_setPriority();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc24_setSpriteXY();
|
|
|
|
void vc25_halt_sprite();
|
2005-10-05 12:16:49 +00:00
|
|
|
void vc26_setSubWindow();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc27_resetSprite();
|
2006-10-13 12:55:53 +00:00
|
|
|
void vc28_playSFX();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc29_stopAllSounds();
|
2005-10-05 11:37:26 +00:00
|
|
|
void vc30_setFrameRate();
|
|
|
|
void vc31_setWindow();
|
2005-10-05 12:16:49 +00:00
|
|
|
void vc33_setMouseOn();
|
|
|
|
void vc34_setMouseOff();
|
|
|
|
void vc35_clearWindow();
|
2009-08-11 14:42:44 +00:00
|
|
|
virtual void vc36_setWindowImage();
|
2006-10-27 12:55:48 +00:00
|
|
|
void vc38_ifVarNotZero();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc39_setVar();
|
2007-06-30 17:34:49 +00:00
|
|
|
void vc40_scrollRight();
|
|
|
|
void vc41_scrollLeft();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc42_delayIfNotEQ();
|
2006-10-27 12:55:48 +00:00
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
// Video Script Opcodes, Personal Nightmare
|
|
|
|
void vc11_onStop();
|
|
|
|
void vc36_pause();
|
|
|
|
void vc39_volume();
|
|
|
|
void vc44_enableBox();
|
|
|
|
void vc45_disableBox();
|
|
|
|
void vc46_maxBox();
|
|
|
|
void vc48_specialEffect();
|
|
|
|
void vc50_setBox();
|
|
|
|
void vc55_scanFlag();
|
|
|
|
|
2006-10-27 12:55:48 +00:00
|
|
|
// Video Script Opcodes, Elvira 1
|
|
|
|
void vc17_waitEnd();
|
|
|
|
void vc32_saveScreen();
|
|
|
|
void vc37_pokePalette();
|
|
|
|
|
|
|
|
// Video Script Opcodes, Elvira 2
|
|
|
|
void vc43_ifBitSet();
|
|
|
|
void vc44_ifBitClear();
|
2006-10-13 23:19:07 +00:00
|
|
|
void vc45_setWindowPalette();
|
|
|
|
void vc46_setPaletteSlot1();
|
|
|
|
void vc47_setPaletteSlot2();
|
|
|
|
void vc48_setPaletteSlot3();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc49_setBit();
|
|
|
|
void vc50_clearBit();
|
2006-04-14 09:57:43 +00:00
|
|
|
void vc51_enableBox();
|
2005-05-06 13:22:48 +00:00
|
|
|
void vc52_playSound();
|
2006-10-13 12:55:53 +00:00
|
|
|
void vc53_dissolveIn();
|
|
|
|
void vc54_dissolveOut();
|
2006-04-14 09:57:43 +00:00
|
|
|
void vc55_moveBox();
|
2006-10-13 12:55:53 +00:00
|
|
|
void vc56_fullScreen();
|
2006-09-19 11:59:13 +00:00
|
|
|
void vc57_blackPalette();
|
2006-10-13 13:16:15 +00:00
|
|
|
void vc58_checkCodeWheel();
|
|
|
|
void vc58_changePriority();
|
2006-10-27 12:55:48 +00:00
|
|
|
void vc59_ifEGA();
|
|
|
|
|
|
|
|
// Video Script Opcodes, Waxworks
|
2006-10-13 13:16:15 +00:00
|
|
|
void vc60_stopAnimation();
|
2006-10-13 12:55:53 +00:00
|
|
|
void vc61();
|
2005-10-05 11:37:26 +00:00
|
|
|
void vc62_fastFadeOut();
|
2009-02-07 04:32:33 +00:00
|
|
|
virtual void vc63_fastFadeIn();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-10-27 12:55:48 +00:00
|
|
|
// Video Script Opcodes, Simon 1
|
|
|
|
void vc11_clearPathFinder();
|
|
|
|
void vc17_setPathfinderItem();
|
|
|
|
void vc32_copyVar();
|
|
|
|
void vc37_addToSpriteY();
|
|
|
|
void vc45_setSpriteX();
|
|
|
|
void vc46_setSpriteY();
|
|
|
|
void vc47_addToVar();
|
2009-08-11 14:42:44 +00:00
|
|
|
virtual void vc48_setPathFinder();
|
2006-10-27 12:55:48 +00:00
|
|
|
void vc59_ifSpeech();
|
|
|
|
void vc61_setMaskImage();
|
|
|
|
|
|
|
|
// Video Script Opcodes, Simon 2
|
|
|
|
void vc56_delayLong();
|
|
|
|
void vc59_stopAnimations();
|
|
|
|
void vc64_ifSpeech();
|
2005-10-05 11:37:26 +00:00
|
|
|
void vc65_slowFadeIn();
|
2006-10-27 12:55:48 +00:00
|
|
|
void vc66_ifEqual();
|
|
|
|
void vc67_ifLE();
|
|
|
|
void vc68_ifGE();
|
|
|
|
void vc69_playSeq();
|
|
|
|
void vc70_joinSeq();
|
|
|
|
void vc71_ifSeqWaiting();
|
|
|
|
void vc72_segue();
|
2005-10-05 11:37:26 +00:00
|
|
|
void vc73_setMark();
|
|
|
|
void vc74_clearMark();
|
2005-11-19 11:37:41 +00:00
|
|
|
|
2006-10-27 12:55:48 +00:00
|
|
|
// Video Script Opcodes, Feeble Files
|
2005-10-09 09:03:37 +00:00
|
|
|
void vc75_setScale();
|
|
|
|
void vc76_setScaleXOffs();
|
|
|
|
void vc77_setScaleYOffs();
|
2005-11-14 10:31:19 +00:00
|
|
|
void vc78_computeXY();
|
2005-11-18 12:40:03 +00:00
|
|
|
void vc79_computePosNum();
|
2005-10-09 09:03:37 +00:00
|
|
|
void vc80_setOverlayImage();
|
|
|
|
void vc81_setRandom();
|
2005-11-18 14:15:03 +00:00
|
|
|
void vc82_getPathValue();
|
2005-10-09 09:03:37 +00:00
|
|
|
void vc83_playSoundLoop();
|
|
|
|
void vc84_stopSoundLoop();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-07 09:37:44 +00:00
|
|
|
void setScriptCondition(bool cond);
|
|
|
|
bool getScriptCondition();
|
|
|
|
void setScriptReturn(int ret);
|
|
|
|
int getScriptReturn();
|
|
|
|
|
2006-10-05 05:27:10 +00:00
|
|
|
// Opcodes, common
|
2007-04-15 12:04:47 +00:00
|
|
|
void o_invalid();
|
2006-04-10 09:49:03 +00:00
|
|
|
void o_at();
|
|
|
|
void o_notAt();
|
|
|
|
void o_carried();
|
|
|
|
void o_notCarried();
|
|
|
|
void o_isAt();
|
|
|
|
void o_zero();
|
|
|
|
void o_notZero();
|
|
|
|
void o_eq();
|
|
|
|
void o_notEq();
|
|
|
|
void o_gt();
|
|
|
|
void o_lt();
|
|
|
|
void o_eqf();
|
|
|
|
void o_notEqf();
|
|
|
|
void o_ltf();
|
|
|
|
void o_gtf();
|
|
|
|
void o_chance();
|
|
|
|
void o_isRoom();
|
|
|
|
void o_isObject();
|
|
|
|
void o_state();
|
|
|
|
void o_oflag();
|
|
|
|
void o_destroy();
|
|
|
|
void o_place();
|
|
|
|
void o_copyff();
|
|
|
|
void o_clear();
|
|
|
|
void o_let();
|
|
|
|
void o_add();
|
|
|
|
void o_sub();
|
|
|
|
void o_addf();
|
|
|
|
void o_subf();
|
|
|
|
void o_mul();
|
|
|
|
void o_div();
|
|
|
|
void o_mulf();
|
|
|
|
void o_divf();
|
|
|
|
void o_mod();
|
|
|
|
void o_modf();
|
|
|
|
void o_random();
|
|
|
|
void o_goto();
|
|
|
|
void o_oset();
|
|
|
|
void o_oclear();
|
|
|
|
void o_putBy();
|
|
|
|
void o_inc();
|
|
|
|
void o_dec();
|
|
|
|
void o_setState();
|
|
|
|
void o_print();
|
|
|
|
void o_message();
|
|
|
|
void o_msg();
|
|
|
|
void o_end();
|
|
|
|
void o_done();
|
|
|
|
void o_process();
|
|
|
|
void o_when();
|
|
|
|
void o_if1();
|
|
|
|
void o_if2();
|
|
|
|
void o_isCalled();
|
|
|
|
void o_is();
|
|
|
|
void o_debug();
|
|
|
|
void o_comment();
|
|
|
|
void o_haltAnimation();
|
|
|
|
void o_restartAnimation();
|
|
|
|
void o_getParent();
|
|
|
|
void o_getNext();
|
|
|
|
void o_getChildren();
|
|
|
|
void o_picture();
|
|
|
|
void o_loadZone();
|
|
|
|
void o_killAnimate();
|
|
|
|
void o_defWindow();
|
|
|
|
void o_window();
|
|
|
|
void o_cls();
|
|
|
|
void o_closeWindow();
|
|
|
|
void o_addBox();
|
|
|
|
void o_delBox();
|
|
|
|
void o_enableBox();
|
|
|
|
void o_disableBox();
|
|
|
|
void o_moveBox();
|
|
|
|
void o_doIcons();
|
|
|
|
void o_isClass();
|
|
|
|
void o_setClass();
|
|
|
|
void o_unsetClass();
|
|
|
|
void o_waitSync();
|
|
|
|
void o_sync();
|
|
|
|
void o_defObj();
|
|
|
|
void o_here();
|
|
|
|
void o_doClassIcons();
|
2007-04-15 12:04:47 +00:00
|
|
|
void o_playTune();
|
2006-04-10 09:49:03 +00:00
|
|
|
void o_setAdjNoun();
|
|
|
|
void o_saveUserGame();
|
|
|
|
void o_loadUserGame();
|
|
|
|
void o_copysf();
|
|
|
|
void o_restoreIcons();
|
|
|
|
void o_freezeZones();
|
|
|
|
void o_placeNoIcons();
|
|
|
|
void o_clearTimers();
|
|
|
|
void o_setDollar();
|
|
|
|
void o_isBox();
|
2006-10-25 13:38:35 +00:00
|
|
|
|
2006-11-15 13:11:53 +00:00
|
|
|
int16 moreText(Item *i);
|
|
|
|
void lobjFunc(Item *i, const char *f);
|
2007-06-08 07:50:28 +00:00
|
|
|
uint confirmYesOrNo(uint16 x, uint16 y);
|
2006-11-15 13:11:53 +00:00
|
|
|
uint continueOrQuit();
|
|
|
|
void printScroll();
|
2007-06-08 07:50:28 +00:00
|
|
|
virtual void printStats();
|
2006-11-06 13:59:11 +00:00
|
|
|
void synchChain(Item *i);
|
|
|
|
|
2003-06-15 11:52:42 +00:00
|
|
|
protected:
|
2007-04-15 00:12:09 +00:00
|
|
|
bool drawImage_clip(VC10_state *state);
|
2006-11-06 08:07:47 +00:00
|
|
|
|
2007-05-15 13:01:36 +00:00
|
|
|
void drawImage_init(int16 image, uint16 palette, int16 x, int16 y, uint16 flags);
|
2007-04-15 00:12:09 +00:00
|
|
|
|
2007-05-06 09:46:43 +00:00
|
|
|
virtual void drawImage(VC10_state *state);
|
2007-05-09 15:36:05 +00:00
|
|
|
void drawBackGroundImage(VC10_state *state);
|
|
|
|
void drawVertImage(VC10_state *state);
|
2008-07-16 09:08:44 +00:00
|
|
|
void drawVertImageCompressed(VC10_state *state);
|
|
|
|
void drawVertImageUncompressed(VC10_state *state);
|
2007-05-09 15:36:05 +00:00
|
|
|
|
|
|
|
void setMoveRect(uint16 x, uint16 y, uint16 width, uint16 height);
|
2006-11-06 08:07:47 +00:00
|
|
|
|
2006-04-07 14:27:28 +00:00
|
|
|
void horizontalScroll(VC10_state *state);
|
|
|
|
void verticalScroll(VC10_state *state);
|
|
|
|
|
2005-12-13 00:20:11 +00:00
|
|
|
int vcReadVarOrWord();
|
|
|
|
uint vcReadNextWord();
|
|
|
|
uint vcReadNextByte();
|
|
|
|
uint vcReadVar(uint var);
|
|
|
|
void vcWriteVar(uint var, int16 value);
|
|
|
|
void vcSkipNextInstruction();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-24 06:46:31 +00:00
|
|
|
int getScale(int16 y, int16 x);
|
2006-04-18 00:15:25 +00:00
|
|
|
void checkScrollX(int16 x, int16 xpos);
|
|
|
|
void checkScrollY(int16 y, int16 ypos);
|
2011-04-14 12:34:28 +00:00
|
|
|
void centerScroll();
|
2005-11-18 13:47:47 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void clearVideoWindow(uint16 windowNum, uint16 color);
|
2007-06-21 06:37:00 +00:00
|
|
|
void clearVideoBackGround(uint16 windowNum, uint16 color);
|
2007-05-09 15:36:05 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
void setPaletteSlot(uint16 srcOffs, uint8 dstOffs);
|
2009-03-08 08:45:21 +00:00
|
|
|
void checkOnStopTable();
|
2006-10-14 14:29:14 +00:00
|
|
|
void checkWaitEndTable();
|
2006-10-11 12:03:47 +00:00
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
virtual bool ifObjectHere(uint16 val);
|
|
|
|
virtual bool ifObjectAt(uint16 a, uint16 b);
|
|
|
|
virtual bool ifObjectState(uint16 a, int16 b);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-09-30 07:15:19 +00:00
|
|
|
bool isVgaQueueEmpty();
|
2006-10-13 11:38:41 +00:00
|
|
|
void haltAnimation();
|
|
|
|
void restartAnimation();
|
2009-02-07 01:11:51 +00:00
|
|
|
void addVgaEvent(uint16 num, uint8 type, const byte *codePtr, uint16 curSprite, uint16 curZoneNum);
|
2006-04-21 00:18:23 +00:00
|
|
|
void deleteVgaEvent(VgaTimerEntry * vte);
|
|
|
|
void processVgaEvents();
|
2009-02-07 01:11:51 +00:00
|
|
|
void animateEvent(const byte *codePtr, uint16 curZoneNum, uint16 curSprite);
|
2006-04-21 00:18:23 +00:00
|
|
|
void scrollEvent();
|
2007-05-26 13:23:06 +00:00
|
|
|
void drawStuff(const byte *src, uint offs);
|
2008-04-16 08:50:25 +00:00
|
|
|
void playerDamageEvent(VgaTimerEntry * vte, uint dx);
|
|
|
|
void monsterDamageEvent(VgaTimerEntry * vte, uint dx);
|
2005-12-13 00:20:11 +00:00
|
|
|
|
2006-04-21 00:18:23 +00:00
|
|
|
VgaSprite *findCurSprite();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-10 23:44:17 +00:00
|
|
|
bool isSpriteLoaded(uint16 id, uint16 zoneNum);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-09 06:06:10 +00:00
|
|
|
void resetWindow(WindowBlock *window);
|
2006-10-21 01:51:59 +00:00
|
|
|
void freeBox(uint index);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-22 13:11:06 +00:00
|
|
|
void sendWindow(uint a);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void colorWindow(WindowBlock *window);
|
|
|
|
void colorBlock(WindowBlock *window, uint16 x, uint16 y, uint16 w, uint16 h);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
void restoreWindow(WindowBlock *window);
|
2009-03-08 08:45:21 +00:00
|
|
|
void restoreBlock(uint16 x, uint16 y, uint16 w, uint16 h);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-03-22 13:54:26 +00:00
|
|
|
byte *getBackBuf();
|
2006-04-15 22:37:48 +00:00
|
|
|
byte *getBackGround();
|
2006-03-16 04:10:34 +00:00
|
|
|
byte *getScaleBuf();
|
2006-03-16 03:15:05 +00:00
|
|
|
|
2007-02-12 04:30:24 +00:00
|
|
|
byte *convertImage(VC10_state *state, bool compressed);
|
2007-02-08 23:37:17 +00:00
|
|
|
|
2006-10-14 14:29:14 +00:00
|
|
|
bool decrunchFile(byte *src, byte *dst, uint32 size);
|
2007-06-21 06:37:00 +00:00
|
|
|
void loadVGABeardFile(uint16 id);
|
2009-03-08 08:45:21 +00:00
|
|
|
void loadVGAVideoFile(uint16 id, uint8 type, bool useError = true);
|
2007-06-21 06:37:00 +00:00
|
|
|
bool loadVGASoundFile(uint16 id, uint8 type);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
void openGameFile();
|
2006-04-21 00:18:23 +00:00
|
|
|
void readGameFile(void *dst, uint32 offs, uint32 size);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 04:32:33 +00:00
|
|
|
virtual void timerProc();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-13 08:46:48 +00:00
|
|
|
virtual void animateSprites();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-09 15:36:05 +00:00
|
|
|
void dirtyClips();
|
2007-06-09 05:30:20 +00:00
|
|
|
void dirtyClipCheck(int16 x, int16 y, int16 w, int16 h);
|
2007-05-09 15:36:05 +00:00
|
|
|
void dirtyBackGround();
|
|
|
|
void restoreBackGround();
|
|
|
|
void saveBackGround(VgaSprite *vsp);
|
|
|
|
|
2007-06-21 05:10:42 +00:00
|
|
|
void clearSurfaces();
|
2007-05-13 08:46:48 +00:00
|
|
|
void displayScreen();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
void dumpVideoScript(const byte *src, bool singeOpcode);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void dumpVgaFile(const byte *vga);
|
2009-02-07 03:36:36 +00:00
|
|
|
void dumpVgaScript(const byte *ptr, uint16 res, uint16 id);
|
|
|
|
void dumpVgaScriptAlways(const byte *ptr, uint16 res, uint16 id);
|
2009-05-14 07:05:51 +00:00
|
|
|
|
|
|
|
void dumpVgaBitmaps(uint16 zoneNum);
|
|
|
|
|
2006-10-21 01:51:59 +00:00
|
|
|
void dumpSingleBitmap(int file, int image, const byte *offs, int w, int h, byte base);
|
2009-02-07 03:36:36 +00:00
|
|
|
void dumpBitmap(const char *filename, const byte *offs, uint16 w, uint16 h, int flags, const byte *palette, byte base);
|
2009-05-14 07:05:51 +00:00
|
|
|
void palLoad(byte *pal, const byte *vga1, int a, int b);
|
2002-06-29 16:11:13 +00:00
|
|
|
|
2007-06-21 05:10:42 +00:00
|
|
|
void fillBackFromBackGround(uint16 height, uint16 width);
|
|
|
|
void fillBackFromFront();
|
|
|
|
void fillBackGroundFromBack();
|
|
|
|
void fillBackGroundFromFront();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-05-22 13:11:06 +00:00
|
|
|
virtual void doOutput(const byte *src, uint len);
|
2006-11-15 13:11:53 +00:00
|
|
|
void clsCheck(WindowBlock *window);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2012-04-15 09:24:57 +00:00
|
|
|
virtual void quickLoadOrSave();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-02-07 03:36:36 +00:00
|
|
|
byte *vc10_uncompressFlip(const byte *src, uint16 w, uint16 h);
|
|
|
|
byte *vc10_flip(const byte *src, uint16 w, uint16 h);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
|
|
|
Item *getNextItemPtrStrange();
|
|
|
|
|
2007-05-16 08:27:15 +00:00
|
|
|
virtual bool loadGame(const char *filename, bool restartMode = false);
|
|
|
|
virtual bool saveGame(uint slot, const char *caption);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2006-04-08 07:13:07 +00:00
|
|
|
void openTextWindow();
|
|
|
|
void tidyIconArray(uint i);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-04-15 14:12:08 +00:00
|
|
|
virtual void windowNewLine(WindowBlock *window);
|
2007-06-08 02:18:22 +00:00
|
|
|
void windowScroll(WindowBlock *window);
|
2010-03-07 11:46:03 +00:00
|
|
|
virtual void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr);
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-21 06:37:00 +00:00
|
|
|
void loadMusic(uint16 track);
|
|
|
|
void playModule(uint16 music);
|
2007-06-04 17:52:23 +00:00
|
|
|
virtual void playMusic(uint16 music, uint16 track);
|
2007-06-04 14:25:02 +00:00
|
|
|
void stopMusic();
|
2007-02-16 13:55:01 +00:00
|
|
|
|
2002-04-12 21:26:59 +00:00
|
|
|
void delay(uint delay);
|
2003-12-10 00:54:53 +00:00
|
|
|
void pause();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
By now, it should be obvious that I'm trying to get rid of the o_ functions.
This is in preparation for the next stage of the cleanup.
By now, I have merged most of the o_ opcode functions into the corresponding
o1_ opcode function. There are a few pure o_ opcode functions left, but it
makes sense to keep them separate functions since they are part of groups of
other functions. Now, to get rid of the remaining o_ functions I have:
Dropped the "o_" prefix from the following functions: o_kill_sprite_simon1(),
o_kill_sprite_simon2(), o_waitForSync(), o_freezeBottom(), o_setTextColor(),
o_fadeToBlack(), o_waitForMark(), o_unk_132_helper_3(), o_unk_132_helper(),
o_clearCharacter(), o_fileError().
Renamed o_sync() to sendSync().
Renamed o_mouseOn() to scriptMouseOn(), and moved it to items.cpp
Renamed o_mouseOff() to scriptMouseOff(), and moved it to items.cpp
svn-id: r21760
2006-04-10 09:18:07 +00:00
|
|
|
void waitForMark(uint i);
|
2006-04-21 00:18:23 +00:00
|
|
|
void scrollScreen();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2009-05-14 07:05:51 +00:00
|
|
|
void decodeColumn(byte *dst, const byte *src, uint16 height, uint16 pitch);
|
|
|
|
void decodeRow(byte *dst, const byte *src, uint16 width, uint16 pitch);
|
2002-04-12 21:26:59 +00:00
|
|
|
void hitarea_stuff_helper_2();
|
2005-11-13 07:04:56 +00:00
|
|
|
void fastFadeIn();
|
|
|
|
void slowFadeIn();
|
2009-07-21 10:37:58 +00:00
|
|
|
void fullFade();
|
2002-04-12 21:26:59 +00:00
|
|
|
|
2007-06-21 05:26:47 +00:00
|
|
|
virtual void vcStopAnimation(uint16 zone, uint16 sprite);
|
2002-04-16 12:07:19 +00:00
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual bool confirmOverWrite(WindowBlock *window);
|
2007-06-08 07:50:28 +00:00
|
|
|
int16 matchSaveGame(const char *name, uint16 max);
|
2006-06-02 08:06:50 +00:00
|
|
|
void disableFileBoxes();
|
2007-05-22 10:31:51 +00:00
|
|
|
virtual void userGame(bool load);
|
2006-06-02 08:06:50 +00:00
|
|
|
void userGameBackSpace(WindowBlock *window, int x, byte b = 0);
|
2009-02-07 01:11:51 +00:00
|
|
|
void fileError(WindowBlock *window, bool saveError);
|
2002-04-16 12:07:19 +00:00
|
|
|
|
2005-12-13 00:20:11 +00:00
|
|
|
int countSaveGames();
|
2002-04-16 12:07:19 +00:00
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2002-04-12 21:26:59 +00:00
|
|
|
};
|
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
class AGOSEngine_PN : public AGOSEngine {
|
|
|
|
|
|
|
|
virtual Common::Error go();
|
|
|
|
void demoSeq();
|
|
|
|
void introSeq();
|
|
|
|
void setupBoxes();
|
2009-07-14 21:46:23 +00:00
|
|
|
int readfromline();
|
2009-03-08 08:45:21 +00:00
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_PN(OSystem *system, const AGOSGameDescription *gd);
|
2009-03-08 08:45:21 +00:00
|
|
|
~AGOSEngine_PN();
|
|
|
|
|
|
|
|
virtual void setupGame();
|
|
|
|
virtual void setupOpcodes();
|
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
|
|
|
int actCallD(int n);
|
|
|
|
|
|
|
|
void opn_opcode00();
|
2009-07-14 21:46:23 +00:00
|
|
|
void opn_add();
|
|
|
|
void opn_sub();
|
|
|
|
void opn_mul();
|
|
|
|
void opn_div();
|
2009-03-08 08:45:21 +00:00
|
|
|
void opn_opcode05();
|
|
|
|
void opn_opcode06();
|
|
|
|
void opn_opcode07();
|
|
|
|
void opn_opcode08();
|
|
|
|
void opn_opcode09();
|
|
|
|
void opn_opcode10();
|
|
|
|
void opn_opcode11();
|
|
|
|
void opn_opcode12();
|
|
|
|
void opn_opcode13();
|
|
|
|
void opn_opcode14();
|
|
|
|
void opn_opcode15();
|
|
|
|
void opn_opcode16();
|
2009-07-14 21:46:23 +00:00
|
|
|
void opn_lt();
|
|
|
|
void opn_gt();
|
|
|
|
void opn_eq();
|
|
|
|
void opn_neq();
|
2009-03-08 08:45:21 +00:00
|
|
|
void opn_opcode21();
|
|
|
|
void opn_opcode22();
|
|
|
|
void opn_opcode23();
|
|
|
|
void opn_opcode24();
|
|
|
|
void opn_opcode25();
|
|
|
|
void opn_opcode26();
|
|
|
|
void opn_opcode27();
|
|
|
|
void opn_opcode28();
|
|
|
|
void opn_opcode29();
|
|
|
|
void opn_opcode30();
|
|
|
|
void opn_opcode31();
|
|
|
|
void opn_opcode32();
|
|
|
|
void opn_opcode33();
|
|
|
|
void opn_opcode34();
|
|
|
|
void opn_opcode35();
|
|
|
|
void opn_opcode36();
|
|
|
|
void opn_opcode37();
|
|
|
|
void opn_opcode38();
|
|
|
|
void opn_opcode39();
|
|
|
|
void opn_opcode40();
|
|
|
|
void opn_opcode41();
|
|
|
|
void opn_opcode42();
|
|
|
|
void opn_opcode43();
|
|
|
|
void opn_opcode44();
|
|
|
|
void opn_opcode45();
|
|
|
|
void opn_opcode46();
|
|
|
|
void opn_opcode47();
|
|
|
|
void opn_opcode48();
|
|
|
|
void opn_opcode49();
|
|
|
|
void opn_opcode50();
|
|
|
|
void opn_opcode51();
|
|
|
|
void opn_opcode52();
|
|
|
|
void opn_opcode53();
|
|
|
|
void opn_opcode54();
|
|
|
|
void opn_opcode55();
|
|
|
|
void opn_opcode56();
|
|
|
|
void opn_opcode57();
|
|
|
|
void opn_opcode62();
|
|
|
|
void opn_opcode63();
|
|
|
|
|
2009-07-18 15:12:54 +00:00
|
|
|
protected:
|
|
|
|
struct StackFrame {
|
|
|
|
StackFrame *nextframe;
|
|
|
|
int16 flag[6];
|
|
|
|
int16 param[8];
|
|
|
|
int16 classnum;
|
|
|
|
uint8 *linpos;
|
|
|
|
uint8 *lbase;
|
|
|
|
int16 ll;
|
|
|
|
int16 linenum;
|
|
|
|
int16 process;
|
|
|
|
int tagOfParentDoline; ///< tag of the doline "instance" to which this StackFrame belongs
|
|
|
|
StackFrame() { memset(this, 0, sizeof(*this)); }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-07-14 21:46:23 +00:00
|
|
|
StackFrame *_stackbase;
|
2009-03-08 08:45:21 +00:00
|
|
|
|
2009-07-18 15:12:54 +00:00
|
|
|
int _tagOfActiveDoline; ///< tag of the active doline "instance"
|
|
|
|
int _dolineReturnVal;
|
|
|
|
|
2009-03-08 08:45:21 +00:00
|
|
|
byte *_dataBase, *_textBase;
|
|
|
|
uint32 _dataBaseSize, _textBaseSize;
|
|
|
|
|
|
|
|
HitArea _invHitAreas[45];
|
|
|
|
|
2009-07-14 21:46:23 +00:00
|
|
|
char _buffer[80];
|
2009-03-08 08:45:21 +00:00
|
|
|
char _inputline[61];
|
|
|
|
char _saveFile[20];
|
|
|
|
char _sb[80];
|
|
|
|
uint8 _wordcp[7];
|
|
|
|
|
|
|
|
const char *_mouseString, *_mouseString1;
|
|
|
|
char _objectName1[15], _objectName2[15];
|
|
|
|
char _inMessage[20];
|
|
|
|
char _placeMessage[15];
|
2009-03-09 03:58:18 +00:00
|
|
|
bool _inputReady;
|
|
|
|
bool _inputting;
|
2009-03-08 08:45:21 +00:00
|
|
|
uint16 _intputCounter, _inputMax;
|
2009-05-04 12:55:04 +00:00
|
|
|
uint16 _mousePrintFG;
|
2009-03-08 08:45:21 +00:00
|
|
|
HitArea *_dragStore;
|
|
|
|
uint8 _hitCalled;
|
|
|
|
|
|
|
|
uint32 _quickptr[16];
|
|
|
|
uint16 _quickshort[12];
|
|
|
|
|
|
|
|
bool _noScanFlag;
|
|
|
|
char _keyboardBuffer[61];
|
|
|
|
|
|
|
|
uint16 _objects;
|
|
|
|
int16 _objectCountS;
|
|
|
|
|
2009-07-14 21:46:23 +00:00
|
|
|
int16 _bp;
|
2009-03-09 03:58:18 +00:00
|
|
|
int16 _xofs;
|
2009-03-08 08:45:21 +00:00
|
|
|
int16 _havinit;
|
|
|
|
uint16 _seed;
|
|
|
|
|
|
|
|
char *_curwrdptr;
|
|
|
|
char *_inpp;
|
|
|
|
int _fnst;
|
|
|
|
int _procnum;
|
|
|
|
int _linct;
|
|
|
|
int _linembr;
|
|
|
|
uint8 *_linebase;
|
|
|
|
uint8 *_workptr;
|
|
|
|
|
|
|
|
uint16 getptr(uint32 pos);
|
|
|
|
uint32 getlong(uint32 pos);
|
|
|
|
|
|
|
|
virtual void loadGamePcFile();
|
|
|
|
|
|
|
|
int bitextract(uint32 ptr, int offs);
|
|
|
|
int doaction();
|
|
|
|
int doline(int needsave);
|
|
|
|
int setposition(int process, int line);
|
|
|
|
int varval();
|
|
|
|
|
|
|
|
char *getMessage(char *msg, uint16 num);
|
|
|
|
void getResponse(uint16 charNum, uint16 objNum, uint16 &msgNum1, uint16 &msgNum2);
|
|
|
|
void getObjectName(char *v, uint16 x);
|
|
|
|
|
|
|
|
void processor();
|
|
|
|
void setbitf(uint32 ptr, int offs, int val);
|
|
|
|
void setqptrs();
|
|
|
|
void writeval(uint8 *ptr, int val);
|
|
|
|
|
|
|
|
void addstack(int type);
|
|
|
|
void dumpstack();
|
|
|
|
void popstack(int type);
|
|
|
|
void funccpy(int *store);
|
|
|
|
void funcentry(int *storestore, int procn);
|
|
|
|
|
|
|
|
int findentry();
|
|
|
|
int findset();
|
|
|
|
int gvwrd(uint8 *wptr, int mask);
|
|
|
|
int wrdmatch(uint8 *word1, int mask1, uint8 *word2, int mask2);
|
|
|
|
|
|
|
|
bool testContainer(uint16 a);
|
|
|
|
bool testObvious(uint16 a);
|
|
|
|
bool testSeen(uint16 a);
|
|
|
|
|
|
|
|
bool ifObjectInInv(uint16 a);
|
|
|
|
int inventoryOn(int val);
|
|
|
|
int inventoryOff();
|
|
|
|
void mouseHit();
|
|
|
|
void execMouseHit(HitArea *ha);
|
|
|
|
void hitBox1(HitArea *ha);
|
|
|
|
void hitBox2(HitArea *ha);
|
|
|
|
void hitBox3(HitArea *ha);
|
|
|
|
void hitBox4(HitArea *ha);
|
|
|
|
void hitBox5(HitArea *ha);
|
|
|
|
void hitBox6(HitArea *ha);
|
|
|
|
void hitBox7(HitArea *ha);
|
|
|
|
void hitBox8(HitArea *ha);
|
|
|
|
void hitBox9(HitArea *ha);
|
|
|
|
void hitBox11(HitArea *ha);
|
|
|
|
|
|
|
|
void drawIconHitBar();
|
|
|
|
void iconPage();
|
|
|
|
void printIcon(HitArea *ha, uint8 i, uint8 r);
|
2009-05-04 12:55:04 +00:00
|
|
|
virtual void windowPutChar(WindowBlock *window, byte c, byte b = 0);
|
2009-03-08 08:45:21 +00:00
|
|
|
|
|
|
|
bool badload(int8 errorNum);
|
2009-07-18 15:15:26 +00:00
|
|
|
int loadFile(char *name);
|
|
|
|
int saveFile(char *name);
|
2009-03-08 08:45:21 +00:00
|
|
|
void getFilename();
|
|
|
|
void sysftodb();
|
|
|
|
void dbtosysf();
|
|
|
|
|
|
|
|
uint32 ftext(uint32 base, int n);
|
|
|
|
char *unctok(char *c, int n);
|
|
|
|
void uncomstr(char *c, uint32 x);
|
|
|
|
void patok(int n);
|
|
|
|
void pcf(uint8 ch);
|
|
|
|
void pcl(const char *s);
|
|
|
|
void pmesd(int n);
|
|
|
|
void plocd(int n, int m);
|
|
|
|
void pobjd(int n, int m);
|
|
|
|
void ptext(uint32 tptr);
|
|
|
|
|
|
|
|
virtual void clearVideoWindow(uint16 windowNum, uint16 color);
|
|
|
|
virtual void setWindowImageEx(uint16 mode, uint16 vga_res);
|
|
|
|
|
|
|
|
virtual bool ifObjectHere(uint16 val);
|
|
|
|
virtual bool ifObjectAt(uint16 a, uint16 b);
|
|
|
|
virtual bool ifObjectState(uint16 a, int16 b);
|
|
|
|
|
|
|
|
virtual void boxController(uint x, uint y, uint mode);
|
|
|
|
virtual void timerProc();
|
|
|
|
|
|
|
|
void addChar(uint8 chr);
|
2009-05-05 13:40:16 +00:00
|
|
|
void clearCursor(WindowBlock *window);
|
2009-03-08 08:45:21 +00:00
|
|
|
void clearInputLine();
|
|
|
|
void handleKeyboard();
|
|
|
|
virtual void handleMouseMoved();
|
|
|
|
void interact(char *buffer, uint8 size);
|
|
|
|
|
|
|
|
virtual bool processSpecialKeys();
|
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_PN::*OpcodeProcPN) ();
|
|
|
|
struct OpcodeEntryPN {
|
|
|
|
OpcodeProcPN proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryPN *_opcodesPN;
|
|
|
|
};
|
|
|
|
|
2007-04-15 05:04:48 +00:00
|
|
|
class AGOSEngine_Elvira1 : public AGOSEngine {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_Elvira1(OSystem *system, const AGOSGameDescription *gd);
|
2007-04-15 05:04:48 +00:00
|
|
|
//~AGOSEngine_Elvira1();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
2007-04-15 12:04:47 +00:00
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
|
|
|
void oe1_present();
|
|
|
|
void oe1_notPresent();
|
|
|
|
void oe1_worn();
|
|
|
|
void oe1_notWorn();
|
|
|
|
void oe1_notCarried();
|
|
|
|
void oe1_isNotAt();
|
|
|
|
void oe1_sibling();
|
|
|
|
void oe1_notSibling();
|
|
|
|
void oe1_isIn();
|
|
|
|
void oe1_isNotIn();
|
|
|
|
void oe1_isPlayer();
|
|
|
|
void oe1_canPut();
|
|
|
|
void oe1_create();
|
|
|
|
void oe1_copyof();
|
|
|
|
void oe1_copyfo();
|
|
|
|
void oe1_whatO();
|
|
|
|
void oe1_weigh();
|
|
|
|
void oe1_setFF();
|
|
|
|
void oe1_moveDirn();
|
|
|
|
void oe1_score();
|
|
|
|
void oe1_look();
|
|
|
|
void oe1_doClass();
|
|
|
|
void oe1_pObj();
|
|
|
|
void oe1_pName();
|
|
|
|
void oe1_pcName();
|
|
|
|
void oe1_isCalled();
|
|
|
|
void oe1_cFlag();
|
|
|
|
void oe1_rescan();
|
|
|
|
void oe1_setUserItem();
|
|
|
|
void oe1_getUserItem();
|
|
|
|
void oe1_whereTo();
|
|
|
|
void oe1_doorExit();
|
|
|
|
void oe1_loadGame();
|
|
|
|
void oe1_clearUserItem();
|
|
|
|
void oe1_findMaster();
|
|
|
|
void oe1_nextMaster();
|
|
|
|
void oe1_animate();
|
|
|
|
void oe1_stopAnimate();
|
|
|
|
void oe1_menu();
|
2009-03-05 21:38:17 +00:00
|
|
|
void oe1_addBox();
|
2007-04-15 12:04:47 +00:00
|
|
|
void oe1_enableInput();
|
|
|
|
void oe1_setTime();
|
|
|
|
void oe1_ifTime();
|
|
|
|
void oe1_playTune();
|
|
|
|
void oe1_bitClear();
|
|
|
|
void oe1_bitSet();
|
|
|
|
void oe1_bitTest();
|
|
|
|
void oe1_zoneDisk();
|
|
|
|
void oe1_printStats();
|
|
|
|
void oe1_stopTune();
|
|
|
|
void oe1_printPlayerDamage();
|
|
|
|
void oe1_printMonsterDamage();
|
|
|
|
void oe1_pauseGame();
|
|
|
|
void oe1_printPlayerHit();
|
|
|
|
void oe1_printMonsterHit();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_Elvira1::*OpcodeProcElvira1) ();
|
|
|
|
struct OpcodeEntryElvira1 {
|
|
|
|
OpcodeProcElvira1 proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryElvira1 *_opcodesElvira1;
|
2009-03-08 08:45:21 +00:00
|
|
|
|
|
|
|
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
|
|
|
|
|
|
|
|
virtual char *genSaveName(int slot);
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class AGOSEngine_Elvira2 : public AGOSEngine_Elvira1 {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_Elvira2(OSystem *system, const AGOSGameDescription *gd);
|
2007-04-15 05:04:48 +00:00
|
|
|
//~AGOSEngine_Elvira2();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
2007-04-15 12:04:47 +00:00
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
|
|
|
void oe2_moveDirn();
|
|
|
|
void oe2_doClass();
|
|
|
|
void oe2_pObj();
|
2007-06-29 02:06:46 +00:00
|
|
|
void oe2_isCalled();
|
2007-07-01 23:57:49 +00:00
|
|
|
void oe2_menu();
|
2007-04-15 12:04:47 +00:00
|
|
|
void oe2_drawItem();
|
|
|
|
void oe2_doTable();
|
|
|
|
void oe2_pauseGame();
|
|
|
|
void oe2_setDoorOpen();
|
|
|
|
void oe2_setDoorClosed();
|
|
|
|
void oe2_setDoorLocked();
|
|
|
|
void oe2_ifDoorOpen();
|
|
|
|
void oe2_ifDoorClosed();
|
|
|
|
void oe2_ifDoorLocked();
|
|
|
|
void oe2_storeItem();
|
|
|
|
void oe2_getItem();
|
|
|
|
void oe2_bSet();
|
|
|
|
void oe2_bClear();
|
|
|
|
void oe2_bZero();
|
|
|
|
void oe2_bNotZero();
|
|
|
|
void oe2_getOValue();
|
|
|
|
void oe2_setOValue();
|
|
|
|
void oe2_ink();
|
|
|
|
void oe2_printStats();
|
|
|
|
void oe2_setSuperRoom();
|
|
|
|
void oe2_getSuperRoom();
|
|
|
|
void oe2_setExitOpen();
|
|
|
|
void oe2_setExitClosed();
|
|
|
|
void oe2_setExitLocked();
|
|
|
|
void oe2_ifExitOpen();
|
|
|
|
void oe2_ifExitClosed();
|
|
|
|
void oe2_ifExitLocked();
|
2007-05-28 01:11:43 +00:00
|
|
|
void oe2_playEffect();
|
2007-04-15 12:04:47 +00:00
|
|
|
void oe2_getDollar2();
|
|
|
|
void oe2_setSRExit();
|
2008-04-16 08:50:25 +00:00
|
|
|
void oe2_printPlayerDamage();
|
|
|
|
void oe2_printMonsterDamage();
|
2007-04-15 12:04:47 +00:00
|
|
|
void oe2_isAdjNoun();
|
|
|
|
void oe2_b2Set();
|
|
|
|
void oe2_b2Clear();
|
|
|
|
void oe2_b2Zero();
|
|
|
|
void oe2_b2NotZero();
|
|
|
|
|
2007-06-08 07:50:28 +00:00
|
|
|
virtual void printStats();
|
2007-04-15 12:04:47 +00:00
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_Elvira2::*OpcodeProcElvira2) ();
|
|
|
|
struct OpcodeEntryElvira2 {
|
|
|
|
OpcodeProcElvira2 proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryElvira2 *_opcodesElvira2;
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2007-06-20 01:01:29 +00:00
|
|
|
virtual void readItemChildren(Common::SeekableReadStream *in, Item *item, uint tmp);
|
|
|
|
|
2007-05-16 09:39:36 +00:00
|
|
|
virtual bool loadGame(const char *filename, bool restartMode = false);
|
|
|
|
virtual bool saveGame(uint slot, const char *caption);
|
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void addArrows(WindowBlock *window, uint8 num);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void removeArrows(WindowBlock *window, uint num);
|
|
|
|
|
|
|
|
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
|
|
|
|
virtual bool hasIcon(Item *item);
|
|
|
|
virtual uint itemGetIconNumber(Item *item);
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
|
|
|
virtual void moveDirn(Item *i, uint x);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual int canPlace(Item *x, Item *y);
|
|
|
|
virtual int sizeOfRec(Item *o, int d);
|
|
|
|
virtual int weightOf(Item *x);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
|
|
|
int changeExitStates(SubSuperRoom *sr, int n, int d, uint16 s);
|
|
|
|
uint16 getExitState(Item *item, uint16 x, uint16 d);
|
|
|
|
void setExitState(Item *i, uint16 n, uint16 d, uint16 s);
|
|
|
|
void setSRExit(Item *i, int n, int d, uint16 s);
|
2007-06-08 07:50:28 +00:00
|
|
|
|
|
|
|
virtual void listSaveGames(char *dst);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual bool confirmOverWrite(WindowBlock *window);
|
2007-06-08 07:50:28 +00:00
|
|
|
virtual void userGame(bool load);
|
|
|
|
virtual int userGameGetKey(bool *b, char *buf, uint maxChar);
|
2008-12-13 03:12:56 +00:00
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class AGOSEngine_Waxworks : public AGOSEngine_Elvira2 {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_Waxworks(OSystem *system, const AGOSGameDescription *gd);
|
2007-04-15 05:04:48 +00:00
|
|
|
//~AGOSEngine_Waxworks();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
2007-04-15 12:04:47 +00:00
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
2007-04-15 14:12:08 +00:00
|
|
|
void boxTextMessage(const char *x);
|
|
|
|
void boxTextMsg(const char *x);
|
|
|
|
void printBox();
|
|
|
|
uint16 getBoxSize();
|
|
|
|
uint16 checkFit(char *Ptr, int width, int lines);
|
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
void oww_goto();
|
|
|
|
void oww_addTextBox();
|
|
|
|
void oww_setShortText();
|
|
|
|
void oww_setLongText();
|
|
|
|
void oww_printLongText();
|
|
|
|
void oww_whereTo();
|
|
|
|
void oww_textMenu();
|
|
|
|
void oww_pauseGame();
|
|
|
|
void oww_boxMessage();
|
|
|
|
void oww_boxMsg();
|
|
|
|
void oww_boxLongText();
|
|
|
|
void oww_printBox();
|
|
|
|
void oww_boxPObj();
|
|
|
|
void oww_lockZones();
|
|
|
|
void oww_unlockZones();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_Waxworks::*OpcodeProcWaxworks) ();
|
|
|
|
struct OpcodeEntryWaxworks {
|
|
|
|
OpcodeProcWaxworks proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryWaxworks *_opcodesWaxworks;
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2009-03-09 04:37:31 +00:00
|
|
|
bool _boxCR;
|
|
|
|
char _boxBuffer[310];
|
|
|
|
char *_boxBufferPtr;
|
|
|
|
int _boxLineCount;
|
|
|
|
int _lineCounts[6];
|
|
|
|
char *_linePtrs[6];
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
|
|
|
|
|
2009-03-05 21:38:17 +00:00
|
|
|
virtual void boxController(uint x, uint y, uint mode);
|
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void addArrows(WindowBlock *window, uint8 num);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void removeArrows(WindowBlock *window, uint num);
|
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual bool loadTablesIntoMem(uint16 subrId);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
|
|
|
virtual void moveDirn(Item *i, uint x);
|
2008-12-13 03:12:56 +00:00
|
|
|
|
|
|
|
virtual bool confirmOverWrite(WindowBlock *window);
|
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class AGOSEngine_Simon1 : public AGOSEngine_Waxworks {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_Simon1(OSystem *system, const AGOSGameDescription *gd);
|
2007-04-15 05:04:48 +00:00
|
|
|
//~AGOSEngine_Simon1();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
2007-04-15 12:04:47 +00:00
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
2009-08-11 14:42:44 +00:00
|
|
|
virtual void vc22_setPalette();
|
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
// Opcodes, Simon 1
|
|
|
|
void os1_animate();
|
|
|
|
void os1_pauseGame();
|
|
|
|
void os1_screenTextBox();
|
|
|
|
void os1_screenTextMsg();
|
|
|
|
void os1_playEffect();
|
|
|
|
void os1_screenTextPObj();
|
|
|
|
void os1_getPathPosn();
|
|
|
|
void os1_scnTxtLongText();
|
|
|
|
void os1_mouseOn();
|
|
|
|
void os1_mouseOff();
|
|
|
|
void os1_loadBeard();
|
|
|
|
void os1_unloadBeard();
|
|
|
|
void os1_unloadZone();
|
|
|
|
void os1_loadStrings();
|
|
|
|
void os1_unfreezeZones();
|
|
|
|
void os1_specialFade();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_Simon1::*OpcodeProcSimon1) ();
|
|
|
|
struct OpcodeEntrySimon1 {
|
|
|
|
OpcodeProcSimon1 proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntrySimon1 *_opcodesSimon1;
|
2007-05-06 09:46:43 +00:00
|
|
|
|
|
|
|
virtual void drawImage(VC10_state *state);
|
2007-05-09 15:36:05 +00:00
|
|
|
void drawMaskedImage(VC10_state *state);
|
|
|
|
void draw32ColorImage(VC10_state *state);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void dumpVgaFile(const byte *vga);
|
|
|
|
|
2008-03-23 23:18:43 +00:00
|
|
|
virtual void clearName();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
|
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void initMouse();
|
2007-06-05 11:38:26 +00:00
|
|
|
virtual void handleMouseMoved();
|
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void addArrows(WindowBlock *window, uint8 num);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void removeArrows(WindowBlock *window, uint num);
|
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
|
2007-05-22 10:31:51 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void playSpeech(uint16 speechId, uint16 vgaSpriteId);
|
2007-06-04 05:18:11 +00:00
|
|
|
|
2007-05-22 10:31:51 +00:00
|
|
|
virtual void listSaveGames(char *dst);
|
|
|
|
virtual void userGame(bool load);
|
|
|
|
virtual int userGameGetKey(bool *b, char *buf, uint maxChar);
|
2007-06-02 13:35:24 +00:00
|
|
|
|
2007-06-04 14:25:02 +00:00
|
|
|
virtual void playMusic(uint16 music, uint16 track);
|
2007-06-04 05:18:11 +00:00
|
|
|
|
2007-06-21 05:26:47 +00:00
|
|
|
virtual void vcStopAnimation(uint16 zone, uint16 sprite);
|
2008-12-13 03:12:56 +00:00
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class AGOSEngine_Simon2 : public AGOSEngine_Simon1 {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_Simon2(OSystem *system, const AGOSGameDescription *gd);
|
2007-04-15 05:04:48 +00:00
|
|
|
//~AGOSEngine_Simon2();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
2007-04-15 12:04:47 +00:00
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
|
|
|
void os2_printLongText();
|
|
|
|
void os2_rescan();
|
|
|
|
void os2_animate();
|
|
|
|
void os2_stopAnimate();
|
|
|
|
void os2_playTune();
|
|
|
|
void os2_screenTextPObj();
|
|
|
|
void os2_mouseOn();
|
|
|
|
void os2_mouseOff();
|
|
|
|
void os2_isShortText();
|
|
|
|
void os2_clearMarks();
|
|
|
|
void os2_waitMark();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_Simon2::*OpcodeProcSimon2) ();
|
|
|
|
struct OpcodeEntrySimon2 {
|
|
|
|
OpcodeProcSimon2 proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntrySimon2 *_opcodesSimon2;
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2008-03-23 23:18:43 +00:00
|
|
|
virtual void clearName();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void drawIcon(WindowBlock *window, uint icon, uint x, uint y);
|
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void addArrows(WindowBlock *window, uint8 num);
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
|
|
|
|
|
|
|
|
virtual void clearVideoWindow(uint16 windowNum, uint16 color);
|
2007-06-04 05:18:11 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void playSpeech(uint16 speechId, uint16 vgaSpriteId);
|
2008-12-13 03:12:56 +00:00
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
|
|
|
|
2009-08-11 14:42:44 +00:00
|
|
|
#ifdef ENABLE_AGOS2
|
2007-04-15 05:04:48 +00:00
|
|
|
class AGOSEngine_Feeble : public AGOSEngine_Simon2 {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_Feeble(OSystem *system, const AGOSGameDescription *gd);
|
2009-05-16 05:34:16 +00:00
|
|
|
~AGOSEngine_Feeble();
|
2007-04-15 05:04:48 +00:00
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
2007-04-15 05:04:48 +00:00
|
|
|
virtual void setupVideoOpcodes(VgaOpcodeProc *op);
|
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
2009-08-11 14:42:44 +00:00
|
|
|
virtual void vc36_setWindowImage();
|
|
|
|
virtual void vc48_setPathFinder();
|
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
void off_chance();
|
|
|
|
void off_jumpOut();
|
|
|
|
void off_addTextBox();
|
|
|
|
void off_printLongText();
|
|
|
|
void off_addBox();
|
|
|
|
void off_oracleTextDown();
|
|
|
|
void off_oracleTextUp();
|
|
|
|
void off_ifTime();
|
|
|
|
void off_setTime();
|
|
|
|
void off_saveUserGame();
|
|
|
|
void off_loadUserGame();
|
|
|
|
void off_listSaveGames();
|
|
|
|
void off_checkCD();
|
|
|
|
void off_screenTextBox();
|
|
|
|
void off_isAdjNoun();
|
|
|
|
void off_hyperLinkOn();
|
|
|
|
void off_hyperLinkOff();
|
|
|
|
void off_checkPaths();
|
|
|
|
void off_screenTextPObj();
|
|
|
|
void off_mouseOn();
|
|
|
|
void off_mouseOff();
|
|
|
|
void off_loadVideo();
|
|
|
|
void off_playVideo();
|
2011-04-14 12:34:28 +00:00
|
|
|
void off_centerScroll();
|
2007-04-15 12:04:47 +00:00
|
|
|
void off_resetPVCount();
|
|
|
|
void off_setPathValues();
|
|
|
|
void off_stopClock();
|
|
|
|
void off_restartClock();
|
2010-11-17 12:22:08 +00:00
|
|
|
void off_setColor();
|
2007-04-15 12:04:47 +00:00
|
|
|
void off_b3Set();
|
|
|
|
void off_b3Clear();
|
|
|
|
void off_b3Zero();
|
|
|
|
void off_b3NotZero();
|
|
|
|
|
2007-04-15 05:04:48 +00:00
|
|
|
protected:
|
2009-05-16 05:34:16 +00:00
|
|
|
friend class MoviePlayer;
|
|
|
|
friend class MoviePlayerDXA;
|
|
|
|
friend class MoviePlayerSMK;
|
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
typedef void (AGOSEngine_Feeble::*OpcodeProcFeeble) ();
|
|
|
|
struct OpcodeEntryFeeble {
|
|
|
|
OpcodeProcFeeble proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryFeeble *_opcodesFeeble;
|
|
|
|
|
2009-05-16 05:34:16 +00:00
|
|
|
MoviePlayer *_moviePlayer;
|
|
|
|
|
|
|
|
uint8 _interactiveVideo;
|
2009-03-09 04:37:31 +00:00
|
|
|
uint16 _vgaCurSpritePriority;
|
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual uint16 to16Wrapper(uint value);
|
|
|
|
virtual uint16 readUint16Wrapper(const void *src);
|
|
|
|
virtual uint32 readUint32Wrapper(const void *src);
|
|
|
|
|
2009-05-16 05:34:16 +00:00
|
|
|
void playVideo(const char *filename, bool lastSceneUsed = false);
|
|
|
|
void stopInteractiveVideo();
|
|
|
|
|
2007-05-06 09:46:43 +00:00
|
|
|
virtual void drawImage(VC10_state *state);
|
2007-05-07 01:11:10 +00:00
|
|
|
void scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY);
|
2007-05-06 09:46:43 +00:00
|
|
|
|
2007-04-15 14:12:08 +00:00
|
|
|
void drawMousePart(int image, byte x, byte y);
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void initMouse();
|
2007-04-15 14:12:08 +00:00
|
|
|
virtual void drawMousePointer();
|
|
|
|
|
2007-05-13 08:46:48 +00:00
|
|
|
virtual void animateSprites();
|
|
|
|
void animateSpritesByY();
|
|
|
|
|
2007-05-13 13:19:46 +00:00
|
|
|
void oracleLogo();
|
|
|
|
void swapCharacterLogo();
|
2009-02-07 04:32:33 +00:00
|
|
|
virtual void timerProc();
|
2007-05-13 13:19:46 +00:00
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void addArrows(WindowBlock *window, uint8 num);
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *itemPtr);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2007-04-15 05:33:21 +00:00
|
|
|
virtual void resetVerbs();
|
|
|
|
virtual void setVerb(HitArea * ha);
|
2007-04-15 14:12:08 +00:00
|
|
|
virtual void hitarea_leave(HitArea * ha, bool state = false);
|
|
|
|
void invertBox(HitArea *ha, bool state);
|
2007-04-15 05:33:21 +00:00
|
|
|
|
2007-04-15 14:12:08 +00:00
|
|
|
virtual void windowNewLine(WindowBlock *window);
|
2010-03-07 11:46:03 +00:00
|
|
|
virtual void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr);
|
2007-04-15 05:33:21 +00:00
|
|
|
|
|
|
|
virtual void clearName();
|
2007-04-15 05:04:48 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void drawIconArray(uint i, Item *itemPtr, int line, int classMask);
|
2007-04-15 14:12:08 +00:00
|
|
|
|
2007-06-07 15:42:59 +00:00
|
|
|
virtual void colorWindow(WindowBlock *window);
|
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void dumpVgaFile(const byte *vga);
|
|
|
|
|
2007-05-22 13:11:06 +00:00
|
|
|
virtual void doOutput(const byte *src, uint len);
|
2007-04-15 14:12:08 +00:00
|
|
|
|
2009-02-07 01:11:51 +00:00
|
|
|
virtual void printScreenText(uint vgaSpriteId, uint color, const char *stringPtr, int16 x, int16 y, int16 width);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
|
|
|
void printInteractText(uint16 num, const char *string);
|
2009-07-01 20:51:04 +00:00
|
|
|
void sendInteractText(uint16 num, const char *fmt, ...) GCC_PRINTF(3, 4);
|
2007-05-07 01:11:10 +00:00
|
|
|
|
2007-04-15 14:12:08 +00:00
|
|
|
void checkLinkBox();
|
2008-01-28 00:14:17 +00:00
|
|
|
void hyperLinkOn(uint16 x);
|
|
|
|
void hyperLinkOff();
|
2007-04-15 14:12:08 +00:00
|
|
|
void linksUp();
|
|
|
|
void linksDown();
|
|
|
|
|
2009-05-16 05:34:16 +00:00
|
|
|
virtual void runSubroutine101();
|
|
|
|
|
2007-04-15 14:12:08 +00:00
|
|
|
void checkUp(WindowBlock *window);
|
|
|
|
void checkDown(WindowBlock *window);
|
|
|
|
virtual void inventoryUp(WindowBlock *window);
|
|
|
|
virtual void inventoryDown(WindowBlock *window);
|
|
|
|
|
|
|
|
void oracleTextUp();
|
|
|
|
void oracleTextDown();
|
|
|
|
void scrollOracle();
|
|
|
|
void scrollOracleUp();
|
|
|
|
void scrollOracleDown();
|
|
|
|
|
2011-02-26 17:38:21 +00:00
|
|
|
void listSaveGamesFeeble();
|
2007-04-15 14:12:08 +00:00
|
|
|
void saveUserGame(int slot);
|
|
|
|
void windowBackSpace(WindowBlock *window);
|
2007-05-17 09:00:14 +00:00
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2012-04-15 09:24:57 +00:00
|
|
|
virtual void quickLoadOrSave();
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
|
|
|
|
2009-05-16 05:34:16 +00:00
|
|
|
class AGOSEngine_FeebleDemo : public AGOSEngine_Feeble {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_FeebleDemo(OSystem *system, const AGOSGameDescription *gd);
|
2009-05-16 05:34:16 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
bool _filmMenuUsed;
|
|
|
|
|
|
|
|
virtual Common::Error go();
|
|
|
|
|
|
|
|
virtual void initMouse();
|
|
|
|
virtual void drawMousePointer();
|
|
|
|
|
|
|
|
void exitMenu();
|
|
|
|
void filmMenu();
|
|
|
|
void handleText();
|
|
|
|
void handleWobble();
|
|
|
|
void mainMenu();
|
|
|
|
void startInteractiveVideo(const char *filename);
|
|
|
|
void waitForSpace();
|
|
|
|
};
|
|
|
|
|
2007-04-15 05:04:48 +00:00
|
|
|
class AGOSEngine_PuzzlePack : public AGOSEngine_Feeble {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_PuzzlePack(OSystem *system, const AGOSGameDescription *gd);
|
2007-04-15 05:04:48 +00:00
|
|
|
//~AGOSEngine_PuzzlePack();
|
|
|
|
|
2007-05-07 01:11:10 +00:00
|
|
|
virtual void setupGame();
|
2007-04-15 12:04:47 +00:00
|
|
|
virtual void setupOpcodes();
|
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
2009-02-07 04:32:33 +00:00
|
|
|
virtual void vc3_loadSprite();
|
|
|
|
virtual void vc63_fastFadeIn();
|
|
|
|
|
2007-04-15 12:04:47 +00:00
|
|
|
void opp_iconifyWindow();
|
|
|
|
void opp_restoreOopsPosition();
|
|
|
|
void opp_loadMouseImage();
|
|
|
|
void opp_message();
|
|
|
|
void opp_setShortText();
|
|
|
|
void opp_loadHiScores();
|
|
|
|
void opp_checkHiScores();
|
|
|
|
void opp_sync();
|
|
|
|
void opp_saveUserGame();
|
|
|
|
void opp_loadUserGame();
|
2007-06-10 01:05:55 +00:00
|
|
|
void opp_playTune();
|
2007-04-15 12:04:47 +00:00
|
|
|
void opp_saveOopsPosition();
|
|
|
|
void opp_resetGameTime();
|
|
|
|
void opp_resetPVCount();
|
|
|
|
void opp_setPathValues();
|
2009-09-24 00:38:29 +00:00
|
|
|
void opp_pauseClock();
|
2007-04-15 05:04:48 +00:00
|
|
|
|
2007-04-15 05:33:21 +00:00
|
|
|
protected:
|
2007-04-15 12:04:47 +00:00
|
|
|
typedef void (AGOSEngine_PuzzlePack::*OpcodeProcPuzzlePack) ();
|
|
|
|
struct OpcodeEntryPuzzlePack {
|
|
|
|
OpcodeProcPuzzlePack proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryPuzzlePack *_opcodesPuzzlePack;
|
|
|
|
|
2009-03-09 04:37:31 +00:00
|
|
|
bool _oopsValid;
|
|
|
|
uint32 _gameTime;
|
2009-02-07 04:32:33 +00:00
|
|
|
|
2008-12-13 03:12:56 +00:00
|
|
|
virtual void initMouse();
|
2007-05-17 09:00:14 +00:00
|
|
|
virtual void handleMouseMoved();
|
2007-04-15 14:43:23 +00:00
|
|
|
virtual void drawMousePointer();
|
|
|
|
|
2007-04-15 05:33:21 +00:00
|
|
|
virtual void resetVerbs();
|
2007-04-15 14:12:08 +00:00
|
|
|
|
|
|
|
void loadMouseImage();
|
2008-12-13 03:12:56 +00:00
|
|
|
|
2009-02-07 04:32:33 +00:00
|
|
|
void startOverlayAnims();
|
|
|
|
void startAnOverlayAnim();
|
|
|
|
|
2010-11-05 03:30:45 +00:00
|
|
|
void printInfoText(const char *itemText);
|
|
|
|
|
2008-12-13 03:16:20 +00:00
|
|
|
virtual char *genSaveName(int slot);
|
2007-04-15 05:04:48 +00:00
|
|
|
};
|
2009-09-24 03:41:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AGOSEngine_DIMP : public AGOSEngine_PuzzlePack {
|
|
|
|
public:
|
2011-05-17 13:32:41 +00:00
|
|
|
AGOSEngine_DIMP(OSystem *system, const AGOSGameDescription *gd);
|
2009-09-24 03:41:45 +00:00
|
|
|
//~AGOSEngine_DIMP();
|
|
|
|
|
|
|
|
virtual void setupOpcodes();
|
|
|
|
|
|
|
|
virtual void executeOpcode(int opcode);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
typedef void (AGOSEngine_DIMP::*OpcodeProcDIMP) ();
|
|
|
|
struct OpcodeEntryDIMP {
|
|
|
|
OpcodeProcDIMP proc;
|
|
|
|
const char *desc;
|
|
|
|
};
|
|
|
|
|
|
|
|
const OpcodeEntryDIMP *_opcodesDIMP;
|
|
|
|
|
|
|
|
int16 _iconToggleCount, _voiceCount;
|
|
|
|
uint32 _lastTickCount;
|
|
|
|
uint32 _startSecondCount, _tSecondCount;
|
|
|
|
|
|
|
|
void odp_saveUserGame();
|
|
|
|
void odp_loadUserGame();
|
|
|
|
|
|
|
|
void dimpIdle();
|
|
|
|
virtual void timerProc();
|
|
|
|
|
|
|
|
};
|
2009-08-11 14:42:44 +00:00
|
|
|
#endif
|
2007-04-15 05:04:48 +00:00
|
|
|
|
2006-09-29 09:44:30 +00:00
|
|
|
} // End of namespace AGOS
|
2003-10-03 19:42:27 +00:00
|
|
|
|
2002-08-18 16:21:34 +00:00
|
|
|
#endif
|