From 30a82f1879b60887bcdc0f6e21e4493aba363776 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 25 Aug 2007 19:21:43 +0000 Subject: When sfMainMode is set, overwrite the stored panel mode svn-id: r28731 --- engines/saga/interface.cpp | 2 +- engines/saga/sfuncs.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3