diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-09-30 19:50:46 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2017-09-30 22:20:27 +0100 |
| commit | 03d464dc658a2dc7048b62c1058aba78125b82d3 (patch) | |
| tree | be4d1bfcde1d9f8b1d3f81dcc40c0c57129757f1 | |
| parent | f03e8d30a038f740ea0bfe21474de5df69093893 (diff) | |
| download | puzzles-03d464dc658a2dc7048b62c1058aba78125b82d3.zip puzzles-03d464dc658a2dc7048b62c1058aba78125b82d3.tar.gz puzzles-03d464dc658a2dc7048b62c1058aba78125b82d3.tar.bz2 puzzles-03d464dc658a2dc7048b62c1058aba78125b82d3.tar.xz | |
tracks.c: draw_clue: Introduce bg parameter
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
| -rw-r--r-- | tracks.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -2417,7 +2417,7 @@ static void draw_square(drawing *dr, game_drawstate *ds, draw_update(dr, ox, oy, TILE_SIZE, TILE_SIZE); } -static void draw_clue(drawing *dr, game_drawstate *ds, int w, int clue, int i, int col) +static void draw_clue(drawing *dr, game_drawstate *ds, int w, int clue, int i, int col, int bg) { int cx, cy, tsz = TILE_SIZE/2; char buf[20]; @@ -2432,7 +2432,7 @@ static void draw_clue(drawing *dr, game_drawstate *ds, int w, int clue, int i, i draw_rect(dr, cx - tsz + GRID_LINE_TL, cy - tsz + GRID_LINE_TL, TILE_SIZE - GRID_LINE_ALL, TILE_SIZE - GRID_LINE_ALL, - COL_BACKGROUND); + bg); sprintf(buf, "%d", clue); draw_text(dr, cx, cy, FONT_VARIABLE, tsz, ALIGN_VCENTRE|ALIGN_HCENTRE, col, buf); @@ -2518,7 +2518,8 @@ static void game_redraw(drawing *dr, game_drawstate *ds, const game_state *oldst if (force || (state->num_errors[i] != ds->num_errors[i])) { ds->num_errors[i] = state->num_errors[i]; draw_clue(dr, ds, w, state->numbers->numbers[i], i, - ds->num_errors[i] ? COL_ERROR : COL_CLUE); + ds->num_errors[i] ? COL_ERROR : COL_CLUE, + COL_BACKGROUND); } } @@ -2608,7 +2609,8 @@ static void game_print(drawing *dr, const game_state *state, int tilesize) /* clue numbers, and loop ends */ for (i = 0; i < w+h; i++) - draw_clue(dr, ds, w, state->numbers->numbers[i], i, black); + draw_clue(dr, ds, w, state->numbers->numbers[i], i, + black, COL_BACKGROUND); draw_loop_ends(dr, ds, state, black); /* clue tracks / solution */ |