]> granicus.if.org Git - nethack/commitdiff
more expanded-glyphs follow-up
authornhmall <nhmall@nethack.org>
Wed, 22 Sep 2021 18:20:41 +0000 (14:20 -0400)
committernhmall <nhmall@nethack.org>
Wed, 22 Sep 2021 18:20:41 +0000 (14:20 -0400)
relocate reset_glyphmap() call to more appropriate location
valley and mines unaligned altars are included in the level-specfic
colorization

include/display.h
src/display.c
src/do.c

index 130cad4abdf2b606c93e0e9a6a94227a4d95122b..30d15ffc9495f1e9ca5337031eacfcae13d34377 100644 (file)
@@ -896,7 +896,7 @@ enum zap_colors {
 
 enum altar_colors {
     altar_color_unaligned = CLR_RED,
-#if 0
+#if defined(USE_GENERAL_ALTAR_COLORS)
         /* On OSX with TERM=xterm-color256 these render as
          *  white -> tty: gray, curses: ok
          *  gray  -> both tty and curses: black
index ab002d670775855ac1b3a37749dac43e73302b4e..a6434b951daec089967b1a219ab1d5988e020918 100644 (file)
@@ -2334,7 +2334,10 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
 
         if (Is_rogue_level(&u.uz)) {
             g.glyphmap_perlevel_flags |= GMAP_ROGUELEVEL;
-        } else if ((Is_astralevel(&u.uz) || Is_sanctum(&u.uz))) {
+        } else if (Is_astralevel(&u.uz)
+                   || Is_sanctum(&u.uz)
+                   || In_mines(&u.uz)
+                   || Is_valley(&u.uz)) {
             g.glyphmap_perlevel_flags |= GMAP_ALTARCOLOR;
         }
     }
index cd461616a436493022b8ba728832fd4161ee91c8..9a09203ff8ab337ee6ff4762e3358793646cf234 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -1455,7 +1455,6 @@ goto_level(
 
     if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz))
         assign_graphics(Is_rogue_level(newlevel) ? ROGUESET : PRIMARY);
-    reset_glyphmap(gm_levelchange);
     check_gold_symbol();
     /* record this level transition as a potential seen branch unless using
      * some non-standard means of transportation (level teleport).
@@ -1637,7 +1636,8 @@ goto_level(
     /* Reset the screen. */
     vision_reset(); /* reset the blockages */
     g.glyphmap_perlevel_flags = 0L; /* force per-level map_glyphinfo() changes */
-    docrt();        /* does a full vision recalc */
+    reset_glyphmap(gm_levelchange);
+    docrt(); /* does a full vision recalc */
     flush_screen(-1);
 
     /*