X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/2def1838dc5c580e0014f3b481e8db152efff5d8..6bb2af847d3bad4f2a544ad7a428f7063fd1991a:/mines.c diff --git a/mines.c b/mines.c index e0e6eb0..431cc08 100644 --- a/mines.c +++ b/mines.c @@ -28,7 +28,11 @@ enum { #define PREFERRED_TILE_SIZE 20 #define TILE_SIZE (ds->tilesize) +#ifdef SMALL_SCREEN +#define BORDER 8 +#else #define BORDER (TILE_SIZE * 3 / 2) +#endif #define HIGHLIGHT_WIDTH (TILE_SIZE / 10) #define OUTER_HIGHLIGHT_WIDTH (BORDER / 10) #define COORD(x) ( (x) * TILE_SIZE + BORDER ) @@ -102,8 +106,10 @@ static const struct game_params mines_presets[] = { {9, 9, 35, TRUE}, {16, 16, 40, TRUE}, {16, 16, 99, TRUE}, +#ifndef SMALL_SCREEN {30, 16, 99, TRUE}, {30, 16, 170, TRUE}, +#endif }; static int game_fetch_preset(int i, char **name, game_params **params) @@ -2306,6 +2312,11 @@ static char *solve_game(game_state *state, game_state *currstate, return dupstr("S"); } +static int game_can_format_as_text_now(game_params *params) +{ + return TRUE; +} + static char *game_text_format(game_state *state) { char *ret; @@ -3070,7 +3081,7 @@ static void game_print(drawing *dr, game_state *state, int tilesize) #endif const struct game thegame = { - "Mines", "games.mines", + "Mines", "games.mines", "mines", default_params, game_fetch_preset, decode_params, @@ -3085,7 +3096,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, @@ -3103,7 +3114,7 @@ const struct game thegame = { FALSE, FALSE, game_print_size, game_print, TRUE, /* wants_statusbar */ TRUE, game_timing_state, - BUTTON_BEATS(LEFT_BUTTON, RIGHT_BUTTON), + BUTTON_BEATS(LEFT_BUTTON, RIGHT_BUTTON) | REQUIRE_RBUTTON, }; #ifdef STANDALONE_OBFUSCATOR