]> granicus.if.org Git - nethack/commitdiff
fix build when TEXTCOLOR is not defined
authornhmall <nhmall@nethack.org>
Tue, 21 Sep 2021 12:38:56 +0000 (08:38 -0400)
committernhmall <nhmall@nethack.org>
Tue, 21 Sep 2021 12:38:56 +0000 (08:38 -0400)
This was picked-up by the CI minimal build which #undefine's
several things before attempting the build.

src/display.c

index 411caaa0f0d16dbf315fe905454f8392e3703ee8..0d645d02bca7fa1007fbc7143bd417f4064cc57e 100644 (file)
@@ -2250,7 +2250,7 @@ int wallcolors[sokoban_walls + 1] = {
 #define explode_color(n) \
     color = iflags.use_color ? explodecolors[n] : NO_COLOR
 #define wall_color(n) color = iflags.use_color ? wallcolors[n] : NO_COLOR
-
+#define altar_color(n) color = iflags.use_color ? altarcolors[n] : NO_COLOR
 #else /* no text color */
 
 #define zap_color(n)
@@ -2262,6 +2262,7 @@ int wallcolors[sokoban_walls + 1] = {
 #define warn_color(n)
 #define explode_color(n)
 #define wall_color(n)
+#define altar_color(n)
 #endif
 
 #if 0
@@ -2438,7 +2439,7 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
             /* unaligned, chaotic, neutral, lawful, shrine */
             gmap->symidx = S_altar + SYM_OFF_P;
             if (g.glyphmap_perlevel_flags & GMAP_ALTARCOLOR)
-                color = altarcolors[offset];
+                altar_color(offset);
             else
                 cmap_color(S_altar); /* gray */
         } else if ((offset = (glyph - GLYPH_CMAP_A_OFF)) >= 0) {