diff options
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index fcf951e4f2..1b56e667bf 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -1066,10 +1066,12 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { if (g_sci->_gfxScreen) g_sci->_gfxScreen->clearForRestoreGame(); #ifdef ENABLE_SCI32 - // Also clear any SCI32 planes/screen items currently showing so they - // don't show up after the load. + // Delete current planes/elements of actively loaded VM, only when our ScummVM dialogs are patched in + // We MUST NOT delete all planes/screen items. At least Space Quest 6 has a few in memory like for example + // the options plane, which are not re-added and are in memory all the time right from the start of the + // game. Sierra SCI32 did not clear planes, only scripts cleared the ones inside planes::elements. if (getSciVersion() >= SCI_VERSION_2) - g_sci->_gfxFrameout->clear(); + g_sci->_gfxFrameout->syncWithScripts(false); #endif s->reset(true); @@ -1094,6 +1096,12 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { if (g_sci->_gfxPorts) g_sci->_gfxPorts->saveLoadWithSerializer(ser); +#ifdef ENABLE_SCI32 + // Add current planes/screen elements of freshly loaded VM, only when our ScummVM dialogs are patched in + if (getSciVersion() >= SCI_VERSION_2) + g_sci->_gfxFrameout->syncWithScripts(true); +#endif + Vocabulary *voc = g_sci->getVocabulary(); if (ser.getVersion() >= 30 && voc) voc->saveLoadWithSerializer(ser); |