mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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.
This commit is contained in:
4
mines.c
4
mines.c
@ -34,8 +34,8 @@ enum {
|
|||||||
#else
|
#else
|
||||||
#define BORDER (TILE_SIZE * 3 / 2)
|
#define BORDER (TILE_SIZE * 3 / 2)
|
||||||
#endif
|
#endif
|
||||||
#define HIGHLIGHT_WIDTH (TILE_SIZE / 10)
|
#define HIGHLIGHT_WIDTH (TILE_SIZE / 10 ? TILE_SIZE / 10 : 1)
|
||||||
#define OUTER_HIGHLIGHT_WIDTH (BORDER / 10)
|
#define OUTER_HIGHLIGHT_WIDTH (BORDER / 10 ? BORDER / 10 : 1)
|
||||||
#define COORD(x) ( (x) * TILE_SIZE + BORDER )
|
#define COORD(x) ( (x) * TILE_SIZE + BORDER )
|
||||||
#define FROMCOORD(x) ( ((x) - BORDER + TILE_SIZE) / TILE_SIZE - 1 )
|
#define FROMCOORD(x) ( ((x) - BORDER + TILE_SIZE) / TILE_SIZE - 1 )
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user