Remove TEXTCOLOR build option
This commit is contained in:
@@ -136,9 +136,7 @@ int attrib_gr_intense; /* graphics mode intense attribute */
|
||||
uint32 curframecolor = NO_COLOR; /* current background text color */
|
||||
boolean traditional = FALSE; /* traditonal TTY character mode */
|
||||
boolean inmap = FALSE; /* in the map window */
|
||||
#ifdef TEXTCOLOR
|
||||
char ttycolors[CLR_MAX]; /* also used/set in options.c */
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
void
|
||||
backsp(void)
|
||||
@@ -233,11 +231,7 @@ int
|
||||
has_color(int color)
|
||||
{
|
||||
++color; /* prevents compiler warning (unref. param) */
|
||||
#ifdef TEXTCOLOR
|
||||
return (monoflag) ? 0 : 1;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -357,7 +351,6 @@ term_start_attr(int attr)
|
||||
void
|
||||
term_start_color(int color)
|
||||
{
|
||||
#ifdef TEXTCOLOR
|
||||
if (monoflag) {
|
||||
g_attribute = attrib_text_normal;
|
||||
} else {
|
||||
@@ -368,19 +361,16 @@ term_start_color(int color)
|
||||
g_attribute = ttycolors[color];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
term_start_bgcolor(int bgcolor)
|
||||
{
|
||||
// pline("before bgcolor = %d, curframecolor = %d", bgcolor, curframecolor);
|
||||
#ifdef TEXTCOLOR
|
||||
if (!monoflag) {
|
||||
if (bgcolor >= 0 && bgcolor < CLR_MAX)
|
||||
curframecolor = bgcolor;
|
||||
}
|
||||
#endif
|
||||
// pline("after bgcolor = %d, curframecolor = %d", bgcolor, curframecolor);
|
||||
}
|
||||
|
||||
@@ -466,9 +456,7 @@ tty_startup(int *wid, int *hgt)
|
||||
setclipped();
|
||||
#endif
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
init_ttycolor();
|
||||
#endif
|
||||
|
||||
#ifdef MONO_CHECK
|
||||
monoflag = txt_monoadapt_check();
|
||||
@@ -704,7 +692,6 @@ HideCursor(void)
|
||||
|
||||
#endif /* SIMULATE_CURSOR */
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
/*
|
||||
* CLR_BLACK 0
|
||||
* CLR_RED 1
|
||||
@@ -928,7 +915,6 @@ convert_uchars(char *bufp, /* current pointer */
|
||||
}
|
||||
|
||||
#endif /* VIDEOSHADES */
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
/*
|
||||
* Process defaults.nh OPTIONS=video:xxxx
|
||||
|
||||
@@ -279,7 +279,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TOS) && defined(TEXTCOLOR)
|
||||
#if defined(TOS)
|
||||
if (iflags.BIOS && iflags.use_color)
|
||||
set_colors();
|
||||
#endif
|
||||
|
||||
@@ -273,10 +273,8 @@ msexit(void)
|
||||
#ifdef TOS
|
||||
if (run_from_desktop)
|
||||
getreturn("to continue"); /* so the user can read the score list */
|
||||
#ifdef TEXTCOLOR
|
||||
if (colors_changed)
|
||||
restore_colors();
|
||||
#endif
|
||||
#endif
|
||||
wait_synch();
|
||||
return;
|
||||
|
||||
@@ -393,10 +393,8 @@ init_sco_cons(void)
|
||||
load_symset("IBMGraphics", PRIMARYSET);
|
||||
load_symset("RogueIBM", ROGUESET);
|
||||
switch_symbols(TRUE);
|
||||
#ifdef TEXTCOLOR
|
||||
if (has_colors())
|
||||
iflags.use_color = TRUE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -450,10 +448,8 @@ init_linux_cons(void)
|
||||
if (WINDOWPORT(tty) && linux_flag_console) {
|
||||
atexit(linux_mapon);
|
||||
linux_mapoff();
|
||||
#ifdef TEXTCOLOR
|
||||
if (has_colors())
|
||||
iflags.use_color = TRUE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -229,10 +229,11 @@ Notes:
|
||||
config.h: UNIX, TTY_GRAPHICS
|
||||
unixconf.h: SYSV, SVR4, TERMINFO, POSIX_JOB_CONTROL, POSIX_TYPES
|
||||
|
||||
X11_GRAPHICS does work. You may safely define
|
||||
NETWORK, TEXTCOLOR if desired. Other #defines in these files may be
|
||||
defined too, as needed. Just make sure that the set mentioned here are
|
||||
not misdefined, or your compile will fail (do _not_ define BSD or SUNOS4).
|
||||
X11_GRAPHICS does work. You may safely define NETWORK if desired.
|
||||
Other #defines in these files may be defined too, as needed. Just make
|
||||
sure that the set mentioned here are not misdefined, or your compile
|
||||
will fail (do _not_ define BSD or SUNOS4).
|
||||
|
||||
Unless you are using gzip you will probably want to define COMPRESS to
|
||||
be "/usr/bin/compress".
|
||||
|
||||
|
||||
@@ -61,10 +61,7 @@
|
||||
|
||||
3. Prior to beginning compilation, go to the [.include] subdirectory and
|
||||
edit vmsconf.h according to its comments. You should set Local_WIZARD
|
||||
and Local_HACKDIR to appropriate values, and you might want to define
|
||||
TEXTCOLOR if you have any color VAXstations or color terminals which
|
||||
handle ANSI-format escape sequences to set foreground and background
|
||||
color for text characters. (VT241/VT340 color graphics won't work.)
|
||||
and Local_HACKDIR to appropriate values.
|
||||
Other things which may be of interest are SECURE if you intend to
|
||||
set up NetHack as an installed image which is granted privileges, and
|
||||
SHELL which should be disabled if you intend to allow captive accounts
|
||||
|
||||
@@ -975,18 +975,10 @@ void buffer_write(cell_t * buffer, cell_t * cell, COORD pos)
|
||||
void
|
||||
gettty(void)
|
||||
{
|
||||
#ifndef TEXTCOLOR
|
||||
int k;
|
||||
#endif
|
||||
erase_char = '\b';
|
||||
kill_char = 21; /* cntl-U */
|
||||
iflags.cbreak = TRUE;
|
||||
#ifdef TEXTCOLOR
|
||||
init_ttycolor();
|
||||
#else
|
||||
for (k = 0; k < CLR_MAX; ++k)
|
||||
ttycolors[k] = NO_COLOR;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* reset terminal to original state */
|
||||
@@ -1636,7 +1628,6 @@ tty_delay_output(void)
|
||||
static void
|
||||
init_ttycolor(void)
|
||||
{
|
||||
#ifdef TEXTCOLOR
|
||||
ttycolors[CLR_BLACK] = FOREGROUND_INTENSITY; /* fix by Quietust */
|
||||
ttycolors[CLR_RED] = FOREGROUND_RED;
|
||||
ttycolors[CLR_GREEN] = FOREGROUND_GREEN;
|
||||
@@ -1673,15 +1664,6 @@ init_ttycolor(void)
|
||||
ttycolors_inv[CLR_BRIGHT_CYAN] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY;
|
||||
ttycolors_inv[CLR_WHITE] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
|
||||
| BACKGROUND_INTENSITY;
|
||||
#else
|
||||
int k;
|
||||
ttycolors[0] = FOREGROUND_INTENSITY;
|
||||
ttycolors_inv[0] = BACKGROUND_INTENSITY;
|
||||
for (k = 1; k < SIZE(ttycolors); ++k) {
|
||||
ttycolors[k] = FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED;
|
||||
ttycolors_inv[k] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED;
|
||||
}
|
||||
#endif
|
||||
init_ttycolor_completed = TRUE;
|
||||
}
|
||||
|
||||
@@ -1765,31 +1747,27 @@ term_start_raw_bold(void)
|
||||
void
|
||||
term_start_color(int color)
|
||||
{
|
||||
#ifdef TEXTCOLOR
|
||||
if (color >= 0 && color < CLR_MAX) {
|
||||
console.current_nhcolor = color;
|
||||
} else
|
||||
#endif
|
||||
console.current_nhcolor = NO_COLOR;
|
||||
} else {
|
||||
console.current_nhcolor = NO_COLOR;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
term_start_bgcolor(int color)
|
||||
{
|
||||
#ifdef TEXTCOLOR
|
||||
if (color >= 0 && color < CLR_MAX) {
|
||||
console.current_nhbkcolor = color;
|
||||
} else
|
||||
#endif
|
||||
console.current_nhbkcolor = NO_COLOR;
|
||||
} else {
|
||||
console.current_nhbkcolor = NO_COLOR;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
term_end_color(void)
|
||||
{
|
||||
#ifdef TEXTCOLOR
|
||||
console.foreground = DEFTEXTCOLOR;
|
||||
#endif
|
||||
#ifndef VIRTUAL_TERMINAL_SEQUENCES
|
||||
console.attr = (console.foreground | console.background);
|
||||
#endif /* ! VIRTUAL_TERMINAL_SEQUENCES */
|
||||
|
||||
Reference in New Issue
Block a user