}
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, j;
draw_rect(fe, 0, 0, (int)((bb.r-bb.l+2.0F) * GRID_SCALE),
(int)((bb.d-bb.u+2.0F) * GRID_SCALE), COL_BACKGROUND);
- if (oldstate && oldstate->movecount > state->movecount) {
+ if (dir < 0) {
game_state *t;
/*
* This is an Undo. So reverse the order of the states, and
* run the roll timer backwards.
*/
+ assert(oldstate);
+
t = oldstate;
oldstate = state;
state = t;
}
}
-float game_anim_length(game_state *oldstate, game_state *newstate)
+float game_anim_length(game_state *oldstate, game_state *newstate, int dir)
{
return ROLLTIME;
}
-float game_flash_length(game_state *oldstate, game_state *newstate)
+float game_flash_length(game_state *oldstate, game_state *newstate, int dir)
{
return 0.0F;
}