From ce3af91ef865992fb744463f2bbb8dff8d0369cb Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Tue, 8 Mar 2016 16:30:28 +0100 Subject: ADL: Disable GMM restore on restart prompt At the end of the game a restart command is executed from the global command list. As we assumed that this would not occur, we disable restoring on the restart prompt, at least for now. --- engines/adl/adl.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index 8e374fa8f6..1ab74c3cf6 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -946,16 +946,7 @@ void AdlEngine::doActions(const Command &command, byte noun, byte offset) { break; case IDO_ACT_RESTART: { _display->printString(_strings.playAgain); - - // We allow restoring via GMM here - _canRestoreNow = true; Common::String input = inputString(); - _canRestoreNow = false; - - // If the user restored with the GMM, we break off the restart - if (_isRestoring) - return; - if (input.size() == 0 || input[0] != APPLECHAR('N')) { _isRestarting = true; _display->clear(0x00); @@ -1036,18 +1027,11 @@ bool AdlEngine::doOneCommand(const Commands &commands, byte verb, byte noun) { void AdlEngine::doAllCommands(const Commands &commands, byte verb, byte noun) { Commands::const_iterator cmd; - bool oldIsRestoring = _isRestoring; for (cmd = commands.begin(); cmd != commands.end(); ++cmd) { uint offset = 0; if (matchCommand(*cmd, verb, noun, &offset)) doActions(*cmd, noun, offset); - - // We assume no restarts happen in this command group. This - // simplifies enabling GMM savegame loading on the restart - // prompt. - if (_isRestarting || _isRestoring != oldIsRestoring) - error("Unexpected restart action encountered"); } } -- cgit v1.2.3