aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-05-11 13:03:17 +0000
committerSimon Tatham <anakin@pobox.com>2005-05-11 13:03:17 +0000
commit701cd045b36f9be1b0b8cfb74d9c191cb5813e98 (patch)
treebbffc76c5675e32bab7f786027afd3b55c5dfdc7
parent751d7a25244d2b62352b57e298c409a8a419bcb2 (diff)
downloadpuzzles-701cd045b36f9be1b0b8cfb74d9c191cb5813e98.zip
puzzles-701cd045b36f9be1b0b8cfb74d9c191cb5813e98.tar.gz
puzzles-701cd045b36f9be1b0b8cfb74d9c191cb5813e98.tar.bz2
puzzles-701cd045b36f9be1b0b8cfb74d9c191cb5813e98.tar.xz
Completion flashes were occasionally failing to be cleaned up if a
subsequent move animation began during them. Tracked this to overenthusiastic use of clip() and fixed it. [originally from svn r5766]
-rw-r--r--twiddle.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/twiddle.c b/twiddle.c
index 6c51cb7..7585239 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -693,6 +693,16 @@ static void draw_tile(frontend *fe, game_state *state, int x, int y,
int coords[8];
char str[40];
+ /*
+ * If we've been passed a rotation region but we're drawing a
+ * tile which is outside it, we must draw it normally. This can
+ * occur if we're cleaning up after a completion flash while a
+ * new move is also being made.
+ */
+ if (rot && (x < rot->cx || y < rot->cy ||
+ x >= rot->cx+rot->cw || y > rot->cy+rot->ch))
+ rot = NULL;
+
if (rot)
clip(fe, rot->cx, rot->cy, rot->cw, rot->ch);