mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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]
This commit is contained in:
6
pearl.c
6
pearl.c
@ -1640,8 +1640,6 @@ static void check_completion(game_state *state, int mark)
|
|||||||
if (!had_error && loopclass != -1) {
|
if (!had_error && loopclass != -1) {
|
||||||
state->completed = TRUE;
|
state->completed = TRUE;
|
||||||
state->loop_length = dsfsize[loopclass];
|
state->loop_length = dsfsize[loopclass];
|
||||||
} else {
|
|
||||||
state->completed = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sfree(dsf);
|
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,
|
static float game_flash_length(game_state *oldstate, game_state *newstate,
|
||||||
int dir, game_ui *ui)
|
int dir, game_ui *ui)
|
||||||
{
|
{
|
||||||
if (!oldstate->completed &&
|
if (!oldstate->completed && newstate->completed &&
|
||||||
newstate->completed && !newstate->used_solve)
|
!oldstate->used_solve && !newstate->used_solve)
|
||||||
return FLASH_TIME;
|
return FLASH_TIME;
|
||||||
else
|
else
|
||||||
return 0.0F;
|
return 0.0F;
|
||||||
|
Reference in New Issue
Block a user