X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/807a3beee0db4afe1fc03fde37c51d13d137dbff..63ed24043747435fc5b67339248426ca236e0739:/unequal.c diff --git a/unequal.c b/unequal.c index 91ae118..320dedf 100644 --- a/unequal.c +++ b/unequal.c @@ -408,6 +408,11 @@ static int c2n(int c, int order) { return -1; } +static int game_can_format_as_text_now(game_params *params) +{ + return TRUE; +} + static char *game_text_format(game_state *state) { int x, y, len, n; @@ -1266,7 +1271,8 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, button &= ~MOD_MASK; - if (x >= 0 && x < ds->order && y >= 0 && y < ds->order) { + if (x >= 0 && x < ds->order && ((ox - COORD(x)) <= TILE_SIZE) && + y >= 0 && y < ds->order && ((oy - COORD(y)) <= TILE_SIZE)) { if (button == LEFT_BUTTON) { /* normal highlighting for non-immutable squares */ if (GRID(state, flags, x, y) & F_IMMUTABLE) @@ -1735,7 +1741,7 @@ const struct game thegame = { dup_game, free_game, TRUE, solve_game, - TRUE, game_text_format, + TRUE, game_can_format_as_text_now, game_text_format, new_ui, free_ui, encode_ui,