more NO_TILE_C

When USE_TILES is disabled, don't let wc_tiled_map be the default.

Qt is capable of showing an (ugly) ascii map, and will do so if built
with NO_TILE_C after this fix (it defaults to tiles without this),
but it requires that a tiles file be loaded because it displays tiles
in other places besides the map, like role selection.  So it can't
skip them when wc_ascii_map is set.
This commit is contained in:
PatR
2021-12-31 15:02:35 -08:00
parent d19e80ae2f
commit 4f1c213516
2 changed files with 14 additions and 6 deletions

View File

@@ -74,6 +74,14 @@ opt_##a,
#define NHOPTO(m, a, b, c, s, n, v, d, al, z) \
{ m, 0, b, opt_##a, s, OthrOpt, n, v, d, No, c, (boolean *) 0, &optfn_##a, \
al, z, (const char *) 0, On, On, 0 },
#ifdef USE_TILES
#define tiled_map_Def On
#define ascii_map_Def Off
#else
#define ascii_map_Def On
#define tiled_map_Def Off
#endif
#endif
/* B:nm, ln, opt_*, setwhere?, on?, negat?, val?, dup?, hndlr? Alias, bool_p */
@@ -97,8 +105,8 @@ opt_##a,
NHOPTB(altmeta, 0, opt_out, set_in_config, Off, Yes, No, No, NoAlias,
(boolean *) 0)
#endif
NHOPTB(ascii_map, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.wc_ascii_map)
NHOPTB(ascii_map, 0, opt_in, set_in_game, ascii_map_Def, Yes, No, No,
NoAlias, &iflags.wc_ascii_map)
NHOPTB(autodescribe, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&iflags.autodescribe)
NHOPTB(autodig, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
@@ -472,8 +480,8 @@ opt_##a,
"height of tiles")
NHOPTC(tile_width, 20, opt_in, set_gameview, Yes, Yes, No, No, NoAlias,
"width of tiles")
NHOPTB(tiled_map, 0, opt_in, set_in_config, On, Yes, No, No, NoAlias,
&iflags.wc_tiled_map)
NHOPTB(tiled_map, 0, opt_in, set_in_config, tiled_map_Def, Yes, No, No,
NoAlias, &iflags.wc_tiled_map)
NHOPTB(time, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&flags.time)
#ifdef TIMED_DELAY

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 options.c $NHDT-Date: 1613723080 2021/02/19 08:24:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.508 $ */
/* NetHack 3.7 options.c $NHDT-Date: 1640991743 2021/12/31 23:02:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.522 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
@@ -65,7 +65,7 @@ static struct allopt_t allopt_init[] = {
#undef NHOPT_PARSE
#ifdef DEFAULT_WC_TILED_MAP
#if defined(USE_TILES) && defined(DEFAULT_WC_TILED_MAP)
#define PREFER_TILED TRUE
#else
#define PREFER_TILED FALSE