diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-07-29 16:45:52 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-07-29 16:45:52 +0000 |
| commit | e37c2c0ad2811eadbf8e6f470cd719c5c21142fa (patch) | |
| tree | 4b9e96b39973c65f2f107ba65fe5160457dc866b /blackbox.c | |
| parent | 14ad9d832eb8970770a893a65caa095829d5b9b3 (diff) | |
| download | puzzles-e37c2c0ad2811eadbf8e6f470cd719c5c21142fa.zip puzzles-e37c2c0ad2811eadbf8e6f470cd719c5c21142fa.tar.gz puzzles-e37c2c0ad2811eadbf8e6f470cd719c5c21142fa.tar.bz2 puzzles-e37c2c0ad2811eadbf8e6f470cd719c5c21142fa.tar.xz | |
One more fix from Ben H. Also switched round the arena colour
selection in the redraw function, so that locked squares are no
longer displayed once the game is at an end. (It looked untidy and
disorienting for lighter-coloured locked squares to suddenly become
darker when the box was opened. You can still flip back and forth to
your previous game state using undo/redo if you want to compare the
results against your lock pattern.)
[originally from svn r6150]
Diffstat (limited to 'blackbox.c')
| -rw-r--r-- | blackbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -273,7 +273,7 @@ static char *validate_desc(game_params *params, char *desc) /* check each ball will fit on that grid */ for (i = 0; i < nballs; i++) { int x = bmp[(i+1)*2 + 0], y = bmp[(i+1)*2 + 1]; - if (x < 0 || y < 0 || x > params->w || y > params->h) + if (x < 0 || y < 0 || x >= params->w || y >= params->h) goto done; } ret = NULL; @@ -994,8 +994,8 @@ static void draw_arena_tile(frontend *fe, game_state *gs, game_drawstate *ds, if (gs_tile != ds_tile || gs->reveal != ds->reveal || force) { int bcol, bg; - bg = (gs_tile & BALL_LOCK) ? COL_LOCK : - gs->reveal ? COL_BACKGROUND : COL_COVER; + bg = (gs->reveal ? COL_BACKGROUND : + (gs_tile & BALL_LOCK) ? COL_LOCK : COL_COVER); draw_rect(fe, dx, dy, TILE_SIZE, TILE_SIZE, bg); draw_rect_outline(fe, dx, dy, TILE_SIZE, TILE_SIZE, COL_GRID); |