aboutsummaryrefslogtreecommitdiff
path: root/samegame.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-08-05 17:17:23 +0000
committerSimon Tatham <anakin@pobox.com>2005-08-05 17:17:23 +0000
commitc321a88408c4541160c66151210bd048761ae392 (patch)
treeb2afc51595f3835356014d080c2d9b988822ac76 /samegame.c
parent56e01e54fad38cf1470b0994ea2cc70c714ced5d (diff)
downloadpuzzles-c321a88408c4541160c66151210bd048761ae392.zip
puzzles-c321a88408c4541160c66151210bd048761ae392.tar.gz
puzzles-c321a88408c4541160c66151210bd048761ae392.tar.bz2
puzzles-c321a88408c4541160c66151210bd048761ae392.tar.xz
Cleanups to completion flashes: all four of these games used to
redraw the whole window _every_ time game_redraw() was called during a flash. Now they only redraw the whole window every time the background colour actually changes. Thanks to James H for much of the work. [originally from svn r6166]
Diffstat (limited to 'samegame.c')
-rw-r--r--samegame.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samegame.c b/samegame.c
index d8c58ac..2331799 100644
--- a/samegame.c
+++ b/samegame.c
@@ -1432,6 +1432,7 @@ static game_drawstate *game_new_drawstate(game_state *state)
ds->started = 0;
ds->tileinner = ds->tilegap = 0; /* not decided yet */
ds->tiles = snewn(state->n, int);
+ ds->bgcolour = -1;
for (i = 0; i < state->n; i++)
ds->tiles[i] = -1;
@@ -1564,7 +1565,6 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
* no animation); when we do we might well want to be looking
* at the tile colours from oldstate, not state. */
if ((oldstate && COL(oldstate,x,y) != col) ||
- (flashtime > 0.0) ||
(ds->bgcolour != bgcolour) ||
(tile != ds->tiles[i])) {
tile_redraw(fe, ds, x, y, dright, dbelow, tile, bgcolour);