X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/fa3abef5abe95dd9668a87b1cc57a724dcbf6354..741706e742744446d51c8af5e3fa25dc5a966f0b:/net.c diff --git a/net.c b/net.c index ab16b1a..4fc5268 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++; @@ -2077,14 +2077,14 @@ static char *interpret_move(game_state *state, game_ui *ui, } else if (button == 'a' || button == 's' || button == 'd' || button == 'A' || button == 'S' || button == 'D' || button == 'f' || button == 'F' || - button == CURSOR_SELECT) { + button == CURSOR_SELECT || button == CURSOR_SELECT2) { tx = ui->cur_x; ty = ui->cur_y; if (button == 'a' || button == 'A' || button == CURSOR_SELECT) action = ROTATE_LEFT; else if (button == 's' || button == 'S') action = TOGGLE_LOCK; - else if (button == 'd' || button == 'D') + else if (button == 'd' || button == 'D' || button == CURSOR_SELECT2) action = ROTATE_RIGHT; else if (button == 'f' || button == 'F') action = ROTATE_180; @@ -2863,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,