From 7f4aa161bcb0f989fe2b343909fd855679901d3e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 31 Jan 2010 01:26:06 +0000 Subject: Removed duplicate code. Some cleanup svn-id: r47735 --- engines/sci/detection.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'engines/sci/detection.cpp') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 30b5f00964..cfa81ed6e1 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -475,23 +475,17 @@ void SciMetaEngine::removeSaveState(const char *target, int slot) const { } Common::Error SciEngine::loadGameState(int slot) { - EngineState *newstate = NULL; Common::String fileName = Common::String::printf("%s.%03d", _targetName.c_str(), slot); Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager(); Common::SeekableReadStream *in = saveFileMan->openForLoading(fileName); if (in) { // found a savegame file - newstate = gamestate_restore(_gamestate, in); + gamestate_restore(_gamestate, in); delete in; } - if (newstate) { - _gamestate->successor = newstate; // Set successor - - script_abort_flag = 2; // Abort current game with replay - - shrink_execution_stack(_gamestate, _gamestate->execution_stack_base + 1); + if (_gamestate->r_acc != make_reg(0, 1)) { return Common::kNoError; } else { warning("Restoring gamestate '%s' failed", fileName.c_str()); -- cgit v1.2.3