]> granicus.if.org Git - nethack/commitdiff
remove unneeded per level flag
authornhmall <nhmall@nethack.org>
Thu, 23 Sep 2021 01:17:21 +0000 (21:17 -0400)
committernhmall <nhmall@nethack.org>
Thu, 23 Sep 2021 01:17:21 +0000 (21:17 -0400)
this is now taken care of in back_to_glyph (via altar_to_glyph)

include/display.h
include/extern.h
src/display.c
win/share/other.txt
win/share/tilemap.c

index 57147597b967e35acb8df85c7727d48097e2dba4..5a3e1d9e91cac9c2882d7af161d6151b64c55d18 100644 (file)
  * cmap A           S_ndoor through S_brdnladder
  *                  Count: (S_brdnladder - S_ndoor) + 1 = 19
  *
- * Altars           Altar (Unaligned, Chaotic, Neutral, Lawful, high altar)
+ * Altars           Altar (unaligned, chaotic, neutral, lawful, other)
  *                  Count: 5
  *
  * cmap B           S_grave through S_vibrating_square
@@ -916,7 +916,7 @@ enum altar_colors {
     altar_color_neutral = CLR_GRAY,
     altar_color_lawful  = CLR_GRAY,
 #endif
-    altar_color_highaltar = CLR_BRIGHT_MAGENTA,
+    altar_color_other = CLR_BRIGHT_MAGENTA,
 };
 
 /* types of explosions */
@@ -956,7 +956,7 @@ enum altar_types {
     altar_chaotic,
     altar_neutral,
     altar_lawful,
-    altar_highaltar
+    altar_other
 };
 
 enum { GM_FLAGS, GM_TTYCHAR, GM_COLOR, NUM_GLYPHMOD }; /* glyphmod entries */
index f545be56c89f6614c80164113122998592ff8565..98b08e1d958243f6456a7c783c4b27c7296f5d49 100644 (file)
@@ -342,7 +342,6 @@ extern int wiz_debug_cmd_bury(void);
 /* ### display.c ### */
 
 extern void magic_map_background(xchar, xchar, int);
-extern void map_altar(xchar, xchar, int);
 extern void map_background(xchar, xchar, int);
 extern void map_trap(struct trap *, int);
 extern void map_object(struct obj *, int);
index 90cf5b69ce9d9dde58e132591457b8095b64ac1b..053c4fb0b700fc8d6c19a8a21deec58e30314bb7 100644 (file)
@@ -370,18 +370,6 @@ show_mon_or_warn(int x, int y, int monglyph)
     show_glyph(x, y, monglyph);
 }
 
-/*
- * map_altar(x, y, amsk)
- */
-void
-map_altar(xchar x, xchar y, int amsk)
-{
-    int glyph = altar_to_glyph(amsk);
-
-    if (g.level.flags.hero_memory)
-        levl[x][y].glyph = glyph;
-    show_glyph(x, y, glyph);
-}
 #define DETECTED 2
 #define PHYSICALLY_SEEN 1
 #define is_worm_tail(mon) ((mon) && ((x != (mon)->mx) || (y != (mon)->my)))
@@ -837,8 +825,6 @@ newsym(register int x, register int y)
                 display_warning(mon);
             } else if (glyph_is_invisible(lev->glyph)) {
                 map_invisible(x, y);
-            } else if (IS_ALTAR(levl[x][y].typ)) {
-                map_altar(x, y, levl[x][y].altarmask);
             } else
                 _map_location(x, y, 1); /* map the location */\
         }
@@ -1972,12 +1958,6 @@ back_to_glyph(xchar x, xchar y)
         idx = S_sink;
         break;
     case ALTAR:
-        /* 5 altar types share one cmap entry, so
-           ptr->altarmask needs to be considered.
-           An alternative would be to add 4 additional cmap
-           entries for the 5 altar types and symbols
-           S_altar_unaligned, S_altar_chaotic,
-           S_altar_neutral, S_altar_lawful, S_altar_shrine. */
         idx = S_altar;  /* not really used */
         bypass_glyph = altar_to_glyph(ptr->altarmask);
         break;
@@ -2185,7 +2165,6 @@ get_bk_glyph(xchar x, xchar y)
 /* masks for per-level variances kept in g.glyphmap_perlevel_flags */
 #define GMAP_SET            0x0001
 #define GMAP_ROGUELEVEL     0x0002
-#define GMAP_HIGHALTARCOLOR 0x0004
 
 void
 map_glyphinfo(xchar x, xchar y, int glyph, unsigned mgflags,
@@ -2242,7 +2221,7 @@ const int zapcolors[NUM_ZAP] = {
 };
 const int altarcolors[] = {
     altar_color_unaligned, altar_color_chaotic, altar_color_neutral,
-    altar_color_lawful, altar_color_highaltar
+    altar_color_lawful, altar_color_other
 };
 const int explodecolors[7] = {
     explode_color_dark,   explode_color_noxious, explode_color_muddy,
@@ -2328,14 +2307,11 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
         /*
          *    GMAP_SET                0x00000001
          *    GMAP_ROGUELEVEL         0x00000002
-         *    GMAP_HIGHALTARCOLOR     0x00000004
          */
         g.glyphmap_perlevel_flags |= GMAP_SET;
 
         if (Is_rogue_level(&u.uz)) {
             g.glyphmap_perlevel_flags |= GMAP_ROGUELEVEL;
-        } else if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) {
-            g.glyphmap_perlevel_flags |= GMAP_HIGHALTARCOLOR;
         }
     }
 
@@ -2457,7 +2433,7 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
             gmap->symidx = S_grave + offset + SYM_OFF_P;
             cmap_color(S_grave + offset);
         } else if ((offset = (glyph - GLYPH_ALTAR_OFF)) >= 0) {
-            /* unaligned, chaotic, neutral, lawful, high altar */
+            /* unaligned, chaotic, neutral, lawful, other altar */
             gmap->symidx = S_altar + SYM_OFF_P;
             altar_color(offset);
         } else if ((offset = (glyph - GLYPH_CMAP_A_OFF)) >= 0) {
index 09ff7df15f40503c68f24829d55fa7fbe7dc6831..af674ff092d090aebfbd47760ab1b70bcf6a39c5 100644 (file)
@@ -692,7 +692,7 @@ Z = (195, 195, 195)
   ...AAAAAAAAAAA..
   ................
 }
-# tile 35 (high altar)
+# tile 35 (other altar)
 {
   ................
   ................
index 4d4f36f135a0ab4d7de1a83efba764223b38ad1c..84935b08674e8d35cd79dbc43cce21b1eb425030 100644 (file)
@@ -60,7 +60,7 @@ struct {
 enum {MON_GLYPH, OBJ_GLYPH, OTH_GLYPH, TERMINATOR = -1};
 #define EXTRA_SCROLL_DESCR_COUNT ((SCR_BLANK_PAPER - SCR_STINKING_CLOUD) - 1)
 const char *altar_text[] = {
-    "unaligned", "chaotic", "neutral", "lawful", "high altar",
+    "unaligned", "chaotic", "neutral", "lawful", "other altar",
 };
 enum wall_levels { main_dungeon, mines, gehennom, knox, sokoban };
 
@@ -329,7 +329,7 @@ tilename(int set, const int file_entry, int gend UNUSED)
 
         /* Altars */
         cmap = S_altar;
-        for (k = altar_unaligned; k <= altar_highaltar; k++) {
+        for (k = altar_unaligned; k <= altar_other; k++) {
             /* Since defsyms only has one altar symbol,
                it isn't much help in identifying details
                these. Roll our own name. */
@@ -889,7 +889,7 @@ init_tilemap(void)
     /* Altars */
     cmap = S_altar;
     j = 0;
-    for (k = altar_unaligned; k <= altar_highaltar; k++) {
+    for (k = altar_unaligned; k <= altar_other; k++) {
         offset = GLYPH_ALTAR_OFF + j;
         precheck((offset), "altar");
         tilemap[offset].tilenum = tilenum;
@@ -1377,7 +1377,7 @@ acceptable_tilename(int glyph_set, int idx, const char *encountered,
         { "raised drawbridge", "vertical closed drawbridge" },
         { "raised drawbridge", "horizontal closed drawbridge" },
         { "altar", "unaligned altar" },
-        { "altar", "high altar" },
+        { "altar", "other altar" },
 #if 0
         { "dark part of a room", "stone" },
 #endif