aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-07 19:02:11 +0000
committerMartin Kiewitz2009-10-07 19:02:11 +0000
commit51784e95808f751027a5ca011d10d421e86d992e (patch)
treef594da372ea6451e3eb692cc91aab9edd6f18faf
parent0c413530ac6d2c6731cdd15b44cf065a90757835 (diff)
downloadscummvm-rg350-51784e95808f751027a5ca011d10d421e86d992e.tar.gz
scummvm-rg350-51784e95808f751027a5ca011d10d421e86d992e.tar.bz2
scummvm-rg350-51784e95808f751027a5ca011d10d421e86d992e.zip
SCI/newgui: it seems that this fixes floodfill finally
svn-id: r44744
-rw-r--r--engines/sci/gui/gui_gfx.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index f6c5f62104..a3ff89825e 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -932,8 +932,8 @@ void SciGuiGfx::Pic_Fill(int16 x, int16 y, byte color, byte prio, byte control)
stack.push(p);
// parameters check
- if ((flag & 2 && prio == 0) || (flag & 3 && control == 0))
- return;
+ //if ((flag & 2 && prio == 0) || (flag & 3 && control == 0))
+ // return;
byte t_col = _screen->getVisual(p.x, p.y);
byte t_pri = _screen->getPriority(p.x, p.y);
@@ -962,14 +962,14 @@ void SciGuiGfx::Pic_Fill(int16 x, int16 y, byte color, byte prio, byte control)
w = p.x;
e = p.x;
// moving west and east pointers as long as there is a matching color to fill
- while (w > l && (fmatch = _screen->isFillMatch(w - 1, p.y, flag, t_col, t_pri, t_con)))
+ while (w > l && (fmatch == _screen->isFillMatch(w - 1, p.y, flag, t_col, t_pri, t_con)))
_screen->putPixel(--w, p.y, fmatch, color, prio, control);
- while (e < r && (fmatch = _screen->isFillMatch(e + 1, p.y, flag, t_col, t_pri, t_con)))
+ while (e < r && (fmatch == _screen->isFillMatch(e + 1, p.y, flag, t_col, t_pri, t_con)))
_screen->putPixel(++e, p.y, fmatch, color, prio, control);
// checking lines above and below for possible flood targets
a_set = b_set = 0;
while (w <= e) {
- if (p.y > t && _screen->isFillMatch(w, p.y - 1, flag, t_col, t_pri, t_con)) { // one line above
+ if (p.y > t && (fmatch == _screen->isFillMatch(w, p.y - 1, flag, t_col, t_pri, t_con))) { // one line above
if (a_set == 0) {
p1.x = w;
p1.y = p.y - 1;
@@ -979,7 +979,7 @@ void SciGuiGfx::Pic_Fill(int16 x, int16 y, byte color, byte prio, byte control)
} else
a_set = 0;
- if (p.y < b && _screen->isFillMatch(w, p.y + 1, flag, t_col, t_pri, t_con)) { // one line below
+ if (p.y < b && (fmatch == _screen->isFillMatch(w, p.y + 1, flag, t_col, t_pri, t_con))) { // one line below
if (b_set == 0) {
p1.x = w;
p1.y = p.y + 1;