diff options
author | Filippos Karapetis | 2007-07-31 17:41:10 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-07-31 17:41:10 +0000 |
commit | 03d7990a341a5c05d2b23b073620159d3fe15a0f (patch) | |
tree | 87318f60b356120b73965e6ba52f4d07c90d9b47 /engines/saga | |
parent | ea251afbb7dcee4de2c6f99d223480841c89ed40 (diff) | |
download | scummvm-rg350-03d7990a341a5c05d2b23b073620159d3fe15a0f.tar.gz scummvm-rg350-03d7990a341a5c05d2b23b073620159d3fe15a0f.tar.bz2 scummvm-rg350-03d7990a341a5c05d2b23b073620159d3fe15a0f.zip |
Some updates to the psychic profile in IHNM. sfPsychicProfileOff has been enabled again
svn-id: r28361
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/interface.cpp | 10 | ||||
-rw-r--r-- | engines/saga/scene.cpp | 13 | ||||
-rw-r--r-- | engines/saga/sfuncs.cpp | 5 |
3 files changed, 15 insertions, 13 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index c7054436d9..941262e10e 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -369,18 +369,18 @@ int Interface::deactivate() { } void Interface::rememberMode() { - assert (_savedMode == -1); + debug(1, "rememberMode(%d)", _savedMode); _savedMode = _panelMode; - - debug(1, "rememberMode(%d)", _savedMode); } void Interface::restoreMode(bool draw_) { - assert (_savedMode != -1); - debug(1, "restoreMode(%d)", _savedMode); + // If _savedMode is -1 by a race condition, set it to kPanelMain + if (_savedMode == -1) + _savedMode = kPanelMain; + _panelMode = _savedMode; _savedMode = -1; diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 6e51296bad..3c98421361 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -1361,12 +1361,13 @@ void Scene::clearPlacard() { } void Scene::clearPsychicProfile() { - _vm->_scene->clearPlacard(); - _vm->_actor->showActors(false); - _vm->_gfx->restorePalette(); - _vm->_scene->restoreScene(); - _vm->_interface->setMode(kPanelMain); - _vm->_interface->activate(); + if (_vm->_interface->getMode() == kPanelPlacard) { + _vm->_scene->clearPlacard(); + _vm->_actor->showActors(false); + _vm->_gfx->restorePalette(); + _vm->_scene->restoreScene(); + _vm->_interface->activate(); + } } void Scene::showIHNMDemoSpecialScreen() { diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 61d8caaaf0..ef1ecd587f 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -1519,8 +1519,9 @@ void Script::sfPsychicProfile(SCRIPTFUNC_PARAMS) { void Script::sfPsychicProfileOff(SCRIPTFUNC_PARAMS) { thread->wait(kWaitTypePlacard); - // This is not used - //_vm->_scene->clearPsychicProfile(); + // This is called a while after the psychic profile is + // opened, to close it automatically + _vm->_scene->clearPsychicProfile(); } // Script function #50 (0x32) |