diff options
author | Filippos Karapetis | 2007-09-16 04:22:52 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-09-16 04:22:52 +0000 |
commit | 990e9a782891ce5510aa04f7d3b93f1b79504ac0 (patch) | |
tree | 343fc78261a104437c74f21cf6e203245e2048e0 /engines | |
parent | b2e97060adf93760f7e4bce97e691e34fc258922 (diff) | |
download | scummvm-rg350-990e9a782891ce5510aa04f7d3b93f1b79504ac0.tar.gz scummvm-rg350-990e9a782891ce5510aa04f7d3b93f1b79504ac0.tar.bz2 scummvm-rg350-990e9a782891ce5510aa04f7d3b93f1b79504ac0.zip |
Script modules are now unloaded correctly when changing chapters in IHNM
svn-id: r28918
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/scene.cpp | 10 | ||||
-rw-r--r-- | engines/saga/script.cpp | 1 | ||||
-rw-r--r-- | engines/saga/script.h | 1 |
3 files changed, 2 insertions, 10 deletions
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index d2193dac3c..a80b482e47 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -611,15 +611,7 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { _vm->_interface->setLeftPortrait(0); _vm->_anim->freeCutawayList(); - // FIXME: Freed script modules are not reloaded correctly when changing chapters. - // This is apparent when returning back to the character selection screen, - // where the scene script module is loaded incorrectly - // Don't free them for now, but free them on game exit, like ITE. - // This has no impact on the game itself (other than increased memory usage), - // as each chapter uses a different module slot - // TODO: Find out why the script modules are not loaded correctly when - // changing chapters and uncomment this again - //_vm->_script->freeModules(); + _vm->_script->freeModules(); // deleteAllScenes(); diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index 8012d5af32..611975f471 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -204,6 +204,7 @@ void Script::freeModules() { for (i = 0; i < _modulesCount; i++) { if (_modules[i].loaded) { _modules[i].freeMem(); + _modules[i].loaded = false; } } _staticSize = 0; diff --git a/engines/saga/script.h b/engines/saga/script.h index 002c91cda6..37e35cf241 100644 --- a/engines/saga/script.h +++ b/engines/saga/script.h @@ -237,7 +237,6 @@ struct ModuleData { voiceLUT.freeMem(); free(moduleBase); free(entryPoints); - memset(this, 0x0, sizeof(*this)); } }; |