| preload_tiles | WC_PRELOAD_TILES | wc_preload_tiles |boolean |
| scroll_margin | WC_SCROLL_MARGIN | wc_scroll_margin |int |
| tiled_map | WC_TILED_MAP | wc_tiled_map |boolean |
- | tiles_16x16 | WC_TILES_16x16 | wc_tiles_16x16 |boolean |
- | tiles_32x32 | WC_TILES_32x32 | wc_tiles_32x32 |boolean |
- | tiles_8x16 | WC_TILES_8x16 | wc_tiles_8x16 |boolean |
+ | tile_width | WC_TILE_WIDTH | wc_tile_width |int |
+ | tile_height | WC_TILE_HEIGHT | wc_tile_height |int |
+ | tile_file | WC_TILE_FILE | wc_tile_file |char * |
| use_inverse | WC_INVERSE | wc_inverse |boolean |
| vary_msgcount | WC_VARY_MSGCOUNT | wc_vary_msgcount |int |
+-------------------+--------------------+-------------------+--------+
scroll_margin -- port should scroll the display when the hero or cursor
is this number of cells away from the edge of the window.
tiled_map -- port should display a tiled map if it can.
-tiles_16x16 -- port should display 16x16 tiles if it can.
-tiles_32x32 -- port should display 32x32 tiles if it can.
-tiles_8x16 -- port should display 8x16 tiles if it can.
+tile_width -- port should display tiles with this width or round to closest
+ if it can.
+tile_height -- port should display tiles with this height or round to closest
+ if it can.
+tile_file -- open this alterntive tile file. The file name is likely to be
+ window-port or platform specific.
use_inverse -- port should display inverse when NetHack asks for it.
vary_msgcount -- port should display this number of messages at a time in
the message window.
/*
* Window capability support.
*/
- boolean wc_color; /* use color graphics */
- boolean wc_hilite_pet; /* hilight pets */
- boolean wc_ascii_map; /* show map using traditional ascii */
- boolean wc_tiled_map; /* show map using tiles */
- boolean wc_preload_tiles; /* preload tiles into memory */
- boolean wc_tiles_8x16; /* use 8x16 tiles */
- boolean wc_tiles_16x16; /* use 16x16 tiles */
- boolean wc_tiles_32x32; /* use 32x32 tiles */
+ boolean wc_color; /* use color graphics */
+ boolean wc_hilite_pet; /* hilight pets */
+ boolean wc_ascii_map; /* show map using traditional ascii */
+ boolean wc_tiled_map; /* show map using tiles */
+ boolean wc_preload_tiles; /* preload tiles into memory */
+ int wc_tile_width; /* tile width */
+ int wc_tile_height; /* tile height */
+ char *wc_tile_file; /* name of tile file;overrides default */
boolean wc_inverse; /* use inverse video for some things */
- int wc_align_status; /* status win at top|bot|right|left */
+ int wc_align_status; /* status win at top|bot|right|left */
int wc_align_message; /* message win at top|bot|right|left */
int wc_vary_msgcount; /* show more old messages at a time */
char *wc_font_map; /* points to font name for the map win */
-/* SCCS Id: @(#)options.c 3.3 2002/02/02 */
+/* SCCS Id: @(#)options.c 3.3 2002/02/04 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
{"standout", &flags.standout, FALSE, SET_IN_GAME},
{"time", &flags.time, FALSE, SET_IN_GAME},
{"tiled_map", &iflags.wc_tiled_map, FALSE, DISP_IN_GAME}, /*WC*/
- {"tiles_8x16", &iflags.wc_tiles_8x16, FALSE, DISP_IN_GAME}, /*WC*/
- {"tiles_16x16", &iflags.wc_tiles_16x16, FALSE, DISP_IN_GAME}, /*WC*/
- {"tiles_32x32", &iflags.wc_tiles_32x32, FALSE, DISP_IN_GAME}, /*WC*/
#ifdef TIMED_DELAY
{"timed_delay", &flags.nap, TRUE, SET_IN_GAME},
#else
#endif
{ "suppress_alert", "suppress alerts about version-specific features",
8, SET_IN_GAME },
+ { "tile_width", "width of tiles", 20, DISP_IN_GAME}, /*WC*/
+ { "tile_height", "height of tiles", 20, DISP_IN_GAME}, /*WC*/
+ { "tile_file", "name of tile file", 70, DISP_IN_GAME}, /*WC*/
{ "traps", "the symbols to use in drawing traps",
MAXTCHARS+1, SET_IN_FILE },
#ifdef MAC
} else if (negated) bad_negation(fullname, TRUE);
return;
}
+ /* WINCAP
+ * tile_width:nn */
+ fullname = "tile_width";
+ if (match_optname(opts, fullname, sizeof("tile_width")-1, TRUE)) {
+ op = string_for_env_opt(fullname, opts, negated);
+ if ((negated && !op) || (!negated && op)) {
+ iflags.wc_tile_width = negated ? 0 : atoi(op);
+ } else if (negated) bad_negation(fullname, TRUE);
+ return;
+ }
+ /* WINCAP
+ * tile_file:name */
+ fullname = "tile_file";
+ if (match_optname(opts, fullname, sizeof("tile_file")-1, TRUE)) {
+ if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
+ if (iflags.wc_tile_file) free(iflags.wc_tile_file);
+ iflags.wc_tile_file = (char *)alloc(strlen(op) + 1);
+ Strcpy(iflags.wc_tile_file, op);
+ }
+ }
+ /* WINCAP
+ * tile_height:nn */
+ fullname = "tile_height";
+ if (match_optname(opts, fullname, sizeof("tile_height")-1, TRUE)) {
+ op = string_for_env_opt(fullname, opts, negated);
+ if ((negated && !op) || (!negated && op)) {
+ iflags.wc_tile_height = negated ? 0 : atoi(op);
+ } else if (negated) bad_negation(fullname, TRUE);
+ return;
+ }
/* WINCAP
* vary_msgcount:nn */
fullname = "vary_msgcount";
FEATURE_NOTICE_VER_MAJ,
FEATURE_NOTICE_VER_MIN,
FEATURE_NOTICE_VER_PATCH);
- } else if (!strcmp(optname, "traps"))
+ }
+ else if (!strcmp(optname, "tile_file"))
+ Sprintf(buf, "%s", iflags.wc_tile_file ? iflags.wc_tile_file : none);
+ else if (!strcmp(optname, "tile_height"))
+ Sprintf(buf, "%d", iflags.wc_tile_width);
+ else if (!strcmp(optname, "tile_width"))
+ Sprintf(buf, "%d", iflags.wc_tile_width);
+ else if (!strcmp(optname, "traps"))
Sprintf(buf, "%s", to_be_done);
else if (!strcmp(optname, "vary_msgcount"))
Sprintf(buf, "%d", iflags.wc_vary_msgcount);
{"popup_dialog", WC_POPUP_DIALOG},
{"preload_tiles", WC_PRELOAD_TILES},
{"tiled_map", WC_TILED_MAP},
- {"tiles_16x16", WC_TILES_16x16},
- {"tiles_32x32", WC_TILES_32x32},
- {"tiles_8x16", WC_TILES_8x16},
+ {"tile_file", WC_TILE_FILE},
+ {"tile_width", WC_TILE_WIDTH},
+ {"tile_height", WC_TILE_HEIGHT},
{"use_inverse", WC_INVERSE},
{"align_message", WC_ALIGN_MESSAGE},
{"align_status", WC_ALIGN_STATUS},
char *fontname;
{
char **fn = (char **)0;
+ if (!fontname) return;
switch(wtype) {
case NHW_MAP:
fn = &iflags.wc_font_map;
case NHW_STATUS:
fn = &iflags.wc_font_status;
break;
+ default:
+ return;
}
if (fn) {
if (*fn) free(*fn);