[Scummvm-cvs-logs] scummvm master -> 480035d6aaa6f70f30190c8dc940ecf7ae33baba

m-kiewitz m_kiewitz at users.sourceforge.net
Mon Feb 22 21:38:47 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
480035d6aa SCI32: Do not clear screen when restoring for SCI32


Commit: 480035d6aaa6f70f30190c8dc940ecf7ae33baba
    https://github.com/scummvm/scummvm/commit/480035d6aaa6f70f30190c8dc940ecf7ae33baba
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-22T21:38:01+01:00

Commit Message:
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.

Changed paths:
    engines/sci/engine/savegame.cpp



diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 851e4fc..18cee33 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






More information about the Scummvm-git-logs mailing list