aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/detection.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-31 01:26:06 +0000
committerFilippos Karapetis2010-01-31 01:26:06 +0000
commit7f4aa161bcb0f989fe2b343909fd855679901d3e (patch)
tree16508cd1ee279057ce7058f23769bfd80ece7b01 /engines/sci/detection.cpp
parent8b9cdd671f1bb613b9efef3fec5acd21fdc297ea (diff)
downloadscummvm-rg350-7f4aa161bcb0f989fe2b343909fd855679901d3e.tar.gz
scummvm-rg350-7f4aa161bcb0f989fe2b343909fd855679901d3e.tar.bz2
scummvm-rg350-7f4aa161bcb0f989fe2b343909fd855679901d3e.zip
Removed duplicate code. Some cleanup
svn-id: r47735
Diffstat (limited to 'engines/sci/detection.cpp')
-rw-r--r--engines/sci/detection.cpp10
1 files changed, 2 insertions, 8 deletions
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());