aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-03-04 00:27:28 +0100
committerWillem Jan Palenstijn2011-03-04 00:28:23 +0100
commit78c00744c21b95e98f022f037dbb38591112a104 (patch)
tree612807383fa3e730bf79aeceb09df287ebcec106 /engines/sci/graphics
parent1bdc6db980ffb72c4466d3b1a37f631f78ef59b9 (diff)
downloadscummvm-rg350-78c00744c21b95e98f022f037dbb38591112a104.tar.gz
scummvm-rg350-78c00744c21b95e98f022f037dbb38591112a104.tar.bz2
scummvm-rg350-78c00744c21b95e98f022f037dbb38591112a104.zip
SCI: Add fixme for EGA flood fill bug (#3078365)
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/screen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index b019853a2b..ef2bffce76 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -357,6 +357,13 @@ byte GfxScreen::isFillMatch(int16 x, int16 y, byte screenMask, byte t_color, byt
int offset = y * _width + x;
byte match = 0;
+ // FIXME:
+ // This does not behave properly in EGA games where a pixel in the
+ // framebuffer is only 4 bits. We store a full byte per pixel to allow
+ // undithering, but when comparing pixels for flood-fill purposes, we
+ // should only compare the visible color of a pixel (with dithering
+ // enabled). See bug #3078365. Also see IS_BOUNDARY in FreeSCI's picfill.
+
if ((screenMask & GFX_SCREEN_MASK_VISUAL) && *(_visualScreen + offset) == t_color)
match |= GFX_SCREEN_MASK_VISUAL;
if ((screenMask & GFX_SCREEN_MASK_PRIORITY) && *(_priorityScreen + offset) == t_pri)