From: nhmall Date: Tue, 21 Sep 2021 12:38:56 +0000 (-0400) Subject: fix build when TEXTCOLOR is not defined X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36601cf35c17860a60b890b38eea58609e85cb80;p=nethack fix build when TEXTCOLOR is not defined This was picked-up by the CI minimal build which #undefine's several things before attempting the build. --- diff --git a/src/display.c b/src/display.c index 411caaa0f..0d645d02b 100644 --- a/src/display.c +++ b/src/display.c @@ -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) {