X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/bc578afebc301519e7ce2e905ae2e3ea0b28af58..HEAD:/fifteen.c diff --git a/fifteen.c b/fifteen.c index ccd1903..1a106e8 100644 --- a/fifteen.c +++ b/fifteen.c @@ -383,6 +383,11 @@ static char *solve_game(game_state *state, game_state *currstate, return dupstr("S"); } +static int game_can_format_as_text_now(game_params *params) +{ + return TRUE; +} + static char *game_text_format(game_state *state) { char *ret, *p, buf[80]; @@ -455,7 +460,7 @@ struct game_drawstate { int tilesize; }; -static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, +static char *interpret_move(game_state *state, game_ui *ui, const game_drawstate *ds, int x, int y, int button) { int gx, gy, dx, dy; @@ -825,6 +830,11 @@ static float game_flash_length(game_state *oldstate, return 0.0F; } +static int game_status(game_state *state) +{ + return state->completed ? +1 : 0; +} + static int game_timing_state(game_state *state, game_ui *ui) { return TRUE; @@ -858,7 +868,7 @@ const struct game thegame = { dup_game, free_game, TRUE, solve_game, - TRUE, game_text_format, + TRUE, game_can_format_as_text_now, game_text_format, new_ui, free_ui, encode_ui, @@ -873,6 +883,7 @@ const struct game thegame = { game_redraw, game_anim_length, game_flash_length, + game_status, FALSE, FALSE, game_print_size, game_print, TRUE, /* wants_statusbar */ FALSE, game_timing_state,