Remove TEXTCOLOR build option
This commit is contained in:
@@ -2457,7 +2457,6 @@ map_glyphinfo(
|
||||
* as well as to regular display.)
|
||||
*/
|
||||
if (is_you) {
|
||||
#ifdef TEXTCOLOR
|
||||
if (!iflags.use_color || Upolyd || glyph != hero_glyph) {
|
||||
; /* color tweak not needed (!use_color) or not wanted (poly'd
|
||||
or riding--which uses steed's color, not hero's) */
|
||||
@@ -2471,7 +2470,6 @@ map_glyphinfo(
|
||||
by newsym()); we change the color to same as human hero */
|
||||
glyphinfo->gm.sym.color = HI_DOMESTIC;
|
||||
}
|
||||
#endif
|
||||
/* accessibility
|
||||
This unchanging display character for hero was requested by
|
||||
a blind player to enhance screen reader use.
|
||||
@@ -2495,7 +2493,6 @@ map_glyphinfo(
|
||||
glyphinfo->glyph = glyph;
|
||||
}
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
/*
|
||||
* This must be the same order as used for buzz() in zap.c.
|
||||
* The zap_color_ and altar_color_ enums are in decl.h.
|
||||
@@ -2522,9 +2519,6 @@ int wallcolors[sokoban_walls + 1] = {
|
||||
/* CLR_GRAY, CLR_BROWN, CLR_RED, CLR_GRAY, CLR_BRIGHT_BLUE, */
|
||||
};
|
||||
|
||||
#endif /* text color */
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
#define zap_color(n) color = iflags.use_color ? zapcolors[n] : NO_COLOR
|
||||
#define cmap_color(n) color = iflags.use_color ? defsyms[n].color : NO_COLOR
|
||||
#define obj_color(n) color = iflags.use_color ? objects[n].oc_color : NO_COLOR
|
||||
@@ -2537,19 +2531,6 @@ int wallcolors[sokoban_walls + 1] = {
|
||||
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)
|
||||
#define cmap_color(n)
|
||||
#define obj_color(n)
|
||||
#define mon_color(n)
|
||||
#define invis_color(n)
|
||||
#define pet_color(c)
|
||||
#define warn_color(n)
|
||||
#define explode_color(n)
|
||||
#define wall_color(n)
|
||||
#define altar_color(n)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define is_objpile(x, y) \
|
||||
@@ -2797,13 +2778,11 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
|
||||
*/
|
||||
if (has_rogue_color) {
|
||||
color = cmap_to_roguecolor(cmap);
|
||||
#ifdef TEXTCOLOR
|
||||
/* provide a visible difference if normal and lit corridor
|
||||
use the same symbol */
|
||||
} else if (cmap == S_litcorr
|
||||
&& sym == gs.showsyms[S_corr + SYM_OFF_P]) {
|
||||
color = CLR_WHITE;
|
||||
#endif
|
||||
/* likewise for corridor and engraving-in-corridor */
|
||||
} else if (cmap == S_engrcorr
|
||||
&& (sym == gs.showsyms[S_corr + SYM_OFF_P]
|
||||
@@ -2940,13 +2919,11 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
|
||||
if (gs.showsyms[pet_override] != ' ')
|
||||
gmap->sym.symidx = SYM_PET_OVERRIDE + SYM_OFF_X;
|
||||
}
|
||||
#ifdef TEXTCOLOR
|
||||
/* Turn off color if no color defined, or rogue level w/o PC graphics.
|
||||
*/
|
||||
if ((!has_color(color)
|
||||
|| ((gg.glyphmap_perlevel_flags & GMAP_ROGUELEVEL)
|
||||
&& !has_rogue_color)) || !iflags.use_color)
|
||||
#endif
|
||||
color = NO_COLOR;
|
||||
gmap->sym.color = color;
|
||||
}
|
||||
|
||||
@@ -14,12 +14,7 @@
|
||||
#ifdef C
|
||||
#undef C
|
||||
#endif
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
#define C(n) n
|
||||
#else
|
||||
#define C(n)
|
||||
#endif
|
||||
|
||||
/* Default object class symbols. See objclass.h.
|
||||
* {symbol, name, explain}
|
||||
@@ -70,11 +65,7 @@ const struct symdef defsyms[MAXPCHARS + 1] = {
|
||||
#define PCHAR_DRAWING
|
||||
#include "defsym.h"
|
||||
#undef PCHAR_DRAWING
|
||||
{ 0, NULL
|
||||
#ifdef TEXTCOLOR
|
||||
, NO_COLOR
|
||||
#endif
|
||||
}
|
||||
{ 0, NULL, NO_COLOR }
|
||||
};
|
||||
|
||||
/* default rogue level symbols */
|
||||
|
||||
@@ -279,9 +279,7 @@ make_version(void)
|
||||
#endif
|
||||
/* objects (10..14) */
|
||||
/* flag bits and/or other global variables (15..26) */
|
||||
#ifdef TEXTCOLOR
|
||||
| (1L << 17)
|
||||
#endif
|
||||
/* color support always*/ | (1L << 17)
|
||||
#ifdef INSURANCE
|
||||
| (1L << 18)
|
||||
#endif
|
||||
@@ -501,9 +499,7 @@ static const char *const build_opts[] = {
|
||||
#ifdef ANSI_DEFAULT
|
||||
"ANSI default terminal",
|
||||
#endif
|
||||
#ifdef TEXTCOLOR
|
||||
"color",
|
||||
#endif
|
||||
#ifdef TTY_GRAPHICS
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
"console escape codes for tile hinting",
|
||||
|
||||
@@ -11,12 +11,8 @@
|
||||
#ifdef C
|
||||
#undef C
|
||||
#endif
|
||||
#ifdef TEXTCOLOR
|
||||
#include "color.h"
|
||||
#define C(color) color
|
||||
#else
|
||||
#define C(color)
|
||||
#endif
|
||||
|
||||
#define NO_ATTK \
|
||||
{ \
|
||||
|
||||
57
src/muse.c
57
src/muse.c
@@ -3053,9 +3053,11 @@ cures_sliming(struct monst *mon, struct obj *obj)
|
||||
&& obj->spe > 0);
|
||||
}
|
||||
|
||||
/* TRUE if monster appears to be green; for active TEXTCOLOR, we go by
|
||||
the display color, otherwise we just pick things that seem plausibly
|
||||
green (which doesn't necessarily match the TEXTCOLOR categorization) */
|
||||
/* TRUE if monster appears to be green; we go by the display color.
|
||||
The alternative was to just pick things that
|
||||
seem plausibly green (which didn't necessarily match the categorization
|
||||
by the color of the text).
|
||||
iflags.use_color is not meant for game behavior decisions */
|
||||
static boolean
|
||||
green_mon(struct monst *mon)
|
||||
{
|
||||
@@ -3063,34 +3065,37 @@ green_mon(struct monst *mon)
|
||||
|
||||
if (Hallucination)
|
||||
return FALSE;
|
||||
#ifdef TEXTCOLOR
|
||||
return (ptr->mcolor == CLR_GREEN || ptr->mcolor == CLR_BRIGHT_GREEN);
|
||||
#if 0
|
||||
if (iflags.use_color)
|
||||
return (ptr->mcolor == CLR_GREEN || ptr->mcolor == CLR_BRIGHT_GREEN);
|
||||
#endif
|
||||
/* approximation */
|
||||
if (strstri(ptr->pmnames[NEUTRAL], "green")
|
||||
|| (ptr->pmnames[MALE] && strstri(ptr->pmnames[MALE], "green"))
|
||||
|| (ptr->pmnames[FEMALE] && strstri(ptr->pmnames[FEMALE], "green")))
|
||||
return TRUE;
|
||||
switch (monsndx(ptr)) {
|
||||
case PM_FOREST_CENTAUR:
|
||||
case PM_GARTER_SNAKE:
|
||||
case PM_GECKO:
|
||||
case PM_GREMLIN:
|
||||
case PM_HOMUNCULUS:
|
||||
case PM_JUIBLEX:
|
||||
case PM_LEPRECHAUN:
|
||||
case PM_LICHEN:
|
||||
case PM_LIZARD:
|
||||
case PM_WOOD_NYMPH:
|
||||
return TRUE;
|
||||
default:
|
||||
if (is_elf(ptr) && !is_prince(ptr) && !is_lord(ptr)
|
||||
&& ptr != &mons[PM_GREY_ELF])
|
||||
else {
|
||||
/* approximation */
|
||||
if (strstri(ptr->pmnames[NEUTRAL], "green")
|
||||
|| (ptr->pmnames[MALE] && strstri(ptr->pmnames[MALE], "green"))
|
||||
|| (ptr->pmnames[FEMALE] && strstri(ptr->pmnames[FEMALE], "green")))
|
||||
return TRUE;
|
||||
break;
|
||||
switch (monsndx(ptr)) {
|
||||
case PM_FOREST_CENTAUR:
|
||||
case PM_GARTER_SNAKE:
|
||||
case PM_GECKO:
|
||||
case PM_GREMLIN:
|
||||
case PM_HOMUNCULUS:
|
||||
case PM_JUIBLEX:
|
||||
case PM_LEPRECHAUN:
|
||||
case PM_LICHEN:
|
||||
case PM_LIZARD:
|
||||
case PM_WOOD_NYMPH:
|
||||
return TRUE;
|
||||
default:
|
||||
if (is_elf(ptr) && !is_prince(ptr) && !is_lord(ptr)
|
||||
&& ptr != &mons[PM_GREY_ELF])
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*muse.c*/
|
||||
|
||||
@@ -120,12 +120,8 @@ init_objects(void)
|
||||
{
|
||||
int i, first, last, prevoclass;
|
||||
char oclass;
|
||||
#ifdef TEXTCOLOR
|
||||
#define COPY_OBJ_DESCR(o_dst, o_src) \
|
||||
o_dst.oc_descr_idx = o_src.oc_descr_idx, o_dst.oc_color = o_src.oc_color
|
||||
#else
|
||||
#define COPY_OBJ_DESCR(o_dst, o_src) o_dst.oc_descr_idx = o_src.oc_descr_idx
|
||||
#endif
|
||||
|
||||
for (i = 0; i <= MAXOCLASSES; i++) {
|
||||
gb.bases[i] = 0;
|
||||
|
||||
@@ -110,7 +110,7 @@ static struct allopt_t allopt[SIZE(allopt_init)];
|
||||
|
||||
extern char configfile[]; /* for messages */
|
||||
extern const struct symparse loadsyms[];
|
||||
#if defined(TOS) && defined(TEXTCOLOR)
|
||||
#if defined(TOS)
|
||||
extern boolean colors_changed; /* in tos.c */
|
||||
#endif
|
||||
#ifdef VIDEOSHADES
|
||||
@@ -6755,9 +6755,7 @@ initoptions_init(void)
|
||||
if (!gs.symset[ROGUESET].explicitly)
|
||||
load_symset("RogueIBM", ROGUESET);
|
||||
switch_symbols(TRUE);
|
||||
#ifdef TEXTCOLOR
|
||||
iflags.use_color = TRUE;
|
||||
#endif
|
||||
}
|
||||
#endif /* UNIX && TTY_GRAPHICS */
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
|
||||
@@ -1361,14 +1361,12 @@ dump_redirect(boolean onoff_flag)
|
||||
}
|
||||
|
||||
#ifdef TTY_GRAPHICS
|
||||
#ifdef TEXTCOLOR
|
||||
#ifdef TOS
|
||||
extern const char *hilites[CLR_MAX];
|
||||
#else
|
||||
extern NEARDATA char *hilites[CLR_MAX];
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int
|
||||
has_color(int color)
|
||||
@@ -1376,7 +1374,7 @@ has_color(int color)
|
||||
return (iflags.use_color && windowprocs.name
|
||||
&& (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color]
|
||||
#ifdef TTY_GRAPHICS
|
||||
#if defined(TEXTCOLOR) && defined(TERMLIB) && !defined(NO_TERMS)
|
||||
#if defined(TERMLIB) && !defined(NO_TERMS)
|
||||
&& (hilites[color] != 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user