aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-25 19:21:43 +0000
committerFilippos Karapetis2007-08-25 19:21:43 +0000
commit30a82f1879b60887bcdc0f6e21e4493aba363776 (patch)
tree9ee0bcffb8644443208ff3a7618119e390f83413
parent79eb157fef249f7c27dd6097f6816cf967a0487d (diff)
downloadscummvm-rg350-30a82f1879b60887bcdc0f6e21e4493aba363776.tar.gz
scummvm-rg350-30a82f1879b60887bcdc0f6e21e4493aba363776.tar.bz2
scummvm-rg350-30a82f1879b60887bcdc0f6e21e4493aba363776.zip
When sfMainMode is set, overwrite the stored panel mode
svn-id: r28731
-rw-r--r--engines/saga/interface.cpp2
-rw-r--r--engines/saga/sfuncs.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index f8b65f5b8e..7bf9f3ed6b 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -367,7 +367,7 @@ int Interface::deactivate() {
}
void Interface::rememberMode() {
- debug(1, "rememberMode(%d)", _savedMode);
+ debug(1, "rememberMode(%d)", _panelMode);
_savedMode = _panelMode;
}
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index b68c395403..2f93aa5197 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -323,6 +323,12 @@ void Script::sfMainMode(SCRIPTFUNC_PARAMS) {
showVerb();
_vm->_interface->activate();
_vm->_interface->setMode(kPanelMain);
+ // Sometimes, the active cutaway is cleared after this opcode is called,
+ // resulting in an incorrect mode being set. An example is Ellen's chapter
+ // in IHNM, when using the computer with the chaos trebler CD. Make sure
+ // that the saved mode is kPanelMain, so that it won't get overwritten
+ // by an incorrect stored mode
+ _vm->_interface->rememberMode();
if (_vm->getGameType() == GType_ITE)
setPointerVerb();