chiark / gitweb /
Part of r7310 completely changed the careful semantics of my
authorSimon Tatham <anakin@pobox.com>
Thu, 22 Feb 2007 18:59:15 +0000 (18:59 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 22 Feb 2007 18:59:15 +0000 (18:59 +0000)
coordinate-rounding, causing picking up arrows from a dot anywhere
other than at the centre of a square to break.

[originally from svn r7311]
[r7310 == a428c5899de86897fe4e92fa6585b3c3908ce2ad]

galaxies.c

index d59509e15a4c3a02c3eb5892c42e08ce9c8af3d3..58e33ebd138c1b5d12976d874a37eb8b6835776b 100644 (file)
@@ -2225,8 +2225,8 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
     } else if (button == RIGHT_BUTTON) {
         int px1, py1;
 
-        px = 2*(FROMCOORD( (int)((float)x + 0.5) ));
-        py = 2*(FROMCOORD( (int)((float)y + 0.5) ));
+        px = 2*(int)(FROMCOORD((float)x) + 0.5);
+        py = 2*(int)(FROMCOORD((float)y) + 0.5);
 
         dot = NULL;