diff options
author | Filippos Karapetis | 2010-06-15 09:11:26 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-15 09:11:26 +0000 |
commit | e64eb71ce86663c479bbbb94072fee94a015eecb (patch) | |
tree | 27c06cb158d8ebced0d8cd39d15b46d3a06dd8a6 | |
parent | ba3c43498b12b4c5855030bea7ab9e613c55d4ac (diff) | |
download | scummvm-rg350-e64eb71ce86663c479bbbb94072fee94a015eecb.tar.gz scummvm-rg350-e64eb71ce86663c479bbbb94072fee94a015eecb.tar.bz2 scummvm-rg350-e64eb71ce86663c479bbbb94072fee94a015eecb.zip |
Properly reconstruct the running stack when restoring (a regression from commits #49376 and #49525), some formatting
svn-id: r49689
-rw-r--r-- | engines/sci/engine/savegame.cpp | 1 | ||||
-rw-r--r-- | engines/sci/engine/segment.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/state.cpp | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index d2bd955793..02fdde5622 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -994,6 +994,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { #endif s->abortScriptProcessing = kAbortLoadGame; + s->shrinkStackToBase(); } bool get_savegame_metadata(Common::SeekableReadStream *stream, SavegameMetadata *meta) { diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 61f1c7b3c9..253d94cc53 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -802,7 +802,7 @@ public: byte getType() const { return _type; } uint32 getSize() const { return _size; } T *getRawData() { return _data; } - const T *getRawData()const { return _data; } + const T *getRawData() const { return _data; } protected: int8 _type; diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 41f263bb62..1c8113e5e4 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -90,13 +90,13 @@ void EngineState::reset(bool isRestoring) { _fileHandles.resize(5); - stack_base = 0; - stack_top = 0; abortScriptProcessing = kAbortNone; } executionStackBase = 0; _executionStackPosChanged = false; + stack_base = 0; + stack_top = 0; restAdjust = 0; |