aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2013-12-23 23:41:35 +0100
committerMartin Kiewitz2013-12-23 23:41:35 +0100
commitc2a2a760e9f634b7e24b8fe66d75054d80d1f435 (patch)
tree1814d86c5e45a94d3d6fd643008a367f34b695d9
parent4eec1a491c31ff0c98457d5f248b583b52964b38 (diff)
downloadscummvm-rg350-c2a2a760e9f634b7e24b8fe66d75054d80d1f435.tar.gz
scummvm-rg350-c2a2a760e9f634b7e24b8fe66d75054d80d1f435.tar.bz2
scummvm-rg350-c2a2a760e9f634b7e24b8fe66d75054d80d1f435.zip
SCI: change floodfill to fix sq4 ship taking off
fixes bug #6446
-rw-r--r--engines/sci/graphics/picture.cpp33
1 files changed, 24 insertions, 9 deletions
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 8ad4f535f9..d78b48884d 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -919,15 +919,30 @@ 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 (screenMask & GFX_SCREEN_MASK_VISUAL) {
- if ((color == _screen->getColorWhite()) || (searchColor != _screen->getColorWhite()))
- return;
- } else if (screenMask & GFX_SCREEN_MASK_PRIORITY) {
- if ((priority == 0) || (searchPriority != 0))
- return;
- } else if (screenMask & GFX_SCREEN_MASK_CONTROL) {
- if ((control == 0) || (searchControl != 0))
- return;
+ if (isEGA) {
+ if (screenMask & GFX_SCREEN_MASK_VISUAL) {
+ if ((color == _screen->getColorWhite()) || (searchColor != _screen->getColorWhite()))
+ return;
+ } else if (screenMask & GFX_SCREEN_MASK_PRIORITY) {
+ if ((priority == 0) || (searchPriority != 0))
+ return;
+ } else if (screenMask & GFX_SCREEN_MASK_CONTROL) {
+ if ((control == 0) || (searchControl != 0))
+ return;
+ }
+ } else {
+ // VGA logic (SCI1 early w/o QfG2)
+ // fixes Space Quest 4 orange ship lifting off (bug #6446)
+ if (screenMask & GFX_SCREEN_MASK_VISUAL) {
+ if (color == _screen->getColorWhite())
+ return;
+ } else if (screenMask & GFX_SCREEN_MASK_PRIORITY) {
+ if (priority == 0)
+ return;
+ } else if (screenMask & GFX_SCREEN_MASK_CONTROL) {
+ if (control == 0)
+ return;
+ }
}
// Now remove screens, that already got the right color/priority/control