diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-25 13:29:04 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-25 13:29:04 +0000 |
| commit | 0b36c01639c4b2f52e49c086b6d645883fbea397 (patch) | |
| tree | ffd1a0e4b10bf55b23ad57a3cb2a8337691d2b62 /mines.c | |
| parent | 5a2ea91cad4dd34fb766498a032294eb3c7a09b2 (diff) | |
| download | puzzles-0b36c01639c4b2f52e49c086b6d645883fbea397.zip puzzles-0b36c01639c4b2f52e49c086b6d645883fbea397.tar.gz puzzles-0b36c01639c4b2f52e49c086b6d645883fbea397.tar.bz2 puzzles-0b36c01639c4b2f52e49c086b6d645883fbea397.tar.xz | |
mines: Ensure highlights don't vanish at small tile sizes
The highlights for covered squares now have a minimum width of 1 pixel,
which means that Mines is comfortably playabale down to about 8 pixel
tilesize, below which the numbers become unreadable.
Diffstat (limited to 'mines.c')
| -rw-r--r-- | mines.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -34,8 +34,8 @@ enum { #else #define BORDER (TILE_SIZE * 3 / 2) #endif -#define HIGHLIGHT_WIDTH (TILE_SIZE / 10) -#define OUTER_HIGHLIGHT_WIDTH (BORDER / 10) +#define HIGHLIGHT_WIDTH (TILE_SIZE / 10 ? TILE_SIZE / 10 : 1) +#define OUTER_HIGHLIGHT_WIDTH (BORDER / 10 ? BORDER / 10 : 1) #define COORD(x) ( (x) * TILE_SIZE + BORDER ) #define FROMCOORD(x) ( ((x) - BORDER + TILE_SIZE) / TILE_SIZE - 1 ) |