diff options
author | Filippos Karapetis | 2010-05-29 14:03:08 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-05-29 14:03:08 +0000 |
commit | 6f056c6c98e6c32c1e18a731ca6296b9ee4b130a (patch) | |
tree | 171a49b04c32cc6794d5c0ccbdc6db0ca9748542 /engines/sci/engine | |
parent | 928eafcccf755859a86587e01b676d020baf4d85 (diff) | |
download | scummvm-rg350-6f056c6c98e6c32c1e18a731ca6296b9ee4b130a.tar.gz scummvm-rg350-6f056c6c98e6c32c1e18a731ca6296b9ee4b130a.tar.bz2 scummvm-rg350-6f056c6c98e6c32c1e18a731ca6296b9ee4b130a.zip |
Added a method to the resource manager, to limit the places where script exports are accessed, since for SCI11 and newer exports can be functions and objects (first step in removing scriptRelocateExportsSci11(), which is a gross hack and it fails in QFG1VGA)
svn-id: r49308
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/game.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.h | 6 |
2 files changed, 1 insertions, 9 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index d7fdd9be6e..232e0eca55 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -127,9 +127,7 @@ int game_init(EngineState *s) { srand(g_system->getMillis()); // Initialize random number generator -// script_dissect(0, s->_selectorNames); - // The first entry in the export table of script 0 points to the game object - s->_gameObj = s->_segMan->lookupScriptExport(0, 0); + s->_gameObj = g_sci->getResMan()->findGameObject(); #ifdef USE_OLD_MUSIC_FUNCTIONS if (s->sfx_init_flags & SFX_STATE_FLAG_NOSOUND) diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index 24d3f3fc1c..30d62f50b0 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -112,12 +112,6 @@ public: SegmentId getScriptSegment(int script_nr, ScriptLoadType load); // TODO: document this - reg_t lookupScriptExport(int script_nr, int export_index) { - SegmentId seg = getScriptSegment(script_nr, SCRIPT_GET_DONT_LOAD); - return make_reg(seg, getScript(seg)->validateExportFunc(export_index)); - } - - // TODO: document this reg_t getClassAddress(int classnr, ScriptLoadType lock, reg_t caller); /** |