[Scummvm-cvs-logs] SF.net SVN: scummvm:[44430] scummvm/trunk/engines/draci

spalek at users.sourceforge.net spalek at users.sourceforge.net
Mon Sep 28 01:57:40 CEST 2009


Revision: 44430
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44430&view=rev
Author:   spalek
Date:     2009-09-27 23:57:39 +0000 (Sun, 27 Sep 2009)

Log Message:
-----------
Fix rounding coordinates at the edge of the screen.

Modified Paths:
--------------
    scummvm/trunk/engines/draci/game.cpp
    scummvm/trunk/engines/draci/surface.cpp

Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp	2009-09-27 23:06:39 UTC (rev 44429)
+++ scummvm/trunk/engines/draci/game.cpp	2009-09-27 23:57:39 UTC (rev 44430)
@@ -1041,7 +1041,9 @@
 	// click but sprites are drawn from their top-left corner so we subtract
 	// the current height of the dragon's sprite
 	y -= (int)(scaleY * height);
-	//x -= (int)(scaleX * width) / 2;
+	x -= (int)(scaleX * width) / 2;
+	if (x < 0)
+		x = 0;
 	anim->setRelative(x, y);
 
 	// Play the animation

Modified: scummvm/trunk/engines/draci/surface.cpp
===================================================================
--- scummvm/trunk/engines/draci/surface.cpp	2009-09-27 23:06:39 UTC (rev 44429)
+++ scummvm/trunk/engines/draci/surface.cpp	2009-09-27 23:57:39 UTC (rev 44430)
@@ -138,9 +138,6 @@
 
 	int newX = x - width / 2;
 
-	if (newX < 0)
-		newX = 0;
-
 	if (newX + width >= (uint)w - 1)
 		newX = (w - 1) - width;
 
@@ -162,9 +159,6 @@
 	
 	int newY = y - height / 2;
 	
-	if (newY < 0)
-		newY = 0;
-
 	if (newY + height >= (uint)h - 1)
 		newY = (h - 1) - height;
 


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