diff options
| author | Simon Tatham <anakin@pobox.com> | 2013-01-19 18:56:06 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2013-01-19 18:56:06 +0000 |
| commit | 8a7dad6d2d3bca56b2473bed6b70e184cf7dced5 (patch) | |
| tree | ee37985dae4cbdcd953e8d167e8d2dda9409e366 /pearl.c | |
| parent | 6b6442b16c5de9f5f9479b736bf865a4236047cb (diff) | |
| download | puzzles-8a7dad6d2d3bca56b2473bed6b70e184cf7dced5.zip puzzles-8a7dad6d2d3bca56b2473bed6b70e184cf7dced5.tar.gz puzzles-8a7dad6d2d3bca56b2473bed6b70e184cf7dced5.tar.bz2 puzzles-8a7dad6d2d3bca56b2473bed6b70e184cf7dced5.tar.xz | |
Bring Pearl's game-completion handling in line with my usual practice:
the 'completed' flag is not reset if you make a new move transforming
a solved game into an unsolved state, so the game won't flash again if
you manually erase and redraw a line segment (though it still will if
you undo and redo past the first solved state in the undo history).
[originally from svn r9750]
Diffstat (limited to 'pearl.c')
| -rw-r--r-- | pearl.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1640,8 +1640,6 @@ static void check_completion(game_state *state, int mark) if (!had_error && loopclass != -1) { state->completed = TRUE; state->loop_length = dsfsize[loopclass]; - } else { - state->completed = FALSE; } sfree(dsf); @@ -2450,8 +2448,8 @@ static float game_anim_length(game_state *oldstate, game_state *newstate, static float game_flash_length(game_state *oldstate, game_state *newstate, int dir, game_ui *ui) { - if (!oldstate->completed && - newstate->completed && !newstate->used_solve) + if (!oldstate->completed && newstate->completed && + !oldstate->used_solve && !newstate->used_solve) return FLASH_TIME; else return 0.0F; |