Added new map_mode tiles_fit_to_screen for Windows NetHackW.exe

This commit is contained in:
Bart House
2019-11-03 17:59:39 -08:00
parent 2244720133
commit 6b88a19365
3 changed files with 13 additions and 4 deletions
+2 -1
View File
@@ -347,7 +347,8 @@
# How the map window is shown? Windows GUI only. # How the map window is shown? Windows GUI only.
# possible map_mode options include: tiles, ascii4x6, # possible map_mode options include: tiles, ascii4x6,
# ascii6x8, ascii8x8, ascii16x8, ascii7x12, ascii8x12, ascii16x12, # ascii6x8, ascii8x8, ascii16x8, ascii7x12, ascii8x12, ascii16x12,
# ascii12x16, ascii10x18, fit_to_screen # ascii12x16, ascii10x18, fit_to_screen, ascii_fit_to_screen,
# tiles_fit_to_screen
#OPTIONS=map_mode:tiles #OPTIONS=map_mode:tiles
# Define alternative file for the files, and the tile size # Define alternative file for the files, and the tile size
+9 -2
View File
@@ -3396,7 +3396,8 @@ boolean tinitial, tfrom_file;
/* WINCAP /* WINCAP
* *
* map_mode:[tiles|ascii4x6|ascii6x8|ascii8x8|ascii16x8|ascii7x12 * map_mode:[tiles|ascii4x6|ascii6x8|ascii8x8|ascii16x8|ascii7x12
* |ascii8x12|ascii16x12|ascii12x16|ascii10x18|fit_to_screen] * |ascii8x12|ascii16x12|ascii12x16|ascii10x18|fit_to_screen
* |ascii_fit_to_screen|tiles_fit_to_screen]
*/ */
fullname = "map_mode"; fullname = "map_mode";
if (match_optname(opts, fullname, sizeof "map_mode" - 1, TRUE)) { if (match_optname(opts, fullname, sizeof "map_mode" - 1, TRUE)) {
@@ -3404,7 +3405,7 @@ boolean tinitial, tfrom_file;
complain_about_duplicate(opts, 1); complain_about_duplicate(opts, 1);
op = string_for_opt(opts, negated); op = string_for_opt(opts, negated);
if (op && !negated) { if (op && !negated) {
if (!strncmpi(op, "tiles", sizeof "tiles" - 1)) if (!strcmpi(op, "tiles"))
iflags.wc_map_mode = MAP_MODE_TILES; iflags.wc_map_mode = MAP_MODE_TILES;
else if (!strncmpi(op, "ascii4x6", sizeof "ascii4x6" - 1)) else if (!strncmpi(op, "ascii4x6", sizeof "ascii4x6" - 1))
iflags.wc_map_mode = MAP_MODE_ASCII4x6; iflags.wc_map_mode = MAP_MODE_ASCII4x6;
@@ -3427,6 +3428,12 @@ boolean tinitial, tfrom_file;
else if (!strncmpi(op, "fit_to_screen", else if (!strncmpi(op, "fit_to_screen",
sizeof "fit_to_screen" - 1)) sizeof "fit_to_screen" - 1))
iflags.wc_map_mode = MAP_MODE_ASCII_FIT_TO_SCREEN; iflags.wc_map_mode = MAP_MODE_ASCII_FIT_TO_SCREEN;
else if (!strncmpi(op, "ascii_fit_to_screen",
sizeof "ascii_fit_to_screen" - 1))
iflags.wc_map_mode = MAP_MODE_ASCII_FIT_TO_SCREEN;
else if (!strncmpi(op, "tiles_fit_to_screen",
sizeof "tiles_fit_to_screen" - 1))
iflags.wc_map_mode = MAP_MODE_TILES_FIT_TO_SCREEN;
else { else {
config_error_add("Unknown %s parameter '%s'", fullname, op); config_error_add("Unknown %s parameter '%s'", fullname, op);
return FALSE; return FALSE;
+2 -1
View File
@@ -104,7 +104,8 @@ OPTIONS=suppress_alert:3.3.1
# Map window settings # Map window settings
# possible map_mode options include: tiles|ascii4x6|ascii6x8|ascii8x8|ascii16x8| # possible map_mode options include: tiles|ascii4x6|ascii6x8|ascii8x8|ascii16x8|
# ascii7x12|ascii8x12|ascii16x12|ascii12x16| # ascii7x12|ascii8x12|ascii16x12|ascii12x16|
# ascii10x18|fit_to_screen # ascii10x18|fit_to_screen|ascii_fit_to_screen|
# tiles_fit_to_screen
OPTIONS=map_mode:tiles,scroll_margin:10 OPTIONS=map_mode:tiles,scroll_margin:10
# Message window settings # Message window settings