some symbol tweaks

A few symbol-related modifications:

- fulfill a request from a blind player to allow them to
  specify a unique/recognizable character for all pets and/or
  the player in the config file for use when using a screen
  reader (S_player_override, S_pet_override). Requires sysconf
  setting ACCESSIBILITY to be set to have an effect, although
  they can still be specified in the config file.

- Config file SYMBOLS entries were not working properly on
  the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
  specified in the config file independently.

- When values are moved into showsyms[], the overriding SYMBOLS
  or ROGUESYMBOLS entry from the config file is used if there is
  one; if there is no overriding value for a particular symbol,
  the loaded symset value is used; if there is no symset entry
  loaded for the symbol then a default symbol is used.
This commit is contained in:
nhmall
2019-10-27 23:12:11 -04:00
parent 4f94bcaa8b
commit a399151d01
16 changed files with 306 additions and 127 deletions

View File

@@ -600,13 +600,13 @@ int class; /* an object class, 0 for all */
}
/* Special boulder symbol check - does the class symbol happen
* to match iflags.bouldersym which is a user-defined?
* to match showsyms[SYM_BOULDER + SYM_OFF_X] which is user-defined.
* If so, that means we aren't sure what they really wanted to
* detect. Rather than trump anything, show both possibilities.
* We can exclude checking the buried obj chain for boulders below.
*/
sym = class ? def_oc_syms[class].sym : 0;
if (sym && iflags.bouldersym && sym == iflags.bouldersym)
if (sym && showsyms[SYM_BOULDER + SYM_OFF_X] && sym == showsyms[SYM_BOULDER + SYM_OFF_X])
boulder = ROCK_CLASS;
if (Hallucination || (Confusion && class == SCROLL_CLASS))
@@ -1208,7 +1208,8 @@ struct obj **optr;
ret = object_detect((struct obj *) 0, class);
else if ((class = def_char_to_monclass(ch)) != MAXMCLASSES)
ret = monster_detect((struct obj *) 0, class);
else if (iflags.bouldersym && (ch == iflags.bouldersym))
else if (showsyms[SYM_BOULDER + SYM_OFF_X]
&& (ch == showsyms[SYM_BOULDER + SYM_OFF_X]))
ret = object_detect((struct obj *) 0, ROCK_CLASS);
else
switch (ch) {

View File

@@ -22,13 +22,14 @@ struct symsetentry symset[NUM_GRAPHICS];
int currentgraphics = 0;
nhsym showsyms[SYM_MAX] = DUMMY; /* symbols to be displayed */
nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */
nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */
nhsym primary_syms[SYM_MAX] = DUMMY; /* primary symbols */
nhsym rogue_syms[SYM_MAX] = DUMMY; /* rogue symbols */
nhsym ov_primary_syms[SYM_MAX] = DUMMY; /* overides via config SYMBOL */
nhsym ov_rogue_syms[SYM_MAX] = DUMMY; /* overides via config ROGUESYMBOL */
nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */
const char invisexplain[] = "remembered, unseen, creature",
altinvisexplain[] = "unseen creature"; /* for clairvoyance */
/* Default object class symbols. See objclass.h.
* {symbol, name, explain}
* name: used in object_detect().
@@ -306,7 +307,7 @@ char ch;
* init_symbols()
* Sets the current display symbols, the
* loadable symbols to the default NetHack
* symbols, including the r_syms rogue level
* symbols, including the rogue_syms rogue level
* symbols. This would typically be done
* immediately after execution begins. Any
* previously loaded external symbol sets are
@@ -322,8 +323,8 @@ char ch;
*
* If (arg != 0), which is the normal expected
* usage, then showsyms are taken from the
* adjustable display symbols found in l_syms.
* l_syms may have been loaded from an external
* adjustable display symbols found in primary_syms.
* primary_syms may have been loaded from an external
* symbol file by config file options or interactively
* in the Options menu.
*
@@ -333,37 +334,33 @@ char ch;
* out of other {rogue} level display modes.
*
* If arg is ROGUESET, this places the rogue level
* symbols from r_syms into showsyms.
* symbols from rogue_syms into showsyms.
*
* If arg is PRIMARY, this places the symbols
* from l_monsyms into showsyms.
*
* update_l_symset()
* Update a member of the loadable (l_*) symbol set.
* update_primary_symset()
* Update a member of the primary(primary_*) symbol set.
*
* update_r_symset()
* Update a member of the rogue (r_*) symbol set.
* update_rogue_symset()
* Update a member of the rogue (rogue_*) symbol set.
*
* update_ov_primary_symset()
* Update a member of the overrides for primary symbol set.
*
* update_ov_rogue_symset()
* Update a member of the overrides for rogue symbol set.
*
*/
void
init_symbols()
{
init_l_symbols();
init_ov_primary_symbols();
init_ov_rogue_symbols();
init_primary_symbols();
init_showsyms();
init_r_symbols();
}
void
update_bouldersym()
{
nhsym boulder = (nhsym) iflags.bouldersym;
if (!boulder)
boulder = def_oc_syms[ROCK_CLASS].sym; /* (nhsym) ROCK_SYM */
showsyms[SYM_BOULDER + SYM_OFF_X] = boulder;
l_syms[SYM_BOULDER + SYM_OFF_X] = boulder;
r_syms[SYM_BOULDER + SYM_OFF_X] = boulder;
init_rogue_symbols();
}
void
@@ -379,44 +376,78 @@ init_showsyms()
showsyms[i + SYM_OFF_M] = def_monsyms[i].sym;
for (i = 0; i < WARNCOUNT; i++)
showsyms[i + SYM_OFF_W] = def_warnsyms[i].sym;
for (i = 0; i < MAXOTHER; i++) {
if (i == SYM_BOULDER)
showsyms[i + SYM_OFF_X] = iflags.bouldersym
? iflags.bouldersym
: def_oc_syms[ROCK_CLASS].sym;
else if (i == SYM_INVISIBLE)
showsyms[i + SYM_OFF_X] = DEF_INVISIBLE;
}
for (i = 0; i < MAXOTHER; i++)
showsyms[i + SYM_OFF_X] = get_othersym(i, PRIMARY);
}
/* initialize defaults for the loadable symset */
/* initialize defaults for the overrides to the rogue symset */
void
init_l_symbols()
init_ov_rogue_symbols()
{
register int i;
for (i = 0; i < SYM_MAX; i++)
ov_rogue_syms[i] = (nhsym) 0;
}
/* initialize defaults for the overrides to the primary symset */
void
init_ov_primary_symbols()
{
register int i;
for (i = 0; i < SYM_MAX; i++)
ov_primary_syms[i] = (nhsym) 0;
}
nhsym
get_othersym(idx, which_set)
int idx, which_set;
{
nhsym sym = (nhsym) 0;
int oidx = idx + SYM_OFF_X;
if (which_set == ROGUESET)
sym = ov_rogue_syms[oidx] ? ov_rogue_syms[oidx]
: rogue_syms[oidx];
else
sym = ov_primary_syms[oidx] ? ov_primary_syms[oidx]
: primary_syms[oidx];
if (!sym) {
switch(idx) {
case SYM_BOULDER:
sym = def_oc_syms[ROCK_CLASS].sym;
break;
case SYM_INVISIBLE:
sym = DEF_INVISIBLE;
break;
}
}
return sym;
}
/* initialize defaults for the primary symset */
void
init_primary_symbols()
{
register int i;
for (i = 0; i < MAXPCHARS; i++)
l_syms[i + SYM_OFF_P] = defsyms[i].sym;
primary_syms[i + SYM_OFF_P] = defsyms[i].sym;
for (i = 0; i < MAXOCLASSES; i++)
l_syms[i + SYM_OFF_O] = def_oc_syms[i].sym;
primary_syms[i + SYM_OFF_O] = def_oc_syms[i].sym;
for (i = 0; i < MAXMCLASSES; i++)
l_syms[i + SYM_OFF_M] = def_monsyms[i].sym;
primary_syms[i + SYM_OFF_M] = def_monsyms[i].sym;
for (i = 0; i < WARNCOUNT; i++)
l_syms[i + SYM_OFF_W] = def_warnsyms[i].sym;
for (i = 0; i < MAXOTHER; i++) {
if (i == SYM_BOULDER)
l_syms[i + SYM_OFF_X] = iflags.bouldersym
? iflags.bouldersym
: def_oc_syms[ROCK_CLASS].sym;
else if (i == SYM_INVISIBLE)
l_syms[i + SYM_OFF_X] = DEF_INVISIBLE;
}
primary_syms[i + SYM_OFF_W] = def_warnsyms[i].sym;
for (i = 0; i < MAXOTHER; i++)
primary_syms[i + SYM_OFF_X] = get_othersym(i, PRIMARY);
clear_symsetentry(PRIMARY, FALSE);
}
/* initialize defaults for the rogue symset */
void
init_r_symbols()
init_rogue_symbols()
{
register int i;
@@ -424,24 +455,18 @@ init_r_symbols()
later by the roguesymbols option */
for (i = 0; i < MAXPCHARS; i++)
r_syms[i + SYM_OFF_P] = defsyms[i].sym;
r_syms[S_vodoor] = r_syms[S_hodoor] = r_syms[S_ndoor] = '+';
r_syms[S_upstair] = r_syms[S_dnstair] = '%';
rogue_syms[i + SYM_OFF_P] = defsyms[i].sym;
rogue_syms[S_vodoor] = rogue_syms[S_hodoor] = rogue_syms[S_ndoor] = '+';
rogue_syms[S_upstair] = rogue_syms[S_dnstair] = '%';
for (i = 0; i < MAXOCLASSES; i++)
r_syms[i + SYM_OFF_O] = def_r_oc_syms[i];
rogue_syms[i + SYM_OFF_O] = def_r_oc_syms[i];
for (i = 0; i < MAXMCLASSES; i++)
r_syms[i + SYM_OFF_M] = def_monsyms[i].sym;
rogue_syms[i + SYM_OFF_M] = def_monsyms[i].sym;
for (i = 0; i < WARNCOUNT; i++)
r_syms[i + SYM_OFF_W] = def_warnsyms[i].sym;
for (i = 0; i < MAXOTHER; i++) {
if (i == SYM_BOULDER)
r_syms[i + SYM_OFF_X] = iflags.bouldersym
? iflags.bouldersym
: def_oc_syms[ROCK_CLASS].sym;
else if (i == SYM_INVISIBLE)
r_syms[i + SYM_OFF_X] = DEF_INVISIBLE;
}
rogue_syms[i + SYM_OFF_W] = def_warnsyms[i].sym;
for (i = 0; i < MAXOTHER; i++)
rogue_syms[i + SYM_OFF_X] = get_othersym(i, ROGUESET);
clear_symsetentry(ROGUESET, FALSE);
/* default on Rogue level is no color
@@ -461,7 +486,8 @@ int whichset;
/* Adjust graphics display characters on Rogue levels */
for (i = 0; i < SYM_MAX; i++)
showsyms[i] = r_syms[i];
showsyms[i] = ov_rogue_syms[i] ? ov_rogue_syms[i]
: rogue_syms[i];
#if defined(MSDOS) && defined(USE_TILES)
if (iflags.grmode)
@@ -473,7 +499,8 @@ int whichset;
case PRIMARY:
default:
for (i = 0; i < SYM_MAX; i++)
showsyms[i] = l_syms[i];
showsyms[i] = ov_primary_syms[i] ? ov_primary_syms[i]
: primary_syms[i];
#if defined(MSDOS) && defined(USE_TILES)
if (iflags.grmode)
@@ -492,7 +519,8 @@ int nondefault;
if (nondefault) {
for (i = 0; i < SYM_MAX; i++)
showsyms[i] = l_syms[i];
showsyms[i] = ov_primary_syms[i] ? ov_primary_syms[i]
: primary_syms[i];
#ifdef PC9800
if (SYMHANDLING(H_IBM) && ibmgraphics_mode_callback)
(*ibmgraphics_mode_callback)();
@@ -513,25 +541,41 @@ int nondefault;
# endif
#endif
} else {
init_l_symbols();
init_primary_symbols();
init_showsyms();
}
}
void
update_l_symset(symp, val)
update_ov_primary_symset(symp, val)
struct symparse *symp;
int val;
{
l_syms[symp->idx] = val;
ov_primary_syms[symp->idx] = val;
}
void
update_r_symset(symp, val)
update_ov_rogue_symset(symp, val)
struct symparse *symp;
int val;
{
r_syms[symp->idx] = val;
ov_rogue_syms[symp->idx] = val;
}
void
update_primary_symset(symp, val)
struct symparse *symp;
int val;
{
primary_syms[symp->idx] = val;
}
void
update_rogue_symset(symp, val)
struct symparse *symp;
int val;
{
rogue_syms[symp->idx] = val;
}
void
@@ -772,6 +816,8 @@ struct symparse loadsyms[] = {
{ SYM_MON, S_MIMIC_DEF + SYM_OFF_M, "S_mimic_def" },
{ SYM_OTH, SYM_BOULDER + SYM_OFF_X, "S_boulder" },
{ SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible" },
{ SYM_OTH, SYM_PET_OVERRIDE + SYM_OFF_X, "S_pet_override" },
{ SYM_OTH, SYM_PLAYER_OVERRIDE + SYM_OFF_X, "S_player_override" },
{ 0, 0, (const char *) 0 } /* fence post */
};

View File

@@ -2540,10 +2540,18 @@ char *origbuf;
if (sysopt.greppath)
free((genericptr_t) sysopt.greppath);
sysopt.greppath = dupstr(bufp);
} else if (src == SET_IN_SYS
&& match_varname(buf, "ACCESSIBILITY", 19)) {
n = atoi(bufp);
if (n < 0 || n > 1) {
config_error_add("Illegal value in ACCESSIBILITY (not 0,1).");
return FALSE;
}
sysopt.accessibility = n;
#endif /* SYSCF */
} else if (match_varname(buf, "BOULDER", 3)) {
(void) get_uchars(bufp, &iflags.bouldersym, TRUE, 1,
(void) get_uchars(bufp, &ov_primary_syms[SYM_BOULDER + SYM_OFF_X], TRUE, 1,
"BOULDER");
} else if (match_varname(buf, "MENUCOLOR", 9)) {
if (!add_menu_coloring(bufp))
@@ -2557,8 +2565,14 @@ char *origbuf;
(void) get_uchars(bufp, translate, FALSE, WARNCOUNT,
"WARNINGS");
assign_warnings(translate);
} else if (match_varname(buf, "ROGUESYMBOLS", 4)) {
if (!parsesymbols(bufp, ROGUESET)) {
config_error_add("Error in ROGUESYMBOLS definition '%s'", bufp);
retval = FALSE;
}
switch_symbols(TRUE);
} else if (match_varname(buf, "SYMBOLS", 4)) {
if (!parsesymbols(bufp)) {
if (!parsesymbols(bufp, PRIMARY)) {
config_error_add("Error in SYMBOLS definition '%s'", bufp);
retval = FALSE;
}
@@ -3338,9 +3352,9 @@ int which_set;
chosen_symset_start = TRUE;
/* these init_*() functions clear symset fields too */
if (which_set == ROGUESET)
init_r_symbols();
init_rogue_symbols();
else if (which_set == PRIMARY)
init_l_symbols();
init_primary_symbols();
}
break;
case 1:
@@ -3393,9 +3407,9 @@ int which_set;
val = sym_val(bufp);
if (chosen_symset_start) {
if (which_set == PRIMARY) {
update_l_symset(symp, val);
update_primary_symset(symp, val);
} else if (which_set == ROGUESET) {
update_r_symset(symp, val);
update_rogue_symset(symp, val);
}
}
}

View File

@@ -66,11 +66,12 @@ unsigned *ospecial;
{
register int offset, idx;
int color = NO_COLOR;
nhsym ch;
nhsym ch, ovsym;
unsigned special = 0;
/* condense multiple tests in macro version down to single */
boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS;
boolean has_rogue_color = (has_rogue_ibm_graphics
boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS,
is_you = (x == u.ux && y == u.uy),
has_rogue_color = (has_rogue_ibm_graphics
&& symset[currentgraphics].nocolor == 0);
/*
@@ -206,7 +207,7 @@ unsigned *ospecial;
} else { /* a monster */
idx = mons[glyph].mlet + SYM_OFF_M;
if (has_rogue_color && iflags.use_color) {
if (x == u.ux && y == u.uy)
if (is_you)
/* actually player should be yellow-on-gray if in corridor */
color = CLR_YELLOW;
else
@@ -215,13 +216,26 @@ unsigned *ospecial;
mon_color(glyph);
#ifdef TEXTCOLOR
/* special case the hero for `showrace' option */
if (iflags.use_color && x == u.ux && y == u.uy
&& flags.showrace && !Upolyd)
if (iflags.use_color && is_you && flags.showrace && !Upolyd)
color = HI_DOMESTIC;
#endif
}
}
/* These were requested by a blind player to enhance screen reader use */
if (sysopt.accessibility == 1) {
ovsym = Is_rogue_level(&u.uz)
? ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X]
: ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X];
if (ovsym && (special & MG_PET))
idx = SYM_PET_OVERRIDE + SYM_OFF_X;
ovsym = Is_rogue_level(&u.uz)
? ov_rogue_syms[SYM_PLAYER_OVERRIDE + SYM_OFF_X]
: ov_primary_syms[SYM_PLAYER_OVERRIDE + SYM_OFF_X];
if (ovsym && is_you)
idx = SYM_PLAYER_OVERRIDE + SYM_OFF_X;
}
ch = showsyms[idx];
#ifdef TEXTCOLOR
/* Turn off color if no color defined, or rogue level w/o PC graphics. */

View File

@@ -751,11 +751,12 @@ initoptions_init()
flags.initrole = flags.initrace = flags.initgend = flags.initalign
= ROLE_NONE;
init_ov_primary_symbols();
init_ov_rogue_symbols();
/* Set the default monster and object class symbols. */
init_symbols();
for (i = 0; i < WARNCOUNT; i++)
warnsyms[i] = def_warnsyms[i].sym;
iflags.bouldersym = 0;
/* for "special achievement" tracking (see obj.h,
create_object(sp_lev.c), addinv_core1(invent.c) */
@@ -773,7 +774,7 @@ initoptions_init()
for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++)
flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO;
switch_symbols(FALSE); /* set default characters */
init_r_symbols();
init_rogue_symbols();
#if defined(UNIX) && defined(TTY_GRAPHICS)
/*
* Set defaults for some options depending on what we can
@@ -837,6 +838,7 @@ initoptions_init()
void
initoptions_finish()
{
nhsym sym = 0;
#ifndef MAC
char *opts = getenv("NETHACKOPTIONS");
@@ -880,8 +882,10 @@ initoptions_finish()
*/
obj_descr[SLIME_MOLD].oc_name = "fruit";
if (iflags.bouldersym)
update_bouldersym();
sym = get_othersym(SYM_BOULDER,
Is_rogue_level(&u.uz) ? ROGUESET : PRIMARY);
if (sym)
showsyms[SYM_BOULDER + SYM_OFF_X] = sym;
reglyph_darkroom();
#ifdef STATUS_HILITES
@@ -2754,12 +2758,16 @@ boolean tinitial, tfrom_file;
/*
* Override the default boulder symbol.
*/
iflags.bouldersym = (uchar) opts[0];
/* for 'initial', update_bouldersym() is done in
ov_primary_syms[SYM_BOULDER + SYM_OFF_X] = (nhsym) opts[0];
ov_rogue_syms[SYM_BOULDER + SYM_OFF_X] = (nhsym) opts[0];
/* for 'initial', update of BOULDER symbol is done in
initoptions_finish(), after all symset options
have been processed */
if (!initial) {
update_bouldersym();
nhsym sym = get_othersym(SYM_BOULDER,
Is_rogue_level(&u.uz) ? ROGUESET : PRIMARY);
if (sym)
showsyms[SYM_BOULDER + SYM_OFF_X] = sym;
need_redraw = TRUE;
}
}
@@ -4119,12 +4127,14 @@ boolean tinitial, tfrom_file;
}
}
#if 0
/* Is it a symbol? */
if (strstr(opts, "S_") == opts && parsesymbols(opts)) {
if (strstr(opts, "S_") == opts && parsesymbols(opts, PRIMARY)) {
switch_symbols(TRUE);
check_gold_symbol();
return retval;
}
#endif
/* out of valid options */
config_error_add("Unknown option '%s'", opts);
@@ -5544,9 +5554,9 @@ boolean setinitial, setfromfile;
/* Set default symbols and clear the handling value */
if (rogueflag)
init_r_symbols();
init_rogue_symbols();
else
init_l_symbols();
init_primary_symbols();
if (symset[which_set].name) {
/* non-default symbols */
@@ -5613,8 +5623,8 @@ char *buf;
#ifdef BACKWARD_COMPAT
else if (!strcmp(optname, "boulder"))
Sprintf(buf, "%c",
iflags.bouldersym
? iflags.bouldersym
ov_primary_syms[SYM_BOULDER + SYM_OFF_X]
? ov_primary_syms[SYM_BOULDER + SYM_OFF_X]
: showsyms[(int) objects[BOULDER].oc_class + SYM_OFF_O]);
#endif
else if (!strcmp(optname, "catname"))
@@ -6099,16 +6109,20 @@ free_symsets()
/* Parse the value of a SYMBOLS line from a config file */
boolean
parsesymbols(opts)
parsesymbols(opts, which_set)
register char *opts;
int which_set;
{
int val;
char *op, *symname, *strval;
struct symparse *symp;
#ifdef DEBUG
int sym_max = SYM_MAX;
#endif
if ((op = index(opts, ',')) != 0) {
*op++ = 0;
if (!parsesymbols(op))
if (!parsesymbols(op, which_set))
return FALSE;
}
@@ -6131,7 +6145,10 @@ register char *opts;
if (symp->range && symp->range != SYM_CONTROL) {
val = sym_val(strval);
update_l_symset(symp, val);
if (which_set == ROGUESET)
update_ov_rogue_symset(symp, val);
else
update_ov_primary_symset(symp, val);
}
return TRUE;
}

View File

@@ -813,11 +813,12 @@ struct permonst **for_supplement;
unreconnoitered[] = "unreconnoitered";
static char look_buf[BUFSZ];
char prefix[BUFSZ];
int i, alt_i, glyph = NO_GLYPH,
int i, alt_i, j, glyph = NO_GLYPH,
skipped_venom = 0, found = 0; /* count of matching syms found */
boolean hit_trap, need_to_look = FALSE,
submerged = (Underwater && !Is_waterlevel(&u.uz));
const char *x_str;
nhsym tmpsym;
if (looked) {
int oc;
@@ -881,7 +882,7 @@ struct permonst **for_supplement;
if (x_str == unreconnoitered)
goto didlook;
}
check_monsters:
/* Check for monsters */
if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0) {
for (i = 1; i < MAXMCLASSES; i++) {
@@ -1034,8 +1035,53 @@ struct permonst **for_supplement;
}
}
/* Finally, handle some optional overriding symbols */
for (j = SYM_OFF_X; j < SYM_MAX; ++j) {
if (j == (SYM_INVISIBLE + SYM_OFF_X))
continue; /* already handled above */
tmpsym = Is_rogue_level(&u.uz) ? ov_rogue_syms[j] : ov_primary_syms[j];
if (tmpsym && sym == tmpsym) {
switch(j) {
case SYM_BOULDER + SYM_OFF_X:
if (!found) {
*firstmatch = "boulder";
Sprintf(out_str, "%s%s", prefix, an(*firstmatch));
found++;
} else {
found += append_str(out_str, "boulder");
}
break;
case SYM_PET_OVERRIDE + SYM_OFF_X:
if (looked) {
int oc = 0;
unsigned os = 0;
nhsym save_override;
if (Is_rogue_level(&u.uz)) {
save_override = ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X];
ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = 0;
} else {
save_override = ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X];
ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = 0;
}
/* convert to symbol without the override in effect */
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y);
if (Is_rogue_level(&u.uz))
ov_rogue_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = save_override;
else
ov_primary_syms[SYM_PET_OVERRIDE + SYM_OFF_X] = save_override;
goto check_monsters;
}
break;
case SYM_PLAYER_OVERRIDE + SYM_OFF_X:
sym = showsyms[S_HUMAN + SYM_OFF_M];
goto check_monsters;
}
}
}
#if 0
/* handle optional boulder symbol as a special case */
if (iflags.bouldersym && sym == iflags.bouldersym) {
if (o_syms[SYM_BOULDER + SYM_OFF_X] && sym == o_syms[SYM_BOULDER + SYM_OFF_X]) {
if (!found) {
*firstmatch = "boulder";
Sprintf(out_str, "%s%s", prefix, an(*firstmatch));
@@ -1044,6 +1090,7 @@ struct permonst **for_supplement;
found += append_str(out_str, "boulder");
}
}
#endif
/*
* If we are looking at the screen, follow multiple possibilities or

View File

@@ -80,6 +80,7 @@ sys_early_init()
sysopt.check_plname = 0;
sysopt.seduce = 1; /* if it's compiled in, default to on */
sysopt_seduce_set(sysopt.seduce);
sysopt.accessibility = 0;
return;
}