diff options
author | Filippos Karapetis | 2010-05-29 15:27:27 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-29 15:27:27 +0000 |
commit | 3d09af03773d353e73b61197befa63031e99d096 (patch) | |
tree | f25a3ba0bb5c728905827170580f53574797916c /engines/sci/engine | |
parent | 708b37898c17ca520e8b3ae92a2e458665c7bd81 (diff) | |
download | scummvm-rg350-3d09af03773d353e73b61197befa63031e99d096.tar.gz scummvm-rg350-3d09af03773d353e73b61197befa63031e99d096.tar.bz2 scummvm-rg350-3d09af03773d353e73b61197befa63031e99d096.zip |
Removed the hack inside findGameObject(), and replaced it with code from the segment manager, till we find out why the segment is sometimes off by 1 (note that findGameObject() works fine for finding the game ID itself)
svn-id: r49310
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/game.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 232e0eca55..241df94316 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -127,7 +127,13 @@ int game_init(EngineState *s) { srand(g_system->getMillis()); // Initialize random number generator - s->_gameObj = g_sci->getResMan()->findGameObject(); + // TODO: This is sometimes off by 1... find out why + //s->_gameObj = g_sci->getResMan()->findGameObject(); + // Replaced by the code below for now + Script *scr000 = s->_segMan->getScript(1); + s->_gameObj = make_reg(1, scr000->validateExportFunc(0)); + if (getSciVersion() >= SCI_VERSION_1_1) + s->_gameObj.offset += scr000->_scriptSize; #ifdef USE_OLD_MUSIC_FUNCTIONS if (s->sfx_init_flags & SFX_STATE_FLAG_NOSOUND) |