[Scummvm-cvs-logs] SF.net SVN: scummvm:[47446] scummvm/trunk/engines/sci/engine/kgraphics.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sat Jan 23 00:02:33 CET 2010


Revision: 47446
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47446&view=rev
Author:   m_kiewitz
Date:     2010-01-22 23:02:33 +0000 (Fri, 22 Jan 2010)

Log Message:
-----------
SCI: dont swap coordinates on rects when both are "wrong", will fix button placement and gfx corruption when challenging jones (caused by duplicate buttons having lower right 0, 0) - function needs some more work

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-22 22:34:14 UTC (rev 47445)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2010-01-22 23:02:33 UTC (rev 47446)
@@ -185,6 +185,14 @@
 }
 
 Common::Rect kGraphCreateRect(int16 x, int16 y, int16 x1, int16 y1) {
+	// TODO: find out what to do when just one coordinate is wrong - if we should fix it the same way as in jones
+	//        needs some serious work
+	if ((x > x1) && (y > y1)) {
+		// We get this in jones when challenging jones -> upper left is right, lower right is 0, 0
+		//  If we "fix this" we will draw a box that isnt supposed to be there and also draw the button to the wrong
+		//  space
+		return Common::Rect(x, y, x, y);
+	}
 	if (x > x1) SWAP(x, x1);
 	if (y > y1) SWAP(y, y1);
 	return Common::Rect(x, y, x1, y1);


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