X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/1185e3c5eaf5a0ac405e14939e7ee818914e0701..48dcdd627698354063fa1b551cfa1917dea1b25e:/pattern.c?ds=sidebyside diff --git a/pattern.c b/pattern.c index 438243d..c5fd9dc 100644 --- a/pattern.c +++ b/pattern.c @@ -601,7 +601,7 @@ static char *validate_desc(game_params *params, char *desc) return NULL; } -static game_state *new_game(game_params *params, char *desc) +static game_state *new_game(midend_data *me, game_params *params, char *desc) { int i; char *p; @@ -769,6 +769,8 @@ static game_state *make_move(game_state *from, game_ui *ui, { game_state *ret; + button &= ~MOD_MASK; + x = FROMCOORD(from->w, x); y = FROMCOORD(from->h, y); @@ -1084,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) @@ -1103,6 +1105,11 @@ static int game_wants_statusbar(void) return FALSE; } +static int game_timing_state(game_state *state) +{ + return TRUE; +} + #ifdef COMBINED #define thegame pattern #endif @@ -1136,6 +1143,7 @@ const struct game thegame = { game_anim_length, game_flash_length, game_wants_statusbar, + FALSE, game_timing_state, }; #ifdef STANDALONE_SOLVER @@ -1206,7 +1214,8 @@ int main(int argc, char **argv) } *desc++ = '\0'; - p = decode_params(id); + p = default_params(); + decode_params(p, id); err = validate_desc(p, desc); if (err) { fprintf(stderr, "%s: %s\n", argv[0], err);