aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sci.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-10 08:11:38 +0000
committerFilippos Karapetis2010-06-10 08:11:38 +0000
commit0ab7c908bb3971a74bb1c8848d6f59f161464ad1 (patch)
tree25e87d47ef767d392990315c313a9c442c67a6f8 /engines/sci/sci.cpp
parent50c1f4e545dde784341eebf6eb8cd6d3ce0751b7 (diff)
downloadscummvm-rg350-0ab7c908bb3971a74bb1c8848d6f59f161464ad1.tar.gz
scummvm-rg350-0ab7c908bb3971a74bb1c8848d6f59f161464ad1.tar.bz2
scummvm-rg350-0ab7c908bb3971a74bb1c8848d6f59f161464ad1.zip
Removed the pointer to the game object from the EngineState class
svn-id: r49562
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r--engines/sci/sci.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 537ec4bef0..fad4e8c4e8 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -145,6 +145,7 @@ Common::Error SciEngine::run() {
// Add the after market GM patches for the specified game, if they exist
_resMan->addNewGMPatch(getGameID());
+ _gameObj = _resMan->findGameObject();
SegManager *segMan = new SegManager(_resMan);
@@ -327,8 +328,6 @@ bool SciEngine::initGame() {
srand(g_system->getMillis()); // Initialize random number generator
- _gamestate->_gameObj = _resMan->findGameObject();
-
#ifdef USE_OLD_MUSIC_FUNCTIONS
if (_gamestate->sfx_init_flags & SFX_STATE_FLAG_NOSOUND)
initGameSound(0, _features->detectDoSoundType());
@@ -359,8 +358,8 @@ void SciEngine::initStackBaseWithSelector(Selector selector) {
_gamestate->stack_base[1] = NULL_REG;
// Register the first element on the execution stack
- if (!send_selector(_gamestate, _gamestate->_gameObj, _gamestate->_gameObj, _gamestate->stack_base, 2, _gamestate->stack_base)) {
- _console->printObject(_gamestate->_gameObj);
+ if (!send_selector(_gamestate, _gameObj, _gameObj, _gamestate->stack_base, 2, _gamestate->stack_base)) {
+ _console->printObject(_gameObj);
error("initStackBaseWithSelector: error while registering the first selector in the call stack");
}