From d1cce09149d72c3ad85995e9f4a9d90ff4a33400 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 29 Jul 2009 19:39:03 +0000 Subject: Fix regression, which prevented saving in COMI. svn-id: r42900 --- engines/scumm/saveload.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'engines') diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index aa046dc6dd..aa4dce470e 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -92,6 +92,13 @@ bool ScummEngine::canLoadGameStateCurrently() { if (_game.heversion >= 60) return false; + // COMI always disables saving/loading (to tell the truth: + // the main menu) via its scripts, thus we need to make an + // exception here. This the same forced overwriting of the + // script decisions as in ScummEngine::processKeyboard. + if (_game.id == GID_CMI) + return true; + return (VAR_MAINMENU_KEY == 0xFF || VAR(VAR_MAINMENU_KEY) != 0); } @@ -111,6 +118,13 @@ bool ScummEngine::canSaveGameStateCurrently() { if (_game.heversion >= 60) return false; + // COMI always disables saving/loading (to tell the truth: + // the main menu) via its scripts, thus we need to make an + // exception here. This the same forced overwriting of the + // script decisions as in ScummEngine::processKeyboard. + if (_game.id == GID_CMI) + return true; + // SCUMM v4+ doesn't allow saving in room 0 or if // VAR(VAR_MAINMENU_KEY) to set to zero. return (VAR_MAINMENU_KEY == 0xFF || (VAR(VAR_MAINMENU_KEY) != 0 && _currentRoom != 0)); -- cgit v1.2.3