mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Same Game: scale TILE_GAP with tilesize
TILE_GAP represents the gap between the coloured parts of adjacent different-coloured tiles. Rather than a fixed 2 pixels, it's now 1/16 of the tilesize (rounded to nearest). This looks the same at the default tilesize of 32, but behaves better with larger or smaller tilesizes. At tilesizes below 8, the gap disappears altogether, but that seems appropriate: at 7 pixels there's not much space for the inner and outer squares and the cursor, and those are all more important than the gap..
This commit is contained in:
@ -1370,7 +1370,7 @@ static game_state *execute_move(const game_state *from, const char *move)
|
||||
static void game_set_size(drawing *dr, game_drawstate *ds,
|
||||
const game_params *params, int tilesize)
|
||||
{
|
||||
ds->tilegap = 2;
|
||||
ds->tilegap = (tilesize + 8) / 16;
|
||||
ds->tileinner = tilesize - ds->tilegap;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user