altar color revisited

The issue of mimics masquerading as altars just came up two weeks
ago but never entered my mind when I worked on this yesterday.
This commit is contained in:
PatR
2019-12-08 10:36:52 -08:00
parent 625bfd1efd
commit d43f8f6f9e
4 changed files with 33 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mapglyph.c $NHDT-Date: 1575755075 2019/12/07 21:44:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.58 $ */
/* NetHack 3.6 mapglyph.c $NHDT-Date: 1575830186 2019/12/08 18:36:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.60 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
@@ -163,22 +163,24 @@ unsigned mgflags;
== g.showsyms[S_water + SYM_OFF_P])) {
special |= MG_BW_LAVA;
} else if (offset == S_altar && iflags.use_color) {
int amsk = altarmask_at(x, y); /* might be a mimic */
if ((g.glyphmap_perlevel_flags & GMAP_ALTARCOLOR)
&& (levl[x][y].altarmask & AM_SHRINE)) {
&& (amsk & AM_SHRINE) != 0) {
/* high altar */
color = CLR_BRIGHT_MAGENTA;
} else {
switch (levl[x][y].altarmask & AM_MASK) {
switch (amsk & AM_MASK) {
#if 0 /*
* On OSX with XTERM=xterm-color256 these render as
* On OSX with TERM=xterm-color256 these render as
* white -> tty: gray, curses: ok
* gray -> both tty and curses: black
* black -> both tty and curses: blue
* red -> both tty and curses: ok.
* Since the colors have specific associations (mainly with
* the unicorns matched with each alignment), we shouldn't use
* Since the colors have specific associations (with the
* unicorns matched with each alignment), we shouldn't use
* scrambled colors and we don't have sufficient information
* to handle platform-specific variations.
* to handle platform-specific color variations.
*/
case AM_LAWFUL: /* 4 */
color = CLR_WHITE;