int orientable;
int *grid;
int completed;
- int just_used_solve; /* used to suppress undo animation */
int used_solve; /* used to suppress completion flash */
int movecount, movetarget;
int lastx, lasty, lastr; /* coordinates of last rotation */
state->n = n;
state->orientable = params->orientable;
state->completed = 0;
- state->used_solve = state->just_used_solve = FALSE;
+ state->used_solve = FALSE;
state->movecount = 0;
state->movetarget = params->movetarget;
state->lastx = state->lasty = state->lastr = -1;
ret->lasty = state->lasty;
ret->lastr = state->lastr;
ret->used_solve = state->used_solve;
- ret->just_used_solve = state->just_used_solve;
ret->grid = snewn(ret->w * ret->h, int);
memcpy(ret->grid, state->grid, ret->w * ret->h * sizeof(int));
qsort(ret->grid, ret->w*ret->h, sizeof(int), compare_int);
for (i = 0; i < ret->w*ret->h; i++)
ret->grid[i] &= ~3;
- ret->used_solve = ret->just_used_solve = TRUE;
+ ret->used_solve = TRUE;
ret->completed = ret->movecount = 1;
return ret;
return NULL; /* can't parse this move string */
ret = dup_game(from);
- ret->just_used_solve = FALSE; /* zero this in a hurry */
ret->movecount++;
do_rotate(ret->grid, w, h, n, ret->orientable, x, y, dir);
ret->lastx = x;
ds->tilesize = tilesize;
}
-static float *game_colours(frontend *fe, game_state *state, int *ncolours)
+static float *game_colours(frontend *fe, int *ncolours)
{
float *ret = snewn(3 * NCOLOURS, float);
int i;
static float game_anim_length(game_state *oldstate, game_state *newstate,
int dir, game_ui *ui)
{
- if ((dir > 0 && newstate->just_used_solve) ||
- (dir < 0 && oldstate->just_used_solve))
- return 0.0F;
- else
- return ANIM_PER_RADIUS_UNIT * sqrt(newstate->n-1);
+ return ANIM_PER_RADIUS_UNIT * sqrt(newstate->n-1);
}
static float game_flash_length(game_state *oldstate, game_state *newstate,
}
}
-static int game_wants_statusbar(void)
-{
- return TRUE;
-}
-
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
game_anim_length,
game_flash_length,
FALSE, FALSE, game_print_size, game_print,
- game_wants_statusbar,
+ TRUE, /* wants_statusbar */
FALSE, game_timing_state,
0, /* flags */
};