aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-22 21:38:01 +0100
committerMartin Kiewitz2016-02-22 21:38:01 +0100
commit480035d6aaa6f70f30190c8dc940ecf7ae33baba (patch)
tree7bc49af1a070547fdb9e3025a0b2e2c12a995b2e /engines
parent23bc6bb8462f995b1987612b225b5731a85e913e (diff)
downloadscummvm-rg350-480035d6aaa6f70f30190c8dc940ecf7ae33baba.tar.gz
scummvm-rg350-480035d6aaa6f70f30190c8dc940ecf7ae33baba.tar.bz2
scummvm-rg350-480035d6aaa6f70f30190c8dc940ecf7ae33baba.zip
SCI32: Do not clear screen when restoring for SCI32
Fixes graphical issues, when restoring saved games. SCI32 did not clear the screen and also did not even redraw the screen on restore. It only redraws elements that have changed. Behavior verified using TSR in DOSBox (see comments). Also added comment about clearing the screen for SCI16.
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/savegame.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 851e4fc07e..18cee3321f 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1063,8 +1063,19 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
if (g_sci->_gfxPorts)
g_sci->_gfxPorts->reset();
// clear screen
- if (g_sci->_gfxScreen)
- g_sci->_gfxScreen->clearForRestoreGame();
+ if (getSciVersion() <= SCI_VERSION_1_1) {
+ // Only do clearing the screen for SCI16
+ // Both SCI16 + SCI32 did not clear the screen.
+ // We basically do it for SCI16, because of KQ6.
+ // When hires portraits are shown and the user restores during that time, the portraits
+ // wouldn't get fully removed. In original SCI, the user wasn't able to restore during that time,
+ // so this is basically a workaround, so that ScummVM features work properly.
+ // For SCI32, behavior was verified in DOSBox, that SCI32 does not clear and also not redraw the screen.
+ // It only redraws elements that have changed in comparison to the state before the restore.
+ // If we cleared the screen for SCI32, we would have issues because of this behavior.
+ if (g_sci->_gfxScreen)
+ g_sci->_gfxScreen->clearForRestoreGame();
+ }
#ifdef ENABLE_SCI32
// 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