2009-02-16 01:58:30 +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.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-02-15 06:10:59 +00:00
|
|
|
#ifndef SCI_H
|
|
|
|
#define SCI_H
|
|
|
|
|
|
|
|
#include "engines/engine.h"
|
2011-02-17 18:13:30 +00:00
|
|
|
#include "common/macresman.h"
|
2010-05-04 11:56:52 +00:00
|
|
|
#include "common/util.h"
|
2010-07-30 22:47:01 +00:00
|
|
|
#include "common/random.h"
|
2010-07-12 23:20:33 +00:00
|
|
|
#include "sci/engine/vm_types.h" // for Selector
|
|
|
|
#include "sci/debug.h" // for DebugState
|
2009-11-23 23:55:19 +00:00
|
|
|
|
|
|
|
struct ADGameDescription;
|
2009-02-21 09:45:34 +00:00
|
|
|
|
2009-11-24 22:10:14 +00:00
|
|
|
/**
|
|
|
|
* This is the namespace of the SCI engine.
|
|
|
|
*
|
|
|
|
* Status of this engine: ???
|
|
|
|
*
|
2010-10-15 12:48:19 +00:00
|
|
|
* Games using this engine:
|
2011-06-19 22:59:48 +00:00
|
|
|
* - Newer Sierra adventure games (based on FreeSCI)
|
2010-10-15 12:48:19 +00:00
|
|
|
*
|
|
|
|
* @todo give a concrete list of supported games. Could also
|
|
|
|
* list future games, with status for each.
|
2009-11-24 22:10:14 +00:00
|
|
|
*/
|
2009-02-20 14:45:28 +00:00
|
|
|
namespace Sci {
|
2009-02-15 06:10:59 +00:00
|
|
|
|
2009-05-14 12:38:50 +00:00
|
|
|
struct EngineState;
|
2009-07-11 23:45:54 +00:00
|
|
|
class Vocabulary;
|
2009-08-30 01:37:27 +00:00
|
|
|
class ResourceManager;
|
2010-02-13 17:44:58 +00:00
|
|
|
class Kernel;
|
|
|
|
class GameFeatures;
|
|
|
|
class Console;
|
2009-11-04 09:36:18 +00:00
|
|
|
class AudioPlayer;
|
2010-06-29 09:00:08 +00:00
|
|
|
class SoundCommandParser;
|
2010-06-09 07:59:42 +00:00
|
|
|
class EventManager;
|
2010-08-23 23:04:07 +00:00
|
|
|
class SegManager;
|
2013-12-04 19:42:16 +00:00
|
|
|
class ScriptPatcher;
|
2009-05-11 13:31:17 +00:00
|
|
|
|
2010-02-13 17:43:31 +00:00
|
|
|
class GfxAnimate;
|
|
|
|
class GfxCache;
|
|
|
|
class GfxCompare;
|
2011-10-25 22:48:20 +00:00
|
|
|
class GfxControls16;
|
2011-10-28 19:19:52 +00:00
|
|
|
class GfxControls32;
|
2010-02-13 17:43:31 +00:00
|
|
|
class GfxCoordAdjuster;
|
|
|
|
class GfxCursor;
|
2010-06-15 15:44:24 +00:00
|
|
|
class GfxMacIconBar;
|
2010-02-13 17:43:31 +00:00
|
|
|
class GfxMenu;
|
|
|
|
class GfxPaint;
|
|
|
|
class GfxPaint16;
|
2010-06-15 15:44:24 +00:00
|
|
|
class GfxPaint32;
|
2010-02-13 17:43:31 +00:00
|
|
|
class GfxPalette;
|
|
|
|
class GfxPorts;
|
|
|
|
class GfxScreen;
|
2010-06-15 13:01:07 +00:00
|
|
|
class GfxText16;
|
2011-09-03 11:50:58 +00:00
|
|
|
class GfxText32;
|
2010-06-15 15:44:24 +00:00
|
|
|
class GfxTransitions;
|
2010-02-13 17:43:31 +00:00
|
|
|
|
|
|
|
#ifdef ENABLE_SCI32
|
2011-02-07 12:24:09 +00:00
|
|
|
class RobotDecoder;
|
2010-02-13 17:43:31 +00:00
|
|
|
class GfxFrameout;
|
|
|
|
#endif
|
|
|
|
|
2009-02-15 06:10:59 +00:00
|
|
|
// our engine debug levels
|
2009-02-20 20:11:12 +00:00
|
|
|
enum kDebugLevels {
|
2013-11-01 12:25:31 +00:00
|
|
|
kDebugLevelError = 1 << 0,
|
|
|
|
kDebugLevelNodes = 1 << 1,
|
|
|
|
kDebugLevelGraphics = 1 << 2,
|
|
|
|
kDebugLevelStrings = 1 << 3,
|
|
|
|
kDebugLevelMemory = 1 << 4,
|
|
|
|
kDebugLevelFuncCheck = 1 << 5,
|
|
|
|
kDebugLevelBresen = 1 << 6,
|
|
|
|
kDebugLevelSound = 1 << 7,
|
|
|
|
kDebugLevelBaseSetter = 1 << 8,
|
|
|
|
kDebugLevelParser = 1 << 9,
|
|
|
|
kDebugLevelSaid = 1 << 10,
|
|
|
|
kDebugLevelFile = 1 << 11,
|
|
|
|
kDebugLevelTime = 1 << 12,
|
|
|
|
kDebugLevelRoom = 1 << 13,
|
|
|
|
kDebugLevelAvoidPath = 1 << 14,
|
|
|
|
kDebugLevelDclInflate = 1 << 15,
|
|
|
|
kDebugLevelVM = 1 << 16,
|
|
|
|
kDebugLevelScripts = 1 << 17,
|
|
|
|
kDebugLevelGC = 1 << 18,
|
|
|
|
kDebugLevelResMan = 1 << 19,
|
|
|
|
kDebugLevelOnStartup = 1 << 20,
|
|
|
|
kDebugLevelDebugMode = 1 << 21,
|
|
|
|
kDebugLevelScriptPatcher = 1 << 22
|
2009-02-15 06:10:59 +00:00
|
|
|
};
|
|
|
|
|
2010-06-25 16:16:29 +00:00
|
|
|
enum SciGameId {
|
|
|
|
GID_ASTROCHICKEN,
|
|
|
|
GID_CAMELOT,
|
|
|
|
GID_CASTLEBRAIN,
|
2012-10-22 09:19:13 +00:00
|
|
|
GID_CHEST,
|
2010-06-25 16:16:29 +00:00
|
|
|
GID_CHRISTMAS1988,
|
|
|
|
GID_CHRISTMAS1990,
|
|
|
|
GID_CHRISTMAS1992,
|
|
|
|
GID_CNICK_KQ,
|
|
|
|
GID_CNICK_LAURABOW,
|
|
|
|
GID_CNICK_LONGBOW,
|
|
|
|
GID_CNICK_LSL,
|
|
|
|
GID_CNICK_SQ,
|
|
|
|
GID_ECOQUEST,
|
|
|
|
GID_ECOQUEST2,
|
|
|
|
GID_FAIRYTALES,
|
|
|
|
GID_FREDDYPHARKAS,
|
|
|
|
GID_FUNSEEKER,
|
|
|
|
GID_GK1,
|
|
|
|
GID_GK2,
|
|
|
|
GID_HOYLE1,
|
|
|
|
GID_HOYLE2,
|
|
|
|
GID_HOYLE3,
|
|
|
|
GID_HOYLE4,
|
|
|
|
GID_ICEMAN,
|
|
|
|
GID_ISLANDBRAIN,
|
|
|
|
GID_JONES,
|
|
|
|
GID_KQ1,
|
|
|
|
GID_KQ4,
|
|
|
|
GID_KQ5,
|
|
|
|
GID_KQ6,
|
|
|
|
GID_KQ7,
|
2013-08-20 16:43:05 +00:00
|
|
|
GID_KQUESTIONS,
|
2010-06-25 16:16:29 +00:00
|
|
|
GID_LAURABOW,
|
|
|
|
GID_LAURABOW2,
|
|
|
|
GID_LIGHTHOUSE,
|
|
|
|
GID_LONGBOW,
|
|
|
|
GID_LSL1,
|
|
|
|
GID_LSL2,
|
|
|
|
GID_LSL3,
|
|
|
|
GID_LSL5,
|
|
|
|
GID_LSL6,
|
2010-07-12 19:55:42 +00:00
|
|
|
GID_LSL6HIRES, // We have a separate ID for LSL6 SCI32, because it's actually a completely different game
|
2010-06-25 16:16:29 +00:00
|
|
|
GID_LSL7,
|
2010-08-23 16:33:19 +00:00
|
|
|
GID_MOTHERGOOSE, // this one is the SCI0 version
|
|
|
|
GID_MOTHERGOOSE256, // this one handles SCI1 and SCI1.1 variants, at least those 2 share a bit in common
|
|
|
|
GID_MOTHERGOOSEHIRES, // this one is the SCI2.1 hires version, completely different from the other ones
|
2010-06-25 16:16:29 +00:00
|
|
|
GID_MSASTROCHICKEN,
|
|
|
|
GID_PEPPER,
|
|
|
|
GID_PHANTASMAGORIA,
|
|
|
|
GID_PHANTASMAGORIA2,
|
|
|
|
GID_PQ1,
|
|
|
|
GID_PQ2,
|
|
|
|
GID_PQ3,
|
|
|
|
GID_PQ4,
|
|
|
|
GID_PQSWAT,
|
|
|
|
GID_QFG1,
|
2010-07-14 11:53:12 +00:00
|
|
|
GID_QFG1VGA,
|
2010-06-25 16:16:29 +00:00
|
|
|
GID_QFG2,
|
|
|
|
GID_QFG3,
|
|
|
|
GID_QFG4,
|
|
|
|
GID_RAMA,
|
|
|
|
GID_SHIVERS,
|
2010-11-09 22:01:12 +00:00
|
|
|
//GID_SHIVERS2, // Not SCI
|
2010-06-25 16:16:29 +00:00
|
|
|
GID_SLATER,
|
|
|
|
GID_SQ1,
|
|
|
|
GID_SQ3,
|
|
|
|
GID_SQ4,
|
|
|
|
GID_SQ5,
|
|
|
|
GID_SQ6,
|
|
|
|
GID_TORIN,
|
|
|
|
|
|
|
|
GID_FANMADE // FIXME: Do we really need/want this?
|
|
|
|
};
|
|
|
|
|
2011-06-19 22:59:48 +00:00
|
|
|
/**
|
2011-02-27 14:48:53 +00:00
|
|
|
* SCI versions
|
|
|
|
* For more information, check here:
|
|
|
|
* http://wiki.scummvm.org/index.php/Sierra_Game_Versions#SCI_Games
|
|
|
|
*/
|
2009-08-30 01:37:27 +00:00
|
|
|
enum SciVersion {
|
2010-01-03 22:50:39 +00:00
|
|
|
SCI_VERSION_NONE,
|
2011-02-27 14:48:53 +00:00
|
|
|
SCI_VERSION_0_EARLY, // KQ4 early, LSL2 early, XMAS card 1988
|
2009-08-30 01:37:27 +00:00
|
|
|
SCI_VERSION_0_LATE, // KQ4, LSL2, LSL3, SQ3 etc
|
|
|
|
SCI_VERSION_01, // KQ1 and multilingual games (S.old.*)
|
2011-02-27 14:48:53 +00:00
|
|
|
SCI_VERSION_1_EGA_ONLY, // SCI 1 EGA with parser (i.e. QFG2 only)
|
|
|
|
SCI_VERSION_1_EARLY, // KQ5 floppy, SQ4 floppy, XMAS card 1990, Fairy tales, Jones floppy
|
|
|
|
SCI_VERSION_1_MIDDLE, // LSL1, Jones CD
|
|
|
|
SCI_VERSION_1_LATE, // Dr. Brain 1, EcoQuest 1, Longbow, PQ3, SQ1, LSL5, KQ5 CD
|
|
|
|
SCI_VERSION_1_1, // Dr. Brain 2, EcoQuest 1 CD, EcoQuest 2, KQ6, QFG3, SQ4CD, XMAS 1992 and many more
|
|
|
|
SCI_VERSION_2, // GK1, PQ4 floppy, QFG4 floppy
|
|
|
|
SCI_VERSION_2_1, // GK2, KQ7, LSL6 hires, MUMG Deluxe, Phantasmagoria 1, PQ4CD, PQ:SWAT, QFG4CD, Shivers 1, SQ6, Torin
|
|
|
|
SCI_VERSION_3 // LSL7, Lighthouse, RAMA, Phantasmagoria 2
|
2009-08-30 01:37:27 +00:00
|
|
|
};
|
|
|
|
|
2010-02-13 17:46:44 +00:00
|
|
|
/** Supported languages */
|
|
|
|
enum kLanguage {
|
|
|
|
K_LANG_NONE = 0,
|
|
|
|
K_LANG_ENGLISH = 1,
|
|
|
|
K_LANG_FRENCH = 33,
|
|
|
|
K_LANG_SPANISH = 34,
|
|
|
|
K_LANG_ITALIAN = 39,
|
|
|
|
K_LANG_GERMAN = 49,
|
|
|
|
K_LANG_JAPANESE = 81,
|
|
|
|
K_LANG_PORTUGUESE = 351
|
|
|
|
};
|
|
|
|
|
2009-02-15 06:10:59 +00:00
|
|
|
class SciEngine : public Engine {
|
2009-06-07 23:04:34 +00:00
|
|
|
friend class Console;
|
2009-02-15 22:43:13 +00:00
|
|
|
public:
|
2010-06-25 16:16:29 +00:00
|
|
|
SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gameId);
|
2009-02-15 22:43:13 +00:00
|
|
|
~SciEngine();
|
2009-02-15 06:10:59 +00:00
|
|
|
|
2009-03-01 04:42:46 +00:00
|
|
|
// Engine APIs
|
|
|
|
virtual Common::Error run();
|
2009-10-11 15:51:43 +00:00
|
|
|
bool hasFeature(EngineFeature f) const;
|
2009-06-02 19:03:43 +00:00
|
|
|
void pauseEngineIntern(bool pause);
|
2009-05-11 13:31:17 +00:00
|
|
|
virtual GUI::Debugger *getDebugger();
|
2009-07-03 14:22:50 +00:00
|
|
|
Console *getSciDebugger();
|
2009-10-11 15:51:43 +00:00
|
|
|
Common::Error loadGameState(int slot);
|
2011-06-02 12:11:38 +00:00
|
|
|
Common::Error saveGameState(int slot, const Common::String &desc);
|
2009-10-11 15:51:43 +00:00
|
|
|
bool canLoadGameStateCurrently();
|
|
|
|
bool canSaveGameStateCurrently();
|
2010-01-12 00:51:37 +00:00
|
|
|
void syncSoundSettings();
|
2012-10-08 20:14:02 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Syncs the audio options of the ScummVM launcher (speech, subtitles or
|
|
|
|
* both) with the in-game audio options of certain CD game versions. For
|
|
|
|
* some games, this allows simultaneous playing of speech and subtitles,
|
|
|
|
* even if the original games didn't support this feature.
|
2012-10-08 20:50:47 +00:00
|
|
|
*
|
|
|
|
* SCI1.1 games which support simultaneous speech and subtitles:
|
|
|
|
* - EcoQuest 1 CD
|
|
|
|
* - Leisure Suit Larry 6 CD
|
|
|
|
* SCI1.1 games which don't support simultaneous speech and subtitles,
|
|
|
|
* and we add this functionality in ScummVM:
|
|
|
|
* - Space Quest 4 CD
|
|
|
|
* - Freddy Pharkas CD
|
2013-11-20 22:31:36 +00:00
|
|
|
* - Laura Bow 2 CD
|
2012-10-08 20:50:47 +00:00
|
|
|
* SCI1.1 games which don't support simultaneous speech and subtitles,
|
|
|
|
* and we haven't added any extra functionality in ScummVM because extra
|
|
|
|
* script patches are needed:
|
|
|
|
* - King's Quest 6 CD
|
2012-10-08 20:14:02 +00:00
|
|
|
*/
|
2013-11-20 22:31:36 +00:00
|
|
|
bool speechAndSubtitlesEnabled();
|
2010-12-22 13:58:28 +00:00
|
|
|
void syncIngameAudioOptions();
|
2013-10-31 05:25:25 +00:00
|
|
|
void updateScummVMAudioOptions();
|
2009-02-21 09:45:34 +00:00
|
|
|
|
2010-06-25 16:16:29 +00:00
|
|
|
const SciGameId &getGameId() const { return _gameId; }
|
|
|
|
const char *getGameIdStr() const;
|
2009-02-22 03:40:51 +00:00
|
|
|
int getResourceVersion() const;
|
2009-02-18 20:08:49 +00:00
|
|
|
Common::Language getLanguage() const;
|
|
|
|
Common::Platform getPlatform() const;
|
2010-02-13 17:44:19 +00:00
|
|
|
bool isDemo() const;
|
2010-11-25 14:19:02 +00:00
|
|
|
bool isCD() const;
|
2011-03-05 00:15:06 +00:00
|
|
|
|
|
|
|
/** Returns true if the game's original platform is big-endian. */
|
2011-03-04 20:07:52 +00:00
|
|
|
bool isBE() const;
|
2011-03-05 00:15:06 +00:00
|
|
|
|
2010-10-13 03:28:59 +00:00
|
|
|
bool hasMacIconBar() const;
|
2010-02-13 17:44:19 +00:00
|
|
|
|
2010-02-13 17:45:40 +00:00
|
|
|
inline ResourceManager *getResMan() const { return _resMan; }
|
2013-12-04 19:42:16 +00:00
|
|
|
inline ScriptPatcher *getScriptPatcher() const { return _scriptPatcher; }
|
2010-02-13 17:45:40 +00:00
|
|
|
inline Kernel *getKernel() const { return _kernel; }
|
|
|
|
inline EngineState *getEngineState() const { return _gamestate; }
|
|
|
|
inline Vocabulary *getVocabulary() const { return _vocabulary; }
|
2010-06-09 07:59:42 +00:00
|
|
|
inline EventManager *getEventManager() const { return _eventMan; }
|
2010-08-23 20:29:13 +00:00
|
|
|
inline reg_t getGameObject() const { return _gameObjectAddress; }
|
2009-02-27 01:17:24 +00:00
|
|
|
|
2010-07-30 22:47:01 +00:00
|
|
|
Common::RandomSource &getRNG() { return _rng; }
|
|
|
|
|
2009-02-20 23:41:15 +00:00
|
|
|
Common::String getSavegameName(int nr) const;
|
2009-02-27 01:17:24 +00:00
|
|
|
Common::String getSavegamePattern() const;
|
|
|
|
|
2010-01-01 09:40:28 +00:00
|
|
|
Common::String getFilePrefix() const;
|
|
|
|
|
2009-02-27 01:17:24 +00:00
|
|
|
/** Prepend 'TARGET-' to the given filename. */
|
|
|
|
Common::String wrapFilename(const Common::String &name) const;
|
|
|
|
|
|
|
|
/** Remove the 'TARGET-' prefix of the given filename, if present. */
|
|
|
|
Common::String unwrapFilename(const Common::String &name) const;
|
|
|
|
|
2010-08-29 00:17:56 +00:00
|
|
|
/**
|
2010-08-29 15:13:25 +00:00
|
|
|
* Checks if we are in a QfG import screen, where special handling
|
|
|
|
* of file-listings is performed.
|
2010-08-29 00:17:56 +00:00
|
|
|
*/
|
2010-08-29 15:13:25 +00:00
|
|
|
int inQfGImportRoom() const;
|
2010-08-29 00:17:56 +00:00
|
|
|
|
2010-06-17 23:10:37 +00:00
|
|
|
void sleep(uint32 msecs);
|
|
|
|
|
2010-07-12 23:20:33 +00:00
|
|
|
void scriptDebug();
|
2010-07-12 23:21:03 +00:00
|
|
|
bool checkExportBreakpoint(uint16 script, uint16 pubfunct);
|
2010-09-02 09:05:08 +00:00
|
|
|
bool checkSelectorBreakpoint(BreakpointType breakpointType, reg_t send_obj, int selector);
|
2010-07-12 23:20:33 +00:00
|
|
|
|
2011-01-27 10:49:11 +00:00
|
|
|
void patchGameSaveRestore();
|
2010-08-23 23:04:07 +00:00
|
|
|
|
2010-02-13 17:46:44 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Processes a multilanguage string based on the current language settings and
|
|
|
|
* returns a string that is ready to be displayed.
|
|
|
|
* @param str the multilanguage string
|
|
|
|
* @param sep optional seperator between main language and subtitle language,
|
|
|
|
* if NULL is passed no subtitle will be added to the returned string
|
|
|
|
* @return processed string
|
|
|
|
*/
|
|
|
|
Common::String strSplit(const char *str, const char *sep = "\r----------\r");
|
|
|
|
|
|
|
|
kLanguage getSciLanguage();
|
2010-06-10 11:18:10 +00:00
|
|
|
void setSciLanguage(kLanguage lang);
|
|
|
|
void setSciLanguage();
|
2010-02-13 17:46:44 +00:00
|
|
|
|
2011-06-03 12:03:36 +00:00
|
|
|
Common::String getSciLanguageString(const Common::String &str, kLanguage lang, kLanguage *lang2 = NULL) const;
|
2010-02-13 17:46:44 +00:00
|
|
|
|
2010-07-19 13:50:06 +00:00
|
|
|
// Check if vocabulary needs to get switched (in multilingual parser games)
|
|
|
|
void checkVocabularySwitch();
|
|
|
|
|
2010-06-15 13:34:40 +00:00
|
|
|
// Initializes ports and paint16 for non-sci32 games, also sets default palette
|
|
|
|
void initGraphics();
|
|
|
|
|
2010-02-13 17:43:31 +00:00
|
|
|
public:
|
|
|
|
GfxAnimate *_gfxAnimate; // Animate for 16-bit gfx
|
|
|
|
GfxCache *_gfxCache;
|
|
|
|
GfxCompare *_gfxCompare;
|
2011-10-25 22:48:20 +00:00
|
|
|
GfxControls16 *_gfxControls16; // Controls for 16-bit gfx
|
2011-10-28 19:19:52 +00:00
|
|
|
GfxControls32 *_gfxControls32; // Controls for 32-bit gfx
|
2010-02-13 17:43:31 +00:00
|
|
|
GfxCoordAdjuster *_gfxCoordAdjuster;
|
|
|
|
GfxCursor *_gfxCursor;
|
|
|
|
GfxMenu *_gfxMenu; // Menu for 16-bit gfx
|
|
|
|
GfxPalette *_gfxPalette;
|
|
|
|
GfxPaint *_gfxPaint;
|
|
|
|
GfxPaint16 *_gfxPaint16; // Painting in 16-bit gfx
|
2010-06-15 15:44:24 +00:00
|
|
|
GfxPaint32 *_gfxPaint32; // Painting in 32-bit gfx
|
2010-02-13 17:43:31 +00:00
|
|
|
GfxPorts *_gfxPorts; // Port managment for 16-bit gfx
|
|
|
|
GfxScreen *_gfxScreen;
|
2010-06-15 13:01:07 +00:00
|
|
|
GfxText16 *_gfxText16;
|
2011-09-03 11:50:58 +00:00
|
|
|
GfxText32 *_gfxText32;
|
2010-06-15 15:44:24 +00:00
|
|
|
GfxTransitions *_gfxTransitions; // transitions between screens for 16-bit gfx
|
2010-05-24 21:47:06 +00:00
|
|
|
GfxMacIconBar *_gfxMacIconBar; // Mac Icon Bar manager
|
2010-02-13 17:43:31 +00:00
|
|
|
|
|
|
|
#ifdef ENABLE_SCI32
|
2011-02-07 12:24:09 +00:00
|
|
|
RobotDecoder *_robotDecoder;
|
2010-02-13 17:43:31 +00:00
|
|
|
GfxFrameout *_gfxFrameout; // kFrameout and the like for 32-bit gfx
|
|
|
|
#endif
|
|
|
|
|
2010-02-14 12:23:22 +00:00
|
|
|
AudioPlayer *_audio;
|
2010-06-29 09:00:08 +00:00
|
|
|
SoundCommandParser *_soundCmd;
|
2010-02-13 17:44:58 +00:00
|
|
|
GameFeatures *_features;
|
|
|
|
|
2011-11-29 17:34:25 +00:00
|
|
|
opcode_format (*_opcode_formats)[4];
|
|
|
|
|
2010-07-12 23:20:33 +00:00
|
|
|
DebugState _debugState;
|
|
|
|
|
2011-02-17 18:13:30 +00:00
|
|
|
Common::MacResManager *getMacExecutable() { return &_macExecutable; }
|
|
|
|
|
2009-02-15 22:43:13 +00:00
|
|
|
private:
|
2010-06-10 07:32:05 +00:00
|
|
|
/**
|
|
|
|
* Initializes a SCI game
|
|
|
|
* This function must be run before script_run() is executed. Graphics data
|
|
|
|
* is initialized iff s->gfx_state != NULL.
|
|
|
|
* @param[in] s The state to operate on
|
2010-06-15 12:33:20 +00:00
|
|
|
* @return true on success, false if an error occurred.
|
2010-06-10 07:32:05 +00:00
|
|
|
*/
|
|
|
|
bool initGame();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Runs a SCI game
|
|
|
|
* This is the main function for SCI games. It takes a valid state, loads
|
|
|
|
* script 0 to it, finds the game object, allocates a stack, and runs the
|
|
|
|
* init method of the game object. In layman's terms, this runs a SCI game.
|
|
|
|
* @param[in] s Pointer to the pointer of the state to operate on
|
|
|
|
*/
|
|
|
|
void runGame();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uninitializes an initialized SCI game
|
|
|
|
* This function should be run after each script_run() call.
|
|
|
|
* @param[in] s The state to operate on
|
|
|
|
*/
|
|
|
|
void exitGame();
|
|
|
|
|
2011-02-17 18:13:30 +00:00
|
|
|
/**
|
|
|
|
* Loads the Mac executable for SCI1 games
|
|
|
|
*/
|
|
|
|
void loadMacExecutable();
|
|
|
|
|
2010-06-10 07:32:05 +00:00
|
|
|
void initStackBaseWithSelector(Selector selector);
|
|
|
|
|
2010-10-29 10:58:54 +00:00
|
|
|
bool gameHasFanMadePatch();
|
2011-01-27 10:49:11 +00:00
|
|
|
void setLauncherLanguage();
|
2010-10-29 10:58:54 +00:00
|
|
|
|
2009-10-09 23:19:53 +00:00
|
|
|
const ADGameDescription *_gameDescription;
|
2010-06-25 16:16:29 +00:00
|
|
|
const SciGameId _gameId;
|
2010-02-13 17:44:19 +00:00
|
|
|
ResourceManager *_resMan; /**< The resource manager */
|
2013-12-04 19:42:16 +00:00
|
|
|
ScriptPatcher *_scriptPatcher; /**< The script patcher */
|
2009-06-03 14:09:25 +00:00
|
|
|
EngineState *_gamestate;
|
2009-07-11 23:45:54 +00:00
|
|
|
Kernel *_kernel;
|
|
|
|
Vocabulary *_vocabulary;
|
2010-07-19 13:50:06 +00:00
|
|
|
int16 _vocabularyLanguage;
|
2010-06-09 07:59:42 +00:00
|
|
|
EventManager *_eventMan;
|
2010-08-23 20:29:13 +00:00
|
|
|
reg_t _gameObjectAddress; /**< Pointer to the game object */
|
2009-06-03 14:09:25 +00:00
|
|
|
Console *_console;
|
2010-07-30 22:47:01 +00:00
|
|
|
Common::RandomSource _rng;
|
2011-02-17 18:13:30 +00:00
|
|
|
Common::MacResManager _macExecutable;
|
2009-02-15 06:10:59 +00:00
|
|
|
};
|
|
|
|
|
2010-02-13 17:42:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Global instance of the SciEngine class, similar to g_engine.
|
|
|
|
* This is a hackish way to make all central components available
|
|
|
|
* everywhere. Ideally, we would get rid of this again in the future,
|
|
|
|
* but for now it's a pragmatic and simple way to achieve the goal.
|
|
|
|
*/
|
|
|
|
extern SciEngine *g_sci;
|
|
|
|
|
2009-09-17 16:50:53 +00:00
|
|
|
/**
|
|
|
|
* Convenience function to obtain the active SCI version.
|
|
|
|
*/
|
2009-09-23 12:12:37 +00:00
|
|
|
SciVersion getSciVersion();
|
2009-09-17 16:50:53 +00:00
|
|
|
|
2010-02-13 11:58:15 +00:00
|
|
|
/**
|
|
|
|
* Convenience function converting an SCI version into a human-readable string.
|
|
|
|
*/
|
|
|
|
const char *getSciVersionDesc(SciVersion version);
|
2009-09-17 16:50:53 +00:00
|
|
|
|
2009-02-20 14:45:28 +00:00
|
|
|
} // End of namespace Sci
|
2009-02-15 06:10:59 +00:00
|
|
|
|
|
|
|
#endif // SCI_H
|