[Scummvm-cvs-logs] SF.net SVN: scummvm:[44744] scummvm/trunk/engines/sci/gui/gui_gfx.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Oct 7 21:02:11 CEST 2009


Revision: 44744
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44744&view=rev
Author:   m_kiewitz
Date:     2009-10-07 19:02:11 +0000 (Wed, 07 Oct 2009)

Log Message:
-----------
SCI/newgui: it seems that this fixes floodfill finally

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_gfx.cpp

Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-07 18:09:06 UTC (rev 44743)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-07 19:02:11 UTC (rev 44744)
@@ -932,8 +932,8 @@
 	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 @@
 		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 @@
 			} 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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list