X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=range.c;h=4dd39b97cd499f62cbd53c0d636cb26713b92d09;hb=db313b3948d27244dd7c34c2609c66d6204d8931;hp=f2ea1b77f5124b1bfdc31c5313af220ed3237fd7;hpb=d5f7c4f871200f9808e284408e28defaa8afbcd3;p=sgt-puzzles.git diff --git a/range.c b/range.c index f2ea1b7..4dd39b9 100644 --- a/range.c +++ b/range.c @@ -1159,7 +1159,8 @@ static int game_can_format_as_text_now(const game_params *params) static char *game_text_format(const game_state *state) { - int cellsize, r, c, i, w_string, h_string, n_string; + int r, c, i, w_string, h_string, n_string; + char cellsize; char *ret, *buf, *gridline; int const w = state->params.w, h = state->params.h; @@ -1694,8 +1695,6 @@ static void game_redraw(drawing *dr, game_drawstate *ds, if (!ds->started) { ds->started = TRUE; draw_rect(dr, 0, 0, wpx, hpx, COL_BACKGROUND); - draw_rect(dr, BORDER-1, BORDER-1, - ds->tilesize*w+2, ds->tilesize*h+2, COL_GRID); draw_update(dr, 0, 0, wpx, hpx); } @@ -1727,17 +1726,15 @@ static void draw_cell(drawing *draw, game_drawstate *ds, int r, int c, cell.flash || cell.cursor ? COL_LOWLIGHT : COL_BACKGROUND); - draw_rect (draw, x, y, ts, ts, colour); - draw_rect_outline(draw, x, y, ts, ts, COL_GRID); + draw_rect_outline(draw, x, y, ts + 1, ts + 1, COL_GRID); + draw_rect (draw, x + 1, y + 1, ts - 1, ts - 1, colour); + if (cell.error) + draw_rect_outline(draw, x + 1, y + 1, ts - 1, ts - 1, COL_ERROR); switch (cell.value) { case WHITE: draw_rect(draw, tx - dotsz / 2, ty - dotsz / 2, dotsz, dotsz, cell.error ? COL_ERROR : COL_USER); - case BLACK: break; - case EMPTY: - if (cell.error) - draw_circle(draw, tx, ty, dotsz / 2, COL_ERROR, COL_GRID); - break; + case BLACK: case EMPTY: break; default: { int const colour = (cell.error ? COL_ERROR : COL_GRID); @@ -1748,7 +1745,7 @@ static void draw_cell(drawing *draw, game_drawstate *ds, int r, int c, } } - draw_update(draw, x, y, ts, ts); + draw_update(draw, x, y, ts + 1, ts + 1); } static int game_timing_state(const game_state *state, game_ui *ui) @@ -1801,7 +1798,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize) struct game const thegame = { "Range", "games.range", "range", default_params, - game_fetch_preset, + game_fetch_preset, NULL, decode_params, encode_params, free_params,