diff options
author | Filippos Karapetis | 2010-06-10 10:27:13 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-10 10:27:13 +0000 |
commit | a635b948239fbbd1ce302fb9d5eac943e90ca7ee (patch) | |
tree | 884db0d95291a80fbeb3c01424e7b75df30beb70 /engines/sci/engine/savegame.cpp | |
parent | 4d8734284701153f10e9a2691d9b3cf5fd51e069 (diff) | |
download | scummvm-rg350-a635b948239fbbd1ce302fb9d5eac943e90ca7ee.tar.gz scummvm-rg350-a635b948239fbbd1ce302fb9d5eac943e90ca7ee.tar.bz2 scummvm-rg350-a635b948239fbbd1ce302fb9d5eac943e90ca7ee.zip |
Pic port saving/loading is only used in SCI0-SCI11
svn-id: r49567
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 0376486667..99191146e5 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -352,16 +352,14 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { s.skip(4, VER(12), VER(12)); // obsolete: used to be status_bar_foreground s.skip(4, VER(12), VER(12)); // obsolete: used to be status_bar_background - if (s.getVersion() >= 13 && g_sci->_gui) { - // Save/Load picPort as well (cause sierra sci also does this) + if (s.getVersion() >= 13 && getSciVersion() <= SCI_VERSION_1_1) { + // Save/Load picPort as well for SCI0-SCI1.1. Necessary for Castle of Dr. Brain, + // as the picPort has been changed when loading during the intro int16 picPortTop, picPortLeft; Common::Rect picPortRect; - if (s.isSaving()) { - // FIXME: _gfxPorts is 0 when using SCI32 code - assert(g_sci->_gfxPorts); + if (s.isSaving()) picPortRect = g_sci->_gfxPorts->kernelGetPicWindow(picPortTop, picPortLeft); - } s.syncAsSint16LE(picPortRect.top); s.syncAsSint16LE(picPortRect.left); @@ -370,9 +368,8 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint16LE(picPortTop); s.syncAsSint16LE(picPortLeft); - if (s.isLoading()) { + if (s.isLoading()) g_sci->_gfxPorts->kernelSetPicWindow(picPortRect, picPortTop, picPortLeft, false); - } } s.skip(1, VER(9), VER(9)); // obsolete: used to be a flag indicating if we got sci11 or not |