After discussion with Simon, the game redraw functions are now passed a new

argument `dir' which tells them whether this redraw is due to an undo, rather
than have them second-guess it from game state.
Note that none of the actual games yet take advantage of this; so it hasn't
been tested in anger (although it has been inspected by debugging).

[originally from svn r4469]
This commit is contained in:
Jacob Nevins
2004-08-16 16:29:54 +00:00
parent f1e8a586b5
commit daac529a9e
10 changed files with 43 additions and 34 deletions

View File

@ -553,7 +553,7 @@ static void draw_tile(frontend *fe, game_state *state, int x, int y,
}
void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
game_state *state, game_ui *ui,
game_state *state, int dir, game_ui *ui,
float animtime, float flashtime)
{
int i, pass, bgcolour;
@ -702,12 +702,12 @@ void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
}
float game_anim_length(game_state *oldstate, game_state *newstate)
float game_anim_length(game_state *oldstate, game_state *newstate, int dir)
{
return ANIM_TIME;
}
float game_flash_length(game_state *oldstate, game_state *newstate)
float game_flash_length(game_state *oldstate, game_state *newstate, int dir)
{
if (!oldstate->completed && newstate->completed)
return 2 * FLASH_FRAME;