aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cube.c4
-rw-r--r--fifteen.c4
-rw-r--r--midend.c5
-rw-r--r--net.c4
-rw-r--r--netslide.c4
-rw-r--r--nullgame.c4
-rw-r--r--pattern.c4
-rw-r--r--puzzles.h6
-rw-r--r--rect.c4
-rw-r--r--sixteen.c4
-rw-r--r--solo.c4
-rw-r--r--twiddle.c6
12 files changed, 28 insertions, 25 deletions
diff --git a/cube.c b/cube.c
index ddf5527..78d35c1 100644
--- a/cube.c
+++ b/cube.c
@@ -1526,13 +1526,13 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
return ROLLTIME;
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
return 0.0F;
}
diff --git a/fifteen.c b/fifteen.c
index 700c26c..5bcc87a 100644
--- a/fifteen.c
+++ b/fifteen.c
@@ -778,7 +778,7 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
if ((dir > 0 && newstate->just_used_solve) ||
(dir < 0 && oldstate->just_used_solve))
@@ -788,7 +788,7 @@ static float game_anim_length(game_state *oldstate,
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->used_solve && !newstate->used_solve)
diff --git a/midend.c b/midend.c
index 070f4f3..6ae10f9 100644
--- a/midend.c
+++ b/midend.c
@@ -212,7 +212,8 @@ static void midend_finish_move(midend_data *me)
flashtime = me->ourgame->flash_length(me->oldstate ? me->oldstate :
me->states[me->statepos-2].state,
me->states[me->statepos-1].state,
- me->oldstate ? me->dir : +1);
+ me->oldstate ? me->dir : +1,
+ me->ui);
if (flashtime > 0) {
me->flash_pos = 0.0F;
me->flash_time = flashtime;
@@ -333,7 +334,7 @@ static int midend_really_process_key(midend_data *me, int x, int y, int button)
} else {
anim_time = me->ourgame->anim_length(oldstate,
me->states[me->statepos-1].state,
- me->dir);
+ me->dir, me->ui);
}
me->oldstate = oldstate;
diff --git a/net.c b/net.c
index e4733f6..0df502f 100644
--- a/net.c
+++ b/net.c
@@ -2521,7 +2521,7 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
int last_rotate_dir;
@@ -2544,7 +2544,7 @@ static float game_anim_length(game_state *oldstate,
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
/*
* If the game has just been completed, we display a completion
diff --git a/netslide.c b/netslide.c
index a97ee07..5e98222 100644
--- a/netslide.c
+++ b/netslide.c
@@ -1683,7 +1683,7 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
/*
* Don't animate an auto-solve move.
@@ -1696,7 +1696,7 @@ static float game_anim_length(game_state *oldstate,
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
/*
* If the game has just been completed, we display a completion
diff --git a/nullgame.c b/nullgame.c
index da57bac..8d08530 100644
--- a/nullgame.c
+++ b/nullgame.c
@@ -199,13 +199,13 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir, game_ui *ui)
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir, game_ui *ui)
{
return 0.0F;
}
diff --git a/pattern.c b/pattern.c
index e09ed3d..0d5f8a8 100644
--- a/pattern.c
+++ b/pattern.c
@@ -1086,13 +1086,13 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->cheated && !newstate->cheated)
diff --git a/puzzles.h b/puzzles.h
index ec818d5..1dbe130 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -219,8 +219,10 @@ struct game {
void (*redraw)(frontend *fe, game_drawstate *ds, game_state *oldstate,
game_state *newstate, int dir, game_ui *ui, float anim_time,
float flash_time);
- float (*anim_length)(game_state *oldstate, game_state *newstate, int dir);
- float (*flash_length)(game_state *oldstate, game_state *newstate, int dir);
+ float (*anim_length)(game_state *oldstate, game_state *newstate, int dir,
+ game_ui *ui);
+ float (*flash_length)(game_state *oldstate, game_state *newstate, int dir,
+ game_ui *ui);
int (*wants_statusbar)(void);
};
diff --git a/rect.c b/rect.c
index 12d14b9..4a88d3b 100644
--- a/rect.c
+++ b/rect.c
@@ -2496,13 +2496,13 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->cheated && !newstate->cheated)
diff --git a/sixteen.c b/sixteen.c
index 2bfaadd..e7eb7bd 100644
--- a/sixteen.c
+++ b/sixteen.c
@@ -937,7 +937,7 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
if ((dir > 0 && newstate->just_used_solve) ||
(dir < 0 && oldstate->just_used_solve))
@@ -947,7 +947,7 @@ static float game_anim_length(game_state *oldstate,
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir, game_ui *ui)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->used_solve && !newstate->used_solve)
diff --git a/solo.c b/solo.c
index 6a964ea..3272a56 100644
--- a/solo.c
+++ b/solo.c
@@ -2121,13 +2121,13 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir, game_ui *ui)
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir, game_ui *ui)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->cheated && !newstate->cheated)
diff --git a/twiddle.c b/twiddle.c
index a681059..02b7982 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -942,7 +942,7 @@ static int highlight_colour(float angle)
}
static float game_anim_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir, game_ui *ui)
{
if ((dir > 0 && newstate->just_used_solve) ||
(dir < 0 && oldstate->just_used_solve))
@@ -952,7 +952,7 @@ static float game_anim_length(game_state *oldstate, game_state *newstate,
}
static float game_flash_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir, game_ui *ui)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->used_solve && !newstate->used_solve)
@@ -1012,7 +1012,7 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
*/
if (oldstate) {
float angle;
- float anim_max = game_anim_length(oldstate, state, dir);
+ float anim_max = game_anim_length(oldstate, state, dir, ui);
if (dir > 0) {
lastx = state->lastx;