aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-28 15:15:18 +0000
committerMartin Kiewitz2009-10-28 15:15:18 +0000
commitc3d75ced87cf7eaa1a46712348eea578dd5de73f (patch)
tree462d2acb52020c6083c8956ed6225e25798c293d /engines/sci
parente4df5071178b48e5ddd100f31193da6db16646b6 (diff)
downloadscummvm-rg350-c3d75ced87cf7eaa1a46712348eea578dd5de73f.tar.gz
scummvm-rg350-c3d75ced87cf7eaa1a46712348eea578dd5de73f.tar.bz2
scummvm-rg350-c3d75ced87cf7eaa1a46712348eea578dd5de73f.zip
SCI/newgui: another floodfill change, fixes sq3 this time (this is madness)
svn-id: r45474
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/gui/gui_picture.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/engines/sci/gui/gui_picture.cpp b/engines/sci/gui/gui_picture.cpp
index fd60994606..e654b4db7c 100644
--- a/engines/sci/gui/gui_picture.cpp
+++ b/engines/sci/gui/gui_picture.cpp
@@ -602,6 +602,23 @@ void SciGuiPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority,
byte searchPriority = _screen->getPriority(p.x, p.y);
byte searchControl = _screen->getControl(p.x, p.y);
+ // This logic was taken directly from sierra sci, floodfill will get aborted on various occations
+ if (screenMask & SCI_SCREEN_MASK_VISUAL) {
+ if (_resMan->isVGA()) {
+ if ((color == 255) || (searchColor != 0))
+ return;
+ } else {
+ if ((color == 15) || (searchColor != 15))
+ return;
+ }
+ } else if (screenMask & SCI_SCREEN_MASK_PRIORITY) {
+ if ((priority == 0) || (searchPriority != 0))
+ return;
+ } else if (screenMask & SCI_SCREEN_MASK_CONTROL) {
+ if ((control == 0) || (searchControl != 0))
+ return;
+ }
+
// Now remove screens, that already got the right color/priority/control
if ((screenMask & SCI_SCREEN_MASK_VISUAL) && (searchColor == color))
screenMask ^= SCI_SCREEN_MASK_VISUAL;
@@ -614,23 +631,11 @@ void SciGuiPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority,
if (!screenMask)
return;
- // This logic was taken directly from sierra sci, floodfill will get aborted on various occations
if (screenMask & SCI_SCREEN_MASK_VISUAL) {
- if (_resMan->isVGA()) {
- if ((color == 255) || (searchColor != 0))
- return;
- } else {
- if ((color == 15) || (searchColor != 15))
- return;
- }
matchMask = SCI_SCREEN_MASK_VISUAL;
} else if (screenMask & SCI_SCREEN_MASK_PRIORITY) {
- if ((priority == 0) || (searchPriority != 0))
- return;
matchMask = SCI_SCREEN_MASK_PRIORITY;
- } else if (screenMask & SCI_SCREEN_MASK_CONTROL) {
- if ((control == 0) || (searchControl != 0))
- return;
+ } else {
matchMask = SCI_SCREEN_MASK_CONTROL;
}