From fe65b2efbd4696c98b9b5f9ef5a3bac2715b12b7 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 4 Sep 2005 12:46:19 +0000 Subject: [PATCH] Patch from Ton van Overbeek to correct Loopy's misplaced line ends at small tile sizes. [originally from svn r6270] --- loopy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/loopy.c b/loopy.c index 4fa56e1..f4d3e6a 100644 --- a/loopy.c +++ b/loopy.c @@ -2459,7 +2459,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate, #define CLEAR_VL(i, j) do { \ draw_rect(dr, \ BORDER + i * TILE_SIZE - CROSS_SIZE, \ - BORDER + j * TILE_SIZE + LINEWIDTH/2, \ + BORDER + j * TILE_SIZE + LINEWIDTH - LINEWIDTH/2, \ CROSS_SIZE * 2, \ TILE_SIZE - LINEWIDTH, \ COL_BACKGROUND); \ @@ -2472,7 +2472,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate, #define CLEAR_HL(i, j) do { \ draw_rect(dr, \ - BORDER + i * TILE_SIZE + LINEWIDTH/2, \ + BORDER + i * TILE_SIZE + LINEWIDTH - LINEWIDTH/2, \ BORDER + j * TILE_SIZE - CROSS_SIZE, \ TILE_SIZE - LINEWIDTH, \ CROSS_SIZE * 2, \ @@ -2499,7 +2499,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate, CLEAR_VL(i, j); draw_rect(dr, BORDER + i * TILE_SIZE - LINEWIDTH/2, - BORDER + j * TILE_SIZE + LINEWIDTH/2, + BORDER + j * TILE_SIZE + LINEWIDTH - LINEWIDTH/2, LINEWIDTH, TILE_SIZE - LINEWIDTH, line_colour); } @@ -2540,7 +2540,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate, flash_changed) { CLEAR_HL(i, j); draw_rect(dr, - BORDER + i * TILE_SIZE + LINEWIDTH/2, + BORDER + i * TILE_SIZE + LINEWIDTH - LINEWIDTH/2, BORDER + j * TILE_SIZE - LINEWIDTH/2, TILE_SIZE - LINEWIDTH, LINEWIDTH, line_colour);