X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/1f3ee4ee0f9443910671f5e57837fa5311000b21..b71ab32e34da71977002ad154b75376b73fa0ae2:/guess.c diff --git a/guess.c b/guess.c index 39241b0..e9b0ca0 100644 --- a/guess.c +++ b/guess.c @@ -212,7 +212,7 @@ static game_params *custom_params(config_item *cfg) return ret; } -static char *validate_params(game_params *params) +static char *validate_params(game_params *params, int full) { if (params->ncolours < 2 || params->npegs < 2) return "Trivial solutions are uninteresting"; @@ -835,7 +835,7 @@ static void game_compute_size(game_params *params, int tilesize, static void game_set_size(game_drawstate *ds, game_params *params, int tilesize) { - int colh, guessh, x, y; + int colh, guessh; ds->pegsz = tilesize; @@ -850,12 +850,12 @@ static void game_set_size(game_drawstate *ds, game_params *params, guessh = ((ds->pegsz + ds->gapsz) * params->nguesses); /* guesses */ guessh += ds->gapsz + ds->pegsz; /* solution */ - game_compute_size(params, tilesize, &x, &y); + game_compute_size(params, tilesize, &ds->w, &ds->h); ds->colx = ds->border; - ds->coly = (y - colh) / 2; + ds->coly = (ds->h - colh) / 2; ds->guessx = ds->solnx = ds->border + ds->pegsz * 2; /* border + colours */ - ds->guessy = (y - guessh) / 2; + ds->guessy = (ds->h - guessh) / 2; ds->solny = ds->guessy + ((ds->pegsz + ds->gapsz) * params->nguesses) + ds->gapsz; assert(ds->pegsz > 0); @@ -1262,7 +1262,7 @@ static int game_wants_statusbar(void) return FALSE; } -static int game_timing_state(game_state *state) +static int game_timing_state(game_state *state, game_ui *ui) { return TRUE; }