From 7cd9a23c0d11b451979aeea66a6bb325b2d31341 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 23 May 2010 17:03:16 +0000 Subject: Remove the unused SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE flag svn-id: r49161 --- engines/sci/console.cpp | 16 ---------------- engines/sci/engine/kmisc.cpp | 1 - engines/sci/engine/state.h | 3 +-- engines/sci/engine/vm.cpp | 2 +- 4 files changed, 2 insertions(+), 20 deletions(-) (limited to 'engines') diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index f73932bcb1..6bd7adfdb7 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -920,22 +920,6 @@ bool Console::cmdRestoreGame(int argc, const char **argv) { } bool Console::cmdRestartGame(int argc, const char **argv) { - if (argc != 2) { - DebugPrintf("Restarts the game. There are two ways to restart a SCI game:\n"); - DebugPrintf("%s play - calls the game object's play() method\n", argv[0]); - DebugPrintf("%s replay - calls the replay() methody\n", argv[0]); - return true; - } - - if (!scumm_stricmp(argv[1], "play")) { - _engine->_gamestate->restarting_flags |= SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE; - } else if (!scumm_stricmp(argv[1], "replay")) { - _engine->_gamestate->restarting_flags &= ~SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE; - } else { - DebugPrintf("Invalid usage of %s\n", argv[0]); - return true; - } - _engine->_gamestate->restarting_flags |= SCI_GAME_IS_RESTARTING_NOW; script_abort_flag = 1; diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 22295dca41..aee1d58357 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -37,7 +37,6 @@ namespace Sci { reg_t kRestartGame(EngineState *s, int argc, reg_t *argv) { s->restarting_flags |= SCI_GAME_IS_RESTARTING_NOW; - s->restarting_flags &= ~SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE; // This appears to help s->shrinkStackToBase(); diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index cc7b371308..ad9de9e13e 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -76,8 +76,7 @@ enum { enum { SCI_GAME_IS_NOT_RESTARTING = 0, SCI_GAME_WAS_RESTARTED = 1, - SCI_GAME_IS_RESTARTING_NOW = 2, - SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE = 4 + SCI_GAME_IS_RESTARTING_NOW = 2 }; class FileHandle { diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 1e252dac46..7b6763f8f2 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -1701,7 +1701,7 @@ static EngineState *_game_run(EngineState *&s) { send_selector(s, s->_gameObj, s->_gameObj, s->stack_base, 2, s->stack_base); script_abort_flag = 0; - s->restarting_flags = SCI_GAME_WAS_RESTARTED | SCI_GAME_WAS_RESTARTED_AT_LEAST_ONCE; + s->restarting_flags = SCI_GAME_WAS_RESTARTED; } else { successor = s->successor; -- cgit v1.2.3