Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-11-16 23:14:34 -05:00
19 changed files with 38 additions and 41 deletions

View File

@@ -1932,7 +1932,7 @@ dump_map()
glyph = reveal_terrain_getglyph(x, y, FALSE, u.uswallow,
default_glyph, subset);
(void) mapglyph(glyph, &ch, &color, &special, x, y);
(void) mapglyph(glyph, &ch, &color, &special, x, y, 0);
buf[x - 1] = ch;
if (ch != ' ') {
blankrow = FALSE;

View File

@@ -59,10 +59,11 @@ static const int explcolors[] = {
/*ARGSUSED*/
int
mapglyph(glyph, ochar, ocolor, ospecial, x, y)
mapglyph(glyph, ochar, ocolor, ospecial, x, y, mgflags)
int glyph, *ocolor, x, y;
int *ochar;
unsigned *ospecial;
unsigned mgflags;
{
register int offset, idx;
int color = NO_COLOR;
@@ -223,7 +224,7 @@ unsigned *ospecial;
}
/* These were requested by a blind player to enhance screen reader use */
if (sysopt.accessibility == 1) {
if (sysopt.accessibility == 1 && !(mgflags & MG_FLAG_NOOVERRIDE)) {
int ovidx;
if ((special & MG_PET) != 0) {
@@ -300,7 +301,7 @@ const char *str;
gv = (gv * 16) + ((int) (dp - hex) / 2);
else
break;
so = mapglyph(gv, &ch, &oc, &os, 0, 0);
so = mapglyph(gv, &ch, &oc, &os, 0, 0, 0);
*put++ = g.showsyms[so];
/* 'str' is ready for the next loop iteration and '*str'
should not be copied at the end of this iteration */

View File

@@ -826,7 +826,7 @@ struct permonst **for_supplement;
glyph = glyph_at(cc.x, cc.y);
/* Convert glyph at selected position to a symbol for use below. */
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y);
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y, 0);
Sprintf(prefix, "%s ", encglyph(glyph));
} else
@@ -1055,21 +1055,10 @@ struct permonst **for_supplement;
if (looked) {
int oc = 0, idx = SYM_PET_OVERRIDE + SYM_OFF_X;
unsigned os = 0;
nhsym save_override;
if (Is_rogue_level(&u.uz)) {
save_override = g.ov_rogue_syms[idx];
g.ov_rogue_syms[idx] = 0;
} else {
save_override = g.ov_primary_syms[idx];
g.ov_primary_syms[idx] = 0;
}
/* convert to symbol without override in effect */
(void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y);
if (Is_rogue_level(&u.uz))
g.ov_rogue_syms[idx] = save_override;
else
g.ov_primary_syms[idx] = save_override;
(void) mapglyph(glyph, &sym, &oc, &os,
cc.x, cc.y, MG_FLAG_NOOVERRIDE);
goto check_monsters;
}
break;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 region.c $NHDT-Date: 1573933605 2019/11/16 19:46:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ */
/* NetHack 3.6 region.c $NHDT-Date: 1573957877 2019/11/17 02:31:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.45 $ */
/* Copyright (c) 1996 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */
@@ -338,6 +338,11 @@ NhRegion *reg;
if (i == g.n_regions)
return;
/* remove region before potential newsym() calls, but don't free it yet */
if (--g.n_regions != i)
g.regions[i] = g.regions[g.n_regions];
g.regions[g.n_regions] = (NhRegion *) 0;
/* Update screen if necessary */
reg->ttl = -2L; /* for visible_region_at */
if (reg->visible)
@@ -347,9 +352,6 @@ NhRegion *reg;
newsym(x, y);
free_region(reg);
g.regions[i] = g.regions[g.n_regions - 1];
g.regions[g.n_regions - 1] = (NhRegion *) 0;
g.n_regions--;
}
/*