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]
This commit is contained in:
Simon Tatham
2005-05-11 13:03:17 +00:00
parent 751d7a2524
commit 701cd045b3

View File

@ -693,6 +693,16 @@ static void draw_tile(frontend *fe, game_state *state, int x, int y,
int coords[8]; int coords[8];
char str[40]; 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) if (rot)
clip(fe, rot->cx, rot->cy, rot->cw, rot->ch); clip(fe, rot->cx, rot->cy, rot->cw, rot->ch);