[Scummvm-cvs-logs] SF.net SVN: scummvm:[39695] scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Mar 26 00:14:08 CET 2009


Revision: 39695
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39695&view=rev
Author:   thebluegr
Date:     2009-03-25 23:14:08 +0000 (Wed, 25 Mar 2009)

Log Message:
-----------
Changed the primitive equality check to not use Common::Rect, as the two primitives being compared might not actually be rectangles (e.g. they may be lines, in which case the "width" and "height" might be negative)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-03-25 22:37:08 UTC (rev 39694)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-03-25 23:14:08 UTC (rev 39695)
@@ -496,7 +496,10 @@
 
 	oprim = (gfxw_primitive_t *) other;
 
-	if (!toCommonRect(wprim->bounds).equals(toCommonRect(oprim->bounds)))
+	// Check if the two primitives are equal (note: the primitives aren't always rectangles, so
+	// the "width" and the "height" here could be negative)
+	if (wprim->bounds.x != oprim->bounds.x || wprim->bounds.y != oprim->bounds.y ||
+		wprim->bounds.width != oprim->bounds.width || wprim->bounds.height != oprim->bounds.height)
 		return 0;
 
 	if (!_color_equals(wprim->color, oprim->color))


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