From: simon Date: Thu, 22 Feb 2007 18:59:15 +0000 (+0000) Subject: Part of r7310 completely changed the careful semantics of my X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/f96188ff220392d9e2fac751d20e087b1e8f3b9e Part of r7310 completely changed the careful semantics of my coordinate-rounding, causing picking up arrows from a dot anywhere other than at the centre of a square to break. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7311 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/galaxies.c b/galaxies.c index d59509e..58e33eb 100644 --- a/galaxies.c +++ b/galaxies.c @@ -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;