X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/1f51811e853cd0e1b6dbf413c05c617b6db818c2..6bb2af847d3bad4f2a544ad7a428f7063fd1991a:/net.c diff --git a/net.c b/net.c index 0d51443..1177f80 100644 --- a/net.c +++ b/net.c @@ -232,7 +232,7 @@ static void decode_params(game_params *ret, char const *string) ret->wrapping = TRUE; } else if (*p == 'b') { p++; - ret->barrier_probability = atof(p); + ret->barrier_probability = (float)atof(p); while (*p && (*p == '.' || isdigit((unsigned char)*p))) p++; } else if (*p == 'a') { p++; @@ -1782,6 +1782,11 @@ static char *solve_game(game_state *state, game_state *currstate, return ret; } +static int game_can_format_as_text_now(game_params *params) +{ + return TRUE; +} + static char *game_text_format(game_state *state) { return NULL; @@ -2858,8 +2863,8 @@ static void game_print_size(game_params *params, float *x, float *y) * I'll use 8mm squares by default. */ game_compute_size(params, 800, &pw, &ph); - *x = pw / 100.0; - *y = ph / 100.0; + *x = pw / 100.0F; + *y = ph / 100.0F; } static void draw_diagram(drawing *dr, game_drawstate *ds, int x, int y, @@ -3005,7 +3010,7 @@ const struct game thegame = { dup_game, free_game, TRUE, solve_game, - FALSE, game_text_format, + FALSE, game_can_format_as_text_now, game_text_format, new_ui, free_ui, encode_ui,