diff options
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r-- | engines/sci/sci.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 4862d0579a..929bdf3307 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -43,6 +43,7 @@ #include "sci/sound/audio.h" #include "sci/sound/soundcmd.h" #include "sci/graphics/gui.h" +#include "sci/graphics/maciconbar.h" #include "sci/graphics/ports.h" #include "sci/graphics/palette.h" #include "sci/graphics/cursor.h" @@ -55,8 +56,6 @@ namespace Sci { -extern int g_loadFromLauncher; - SciEngine *g_sci = 0; @@ -97,6 +96,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc) DebugMan.addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game"); _gamestate = 0; + _gfxMacIconBar = 0; const Common::FSNode gameDataDir(ConfMan.get("path")); @@ -124,6 +124,7 @@ SciEngine::~SciEngine() { delete _console; delete _resMan; delete _features; + delete _gfxMacIconBar; g_sci = 0; } @@ -170,6 +171,9 @@ Common::Error SciEngine::run() { else screen = new GfxScreen(_resMan, 320, 200, upscaledHires); + if (_resMan->isSci11Mac() && getSciVersion() == SCI_VERSION_1_1) + _gfxMacIconBar = new GfxMacIconBar(); + GfxPalette *palette = new GfxPalette(_resMan, screen); GfxCache *cache = new GfxCache(_resMan, screen, palette); GfxCursor *cursor = new GfxCursor(_resMan, palette, screen); @@ -184,7 +188,7 @@ Common::Error SciEngine::run() { _features = new GameFeatures(segMan, _kernel); - _gamestate = new EngineState(_vocabulary, segMan); + _gamestate = new EngineState(segMan); _gamestate->_event = new SciEvent(_resMan); @@ -222,16 +226,11 @@ Common::Error SciEngine::run() { } // Add the after market GM patches for the specified game, if they exist - _resMan->addNewGMPatch(_gamestate->_gameId); + _resMan->addNewGMPatch(getGameID()); script_adjust_opcode_formats(_gamestate); _kernel->loadKernelNames(getGameID()); - // Set the savegame dir (actually, we set it to a fake value, - // since we cannot let the game control where saves are stored) - assert(_gamestate->sys_strings->_strings[SYS_STRING_SAVEDIR]._value != 0); - strcpy(_gamestate->sys_strings->_strings[SYS_STRING_SAVEDIR]._value, ""); - SciVersion soundVersion = _features->detectDoSoundType(); _gamestate->_soundCmd = new SoundCommandParser(_resMan, segMan, _kernel, _audio, soundVersion); @@ -258,9 +257,9 @@ Common::Error SciEngine::run() { // Check whether loading a savestate was requested if (ConfMan.hasKey("save_slot")) { - g_loadFromLauncher = ConfMan.getInt("save_slot"); + _gamestate->loadFromLauncher = ConfMan.getInt("save_slot"); } else { - g_loadFromLauncher = -1; + _gamestate->loadFromLauncher = -1; } game_run(&_gamestate); // Run the game |