aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sci.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2010-01-29 22:02:28 +0000
committerMatthew Hoops2010-01-29 22:02:28 +0000
commit5b9b6b6b7087555723665b0e243de1a9f2d5b018 (patch)
tree52164de9dd178730000ce0abb2905ea34a1a66ed /engines/sci/sci.cpp
parentc6e095715c8901799aa384d2076742a2bd2e00f6 (diff)
downloadscummvm-rg350-5b9b6b6b7087555723665b0e243de1a9f2d5b018.tar.gz
scummvm-rg350-5b9b6b6b7087555723665b0e243de1a9f2d5b018.tar.bz2
scummvm-rg350-5b9b6b6b7087555723665b0e243de1a9f2d5b018.zip
Fix compile when ENABLE_SCI32 is not set.
svn-id: r47682
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r--engines/sci/sci.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 2bfe306674..de608a2765 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -40,11 +40,14 @@
#include "sci/sound/audio.h"
#include "sci/sound/soundcmd.h"
#include "sci/graphics/gui.h"
-#include "sci/graphics/gui32.h"
#include "sci/graphics/palette.h"
#include "sci/graphics/cursor.h"
#include "sci/graphics/screen.h"
+#ifdef ENABLE_SCI32
+#include "sci/graphics/gui32.h"
+#endif
+
namespace Sci {
class GfxDriver;
@@ -163,10 +166,13 @@ Common::Error SciEngine::run() {
if (script_init_engine(_gamestate))
return Common::kUnknownError;
- if (getSciVersion() <= SCI_VERSION_1_1)
- _gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor, _audio);
- else
+#ifdef ENABLE_SCI32
+ if (getSciVersion() >= SCI_VERSION_2)
_gamestate->_gui32 = new SciGui32(_gamestate, screen, palette, cursor);
+ else
+#endif
+ _gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor, _audio);
+
if (game_init(_gamestate)) { /* Initialize */
warning("Game initialization failed: Aborting...");
@@ -196,10 +202,12 @@ Common::Error SciEngine::run() {
syncSoundSettings();
- if (_gamestate->_gui)
- _gamestate->_gui->init(_gamestate->usesOldGfxFunctions());
- else
+#ifdef ENABLE_SCI32
+ if (_gamestate->_gui32)
_gamestate->_gui32->init();
+ else
+#endif
+ _gamestate->_gui->init(_gamestate->usesOldGfxFunctions());
debug("Emulating SCI version %s\n", getSciVersionDesc(getSciVersion()).c_str());