~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Game completion detection was occasionally failing to spot a
[sgt/puzzles]
/
cube.c
diff --git
a/cube.c
b/cube.c
index
72ac527
..
d5221e6
100644
(file)
--- a/
cube.c
+++ b/
cube.c
@@
-1351,7
+1351,7
@@
void game_free_drawstate(game_drawstate *ds)
}
void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
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;
float animtime, float flashtime)
{
int i, j;
@@
-1366,13
+1366,15
@@
void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
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);
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.
*/
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;
t = oldstate;
oldstate = state;
state = t;
@@
-1510,12
+1512,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 ROLLTIME;
}
{
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;
}
{
return 0.0F;
}