[Scummvm-cvs-logs] scummvm master -> 8b3efba40f637a8f5e972ba793a6e59895356355

m-kiewitz m_kiewitz at users.sourceforge.net
Tue Dec 24 10:53:47 CET 2013


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:
8b3efba40f SCI: change floodfill fix for sq4


Commit: 8b3efba40f637a8f5e972ba793a6e59895356355
    https://github.com/scummvm/scummvm/commit/8b3efba40f637a8f5e972ba793a6e59895356355
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2013-12-24T01:39:42-08:00

Commit Message:
SCI: change floodfill fix for sq4

behaviour wasn't changed in SCI1, instead it seems that SSCI draws overlays to separate memory and then copies them over. Previous commit caused regression in qfg1vga (funny room)

Changed paths:
    engines/sci/graphics/picture.cpp



diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index d78b488..651eac7 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -919,7 +919,7 @@ void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, by
 	}
 
 	// This logic was taken directly from sierra sci, floodfill will get aborted on various occations
-	if (isEGA) {
+	if (!_addToFlag) {
 		if (screenMask & GFX_SCREEN_MASK_VISUAL) {
 			if ((color == _screen->getColorWhite()) || (searchColor != _screen->getColorWhite()))
 				return;
@@ -931,7 +931,9 @@ void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, by
 				return;
 		}
 	} else {
-		// VGA logic (SCI1 early w/o QfG2)
+		// When adding a picture onto another picture, don't abort in case current pixel was already drawn previously
+		//  It seems Sierra SCI unpacks such pictures separately and then copies them over
+		//  We draw directly to the screen.
 		//  fixes Space Quest 4 orange ship lifting off (bug #6446)
 		if (screenMask & GFX_SCREEN_MASK_VISUAL) {
 			if (color == _screen->getColorWhite())
@@ -982,6 +984,12 @@ void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, by
 			_screen->putPixel(--w, p.y, screenMask, color, priority, control);
 		while (e < r && (matchedMask = _screen->isFillMatch(e + 1, p.y, matchMask, searchColor, searchPriority, searchControl, isEGA)))
 			_screen->putPixel(++e, p.y, screenMask, color, priority, control);
+#if 0
+		// debug code for floodfill
+		_screen->copyToScreen();
+		g_system->updateScreen();
+		g_system->delayMillis(100);
+#endif
 		// checking lines above and below for possible flood targets
 		a_set = b_set = 0;
 		while (w <= e) {






More information about the Scummvm-git-logs mailing list