aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-25 18:04:39 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-11-25 18:04:39 +0000
commitd90c0a9edb14519ccce41a25fec5c1f60bfd152d (patch)
tree45921fdb94b4bec186da7bca8eab018985ad9578
parent0b36c01639c4b2f52e49c086b6d645883fbea397 (diff)
downloadpuzzles-d90c0a9edb14519ccce41a25fec5c1f60bfd152d.zip
puzzles-d90c0a9edb14519ccce41a25fec5c1f60bfd152d.tar.gz
puzzles-d90c0a9edb14519ccce41a25fec5c1f60bfd152d.tar.bz2
puzzles-d90c0a9edb14519ccce41a25fec5c1f60bfd152d.tar.xz
flip: Set a lower bound on the size of little diagrams
This ensures that they don't vanish entirely and small tile sizes.
-rw-r--r--flip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flip.c b/flip.c
index 010fe61..ddc2294 100644
--- a/flip.c
+++ b/flip.c
@@ -1159,7 +1159,7 @@ static void draw_tile(drawing *dr, game_drawstate *ds, const game_state *state,
for (j = 0; j < w; j++)
if (state->matrix->matrix[(y*w+x)*wh + i*w+j]) {
int ox = j - x, oy = i - y;
- int td = TILE_SIZE / 16;
+ int td = TILE_SIZE / 16 ? TILE_SIZE / 16 : 1;
int cx = (bx + TILE_SIZE/2) + (2 * ox - 1) * td;
int cy = (by + TILE_SIZE/2) + (2 * oy - 1) * td;
if (ox == 0 && oy == 0)