X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/4496362fadb5f60b8ecf431fb220d26df7280f99..HEAD:/galaxies.c diff --git a/galaxies.c b/galaxies.c index 77ef597..db89700 100644 --- a/galaxies.c +++ b/galaxies.c @@ -2369,7 +2369,7 @@ static void coord_round_to_edge(float x, float y, int *xr, int *yr) #endif #ifdef EDITOR -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) { char buf[80]; @@ -2404,7 +2404,7 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, return NULL; } #else -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) { /* UI operations (play mode): @@ -2977,10 +2977,10 @@ static float *game_colours(frontend *fe, int *ncolours) /* tinge the edit background to bluey */ ret[COL_BACKGROUND * 3 + 0] = ret[COL_BACKGROUND * 3 + 0] * 0.8F; ret[COL_BACKGROUND * 3 + 1] = ret[COL_BACKGROUND * 3 + 0] * 0.8F; - ret[COL_BACKGROUND * 3 + 2] = max(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F); + ret[COL_BACKGROUND * 3 + 2] = min(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F); #endif - ret[COL_CURSOR * 3 + 0] = max(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F); + ret[COL_CURSOR * 3 + 0] = min(ret[COL_BACKGROUND * 3 + 0] * 1.4F, 1.0F); ret[COL_CURSOR * 3 + 1] = ret[COL_BACKGROUND * 3 + 0] * 0.8F; ret[COL_CURSOR * 3 + 2] = ret[COL_BACKGROUND * 3 + 0] * 0.8F; @@ -3348,9 +3348,9 @@ static float game_flash_length(game_state *oldstate, game_state *newstate, return 0.0F; } -static int game_is_solved(game_state *state) +static int game_status(game_state *state) { - return state->completed; + return state->completed ? +1 : 0; } static int game_timing_state(game_state *state, game_ui *ui) @@ -3573,7 +3573,7 @@ const struct game thegame = { game_redraw, game_anim_length, game_flash_length, - game_is_solved, + game_status, #ifdef EDITOR FALSE, FALSE, NULL, NULL, TRUE, /* wants_statusbar */