aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-08 07:57:26 +0000
committerFilippos Karapetis2009-10-08 07:57:26 +0000
commit2d98b72858794e5ecf246180bb3cd51334513eae (patch)
tree81411ed7bf6d25cf7edfd8e8fcecd3724782994a /engines/sci
parentce75c9270a836f991e54578767f2e4e4678f6c09 (diff)
downloadscummvm-rg350-2d98b72858794e5ecf246180bb3cd51334513eae.tar.gz
scummvm-rg350-2d98b72858794e5ecf246180bb3cd51334513eae.tar.bz2
scummvm-rg350-2d98b72858794e5ecf246180bb3cd51334513eae.zip
Restore the engine state stored within SciGui during loading once more, since it gets replaced during loading. Fixes loading (a regression from #44730)
svn-id: r44771
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/gui/gui.h3
-rw-r--r--engines/sci/gui32/gui32.h3
3 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 1af29c6fa9..199c27e1a6 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -794,6 +794,8 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
// Message state:
retval->_msgState = s->_msgState;
+ retval->_gui->resetEngineState(retval);
+
return retval;
}
diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h
index dc03182024..58a6da8075 100644
--- a/engines/sci/gui/gui.h
+++ b/engines/sci/gui/gui.h
@@ -94,6 +94,9 @@ public:
virtual bool debugUndither(bool flag);
virtual bool debugShowMap(int mapNo);
+ // FIXME: Don't store EngineState
+ virtual void resetEngineState(EngineState *s) { _s = s; }
+
private:
EngineState *_s;
SciGuiScreen *_screen;
diff --git a/engines/sci/gui32/gui32.h b/engines/sci/gui32/gui32.h
index 4714295c1f..5f04436fcd 100644
--- a/engines/sci/gui32/gui32.h
+++ b/engines/sci/gui32/gui32.h
@@ -86,6 +86,9 @@ public:
bool debugUndither(bool flag);
bool debugShowMap(int mapNo);
+ // FIXME: Don't store EngineState
+ virtual void resetEngineState(EngineState *newState) { s = newState; }
+
private:
EngineState *s;
bool _usesOldGfxFunctions;