Remove TEXTCOLOR build option
This commit is contained in:
@@ -213,7 +213,6 @@ steps:
|
|||||||
sed -i '/^#define MAIL/d' include/unixconf.h
|
sed -i '/^#define MAIL/d' include/unixconf.h
|
||||||
sed -i '/^#define SHELL/d' include/unixconf.h
|
sed -i '/^#define SHELL/d' include/unixconf.h
|
||||||
sed -i '/^#define SUSPEND/d' include/unixconf.h
|
sed -i '/^#define SUSPEND/d' include/unixconf.h
|
||||||
sed -i 's/^#define TEXTCOLOR//' include/unixconf.h
|
|
||||||
make fetch-lua
|
make fetch-lua
|
||||||
make WANT_WIN_ALL=1 all
|
make WANT_WIN_ALL=1 all
|
||||||
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'minimal'))
|
condition: and(eq( variables['Agent.OS'], 'Linux' ), eq( variables.buildTarget, 'minimal'))
|
||||||
|
|||||||
+3
-5
@@ -14,6 +14,7 @@ blind your character is permanently blind [False]
|
|||||||
bones allow loading bones files [True]
|
bones allow loading bones files [True]
|
||||||
clicklook look at map by clicking right mouse button [False]
|
clicklook look at map by clicking right mouse button [False]
|
||||||
cmdassist give help for errors on direction & other commands [True]
|
cmdassist give help for errors on direction & other commands [True]
|
||||||
|
color use different colors for objects on screen [True for micros]
|
||||||
confirm ask before hitting tame or peaceful monsters [True]
|
confirm ask before hitting tame or peaceful monsters [True]
|
||||||
dark_room show floor not in sight in different color [True]
|
dark_room show floor not in sight in different color [True]
|
||||||
eight_bit_tty send 8-bit characters straight to terminal [False]
|
eight_bit_tty send 8-bit characters straight to terminal [False]
|
||||||
@@ -27,6 +28,8 @@ goldX when filtering objects by bless/curse state, [False]
|
|||||||
help print all available info when using the / command [True]
|
help print all available info when using the / command [True]
|
||||||
herecmd_menu show menu of some possible commands when clicking
|
herecmd_menu show menu of some possible commands when clicking
|
||||||
on yourself or next to you with mouse [False]
|
on yourself or next to you with mouse [False]
|
||||||
|
hilite_pet display pets in a highlighted manner [False]
|
||||||
|
hilite_pile display item piles in a highlighted manner [False]
|
||||||
ignintr ignore interrupt signal, including breaks [False]
|
ignintr ignore interrupt signal, including breaks [False]
|
||||||
implicit_uncursed omit "uncursed" from inventory, if possible [True]
|
implicit_uncursed omit "uncursed" from inventory, if possible [True]
|
||||||
legacy print introductory message [True]
|
legacy print introductory message [True]
|
||||||
@@ -91,11 +94,6 @@ news print any news from game administrator on startup [True]
|
|||||||
Boolean option if SCORE_ON_BOTL was set at compile time:
|
Boolean option if SCORE_ON_BOTL was set at compile time:
|
||||||
showscore display your approximate accumulated score [False]
|
showscore display your approximate accumulated score [False]
|
||||||
|
|
||||||
Boolean options if TEXTCOLOR was set at compile time:
|
|
||||||
color use different colors for objects on screen [True for micros]
|
|
||||||
hilite_pet display pets in a highlighted manner [False]
|
|
||||||
hilite_pile display item piles in a highlighted manner [False]
|
|
||||||
|
|
||||||
Boolean option if TIMED_DELAY was set at compile time (tty or curses only):
|
Boolean option if TIMED_DELAY was set at compile time (tty or curses only):
|
||||||
timed_delay on unix and VMS, use a timer instead of sending [True]
|
timed_delay on unix and VMS, use a timer instead of sending [True]
|
||||||
extra screen output when attempting to pause for
|
extra screen output when attempting to pause for
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
NetHack version 3.7.0 [work-in-progress]
|
||||||
|
|
||||||
|
Options compiled into this edition:
|
||||||
|
|
||||||
|
color, data file compression, data librarian, end-of-game dumplogs,
|
||||||
|
deferred handling of hangup signal, insurance files for recovering from
|
||||||
|
crashes, log file, extended log file, errors and warnings log file, mail
|
||||||
|
daemon, news file, internal pager used for viewing help files, pattern
|
||||||
|
matching via :PATMATCH:, pseudo random numbers generated by ISAAC64,
|
||||||
|
strong PRNG seed from /dev/urandom, restore saved games via menu, screen
|
||||||
|
clipping, shell command, traditional status display, status via
|
||||||
|
windowport with highlighting, suspend command, terminal info library,
|
||||||
|
tiles file in XPM format, graphical RIP screen, timed wait for display
|
||||||
|
effects, system configuration at run-time, save and bones files accepted
|
||||||
|
from version 3.7.0 only, and basic NetHack features.
|
||||||
|
|
||||||
|
Supported windowing systems:
|
||||||
|
|
||||||
|
"tty" (traditional text with optional line-drawing), "curses"
|
||||||
|
(terminal-based graphics), and "X11", with a default of "tty".
|
||||||
|
|
||||||
|
NetHack 3.7.* uses the 'Lua' interpreter to process some data:
|
||||||
|
|
||||||
|
:LUACOPYRIGHT:
|
||||||
|
|
||||||
|
"Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software."
|
||||||
|
nodlb
|
||||||
|
nodlb
|
||||||
@@ -34,11 +34,7 @@
|
|||||||
#undef CLR
|
#undef CLR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#define CLR(n) n
|
#define CLR(n) n
|
||||||
#else
|
|
||||||
#define CLR(n)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PCHAR_S_ENUM) || defined(PCHAR_PARSE) \
|
#if defined(PCHAR_S_ENUM) || defined(PCHAR_PARSE) \
|
||||||
|| defined(PCHAR_DRAWING) || defined(PCHAR_TILES)
|
|| defined(PCHAR_DRAWING) || defined(PCHAR_TILES)
|
||||||
|
|||||||
@@ -1046,12 +1046,10 @@ typedef struct {
|
|||||||
glyph_info glyphinfo;
|
glyph_info glyphinfo;
|
||||||
} gbuf_entry;
|
} gbuf_entry;
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
extern const int altarcolors[];
|
extern const int altarcolors[];
|
||||||
extern const int zapcolors[];
|
extern const int zapcolors[];
|
||||||
extern const int explodecolors[];
|
extern const int explodecolors[];
|
||||||
extern int wallcolors[];
|
extern int wallcolors[];
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If TILES_IN_GLYPHMAP is defined during build, this is defined
|
/* If TILES_IN_GLYPHMAP is defined during build, this is defined
|
||||||
* in the generated tile.c, complete with appropriate tile references in
|
* in the generated tile.c, complete with appropriate tile references in
|
||||||
|
|||||||
@@ -246,7 +246,6 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifdef MSDOS
|
#ifdef MSDOS
|
||||||
#define TEXTCOLOR /* */
|
|
||||||
#define PORT_HELP "msdoshlp.txt" /* msdos port specific help file */
|
#define PORT_HELP "msdoshlp.txt" /* msdos port specific help file */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -288,9 +287,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define ASCIIGRAPH
|
#define ASCIIGRAPH
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#define VIDEOSHADES
|
#define VIDEOSHADES
|
||||||
#endif
|
|
||||||
/* SCREEN_8514, SCREEN_VESA are only placeholders presently - sub VGA instead
|
/* SCREEN_8514, SCREEN_VESA are only placeholders presently - sub VGA instead
|
||||||
*/
|
*/
|
||||||
#if defined(SCREEN_8514)
|
#if defined(SCREEN_8514)
|
||||||
|
|||||||
@@ -60,9 +60,7 @@ struct permonst {
|
|||||||
mflags2; /* more boolean bitflags */
|
mflags2; /* more boolean bitflags */
|
||||||
unsigned short mflags3; /* yet more boolean bitflags */
|
unsigned short mflags3; /* yet more boolean bitflags */
|
||||||
uchar difficulty; /* toughness (formerly from makedefs -m) */
|
uchar difficulty; /* toughness (formerly from makedefs -m) */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
uchar mcolor; /* color to use */
|
uchar mcolor; /* color to use */
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern NEARDATA struct permonst mons[]; /* the master list of monster types */
|
extern NEARDATA struct permonst mons[]; /* the master list of monster types */
|
||||||
|
|||||||
@@ -52,9 +52,7 @@ enum symset_handling_types {
|
|||||||
struct symdef {
|
struct symdef {
|
||||||
uchar sym;
|
uchar sym;
|
||||||
const char *explanation;
|
const char *explanation;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
uchar color;
|
uchar color;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum symparse_range {
|
enum symparse_range {
|
||||||
|
|||||||
@@ -47,12 +47,10 @@ extern struct tc_lcl_data { /* defined and set up in termcap.c */
|
|||||||
|
|
||||||
extern short ospeed; /* set up in termcap.c */
|
extern short ospeed; /* set up in termcap.c */
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#ifdef TOS
|
#ifdef TOS
|
||||||
extern const char *hilites[CLR_MAX];
|
extern const char *hilites[CLR_MAX];
|
||||||
#else
|
#else
|
||||||
extern NEARDATA char *hilites[CLR_MAX];
|
extern NEARDATA char *hilites[CLR_MAX];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* TCAP_H */
|
#endif /* TCAP_H */
|
||||||
|
|||||||
+1
-6
@@ -55,11 +55,6 @@
|
|||||||
* particular, it should NOT be defined for the UNIXPC
|
* particular, it should NOT be defined for the UNIXPC
|
||||||
* unless you remove the use of the shared library in
|
* unless you remove the use of the shared library in
|
||||||
* the Makefile */
|
* the Makefile */
|
||||||
#define TEXTCOLOR /* Use System V r3.2 terminfo color support
|
|
||||||
* and/or ANSI color support on termcap systems
|
|
||||||
* and/or X11 color. Note: if you get compiler
|
|
||||||
* warnings about 'has_colors()' being implicitly
|
|
||||||
* declared, uncomment NEED_HAS_COLORS_DECL below. */
|
|
||||||
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control
|
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control
|
||||||
* (e.g., VSUSP) */
|
* (e.g., VSUSP) */
|
||||||
#define POSIX_TYPES /* use POSIX types for system calls and termios */
|
#define POSIX_TYPES /* use POSIX types for system calls and termios */
|
||||||
@@ -365,7 +360,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Relevant for some systems which enable TEXTCOLOR: some older versions
|
/* Relevant for some systems: some older versions
|
||||||
of curses (the run-time library optionally used by nethack's tty
|
of curses (the run-time library optionally used by nethack's tty
|
||||||
interface in addition to its curses interface) supply 'has_colors()'
|
interface in addition to its curses interface) supply 'has_colors()'
|
||||||
but corresponding <curses.h> doesn't declare it. has_colors() is used
|
but corresponding <curses.h> doesn't declare it. has_colors() is used
|
||||||
|
|||||||
@@ -92,17 +92,6 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then
|
|||||||
*/
|
*/
|
||||||
#define SELECTSAVED
|
#define SELECTSAVED
|
||||||
|
|
||||||
/*
|
|
||||||
* You may define TEXTCOLOR if your system has any terminals that recognize
|
|
||||||
* ANSI color sequences of the form ``<ESCAPE>[#;#m'', where the first # is
|
|
||||||
* a number between 40 and 47 represented background color, and the second
|
|
||||||
* # is a number between 30 and 37 representing the foreground color.
|
|
||||||
* GIGI terminals and DECterm windows on color VAXstations support these
|
|
||||||
* color escape sequences, as do some 3rd party terminals and many micro
|
|
||||||
* computers.
|
|
||||||
*/
|
|
||||||
/* #define TEXTCOLOR */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If you define USE_QIO_INPUT, then you'll get raw characters from the
|
* If you define USE_QIO_INPUT, then you'll get raw characters from the
|
||||||
* keyboard, not unlike those of the unix version of Nethack. This will
|
* keyboard, not unlike those of the unix version of Nethack. This will
|
||||||
|
|||||||
+2
-2
@@ -49,7 +49,6 @@ typedef unsigned char X11_color;
|
|||||||
#endif
|
#endif
|
||||||
struct text_map_info_t {
|
struct text_map_info_t {
|
||||||
X11_map_symbol text[ROWNO][COLNO]; /* Actual displayed screen. */
|
X11_map_symbol text[ROWNO][COLNO]; /* Actual displayed screen. */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
X11_color colors[ROWNO][COLNO]; /* Color of each character. */
|
X11_color colors[ROWNO][COLNO]; /* Color of each character. */
|
||||||
X11_color framecolors[ROWNO][COLNO]; /* Color of background
|
X11_color framecolors[ROWNO][COLNO]; /* Color of background
|
||||||
behind text */
|
behind text */
|
||||||
@@ -57,7 +56,8 @@ struct text_map_info_t {
|
|||||||
inv_color_gcs[CLR_MAX]; /* GC for each inverse color */
|
inv_color_gcs[CLR_MAX]; /* GC for each inverse color */
|
||||||
#define copy_gc color_gcs[NO_COLOR]
|
#define copy_gc color_gcs[NO_COLOR]
|
||||||
#define inv_copy_gc inv_color_gcs[NO_COLOR]
|
#define inv_copy_gc inv_color_gcs[NO_COLOR]
|
||||||
#else
|
#if 0
|
||||||
|
/* was else from old textcolor days */
|
||||||
GC copy_gc, /* Drawing GC */
|
GC copy_gc, /* Drawing GC */
|
||||||
inv_copy_gc; /* Inverse drawing GC */
|
inv_copy_gc; /* Inverse drawing GC */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ extern WINDOW *mapwin, *statuswin, *messagewin; /* Main windows */
|
|||||||
extern WINDOW *activemenu; /* curses window for menu requesting a
|
extern WINDOW *activemenu; /* curses window for menu requesting a
|
||||||
* count; affects count_window refresh */
|
* count; affects count_window refresh */
|
||||||
|
|
||||||
#define TEXTCOLOR /* Allow color */
|
|
||||||
#define NHW_END 19
|
#define NHW_END 19
|
||||||
#define OFF 0
|
#define OFF 0
|
||||||
#define ON 1
|
#define ON 1
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
/* #define SHELL */ /* nt use of pcsys routines caused a hang */
|
/* #define SHELL */ /* nt use of pcsys routines caused a hang */
|
||||||
|
|
||||||
#define TEXTCOLOR /* Color text */
|
|
||||||
|
|
||||||
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
|
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
|
||||||
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
|
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
|
||||||
|
|
||||||
|
|||||||
@@ -90,10 +90,8 @@ struct WinDesc {
|
|||||||
struct DisplayDesc {
|
struct DisplayDesc {
|
||||||
short rows, cols; /* width and height of tty display */
|
short rows, cols; /* width and height of tty display */
|
||||||
short curx, cury; /* current cursor position on the screen */
|
short curx, cury; /* current cursor position on the screen */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
int color; /* current color */
|
int color; /* current color */
|
||||||
uint32 framecolor; /* current background color */
|
uint32 framecolor; /* current background color */
|
||||||
#endif
|
|
||||||
int attrs; /* attributes in effect */
|
int attrs; /* attributes in effect */
|
||||||
int toplin; /* flag for topl stuff */
|
int toplin; /* flag for topl stuff */
|
||||||
int rawprint; /* number of raw_printed lines since synch */
|
int rawprint; /* number of raw_printed lines since synch */
|
||||||
@@ -187,11 +185,9 @@ extern void term_end_attr(int attr);
|
|||||||
extern void term_start_raw_bold(void);
|
extern void term_start_raw_bold(void);
|
||||||
extern void term_end_raw_bold(void);
|
extern void term_end_raw_bold(void);
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
extern void term_end_color(void);
|
extern void term_end_color(void);
|
||||||
extern void term_start_color(int color);
|
extern void term_start_color(int color);
|
||||||
extern void term_start_bgcolor(int color);
|
extern void term_start_bgcolor(int color);
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
extern void term_start_24bitcolor(struct unicode_representation *);
|
extern void term_start_24bitcolor(struct unicode_representation *);
|
||||||
extern void term_end_24bitcolor(void); /* termcap.c, consoletty.c */
|
extern void term_end_24bitcolor(void); /* termcap.c, consoletty.c */
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ matrix:
|
|||||||
sed -i '/^#define MAIL/d' include/unixconf.h
|
sed -i '/^#define MAIL/d' include/unixconf.h
|
||||||
sed -i '/^#define SHELL/d' include/unixconf.h
|
sed -i '/^#define SHELL/d' include/unixconf.h
|
||||||
sed -i '/^#define SUSPEND/d' include/unixconf.h
|
sed -i '/^#define SUSPEND/d' include/unixconf.h
|
||||||
sed -i 's/^#define TEXTCOLOR//' include/unixconf.h
|
|
||||||
make fetch-lua LUA_VERSION=$LUA_VERSION
|
make fetch-lua LUA_VERSION=$LUA_VERSION
|
||||||
test -d "lib/lua-$LUA_VERSION/src" || exit 0
|
test -d "lib/lua-$LUA_VERSION/src" || exit 0
|
||||||
make LUA_VERSION=$LUA_VERSION WANT_WIN_ALL=1 install
|
make LUA_VERSION=$LUA_VERSION WANT_WIN_ALL=1 install
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ extern char *gets(char *);
|
|||||||
* (Possibly) configurable Amiga options:
|
* (Possibly) configurable Amiga options:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TEXTCOLOR /* Use colored monsters and objects */
|
|
||||||
#define HACKFONT /* Use special hack.font */
|
#define HACKFONT /* Use special hack.font */
|
||||||
#ifndef CROSS_TO_AMIGA /* issues with prototype and spawnl */
|
#ifndef CROSS_TO_AMIGA /* issues with prototype and spawnl */
|
||||||
#define SHELL /* Have a shell escape command (!) */
|
#define SHELL /* Have a shell escape command (!) */
|
||||||
@@ -164,13 +163,7 @@ extern char *gets(char *);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CHANGE_COLOR 1
|
#define CHANGE_COLOR 1
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#define DEPTH 6 /* Maximum depth of the screen allowed */
|
#define DEPTH 6 /* Maximum depth of the screen allowed */
|
||||||
#else
|
|
||||||
#define DEPTH 2 /* Four colors...sigh... */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AMII_MAXCOLORS (1L << DEPTH)
|
#define AMII_MAXCOLORS (1L << DEPTH)
|
||||||
typedef unsigned short AMII_COLOR_TYPE;
|
typedef unsigned short AMII_COLOR_TYPE;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#define tgetch getchar
|
#define tgetch getchar
|
||||||
#define FCMASK 0666
|
#define FCMASK 0666
|
||||||
#define PORT_ID "BeOS"
|
#define PORT_ID "BeOS"
|
||||||
#define TEXTCOLOR
|
|
||||||
#define POSIX_TYPES
|
#define POSIX_TYPES
|
||||||
#define SIG_RET_TYPE __signal_func_ptr
|
#define SIG_RET_TYPE __signal_func_ptr
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,6 @@
|
|||||||
#define NO_SIGNAL /* You wouldn't believe our signals ... */
|
#define NO_SIGNAL /* You wouldn't believe our signals ... */
|
||||||
#define FILENAME 256
|
#define FILENAME 256
|
||||||
#define NO_TERMS /* For tty port (see wintty.h) */
|
#define NO_TERMS /* For tty port (see wintty.h) */
|
||||||
|
|
||||||
#define TEXTCOLOR /* For Mac TTY interface */
|
|
||||||
#define CHANGE_COLOR
|
#define CHANGE_COLOR
|
||||||
|
|
||||||
/* Use these two includes instead of system.h. */
|
/* Use these two includes instead of system.h. */
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
#define SHELL /* shell escape */
|
#define SHELL /* shell escape */
|
||||||
/* #define TERMLIB /* use termcap file */
|
/* #define TERMLIB /* use termcap file */
|
||||||
#define ANSI_DEFAULT /* allows NetHack to run without termcap file */
|
#define ANSI_DEFAULT /* allows NetHack to run without termcap file */
|
||||||
#define TEXTCOLOR /* allow color */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The remaining code shouldn't need modification.
|
* The remaining code shouldn't need modification.
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
#define RANDOM /* improved random numbers */
|
#define RANDOM /* improved random numbers */
|
||||||
#define SHELL /* allow spawning of shell */
|
#define SHELL /* allow spawning of shell */
|
||||||
#define TERMLIB /* use termcap */
|
#define TERMLIB /* use termcap */
|
||||||
#define TEXTCOLOR /* allow color */
|
|
||||||
#define MAIL /* enable the fake maildemon */
|
#define MAIL /* enable the fake maildemon */
|
||||||
#ifdef MINT
|
#ifdef MINT
|
||||||
#define SUSPEND /* allow suspending the game */
|
#define SUSPEND /* allow suspending the game */
|
||||||
@@ -75,9 +74,7 @@ extern int strncmpi(const char *, const char *, size_t);
|
|||||||
#include "pcconf.h" /* remainder of stuff is same as the PC */
|
#include "pcconf.h" /* remainder of stuff is same as the PC */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
extern boolean colors_changed; /* in tos.c */
|
extern boolean colors_changed; /* in tos.c */
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* TOSCONF_H */
|
#endif /* TOSCONF_H */
|
||||||
#endif /* TOS */
|
#endif /* TOS */
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
/* #define SHELL /* nt use of pcsys routines caused a hang */
|
/* #define SHELL /* nt use of pcsys routines caused a hang */
|
||||||
|
|
||||||
#define RANDOM /* have Berkeley random(3) */
|
#define RANDOM /* have Berkeley random(3) */
|
||||||
#define TEXTCOLOR /* Color text */
|
|
||||||
|
|
||||||
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
|
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
|
||||||
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
|
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
|
||||||
|
|||||||
@@ -932,7 +932,6 @@ struct amii_glyph_node {
|
|||||||
static struct amii_glyph_node amii_g_nodes[NUMBER_GLYPH_NODES];
|
static struct amii_glyph_node amii_g_nodes[NUMBER_GLYPH_NODES];
|
||||||
static char amii_glyph_buffer[GLYPH_BUFFER_SIZE];
|
static char amii_glyph_buffer[GLYPH_BUFFER_SIZE];
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/*
|
/*
|
||||||
* Map our amiga-specific colormap into the colormap specified in color.h.
|
* Map our amiga-specific colormap into the colormap specified in color.h.
|
||||||
* See winami.c for the amiga specific colormap.
|
* See winami.c for the amiga specific colormap.
|
||||||
@@ -963,7 +962,6 @@ int backg[AMII_MAXCOLORS] = {
|
|||||||
#define CLR_WHITE 15
|
#define CLR_WHITE 15
|
||||||
#define CLR_MAX 16
|
#define CLR_MAX 16
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TESTING
|
#ifndef TESTING
|
||||||
/*
|
/*
|
||||||
@@ -1062,13 +1060,8 @@ int color_index, glyph;
|
|||||||
curx = cw->curx;
|
curx = cw->curx;
|
||||||
cury = cw->cury;
|
cury = cw->cury;
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
fg_color = foreg[color_index];
|
fg_color = foreg[color_index];
|
||||||
bg_color = backg[color_index];
|
bg_color = backg[color_index];
|
||||||
#else
|
|
||||||
fg_color = 1;
|
|
||||||
bg_color = 0;
|
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
/* See if we have enough character buffer space... */
|
/* See if we have enough character buffer space... */
|
||||||
if (glyph_buffer_index >= GLYPH_BUFFER_SIZE)
|
if (glyph_buffer_index >= GLYPH_BUFFER_SIZE)
|
||||||
|
|||||||
@@ -68,11 +68,7 @@ int dir;
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!WINVERS_AMIV) {
|
if (!WINVERS_AMIV) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
amii_numcolors = 8;
|
amii_numcolors = 8;
|
||||||
#else
|
|
||||||
amii_numcolors = 4;
|
|
||||||
#endif
|
|
||||||
amii_defpens[0] = C_BLACK; /* DETAILPEN */
|
amii_defpens[0] = C_BLACK; /* DETAILPEN */
|
||||||
amii_defpens[1] = C_BLUE; /* BLOCKPEN */
|
amii_defpens[1] = C_BLUE; /* BLOCKPEN */
|
||||||
amii_defpens[2] = C_BROWN; /* TEXTPEN */
|
amii_defpens[2] = C_BROWN; /* TEXTPEN */
|
||||||
@@ -1225,11 +1221,7 @@ char **argv;
|
|||||||
/* While openscreen fails try fewer colors to see if that is the problem.
|
/* While openscreen fails try fewer colors to see if that is the problem.
|
||||||
*/
|
*/
|
||||||
while ((HackScreen = OpenScreen((void *) &NewHackScreen)) == NULL) {
|
while ((HackScreen = OpenScreen((void *) &NewHackScreen)) == NULL) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (--NewHackScreen.Depth < 3)
|
if (--NewHackScreen.Depth < 3)
|
||||||
#else
|
|
||||||
if (--NewHackScreen.Depth < 2)
|
|
||||||
#endif
|
|
||||||
Abort(AN_OpenScreen & ~AT_DeadEnd);
|
Abort(AN_OpenScreen & ~AT_DeadEnd);
|
||||||
}
|
}
|
||||||
amii_numcolors = 1L << NewHackScreen.Depth;
|
amii_numcolors = 1L << NewHackScreen.Depth;
|
||||||
@@ -2017,15 +2009,11 @@ if(u.uz.dlevel != x){
|
|||||||
/* Move the cursor. */
|
/* Move the cursor. */
|
||||||
amii_curs(win, x, y + 2);
|
amii_curs(win, x, y + 2);
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* Turn off color if rogue level. */
|
/* Turn off color if rogue level. */
|
||||||
if (Is_rogue_level(&u.uz))
|
if (Is_rogue_level(&u.uz))
|
||||||
color = NO_COLOR;
|
color = NO_COLOR;
|
||||||
|
|
||||||
amiga_print_glyph(win, color, ch);
|
amiga_print_glyph(win, color, ch);
|
||||||
#else
|
|
||||||
g_putch(ch); /* print the character */
|
|
||||||
#endif
|
|
||||||
cw->curx++; /* one character over */
|
cw->curx++; /* one character over */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,7 @@ static char DOSgetch(void);
|
|||||||
static char BIOSgetch(void);
|
static char BIOSgetch(void);
|
||||||
static void init_aline(void);
|
static void init_aline(void);
|
||||||
char *_a_line; /* for Line A variables */
|
char *_a_line; /* for Line A variables */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
boolean colors_changed = FALSE;
|
boolean colors_changed = FALSE;
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tgetch()
|
tgetch()
|
||||||
@@ -312,7 +310,6 @@ init_aline()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* used in termcap.c to decide how to set up the hilites */
|
/* used in termcap.c to decide how to set up the hilites */
|
||||||
unsigned long tos_numcolors = 2;
|
unsigned long tos_numcolors = 2;
|
||||||
|
|
||||||
@@ -343,7 +340,6 @@ restore_colors()
|
|||||||
nh_HE = plainHE;
|
nh_HE = plainHE;
|
||||||
colors_changed = FALSE;
|
colors_changed = FALSE;
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
#ifdef SUSPEND
|
#ifdef SUSPEND
|
||||||
|
|
||||||
|
|||||||
@@ -861,8 +861,6 @@ void
|
|||||||
nhglyph2charcolor(short g, uchar *ch, int *color)
|
nhglyph2charcolor(short g, uchar *ch, int *color)
|
||||||
{
|
{
|
||||||
int offset;
|
int offset;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
|
|
||||||
#define zap_color(n) *color = iflags.use_color ? zapcolors[n] : NO_COLOR
|
#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 cmap_color(n) *color = iflags.use_color ? defsyms[n].color : NO_COLOR
|
||||||
#define obj_color(n) \
|
#define obj_color(n) \
|
||||||
@@ -872,17 +870,6 @@ nhglyph2charcolor(short g, uchar *ch, int *color)
|
|||||||
#define warn_color(n) \
|
#define warn_color(n) \
|
||||||
*color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR
|
*color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR
|
||||||
|
|
||||||
#else /* no text color */
|
|
||||||
|
|
||||||
#define zap_color(n)
|
|
||||||
#define cmap_color(n)
|
|
||||||
#define obj_color(n)
|
|
||||||
#define mon_color(n)
|
|
||||||
#define pet_color(c)
|
|
||||||
#define warn_color(c)
|
|
||||||
*color = CLR_WHITE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((offset = (g - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */
|
if ((offset = (g - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */
|
||||||
*ch = showsyms[offset + SYM_OFF_W];
|
*ch = showsyms[offset + SYM_OFF_W];
|
||||||
warn_color(offset);
|
warn_color(offset);
|
||||||
|
|||||||
@@ -1623,7 +1623,6 @@ void NetHackQtMapWindow::mousePressEvent(QMouseEvent* event)
|
|||||||
qApp->exit_loop();
|
qApp->exit_loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static
|
static
|
||||||
const QPen& nhcolor_to_pen(int c)
|
const QPen& nhcolor_to_pen(int c)
|
||||||
{
|
{
|
||||||
@@ -1651,7 +1650,6 @@ const QPen& nhcolor_to_pen(int c)
|
|||||||
|
|
||||||
return pen[c];
|
return pen[c];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
@@ -1710,9 +1708,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
/* map glyph to character and color */
|
/* map glyph to character and color */
|
||||||
(void)mapglyph(g, &och, &color, &special, i, j, 0);
|
(void)mapglyph(g, &och, &color, &special, i, j, 0);
|
||||||
ch = (uchar)och;
|
ch = (uchar)och;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
painter.setPen( nhcolor_to_pen(color) );
|
painter.setPen( nhcolor_to_pen(color) );
|
||||||
#endif
|
|
||||||
painter.drawText(
|
painter.drawText(
|
||||||
i*qt_settings->glyphs().width(),
|
i*qt_settings->glyphs().width(),
|
||||||
j*qt_settings->glyphs().height(),
|
j*qt_settings->glyphs().height(),
|
||||||
@@ -1722,10 +1718,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
(const char*)&ch, 1
|
(const char*)&ch, 1
|
||||||
);
|
);
|
||||||
if (glyph_is_pet(g)
|
if (glyph_is_pet(g)
|
||||||
#ifdef TEXTCOLOR
|
&& ::iflags.hilite_pet) {
|
||||||
&& ::iflags.hilite_pet
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
||||||
j*qt_settings->glyphs().height()),
|
j*qt_settings->glyphs().height()),
|
||||||
pet_annotation);
|
pet_annotation);
|
||||||
@@ -1740,10 +1733,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
unsigned short g=Glyph(i,j);
|
unsigned short g=Glyph(i,j);
|
||||||
qt_settings->glyphs().drawCell(painter, g, i, j);
|
qt_settings->glyphs().drawCell(painter, g, i, j);
|
||||||
if (glyph_is_pet(g)
|
if (glyph_is_pet(g)
|
||||||
#ifdef TEXTCOLOR
|
&& ::iflags.hilite_pet) {
|
||||||
&& ::iflags.hilite_pet
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
||||||
j*qt_settings->glyphs().height()),
|
j*qt_settings->glyphs().height()),
|
||||||
pet_annotation);
|
pet_annotation);
|
||||||
@@ -1754,11 +1744,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
|
|
||||||
if (garea.contains(cursor)) {
|
if (garea.contains(cursor)) {
|
||||||
if (Is_rogue_level(&u.uz)) {
|
if (Is_rogue_level(&u.uz)) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
painter.setPen( white );
|
painter.setPen( white );
|
||||||
#else
|
|
||||||
painter.setPen( green ); // REALLY primitive
|
|
||||||
#endif
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int hp100;
|
int hp100;
|
||||||
|
|||||||
@@ -912,9 +912,7 @@ int glyph, bkglyph;
|
|||||||
if (mar_set_tile_mode(-1)) {
|
if (mar_set_tile_mode(-1)) {
|
||||||
mar_print_glyph(window, x, y, glyph2tile[glyph], glyph2tile[bkglyph]);
|
mar_print_glyph(window, x, y, glyph2tile[glyph], glyph2tile[bkglyph]);
|
||||||
if (
|
if (
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
iflags.hilite_pet &&
|
iflags.hilite_pet &&
|
||||||
#endif
|
|
||||||
glyph_is_pet(glyph))
|
glyph_is_pet(glyph))
|
||||||
mar_add_pet_sign(window, x, y);
|
mar_add_pet_sign(window, x, y);
|
||||||
} else
|
} else
|
||||||
@@ -936,11 +934,9 @@ int glyph;
|
|||||||
/* map glyph to character and color */
|
/* map glyph to character and color */
|
||||||
(void) mapglyph(glyph, &ch, &color, &special, x, y, 0);
|
(void) mapglyph(glyph, &ch, &color, &special, x, y, 0);
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* Turn off color if rogue level. */
|
/* Turn off color if rogue level. */
|
||||||
if (Is_rogue_level(&u.uz))
|
if (Is_rogue_level(&u.uz))
|
||||||
color = NO_COLOR;
|
color = NO_COLOR;
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
mar_print_char(window, x, y, ch, color);
|
mar_print_char(window, x, y, ch, color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -358,11 +358,7 @@ ghack_map_print_glyph(GtkObject *win, guint x, guint y, GdkImlibImage *im,
|
|||||||
if (x == u.ux && y == u.uy)
|
if (x == u.ux && y == u.uy)
|
||||||
ghack_map_cliparound(NULL, x, y, NULL);
|
ghack_map_cliparound(NULL, x, y, NULL);
|
||||||
|
|
||||||
if (glyph_is_pet(glyph)
|
if (glyph_is_pet(glyph) && iflags.hilite_pet) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
&& iflags.hilite_pet
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
gnome_canvas_item_raise_to_top(GNOME_CANVAS_ITEM(canvas_image));
|
gnome_canvas_item_raise_to_top(GNOME_CANVAS_ITEM(canvas_image));
|
||||||
gnome_canvas_item_show(GNOME_CANVAS_ITEM(canvas_image));
|
gnome_canvas_item_show(GNOME_CANVAS_ITEM(canvas_image));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2457,7 +2457,6 @@ map_glyphinfo(
|
|||||||
* as well as to regular display.)
|
* as well as to regular display.)
|
||||||
*/
|
*/
|
||||||
if (is_you) {
|
if (is_you) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (!iflags.use_color || Upolyd || glyph != hero_glyph) {
|
if (!iflags.use_color || Upolyd || glyph != hero_glyph) {
|
||||||
; /* color tweak not needed (!use_color) or not wanted (poly'd
|
; /* color tweak not needed (!use_color) or not wanted (poly'd
|
||||||
or riding--which uses steed's color, not hero's) */
|
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 */
|
by newsym()); we change the color to same as human hero */
|
||||||
glyphinfo->gm.sym.color = HI_DOMESTIC;
|
glyphinfo->gm.sym.color = HI_DOMESTIC;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/* accessibility
|
/* accessibility
|
||||||
This unchanging display character for hero was requested by
|
This unchanging display character for hero was requested by
|
||||||
a blind player to enhance screen reader use.
|
a blind player to enhance screen reader use.
|
||||||
@@ -2495,7 +2493,6 @@ map_glyphinfo(
|
|||||||
glyphinfo->glyph = glyph;
|
glyphinfo->glyph = glyph;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/*
|
/*
|
||||||
* This must be the same order as used for buzz() in zap.c.
|
* This must be the same order as used for buzz() in zap.c.
|
||||||
* The zap_color_ and altar_color_ enums are in decl.h.
|
* 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, */
|
/* 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 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 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
|
#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
|
color = iflags.use_color ? explodecolors[n] : NO_COLOR
|
||||||
#define wall_color(n) color = iflags.use_color ? wallcolors[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
|
#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
|
#if 0
|
||||||
#define is_objpile(x, y) \
|
#define is_objpile(x, y) \
|
||||||
@@ -2797,13 +2778,11 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
|
|||||||
*/
|
*/
|
||||||
if (has_rogue_color) {
|
if (has_rogue_color) {
|
||||||
color = cmap_to_roguecolor(cmap);
|
color = cmap_to_roguecolor(cmap);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* provide a visible difference if normal and lit corridor
|
/* provide a visible difference if normal and lit corridor
|
||||||
use the same symbol */
|
use the same symbol */
|
||||||
} else if (cmap == S_litcorr
|
} else if (cmap == S_litcorr
|
||||||
&& sym == gs.showsyms[S_corr + SYM_OFF_P]) {
|
&& sym == gs.showsyms[S_corr + SYM_OFF_P]) {
|
||||||
color = CLR_WHITE;
|
color = CLR_WHITE;
|
||||||
#endif
|
|
||||||
/* likewise for corridor and engraving-in-corridor */
|
/* likewise for corridor and engraving-in-corridor */
|
||||||
} else if (cmap == S_engrcorr
|
} else if (cmap == S_engrcorr
|
||||||
&& (sym == gs.showsyms[S_corr + SYM_OFF_P]
|
&& (sym == gs.showsyms[S_corr + SYM_OFF_P]
|
||||||
@@ -2940,13 +2919,11 @@ reset_glyphmap(enum glyphmap_change_triggers trigger)
|
|||||||
if (gs.showsyms[pet_override] != ' ')
|
if (gs.showsyms[pet_override] != ' ')
|
||||||
gmap->sym.symidx = SYM_PET_OVERRIDE + SYM_OFF_X;
|
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.
|
/* Turn off color if no color defined, or rogue level w/o PC graphics.
|
||||||
*/
|
*/
|
||||||
if ((!has_color(color)
|
if ((!has_color(color)
|
||||||
|| ((gg.glyphmap_perlevel_flags & GMAP_ROGUELEVEL)
|
|| ((gg.glyphmap_perlevel_flags & GMAP_ROGUELEVEL)
|
||||||
&& !has_rogue_color)) || !iflags.use_color)
|
&& !has_rogue_color)) || !iflags.use_color)
|
||||||
#endif
|
|
||||||
color = NO_COLOR;
|
color = NO_COLOR;
|
||||||
gmap->sym.color = color;
|
gmap->sym.color = color;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-10
@@ -14,12 +14,7 @@
|
|||||||
#ifdef C
|
#ifdef C
|
||||||
#undef C
|
#undef C
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#define C(n) n
|
#define C(n) n
|
||||||
#else
|
|
||||||
#define C(n)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Default object class symbols. See objclass.h.
|
/* Default object class symbols. See objclass.h.
|
||||||
* {symbol, name, explain}
|
* {symbol, name, explain}
|
||||||
@@ -70,11 +65,7 @@ const struct symdef defsyms[MAXPCHARS + 1] = {
|
|||||||
#define PCHAR_DRAWING
|
#define PCHAR_DRAWING
|
||||||
#include "defsym.h"
|
#include "defsym.h"
|
||||||
#undef PCHAR_DRAWING
|
#undef PCHAR_DRAWING
|
||||||
{ 0, NULL
|
{ 0, NULL, NO_COLOR }
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
, NO_COLOR
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* default rogue level symbols */
|
/* default rogue level symbols */
|
||||||
|
|||||||
+1
-5
@@ -279,9 +279,7 @@ make_version(void)
|
|||||||
#endif
|
#endif
|
||||||
/* objects (10..14) */
|
/* objects (10..14) */
|
||||||
/* flag bits and/or other global variables (15..26) */
|
/* flag bits and/or other global variables (15..26) */
|
||||||
#ifdef TEXTCOLOR
|
/* color support always*/ | (1L << 17)
|
||||||
| (1L << 17)
|
|
||||||
#endif
|
|
||||||
#ifdef INSURANCE
|
#ifdef INSURANCE
|
||||||
| (1L << 18)
|
| (1L << 18)
|
||||||
#endif
|
#endif
|
||||||
@@ -501,9 +499,7 @@ static const char *const build_opts[] = {
|
|||||||
#ifdef ANSI_DEFAULT
|
#ifdef ANSI_DEFAULT
|
||||||
"ANSI default terminal",
|
"ANSI default terminal",
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
"color",
|
"color",
|
||||||
#endif
|
|
||||||
#ifdef TTY_GRAPHICS
|
#ifdef TTY_GRAPHICS
|
||||||
#ifdef TTY_TILES_ESCCODES
|
#ifdef TTY_TILES_ESCCODES
|
||||||
"console escape codes for tile hinting",
|
"console escape codes for tile hinting",
|
||||||
|
|||||||
@@ -11,12 +11,8 @@
|
|||||||
#ifdef C
|
#ifdef C
|
||||||
#undef C
|
#undef C
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#define C(color) color
|
#define C(color) color
|
||||||
#else
|
|
||||||
#define C(color)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NO_ATTK \
|
#define NO_ATTK \
|
||||||
{ \
|
{ \
|
||||||
|
|||||||
+31
-26
@@ -3053,9 +3053,11 @@ cures_sliming(struct monst *mon, struct obj *obj)
|
|||||||
&& obj->spe > 0);
|
&& obj->spe > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TRUE if monster appears to be green; for active TEXTCOLOR, we go by
|
/* TRUE if monster appears to be green; we go by the display color.
|
||||||
the display color, otherwise we just pick things that seem plausibly
|
The alternative was to just pick things that
|
||||||
green (which doesn't necessarily match the TEXTCOLOR categorization) */
|
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
|
static boolean
|
||||||
green_mon(struct monst *mon)
|
green_mon(struct monst *mon)
|
||||||
{
|
{
|
||||||
@@ -3063,34 +3065,37 @@ green_mon(struct monst *mon)
|
|||||||
|
|
||||||
if (Hallucination)
|
if (Hallucination)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#ifdef TEXTCOLOR
|
return (ptr->mcolor == CLR_GREEN || ptr->mcolor == CLR_BRIGHT_GREEN);
|
||||||
|
#if 0
|
||||||
if (iflags.use_color)
|
if (iflags.use_color)
|
||||||
return (ptr->mcolor == CLR_GREEN || ptr->mcolor == CLR_BRIGHT_GREEN);
|
return (ptr->mcolor == CLR_GREEN || ptr->mcolor == CLR_BRIGHT_GREEN);
|
||||||
#endif
|
else {
|
||||||
/* approximation */
|
/* approximation */
|
||||||
if (strstri(ptr->pmnames[NEUTRAL], "green")
|
if (strstri(ptr->pmnames[NEUTRAL], "green")
|
||||||
|| (ptr->pmnames[MALE] && strstri(ptr->pmnames[MALE], "green"))
|
|| (ptr->pmnames[MALE] && strstri(ptr->pmnames[MALE], "green"))
|
||||||
|| (ptr->pmnames[FEMALE] && strstri(ptr->pmnames[FEMALE], "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])
|
|
||||||
return TRUE;
|
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;
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*muse.c*/
|
/*muse.c*/
|
||||||
|
|||||||
@@ -120,12 +120,8 @@ init_objects(void)
|
|||||||
{
|
{
|
||||||
int i, first, last, prevoclass;
|
int i, first, last, prevoclass;
|
||||||
char oclass;
|
char oclass;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#define COPY_OBJ_DESCR(o_dst, o_src) \
|
#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
|
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++) {
|
for (i = 0; i <= MAXOCLASSES; i++) {
|
||||||
gb.bases[i] = 0;
|
gb.bases[i] = 0;
|
||||||
|
|||||||
+1
-3
@@ -110,7 +110,7 @@ static struct allopt_t allopt[SIZE(allopt_init)];
|
|||||||
|
|
||||||
extern char configfile[]; /* for messages */
|
extern char configfile[]; /* for messages */
|
||||||
extern const struct symparse loadsyms[];
|
extern const struct symparse loadsyms[];
|
||||||
#if defined(TOS) && defined(TEXTCOLOR)
|
#if defined(TOS)
|
||||||
extern boolean colors_changed; /* in tos.c */
|
extern boolean colors_changed; /* in tos.c */
|
||||||
#endif
|
#endif
|
||||||
#ifdef VIDEOSHADES
|
#ifdef VIDEOSHADES
|
||||||
@@ -6755,9 +6755,7 @@ initoptions_init(void)
|
|||||||
if (!gs.symset[ROGUESET].explicitly)
|
if (!gs.symset[ROGUESET].explicitly)
|
||||||
load_symset("RogueIBM", ROGUESET);
|
load_symset("RogueIBM", ROGUESET);
|
||||||
switch_symbols(TRUE);
|
switch_symbols(TRUE);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
iflags.use_color = TRUE;
|
iflags.use_color = TRUE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif /* UNIX && TTY_GRAPHICS */
|
#endif /* UNIX && TTY_GRAPHICS */
|
||||||
#if defined(UNIX) || defined(VMS)
|
#if defined(UNIX) || defined(VMS)
|
||||||
|
|||||||
+1
-3
@@ -1361,14 +1361,12 @@ dump_redirect(boolean onoff_flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TTY_GRAPHICS
|
#ifdef TTY_GRAPHICS
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#ifdef TOS
|
#ifdef TOS
|
||||||
extern const char *hilites[CLR_MAX];
|
extern const char *hilites[CLR_MAX];
|
||||||
#else
|
#else
|
||||||
extern NEARDATA char *hilites[CLR_MAX];
|
extern NEARDATA char *hilites[CLR_MAX];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
has_color(int color)
|
has_color(int color)
|
||||||
@@ -1376,7 +1374,7 @@ has_color(int color)
|
|||||||
return (iflags.use_color && windowprocs.name
|
return (iflags.use_color && windowprocs.name
|
||||||
&& (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color]
|
&& (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color]
|
||||||
#ifdef TTY_GRAPHICS
|
#ifdef TTY_GRAPHICS
|
||||||
#if defined(TEXTCOLOR) && defined(TERMLIB) && !defined(NO_TERMS)
|
#if defined(TERMLIB) && !defined(NO_TERMS)
|
||||||
&& (hilites[color] != 0)
|
&& (hilites[color] != 0)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2223,9 +2223,7 @@ bhito(struct obj *obj, struct obj *otmp)
|
|||||||
case WAN_CANCELLATION:
|
case WAN_CANCELLATION:
|
||||||
case SPE_CANCELLATION:
|
case SPE_CANCELLATION:
|
||||||
cancel_item(obj);
|
cancel_item(obj);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
newsym(obj->ox, obj->oy); /* might change color */
|
newsym(obj->ox, obj->oy); /* might change color */
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case SPE_DRAIN_LIFE:
|
case SPE_DRAIN_LIFE:
|
||||||
(void) drain_item(obj, TRUE);
|
(void) drain_item(obj, TRUE);
|
||||||
|
|||||||
@@ -136,9 +136,7 @@ int attrib_gr_intense; /* graphics mode intense attribute */
|
|||||||
uint32 curframecolor = NO_COLOR; /* current background text color */
|
uint32 curframecolor = NO_COLOR; /* current background text color */
|
||||||
boolean traditional = FALSE; /* traditonal TTY character mode */
|
boolean traditional = FALSE; /* traditonal TTY character mode */
|
||||||
boolean inmap = FALSE; /* in the map window */
|
boolean inmap = FALSE; /* in the map window */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
char ttycolors[CLR_MAX]; /* also used/set in options.c */
|
char ttycolors[CLR_MAX]; /* also used/set in options.c */
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
backsp(void)
|
backsp(void)
|
||||||
@@ -233,11 +231,7 @@ int
|
|||||||
has_color(int color)
|
has_color(int color)
|
||||||
{
|
{
|
||||||
++color; /* prevents compiler warning (unref. param) */
|
++color; /* prevents compiler warning (unref. param) */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
return (monoflag) ? 0 : 1;
|
return (monoflag) ? 0 : 1;
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -357,7 +351,6 @@ term_start_attr(int attr)
|
|||||||
void
|
void
|
||||||
term_start_color(int color)
|
term_start_color(int color)
|
||||||
{
|
{
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (monoflag) {
|
if (monoflag) {
|
||||||
g_attribute = attrib_text_normal;
|
g_attribute = attrib_text_normal;
|
||||||
} else {
|
} else {
|
||||||
@@ -368,19 +361,16 @@ term_start_color(int color)
|
|||||||
g_attribute = ttycolors[color];
|
g_attribute = ttycolors[color];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
term_start_bgcolor(int bgcolor)
|
term_start_bgcolor(int bgcolor)
|
||||||
{
|
{
|
||||||
// pline("before bgcolor = %d, curframecolor = %d", bgcolor, curframecolor);
|
// pline("before bgcolor = %d, curframecolor = %d", bgcolor, curframecolor);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (!monoflag) {
|
if (!monoflag) {
|
||||||
if (bgcolor >= 0 && bgcolor < CLR_MAX)
|
if (bgcolor >= 0 && bgcolor < CLR_MAX)
|
||||||
curframecolor = bgcolor;
|
curframecolor = bgcolor;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// pline("after bgcolor = %d, curframecolor = %d", bgcolor, curframecolor);
|
// pline("after bgcolor = %d, curframecolor = %d", bgcolor, curframecolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,9 +456,7 @@ tty_startup(int *wid, int *hgt)
|
|||||||
setclipped();
|
setclipped();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
init_ttycolor();
|
init_ttycolor();
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MONO_CHECK
|
#ifdef MONO_CHECK
|
||||||
monoflag = txt_monoadapt_check();
|
monoflag = txt_monoadapt_check();
|
||||||
@@ -704,7 +692,6 @@ HideCursor(void)
|
|||||||
|
|
||||||
#endif /* SIMULATE_CURSOR */
|
#endif /* SIMULATE_CURSOR */
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/*
|
/*
|
||||||
* CLR_BLACK 0
|
* CLR_BLACK 0
|
||||||
* CLR_RED 1
|
* CLR_RED 1
|
||||||
@@ -928,7 +915,6 @@ convert_uchars(char *bufp, /* current pointer */
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* VIDEOSHADES */
|
#endif /* VIDEOSHADES */
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process defaults.nh OPTIONS=video:xxxx
|
* Process defaults.nh OPTIONS=video:xxxx
|
||||||
|
|||||||
+1
-1
@@ -279,7 +279,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TOS) && defined(TEXTCOLOR)
|
#if defined(TOS)
|
||||||
if (iflags.BIOS && iflags.use_color)
|
if (iflags.BIOS && iflags.use_color)
|
||||||
set_colors();
|
set_colors();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -273,10 +273,8 @@ msexit(void)
|
|||||||
#ifdef TOS
|
#ifdef TOS
|
||||||
if (run_from_desktop)
|
if (run_from_desktop)
|
||||||
getreturn("to continue"); /* so the user can read the score list */
|
getreturn("to continue"); /* so the user can read the score list */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (colors_changed)
|
if (colors_changed)
|
||||||
restore_colors();
|
restore_colors();
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
wait_synch();
|
wait_synch();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -393,10 +393,8 @@ init_sco_cons(void)
|
|||||||
load_symset("IBMGraphics", PRIMARYSET);
|
load_symset("IBMGraphics", PRIMARYSET);
|
||||||
load_symset("RogueIBM", ROGUESET);
|
load_symset("RogueIBM", ROGUESET);
|
||||||
switch_symbols(TRUE);
|
switch_symbols(TRUE);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (has_colors())
|
if (has_colors())
|
||||||
iflags.use_color = TRUE;
|
iflags.use_color = TRUE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -450,10 +448,8 @@ init_linux_cons(void)
|
|||||||
if (WINDOWPORT(tty) && linux_flag_console) {
|
if (WINDOWPORT(tty) && linux_flag_console) {
|
||||||
atexit(linux_mapon);
|
atexit(linux_mapon);
|
||||||
linux_mapoff();
|
linux_mapoff();
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (has_colors())
|
if (has_colors())
|
||||||
iflags.use_color = TRUE;
|
iflags.use_color = TRUE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,10 +229,11 @@ Notes:
|
|||||||
config.h: UNIX, TTY_GRAPHICS
|
config.h: UNIX, TTY_GRAPHICS
|
||||||
unixconf.h: SYSV, SVR4, TERMINFO, POSIX_JOB_CONTROL, POSIX_TYPES
|
unixconf.h: SYSV, SVR4, TERMINFO, POSIX_JOB_CONTROL, POSIX_TYPES
|
||||||
|
|
||||||
X11_GRAPHICS does work. You may safely define
|
X11_GRAPHICS does work. You may safely define NETWORK if desired.
|
||||||
NETWORK, TEXTCOLOR if desired. Other #defines in these files may be
|
Other #defines in these files may be defined too, as needed. Just make
|
||||||
defined too, as needed. Just make sure that the set mentioned here are
|
sure that the set mentioned here are not misdefined, or your compile
|
||||||
not misdefined, or your compile will fail (do _not_ define BSD or SUNOS4).
|
will fail (do _not_ define BSD or SUNOS4).
|
||||||
|
|
||||||
Unless you are using gzip you will probably want to define COMPRESS to
|
Unless you are using gzip you will probably want to define COMPRESS to
|
||||||
be "/usr/bin/compress".
|
be "/usr/bin/compress".
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -61,10 +61,7 @@
|
|||||||
|
|
||||||
3. Prior to beginning compilation, go to the [.include] subdirectory and
|
3. Prior to beginning compilation, go to the [.include] subdirectory and
|
||||||
edit vmsconf.h according to its comments. You should set Local_WIZARD
|
edit vmsconf.h according to its comments. You should set Local_WIZARD
|
||||||
and Local_HACKDIR to appropriate values, and you might want to define
|
and Local_HACKDIR to appropriate values.
|
||||||
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.)
|
|
||||||
Other things which may be of interest are SECURE if you intend to
|
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
|
set up NetHack as an installed image which is granted privileges, and
|
||||||
SHELL which should be disabled if you intend to allow captive accounts
|
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
|
void
|
||||||
gettty(void)
|
gettty(void)
|
||||||
{
|
{
|
||||||
#ifndef TEXTCOLOR
|
|
||||||
int k;
|
|
||||||
#endif
|
|
||||||
erase_char = '\b';
|
erase_char = '\b';
|
||||||
kill_char = 21; /* cntl-U */
|
kill_char = 21; /* cntl-U */
|
||||||
iflags.cbreak = TRUE;
|
iflags.cbreak = TRUE;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
init_ttycolor();
|
init_ttycolor();
|
||||||
#else
|
|
||||||
for (k = 0; k < CLR_MAX; ++k)
|
|
||||||
ttycolors[k] = NO_COLOR;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset terminal to original state */
|
/* reset terminal to original state */
|
||||||
@@ -1636,7 +1628,6 @@ tty_delay_output(void)
|
|||||||
static void
|
static void
|
||||||
init_ttycolor(void)
|
init_ttycolor(void)
|
||||||
{
|
{
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
ttycolors[CLR_BLACK] = FOREGROUND_INTENSITY; /* fix by Quietust */
|
ttycolors[CLR_BLACK] = FOREGROUND_INTENSITY; /* fix by Quietust */
|
||||||
ttycolors[CLR_RED] = FOREGROUND_RED;
|
ttycolors[CLR_RED] = FOREGROUND_RED;
|
||||||
ttycolors[CLR_GREEN] = FOREGROUND_GREEN;
|
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_BRIGHT_CYAN] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY;
|
||||||
ttycolors_inv[CLR_WHITE] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
|
ttycolors_inv[CLR_WHITE] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
|
||||||
| BACKGROUND_INTENSITY;
|
| 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;
|
init_ttycolor_completed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1765,31 +1747,27 @@ term_start_raw_bold(void)
|
|||||||
void
|
void
|
||||||
term_start_color(int color)
|
term_start_color(int color)
|
||||||
{
|
{
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (color >= 0 && color < CLR_MAX) {
|
if (color >= 0 && color < CLR_MAX) {
|
||||||
console.current_nhcolor = color;
|
console.current_nhcolor = color;
|
||||||
} else
|
} else {
|
||||||
#endif
|
console.current_nhcolor = NO_COLOR;
|
||||||
console.current_nhcolor = NO_COLOR;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
term_start_bgcolor(int color)
|
term_start_bgcolor(int color)
|
||||||
{
|
{
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (color >= 0 && color < CLR_MAX) {
|
if (color >= 0 && color < CLR_MAX) {
|
||||||
console.current_nhbkcolor = color;
|
console.current_nhbkcolor = color;
|
||||||
} else
|
} else {
|
||||||
#endif
|
console.current_nhbkcolor = NO_COLOR;
|
||||||
console.current_nhbkcolor = NO_COLOR;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
term_end_color(void)
|
term_end_color(void)
|
||||||
{
|
{
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
console.foreground = DEFTEXTCOLOR;
|
console.foreground = DEFTEXTCOLOR;
|
||||||
#endif
|
|
||||||
#ifndef VIRTUAL_TERMINAL_SEQUENCES
|
#ifndef VIRTUAL_TERMINAL_SEQUENCES
|
||||||
console.attr = (console.foreground | console.background);
|
console.attr = (console.foreground | console.background);
|
||||||
#endif /* ! VIRTUAL_TERMINAL_SEQUENCES */
|
#endif /* ! VIRTUAL_TERMINAL_SEQUENCES */
|
||||||
|
|||||||
@@ -160,11 +160,6 @@ static struct grep_var grep_vars[]={
|
|||||||
#else
|
#else
|
||||||
{"SUSPEND", 0},
|
{"SUSPEND", 0},
|
||||||
#endif
|
#endif
|
||||||
#if defined(TEXTCOLOR)
|
|
||||||
{"TEXTCOLOR", 1},
|
|
||||||
#else
|
|
||||||
{"TEXTCOLOR", 0},
|
|
||||||
#endif
|
|
||||||
#if defined(TILES_IN_GLYPHMAP)
|
#if defined(TILES_IN_GLYPHMAP)
|
||||||
{"TILES_IN_GLYPHMAP", 1},
|
{"TILES_IN_GLYPHMAP", 1},
|
||||||
#else
|
#else
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
QT_GRAPHICS GNOME_GRAPHICS GEM_GRAPHICS/;
|
QT_GRAPHICS GNOME_GRAPHICS GEM_GRAPHICS/;
|
||||||
|
|
||||||
# Game Features:
|
# Game Features:
|
||||||
@feature = qw/ZEROCOMP TILES_IN_GLYPHMAP ASCIIGRAPH CLIPPING TEXTCOLOR
|
@feature = qw/ZEROCOMP TILES_IN_GLYPHMAP ASCIIGRAPH CLIPPING
|
||||||
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS
|
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS
|
||||||
SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS
|
SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS
|
||||||
VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING
|
VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ NetHackQtGlyphs::drawBorderedCell(
|
|||||||
|
|
||||||
drawGlyph(painter, glyph, tileidx, lox + 1, loy + 1, reversed);
|
drawGlyph(painter, glyph, tileidx, lox + 1, loy + 1, reversed);
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (border != NO_BORDER) {
|
if (border != NO_BORDER) {
|
||||||
// gray would be a better mid-point between red and cyan but it
|
// gray would be a better mid-point between red and cyan but it
|
||||||
// doesn't show up well enough against the wall tile background
|
// doesn't show up well enough against the wall tile background
|
||||||
@@ -199,9 +198,6 @@ NetHackQtGlyphs::drawBorderedCell(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
nhUse(border);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// mis-named routine to get the pixmap for a particular glyph
|
// mis-named routine to get the pixmap for a particular glyph
|
||||||
|
|||||||
+2
-28
@@ -77,7 +77,6 @@ extern int qt_compact_mode;
|
|||||||
|
|
||||||
namespace nethack_qt_ {
|
namespace nethack_qt_ {
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static const QPen nhcolor_to_pen(uint32_t c)
|
static const QPen nhcolor_to_pen(uint32_t c)
|
||||||
{
|
{
|
||||||
static QPen *pen = (QPen *) 0;
|
static QPen *pen = (QPen *) 0;
|
||||||
@@ -119,7 +118,6 @@ static const QPen nhcolor_to_pen(uint32_t c)
|
|||||||
return pen[c];
|
return pen[c];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NetHackQtMapViewport::NetHackQtMapViewport(NetHackQtClickBuffer& click_sink) :
|
NetHackQtMapViewport::NetHackQtMapViewport(NetHackQtClickBuffer& click_sink) :
|
||||||
QWidget(NULL),
|
QWidget(NULL),
|
||||||
@@ -182,10 +180,9 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
|||||||
painter.begin(this);
|
painter.begin(this);
|
||||||
|
|
||||||
unsigned special, tileidx;
|
unsigned special, tileidx;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
uint32 color;
|
uint32 color;
|
||||||
uint32 framecolor;
|
uint32 framecolor;
|
||||||
#endif
|
|
||||||
if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) {
|
if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) {
|
||||||
// You enter a VERY primitive world!
|
// You enter a VERY primitive world!
|
||||||
|
|
||||||
@@ -204,12 +201,8 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
|||||||
if (SYMHANDLING(H_IBM)) {
|
if (SYMHANDLING(H_IBM)) {
|
||||||
ch = cp437(ch);
|
ch = cp437(ch);
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
color = Glyphcolor(i, j);
|
color = Glyphcolor(i, j);
|
||||||
painter.setPen(nhcolor_to_pen(color));
|
painter.setPen(nhcolor_to_pen(color));
|
||||||
#else
|
|
||||||
painter.setPen(Qt::green);
|
|
||||||
#endif
|
|
||||||
if (!DrawWalls(painter, i * gW, j * gH, gW, gH, ch)) {
|
if (!DrawWalls(painter, i * gW, j * gH, gW, gH, ch)) {
|
||||||
ushort utf16[3];
|
ushort utf16[3];
|
||||||
if (ch < 0x10000) {
|
if (ch < 0x10000) {
|
||||||
@@ -231,7 +224,6 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
|||||||
painter.drawPixmap(QPoint(i * gW, j * gH),
|
painter.drawPixmap(QPoint(i * gW, j * gH),
|
||||||
pile_annotation);
|
pile_annotation);
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
framecolor = GlyphFramecolor(i, j);
|
framecolor = GlyphFramecolor(i, j);
|
||||||
if (framecolor != NO_COLOR) {
|
if (framecolor != NO_COLOR) {
|
||||||
painter.setPen(nhcolor_to_pen(framecolor));
|
painter.setPen(nhcolor_to_pen(framecolor));
|
||||||
@@ -240,7 +232,6 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
|||||||
qt_settings->glyphs().width() - 1,
|
qt_settings->glyphs().width() - 1,
|
||||||
qt_settings->glyphs().height() - 1);
|
qt_settings->glyphs().height() - 1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,7 +253,6 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
|||||||
painter.drawPixmap(QPoint(i * gW, j * gH),
|
painter.drawPixmap(QPoint(i * gW, j * gH),
|
||||||
pile_annotation);
|
pile_annotation);
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
framecolor = GlyphFramecolor(i, j);
|
framecolor = GlyphFramecolor(i, j);
|
||||||
if (framecolor != NO_COLOR) {
|
if (framecolor != NO_COLOR) {
|
||||||
painter.setPen(nhcolor_to_pen(framecolor));
|
painter.setPen(nhcolor_to_pen(framecolor));
|
||||||
@@ -271,18 +261,13 @@ void NetHackQtMapViewport::paintEvent(QPaintEvent* event)
|
|||||||
qt_settings->glyphs().width() - 1,
|
qt_settings->glyphs().width() - 1,
|
||||||
qt_settings->glyphs().height() - 1);
|
qt_settings->glyphs().height() - 1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (garea.contains(cursor)) {
|
if (garea.contains(cursor)) {
|
||||||
if (Is_rogue_level(&u.uz)) {
|
if (Is_rogue_level(&u.uz)) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
painter.setPen( Qt::white );
|
painter.setPen( Qt::white );
|
||||||
#else
|
|
||||||
painter.setPen( Qt::green ); // REALLY primitive
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
int hp = !Upolyd ? u.uhp : u.mh,
|
int hp = !Upolyd ? u.uhp : u.mh,
|
||||||
hpmax = !Upolyd ? u.uhpmax : u.mhmax,
|
hpmax = !Upolyd ? u.uhpmax : u.mhmax,
|
||||||
@@ -935,9 +920,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
nhcolor_to_pen(framecolor).color());
|
nhcolor_to_pen(framecolor).color());
|
||||||
}
|
}
|
||||||
painter.setPen( Qt::green );
|
painter.setPen( Qt::green );
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
painter.setPen( nhcolor_to_pen(color) );
|
painter.setPen( nhcolor_to_pen(color) );
|
||||||
#endif
|
|
||||||
painter.drawText(
|
painter.drawText(
|
||||||
i*qt_settings->glyphs().width(),
|
i*qt_settings->glyphs().width(),
|
||||||
j*qt_settings->glyphs().height(),
|
j*qt_settings->glyphs().height(),
|
||||||
@@ -946,7 +929,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
Qt::AlignCenter,
|
Qt::AlignCenter,
|
||||||
QString(QChar(ch)).left(1)
|
QString(QChar(ch)).left(1)
|
||||||
);
|
);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if ((special & MG_PET) != 0 && ::iflags.hilite_pet) {
|
if ((special & MG_PET) != 0 && ::iflags.hilite_pet) {
|
||||||
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
||||||
j*qt_settings->glyphs().height()),
|
j*qt_settings->glyphs().height()),
|
||||||
@@ -957,7 +939,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
j*qt_settings->glyphs().height()),
|
j*qt_settings->glyphs().height()),
|
||||||
pile_annotation);
|
pile_annotation);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (framecolor != NO_COLOR) {
|
if (framecolor != NO_COLOR) {
|
||||||
painter.setPen( nhcolor_to_pen(framecolor) );
|
painter.setPen( nhcolor_to_pen(framecolor) );
|
||||||
painter.drawRect(i*qt_settings->glyphs().width(),
|
painter.drawRect(i*qt_settings->glyphs().width(),
|
||||||
@@ -978,7 +959,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
uint32 framecolor = GlyphFramecolor(i,j);
|
uint32 framecolor = GlyphFramecolor(i,j);
|
||||||
|
|
||||||
qt_settings->glyphs().drawCell(painter, g, tileidx, i, j);
|
qt_settings->glyphs().drawCell(painter, g, tileidx, i, j);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if ((special & MG_PET) != 0 && ::iflags.hilite_pet) {
|
if ((special & MG_PET) != 0 && ::iflags.hilite_pet) {
|
||||||
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
painter.drawPixmap(QPoint(i*qt_settings->glyphs().width(),
|
||||||
j*qt_settings->glyphs().height()),
|
j*qt_settings->glyphs().height()),
|
||||||
@@ -989,7 +969,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
j*qt_settings->glyphs().height()),
|
j*qt_settings->glyphs().height()),
|
||||||
pile_annotation);
|
pile_annotation);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (framecolor != NO_COLOR) {
|
if (framecolor != NO_COLOR) {
|
||||||
painter.setPen( nhcolor_to_pen(framecolor) );
|
painter.setPen( nhcolor_to_pen(framecolor) );
|
||||||
painter.drawRect(i*qt_settings->glyphs().width(),
|
painter.drawRect(i*qt_settings->glyphs().width(),
|
||||||
@@ -1003,13 +982,8 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
|||||||
|
|
||||||
if (garea.contains(cursor)) {
|
if (garea.contains(cursor)) {
|
||||||
if (Is_rogue_level(&u.uz)) {
|
if (Is_rogue_level(&u.uz)) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
painter.setPen( Qt::white );
|
painter.setPen( Qt::white );
|
||||||
#else
|
} else {
|
||||||
painter.setPen( Qt::green ); // REALLY primitive
|
|
||||||
#endif
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
int hp100;
|
int hp100;
|
||||||
if (Upolyd) {
|
if (Upolyd) {
|
||||||
hp100=u.mhmax ? u.mh*100/u.mhmax : 100;
|
hp100=u.mhmax ? u.mh*100/u.mhmax : 100;
|
||||||
|
|||||||
@@ -165,10 +165,8 @@ struct window_procs X11_procs = {
|
|||||||
* Local functions.
|
* Local functions.
|
||||||
*/
|
*/
|
||||||
static winid find_free_window(void);
|
static winid find_free_window(void);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static void nhFreePixel(XtAppContext, XrmValuePtr, XtPointer, XrmValuePtr,
|
static void nhFreePixel(XtAppContext, XrmValuePtr, XtPointer, XrmValuePtr,
|
||||||
Cardinal *);
|
Cardinal *);
|
||||||
#endif
|
|
||||||
static boolean new_resource_macro(String, unsigned);
|
static boolean new_resource_macro(String, unsigned);
|
||||||
static void load_default_resources(void);
|
static void load_default_resources(void);
|
||||||
static void release_default_resources(void);
|
static void release_default_resources(void);
|
||||||
@@ -708,7 +706,6 @@ load_boldfont(struct xwindow *wp, Widget w)
|
|||||||
wp->boldfs = XLoadQueryFont(dpy, fontname);
|
wp->boldfs = XLoadQueryFont(dpy, fontname);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static void
|
static void
|
||||||
nhFreePixel(
|
nhFreePixel(
|
||||||
@@ -736,7 +733,6 @@ nhFreePixel(
|
|||||||
(unsigned long *) toVal->addr, 1, (unsigned long) 0);
|
(unsigned long *) toVal->addr, 1, (unsigned long) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /*TEXTCOLOR*/
|
|
||||||
|
|
||||||
/* [ALI] Utility function to ask Xaw for font height, since the previous
|
/* [ALI] Utility function to ask Xaw for font height, since the previous
|
||||||
* assumption of ascent + descent is not always valid.
|
* assumption of ascent + descent is not always valid.
|
||||||
@@ -1622,13 +1618,11 @@ X11_init_nhwindows(int *argcp, char **argv)
|
|||||||
|
|
||||||
old_error_handler = XSetErrorHandler(panic_on_error);
|
old_error_handler = XSetErrorHandler(panic_on_error);
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* add new color converter to deal with overused colormaps */
|
/* add new color converter to deal with overused colormaps */
|
||||||
XtSetTypeConverter(XtRString, XtRPixel, nhCvtStringToPixel,
|
XtSetTypeConverter(XtRString, XtRPixel, nhCvtStringToPixel,
|
||||||
(XtConvertArgList) nhcolorConvertArgs,
|
(XtConvertArgList) nhcolorConvertArgs,
|
||||||
XtNumber(nhcolorConvertArgs), XtCacheByDisplay,
|
XtNumber(nhcolorConvertArgs), XtCacheByDisplay,
|
||||||
nhFreePixel);
|
nhFreePixel);
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
/* Register the actions mentioned in "actions". */
|
/* Register the actions mentioned in "actions". */
|
||||||
XtAppAddActions(app_context, actions, XtNumber(actions));
|
XtAppAddActions(app_context, actions, XtNumber(actions));
|
||||||
|
|||||||
@@ -57,13 +57,11 @@ extern int total_tiles_used, Tile_corr;
|
|||||||
#define COL0_OFFSET 1 /* change to 0 to revert to displaying unused column 0 */
|
#define COL0_OFFSET 1 /* change to 0 to revert to displaying unused column 0 */
|
||||||
|
|
||||||
static X11_map_symbol glyph_char(const glyph_info *glyphinfo);
|
static X11_map_symbol glyph_char(const glyph_info *glyphinfo);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static GC X11_make_gc(struct xwindow *wp, struct text_map_info_t *text_map,
|
static GC X11_make_gc(struct xwindow *wp, struct text_map_info_t *text_map,
|
||||||
X11_color color, boolean inverted);
|
X11_color color, boolean inverted);
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
static void X11_free_gc(struct xwindow *wp, GC gc, X11_color color);
|
static void X11_free_gc(struct xwindow *wp, GC gc, X11_color color);
|
||||||
#endif
|
#endif
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
static void X11_set_map_font(struct xwindow *wp);
|
static void X11_set_map_font(struct xwindow *wp);
|
||||||
#endif
|
#endif
|
||||||
@@ -129,10 +127,8 @@ X11_print_glyph(
|
|||||||
register X11_map_symbol *ch_ptr;
|
register X11_map_symbol *ch_ptr;
|
||||||
X11_color color;
|
X11_color color;
|
||||||
unsigned special;
|
unsigned special;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
int colordif;
|
int colordif;
|
||||||
register X11_color *co_ptr;
|
register X11_color *co_ptr;
|
||||||
#endif
|
|
||||||
|
|
||||||
color = glyphinfo->gm.sym.color;
|
color = glyphinfo->gm.sym.color;
|
||||||
special = glyphinfo->gm.glyphflags;
|
special = glyphinfo->gm.glyphflags;
|
||||||
@@ -150,7 +146,6 @@ X11_print_glyph(
|
|||||||
if (!map_info->is_tile)
|
if (!map_info->is_tile)
|
||||||
update_bbox = TRUE;
|
update_bbox = TRUE;
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
co_ptr = &map_info->text_map.colors[y][x];
|
co_ptr = &map_info->text_map.colors[y][x];
|
||||||
colordif = (((special & MG_PET) != 0 && iflags.hilite_pet)
|
colordif = (((special & MG_PET) != 0 && iflags.hilite_pet)
|
||||||
|| ((special & MG_OBJPILE) != 0 && iflags.hilite_pile)
|
|| ((special & MG_OBJPILE) != 0 && iflags.hilite_pile)
|
||||||
@@ -177,7 +172,6 @@ X11_print_glyph(
|
|||||||
map_info->text_map.framecolors[y][x] = bkglyphinfo->framecolor;
|
map_info->text_map.framecolors[y][x] = bkglyphinfo->framecolor;
|
||||||
update_bbox = TRUE;
|
update_bbox = TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (update_bbox) { /* update row bbox */
|
if (update_bbox) { /* update row bbox */
|
||||||
@@ -945,7 +939,6 @@ get_text_gc(struct xwindow *wp, Font font)
|
|||||||
XtSetArg(arg[0], XtNbackground, &bgpixel);
|
XtSetArg(arg[0], XtNbackground, &bgpixel);
|
||||||
XtGetValues(wp->w, arg, ONE);
|
XtGetValues(wp->w, arg, ONE);
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#define set_color_gc(nh_color, resource_name) \
|
#define set_color_gc(nh_color, resource_name) \
|
||||||
set_gc(wp->w, font, resource_name, bgpixel, \
|
set_gc(wp->w, font, resource_name, bgpixel, \
|
||||||
&map_info->text_map.color_gcs[nh_color], \
|
&map_info->text_map.color_gcs[nh_color], \
|
||||||
@@ -967,11 +960,6 @@ get_text_gc(struct xwindow *wp, Font font)
|
|||||||
set_color_gc(CLR_BRIGHT_MAGENTA, XtNbright_magenta);
|
set_color_gc(CLR_BRIGHT_MAGENTA, XtNbright_magenta);
|
||||||
set_color_gc(CLR_BRIGHT_CYAN, XtNbright_cyan);
|
set_color_gc(CLR_BRIGHT_CYAN, XtNbright_cyan);
|
||||||
set_color_gc(CLR_WHITE, XtNwhite);
|
set_color_gc(CLR_WHITE, XtNwhite);
|
||||||
#else
|
|
||||||
set_gc(wp->w, font, XtNforeground, bgpixel,
|
|
||||||
&map_info->text_map.copy_gc,
|
|
||||||
&map_info->text_map.inv_copy_gc);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1071,10 +1059,8 @@ map_all_unexplored(struct map_info_t *map_info) /* [was map_all_stone()] */
|
|||||||
tile_map->glyphs[y][x].framecolor = NO_COLOR;
|
tile_map->glyphs[y][x].framecolor = NO_COLOR;
|
||||||
|
|
||||||
text_map->text[y][x] = (uchar) (!x ? mgnothg : mgunexp);
|
text_map->text[y][x] = (uchar) (!x ? mgnothg : mgunexp);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
text_map->colors[y][x] = NO_COLOR;
|
text_map->colors[y][x] = NO_COLOR;
|
||||||
text_map->framecolors[y][x] = NO_COLOR;
|
text_map->framecolors[y][x] = NO_COLOR;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1446,7 +1432,6 @@ map_update(struct xwindow *wp, int start_row, int stop_row, int start_col, int s
|
|||||||
XSetForeground(dpy, tile_map->black_gc,
|
XSetForeground(dpy, tile_map->black_gc,
|
||||||
BlackPixelOfScreen(screen));
|
BlackPixelOfScreen(screen));
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
{
|
{
|
||||||
uint32_t fc = tile_map->glyphs[row][cur_col].framecolor;
|
uint32_t fc = tile_map->glyphs[row][cur_col].framecolor;
|
||||||
|
|
||||||
@@ -1457,7 +1442,6 @@ map_update(struct xwindow *wp, int start_row, int stop_row, int start_col, int s
|
|||||||
tile_map->square_width - 1 ,
|
tile_map->square_width - 1 ,
|
||||||
tile_map->square_height - 1);
|
tile_map->square_height - 1);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1480,7 +1464,6 @@ map_update(struct xwindow *wp, int start_row, int stop_row, int start_col, int s
|
|||||||
} else {
|
} else {
|
||||||
struct text_map_info_t *text_map = &map_info->text_map;
|
struct text_map_info_t *text_map = &map_info->text_map;
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
{
|
{
|
||||||
register X11_color *c_ptr;
|
register X11_color *c_ptr;
|
||||||
X11_map_symbol *t_ptr;
|
X11_map_symbol *t_ptr;
|
||||||
@@ -1520,38 +1503,9 @@ map_update(struct xwindow *wp, int start_row, int stop_row, int start_col, int s
|
|||||||
} /* col loop */
|
} /* col loop */
|
||||||
} /* row loop */
|
} /* row loop */
|
||||||
}
|
}
|
||||||
#else /* !TEXTCOLOR */
|
|
||||||
{
|
|
||||||
int win_row, win_xstart;
|
|
||||||
int win_start_row, win_start_col;
|
|
||||||
|
|
||||||
win_start_row = start_row;
|
|
||||||
win_start_col = start_col;
|
|
||||||
|
|
||||||
/* We always start at the same x window position and have
|
|
||||||
the same character count. */
|
|
||||||
win_xstart = text_map->square_lbearing
|
|
||||||
+ ((win_start_col - COL0_OFFSET)
|
|
||||||
* text_map->square_width);
|
|
||||||
count = stop_col - start_col + 1;
|
|
||||||
|
|
||||||
for (row = start_row, win_row = win_start_row; row <= stop_row;
|
|
||||||
row++, win_row++) {
|
|
||||||
X11_draw_image_string(XtDisplay(wp->w), XtWindow(wp->w),
|
|
||||||
inverted ? text_map->inv_copy_gc
|
|
||||||
: text_map->copy_gc,
|
|
||||||
win_xstart,
|
|
||||||
text_map->square_ascent
|
|
||||||
+ (win_row * text_map->square_height),
|
|
||||||
&(text_map->text[row][start_col]),
|
|
||||||
count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* ?TEXTCOLOR */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static GC
|
static GC
|
||||||
X11_make_gc(
|
X11_make_gc(
|
||||||
struct xwindow *wp UNUSED,
|
struct xwindow *wp UNUSED,
|
||||||
@@ -1621,7 +1575,6 @@ X11_free_gc(struct xwindow *wp, GC ggc, X11_color color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
X11_draw_image_string(
|
X11_draw_image_string(
|
||||||
@@ -1924,17 +1877,12 @@ destroy_map_window(struct xwindow *wp)
|
|||||||
struct text_map_info_t *text_map = &map_info->text_map;
|
struct text_map_info_t *text_map = &map_info->text_map;
|
||||||
|
|
||||||
/* Free allocated GCs. */
|
/* Free allocated GCs. */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < CLR_MAX; i++) {
|
for (i = 0; i < CLR_MAX; i++) {
|
||||||
XtReleaseGC(wp->w, text_map->color_gcs[i]);
|
XtReleaseGC(wp->w, text_map->color_gcs[i]);
|
||||||
XtReleaseGC(wp->w, text_map->inv_color_gcs[i]);
|
XtReleaseGC(wp->w, text_map->inv_color_gcs[i]);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
XtReleaseGC(wp->w, text_map->copy_gc);
|
|
||||||
XtReleaseGC(wp->w, text_map->inv_copy_gc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Free the font structure if we allocated one */
|
/* Free the font structure if we allocated one */
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
|
|||||||
@@ -300,15 +300,11 @@ HiliteField(Widget label,
|
|||||||
struct xwindow *xw = xw_status_win;
|
struct xwindow *xw = xw_status_win;
|
||||||
int colr, attr;
|
int colr, attr;
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if ((colrattr & 0x00ff) >= CLR_MAX)
|
if ((colrattr & 0x00ff) >= CLR_MAX)
|
||||||
/* for !TEXTCOLOR, the following line is unconditional */
|
|
||||||
#endif
|
|
||||||
colrattr = (colrattr & ~0x00ff) | NO_COLOR;
|
colrattr = (colrattr & ~0x00ff) | NO_COLOR;
|
||||||
colr = colrattr & 0x00ff; /* guaranteed to be >= 0 and < CLR_MAX */
|
colr = colrattr & 0x00ff; /* guaranteed to be >= 0 and < CLR_MAX */
|
||||||
attr = (colrattr >> 8) & 0x00ff;
|
attr = (colrattr >> 8) & 0x00ff;
|
||||||
|
|
||||||
/* potentially used even for !TEXTCOLOR configuration */
|
|
||||||
if (!grayPxl) {/* one-time init */
|
if (!grayPxl) {/* one-time init */
|
||||||
grayPxl = get_nhcolor(xw, CLR_GRAY).pixel;
|
grayPxl = get_nhcolor(xw, CLR_GRAY).pixel;
|
||||||
blackPxl = get_nhcolor(xw, CLR_BLACK).pixel;
|
blackPxl = get_nhcolor(xw, CLR_BLACK).pixel;
|
||||||
@@ -524,9 +520,7 @@ tt_reset_color(int fld, int cond, unsigned long *colormasks)
|
|||||||
if (iflags.hilite_delta != 0L && (X11_condition_bits & bm) != 0) {
|
if (iflags.hilite_delta != 0L && (X11_condition_bits & bm) != 0) {
|
||||||
/* BL_RESET before first BL_CONDITION will have colormasks==Null
|
/* BL_RESET before first BL_CONDITION will have colormasks==Null
|
||||||
but condcolor() and condattr() can cope with that */
|
but condcolor() and condattr() can cope with that */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
colrattr = condcolor(bm, colormasks);
|
colrattr = condcolor(bm, colormasks);
|
||||||
#endif
|
|
||||||
colrattr |= (condattr(bm, colormasks) << 8);
|
colrattr |= (condattr(bm, colormasks) << 8);
|
||||||
}
|
}
|
||||||
label = X11_cond_labels[cond];
|
label = X11_cond_labels[cond];
|
||||||
@@ -724,10 +718,6 @@ X11_status_update_tty(int fld, genericptr_t ptr, int chg UNUSED, int percent,
|
|||||||
for a field which isn't active */
|
for a field which isn't active */
|
||||||
*status_vals[fld] = '\0';
|
*status_vals[fld] = '\0';
|
||||||
}
|
}
|
||||||
#ifndef TEXTCOLOR
|
|
||||||
/* even without color, attribute(s) bits still apply */
|
|
||||||
color = (color & ~0x00ff) | NO_COLOR;
|
|
||||||
#endif
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
if (!iflags.hilite_delta)
|
if (!iflags.hilite_delta)
|
||||||
color = NO_COLOR;
|
color = NO_COLOR;
|
||||||
@@ -895,10 +885,7 @@ X11_status_update_fancy(int fld, genericptr_t ptr, int chg UNUSED,
|
|||||||
} else {
|
} else {
|
||||||
int colr, attr;
|
int colr, attr;
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if ((colrattr & 0x00ff) >= CLR_MAX)
|
if ((colrattr & 0x00ff) >= CLR_MAX)
|
||||||
/* for !TEXTCOLOR, the following line is unconditional */
|
|
||||||
#endif
|
|
||||||
colrattr = (colrattr & ~0x00ff) | NO_COLOR;
|
colrattr = (colrattr & ~0x00ff) | NO_COLOR;
|
||||||
colr = colrattr & 0x00ff; /* guaranteed to be >= 0 and < CLR_MAX */
|
colr = colrattr & 0x00ff; /* guaranteed to be >= 0 and < CLR_MAX */
|
||||||
attr = (colrattr >> 8) & 0x00ff;
|
attr = (colrattr >> 8) & 0x00ff;
|
||||||
|
|||||||
@@ -301,7 +301,6 @@ curses_create_main_windows(void)
|
|||||||
void
|
void
|
||||||
curses_init_nhcolors(void)
|
curses_init_nhcolors(void)
|
||||||
{
|
{
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (has_colors()) {
|
if (has_colors()) {
|
||||||
use_default_colors();
|
use_default_colors();
|
||||||
init_pair(1, COLOR_BLACK, -1);
|
init_pair(1, COLOR_BLACK, -1);
|
||||||
@@ -362,7 +361,6 @@ curses_init_nhcolors(void)
|
|||||||
init_pair(16, COLOR_WHITE + 8, -1);
|
init_pair(16, COLOR_WHITE + 8, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* curses_choose_character + curses_character_dialog no longer used */
|
#if 0 /* curses_choose_character + curses_character_dialog no longer used */
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ curses_init_nhwindows(
|
|||||||
#else
|
#else
|
||||||
base_term = initscr();
|
base_term = initscr();
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (has_colors()) {
|
if (has_colors()) {
|
||||||
start_color();
|
start_color();
|
||||||
curses_init_nhcolors();
|
curses_init_nhcolors();
|
||||||
@@ -221,12 +220,6 @@ curses_init_nhwindows(
|
|||||||
iflags.wc2_guicolor = FALSE;
|
iflags.wc2_guicolor = FALSE;
|
||||||
set_wc2_option_mod_status(WC2_GUICOLOR, set_in_config);
|
set_wc2_option_mod_status(WC2_GUICOLOR, set_in_config);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
iflags.use_color = FALSE;
|
|
||||||
set_option_mod_status("color", set_in_config);
|
|
||||||
iflags.wc2_guicolor = FALSE;
|
|
||||||
set_wc2_option_mod_status(WC2_GUICOLOR, set_in_config);
|
|
||||||
#endif
|
|
||||||
noecho();
|
noecho();
|
||||||
raw();
|
raw();
|
||||||
nonl(); /* don't force ^M into newline (^J); input accepts them both
|
nonl(); /* don't force ^M into newline (^J); input accepts them both
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ curses_toggle_color_attr(WINDOW *win, int color, int attr, int onoff)
|
|||||||
if (color == NO_COLOR)
|
if (color == NO_COLOR)
|
||||||
color = NONE;
|
color = NONE;
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
int curses_color;
|
int curses_color;
|
||||||
|
|
||||||
/* if color is disabled, just show attribute */
|
/* if color is disabled, just show attribute */
|
||||||
@@ -89,7 +88,6 @@ curses_toggle_color_attr(WINDOW *win, int color, int attr, int onoff)
|
|||||||
/* statuswin is for #if STATUS_HILITES
|
/* statuswin is for #if STATUS_HILITES
|
||||||
but doesn't need to be conditional */
|
but doesn't need to be conditional */
|
||||||
: !(iflags.wc2_guicolor || win == statuswin)) {
|
: !(iflags.wc2_guicolor || win == statuswin)) {
|
||||||
#endif
|
|
||||||
if (attr != NONE) {
|
if (attr != NONE) {
|
||||||
if (onoff == ON)
|
if (onoff == ON)
|
||||||
wattron(win, attr);
|
wattron(win, attr);
|
||||||
@@ -97,7 +95,6 @@ curses_toggle_color_attr(WINDOW *win, int color, int attr, int onoff)
|
|||||||
wattroff(win, attr);
|
wattroff(win, attr);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color == 0) { /* make black fg visible */
|
if (color == 0) { /* make black fg visible */
|
||||||
@@ -153,9 +150,6 @@ curses_toggle_color_attr(WINDOW *win, int color, int attr, int onoff)
|
|||||||
wattroff(win, attr);
|
wattroff(win, attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
nhUse(color);
|
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call curses_toggle_color_attr() with 'menucolors' instead of 'guicolor'
|
/* call curses_toggle_color_attr() with 'menucolors' instead of 'guicolor'
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ static void curs_HPbar(char *, int);
|
|||||||
static void curs_stat_conds(int, int, int *, int *, char *, boolean *);
|
static void curs_stat_conds(int, int, int *, int *, char *, boolean *);
|
||||||
static void curs_vert_status_vals(int);
|
static void curs_vert_status_vals(int);
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static int condcolor(long, unsigned long *);
|
static int condcolor(long, unsigned long *);
|
||||||
#endif
|
|
||||||
static int condattr(long, unsigned long *);
|
static int condattr(long, unsigned long *);
|
||||||
static int nhattr2curses(int);
|
static int nhattr2curses(int);
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
@@ -163,9 +161,7 @@ curses_status_update(
|
|||||||
curses_condition_bits = *condptr;
|
curses_condition_bits = *condptr;
|
||||||
curses_colormasks = colormasks;
|
curses_colormasks = colormasks;
|
||||||
} else {
|
} else {
|
||||||
#ifndef TEXTCOLOR
|
|
||||||
color_and_attr = (color_and_attr & ~0x00FF) | NO_COLOR;
|
color_and_attr = (color_and_attr & ~0x00FF) | NO_COLOR;
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* status_vals[] are used for horizontal orientation
|
* status_vals[] are used for horizontal orientation
|
||||||
* (wide lines of multiple short values).
|
* (wide lines of multiple short values).
|
||||||
@@ -591,11 +587,9 @@ draw_horizontal(boolean border)
|
|||||||
attrmask = nhattr2curses(attrmask);
|
attrmask = nhattr2curses(attrmask);
|
||||||
wattron(win, attrmask);
|
wattron(win, attrmask);
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
coloridx &= 0x00FF;
|
coloridx &= 0x00FF;
|
||||||
if (coloridx != NO_COLOR && coloridx != CLR_MAX)
|
if (coloridx != NO_COLOR && coloridx != CLR_MAX)
|
||||||
curses_toggle_color_attr(win, coloridx, NONE, ON);
|
curses_toggle_color_attr(win, coloridx, NONE, ON);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
|
|
||||||
@@ -603,10 +597,8 @@ draw_horizontal(boolean border)
|
|||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
if (iflags.hilite_delta) {
|
if (iflags.hilite_delta) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (coloridx != NO_COLOR)
|
if (coloridx != NO_COLOR)
|
||||||
curses_toggle_color_attr(win, coloridx, NONE, OFF);
|
curses_toggle_color_attr(win, coloridx, NONE, OFF);
|
||||||
#endif
|
|
||||||
if (attrmask)
|
if (attrmask)
|
||||||
wattroff(win, attrmask);
|
wattroff(win, attrmask);
|
||||||
}
|
}
|
||||||
@@ -888,11 +880,9 @@ draw_vertical(boolean border)
|
|||||||
attrmask = nhattr2curses(attrmask);
|
attrmask = nhattr2curses(attrmask);
|
||||||
wattron(win, attrmask);
|
wattron(win, attrmask);
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
coloridx &= 0x00FF;
|
coloridx &= 0x00FF;
|
||||||
if (coloridx != NO_COLOR && coloridx != CLR_MAX)
|
if (coloridx != NO_COLOR && coloridx != CLR_MAX)
|
||||||
curses_toggle_color_attr(win, coloridx, NONE, ON);
|
curses_toggle_color_attr(win, coloridx, NONE, ON);
|
||||||
#endif
|
|
||||||
} /* highlighting active */
|
} /* highlighting active */
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
|
|
||||||
@@ -900,10 +890,8 @@ draw_vertical(boolean border)
|
|||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
if (iflags.hilite_delta) {
|
if (iflags.hilite_delta) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (coloridx != NO_COLOR)
|
if (coloridx != NO_COLOR)
|
||||||
curses_toggle_color_attr(win, coloridx, NONE, OFF);
|
curses_toggle_color_attr(win, coloridx, NONE, OFF);
|
||||||
#endif
|
|
||||||
if (attrmask)
|
if (attrmask)
|
||||||
wattroff(win, attrmask);
|
wattroff(win, attrmask);
|
||||||
} /* resume normal rendition */
|
} /* resume normal rendition */
|
||||||
@@ -933,9 +921,7 @@ curs_HPbar(char *text, /* pre-padded with trailing spaces if short */
|
|||||||
int bar_len) /* width of space within the brackets */
|
int bar_len) /* width of space within the brackets */
|
||||||
{
|
{
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
int coloridx = 0;
|
int coloridx = 0;
|
||||||
#endif
|
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
int k, bar_pos;
|
int k, bar_pos;
|
||||||
char bar[STATVAL_WIDTH], *bar2 = (char *) 0, savedch = '\0';
|
char bar[STATVAL_WIDTH], *bar2 = (char *) 0, savedch = '\0';
|
||||||
@@ -965,25 +951,21 @@ curs_HPbar(char *text, /* pre-padded with trailing spaces if short */
|
|||||||
/* fixed attribute, not nhattr2curses((hpbar_color >> 8) & 0x00FF) */
|
/* fixed attribute, not nhattr2curses((hpbar_color >> 8) & 0x00FF) */
|
||||||
wattron(win, A_REVERSE); /* do this even if hilite_delta is 0 */
|
wattron(win, A_REVERSE); /* do this even if hilite_delta is 0 */
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (iflags.hilite_delta) {
|
if (iflags.hilite_delta) {
|
||||||
coloridx = hpbar_color & 0x00FF;
|
coloridx = hpbar_color & 0x00FF;
|
||||||
if (coloridx != NO_COLOR)
|
if (coloridx != NO_COLOR)
|
||||||
curses_toggle_color_attr(win, coloridx, NONE, ON);
|
curses_toggle_color_attr(win, coloridx, NONE, ON);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
|
|
||||||
/* portion of title corresponding to current hit points */
|
/* portion of title corresponding to current hit points */
|
||||||
waddstr(win, bar);
|
waddstr(win, bar);
|
||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (iflags.hilite_delta) {
|
if (iflags.hilite_delta) {
|
||||||
if (coloridx != NO_COLOR)
|
if (coloridx != NO_COLOR)
|
||||||
curses_toggle_color_attr(win, coloridx, NONE, OFF);
|
curses_toggle_color_attr(win, coloridx, NONE, OFF);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
wattroff(win, A_REVERSE); /* do this even if hilite_delta is 0 */
|
wattroff(win, A_REVERSE); /* do this even if hilite_delta is 0 */
|
||||||
} /* *bar (current HP > 0) */
|
} /* *bar (current HP > 0) */
|
||||||
@@ -1088,11 +1070,9 @@ curs_stat_conds(
|
|||||||
attrmask = nhattr2curses(attrmask);
|
attrmask = nhattr2curses(attrmask);
|
||||||
wattron(win, attrmask);
|
wattron(win, attrmask);
|
||||||
}
|
}
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if ((color = condcolor(bitmsk, curses_colormasks))
|
if ((color = condcolor(bitmsk, curses_colormasks))
|
||||||
!= NO_COLOR)
|
!= NO_COLOR)
|
||||||
curses_toggle_color_attr(win, color, NONE, ON);
|
curses_toggle_color_attr(win, color, NONE, ON);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
|
|
||||||
@@ -1101,10 +1081,8 @@ curs_stat_conds(
|
|||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
if (iflags.hilite_delta) {
|
if (iflags.hilite_delta) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (color != NO_COLOR)
|
if (color != NO_COLOR)
|
||||||
curses_toggle_color_attr(win, color, NONE, OFF);
|
curses_toggle_color_attr(win, color, NONE, OFF);
|
||||||
#endif
|
|
||||||
if (attrmask)
|
if (attrmask)
|
||||||
wattroff(win, attrmask);
|
wattroff(win, attrmask);
|
||||||
}
|
}
|
||||||
@@ -1271,7 +1249,6 @@ curs_vert_status_vals(int win_width)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/*
|
/*
|
||||||
* Return what color this condition should
|
* Return what color this condition should
|
||||||
* be displayed in based on user settings.
|
* be displayed in based on user settings.
|
||||||
@@ -1288,7 +1265,6 @@ condcolor(long bm, unsigned long *bmarray)
|
|||||||
}
|
}
|
||||||
return NO_COLOR;
|
return NO_COLOR;
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
condattr(long bm, unsigned long *bmarray)
|
condattr(long bm, unsigned long *bmarray)
|
||||||
|
|||||||
@@ -213,11 +213,7 @@ struct window_procs shim_procs = {
|
|||||||
| WC2_RESET_STATUS
|
| WC2_RESET_STATUS
|
||||||
#endif
|
#endif
|
||||||
| WC2_DARKGRAY | WC2_SUPPRESS_HIST | WC2_STATUSLINES),
|
| WC2_DARKGRAY | WC2_SUPPRESS_HIST | WC2_STATUSLINES),
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
|
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
|
||||||
#else
|
|
||||||
{1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1},
|
|
||||||
#endif
|
|
||||||
shim_init_nhwindows, shim_player_selection, shim_askname, shim_get_nh_event,
|
shim_init_nhwindows, shim_player_selection, shim_askname, shim_get_nh_event,
|
||||||
shim_exit_nhwindows, shim_suspend_nhwindows, shim_resume_nhwindows,
|
shim_exit_nhwindows, shim_suspend_nhwindows, shim_resume_nhwindows,
|
||||||
shim_create_nhwindow, shim_clear_nhwindow, shim_display_nhwindow,
|
shim_create_nhwindow, shim_clear_nhwindow, shim_display_nhwindow,
|
||||||
|
|||||||
+8
-17
@@ -20,12 +20,12 @@ void nocmov(int, int);
|
|||||||
void term_start_24bitcolor(struct unicode_representation *);
|
void term_start_24bitcolor(struct unicode_representation *);
|
||||||
void term_end_24bitcolor(void);
|
void term_end_24bitcolor(void);
|
||||||
|
|
||||||
#if defined(TEXTCOLOR) && defined(TERMLIB)
|
#if defined(TERMLIB)
|
||||||
#if (!defined(UNIX) || !defined(TERMINFO)) && !defined(TOS)
|
#if (!defined(UNIX) || !defined(TERMINFO)) && !defined(TOS)
|
||||||
static void analyze_seq(char *, int *, int *);
|
static void analyze_seq(char *, int *, int *);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(TEXTCOLOR) && (defined(TERMLIB) || defined(ANSI_DEFAULT))
|
#if (defined(TERMLIB) || defined(ANSI_DEFAULT))
|
||||||
static void init_hilite(void);
|
static void init_hilite(void);
|
||||||
static void kill_hilite(void);
|
static void kill_hilite(void);
|
||||||
#endif
|
#endif
|
||||||
@@ -45,13 +45,11 @@ static char PC = '\0';
|
|||||||
static char tbuf[512];
|
static char tbuf[512];
|
||||||
#endif /*TERMLIB*/
|
#endif /*TERMLIB*/
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#ifdef TOS
|
#ifdef TOS
|
||||||
const char *hilites[CLR_MAX]; /* terminal escapes for the various colors */
|
const char *hilites[CLR_MAX]; /* terminal escapes for the various colors */
|
||||||
#else
|
#else
|
||||||
char NEARDATA *hilites[CLR_MAX]; /* terminal escapes for the various colors */
|
char NEARDATA *hilites[CLR_MAX]; /* terminal escapes for the various colors */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
static char *KS = (char *) 0, *KE = (char *) 0; /* keypad sequences */
|
static char *KS = (char *) 0, *KE = (char *) 0; /* keypad sequences */
|
||||||
static char nullstr[] = "";
|
static char nullstr[] = "";
|
||||||
@@ -160,9 +158,7 @@ tty_startup(int *wid, int *hgt)
|
|||||||
AE = nhStr("\017");
|
AE = nhStr("\017");
|
||||||
#endif
|
#endif
|
||||||
TE = VS = VE = nullstr;
|
TE = VS = VE = nullstr;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
init_hilite();
|
init_hilite();
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
*wid = CO;
|
*wid = CO;
|
||||||
*hgt = LI;
|
*hgt = LI;
|
||||||
CL = nhStr("\033[2J"); /* last thing set */
|
CL = nhStr("\033[2J"); /* last thing set */
|
||||||
@@ -297,7 +293,6 @@ tty_startup(int *wid, int *hgt)
|
|||||||
AS = Tgetstr(nhStr("as")); /* alt charset start */
|
AS = Tgetstr(nhStr("as")); /* alt charset start */
|
||||||
AE = Tgetstr(nhStr("ae")); /* alt charset end */
|
AE = Tgetstr(nhStr("ae")); /* alt charset end */
|
||||||
nh_CD = Tgetstr(nhStr("cd")); /* clear lines from cursor and down */
|
nh_CD = Tgetstr(nhStr("cd")); /* clear lines from cursor and down */
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
#if defined(TOS) && defined(__GNUC__)
|
#if defined(TOS) && defined(__GNUC__)
|
||||||
if (!strcmp(term, "builtin") || !strcmp(term, "tw52")
|
if (!strcmp(term, "builtin") || !strcmp(term, "tw52")
|
||||||
|| !strcmp(term, "st52")) {
|
|| !strcmp(term, "st52")) {
|
||||||
@@ -305,7 +300,6 @@ tty_startup(int *wid, int *hgt)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
init_hilite();
|
init_hilite();
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
*wid = CO;
|
*wid = CO;
|
||||||
*hgt = LI;
|
*hgt = LI;
|
||||||
@@ -332,7 +326,7 @@ void
|
|||||||
tty_shutdown(void)
|
tty_shutdown(void)
|
||||||
{
|
{
|
||||||
/* we only attempt to clean up a few individual termcap variables */
|
/* we only attempt to clean up a few individual termcap variables */
|
||||||
#if defined(TEXTCOLOR) && (defined(TERMLIB) || defined(ANSI_DEFAULT))
|
#if defined(TERMLIB) || defined(ANSI_DEFAULT)
|
||||||
kill_hilite();
|
kill_hilite();
|
||||||
#endif
|
#endif
|
||||||
#ifdef TERMLIB
|
#ifdef TERMLIB
|
||||||
@@ -809,7 +803,7 @@ cl_eos(void) /* free after Robert Viduya */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(TEXTCOLOR) && defined(TERMLIB)
|
#if defined(TERMLIB)
|
||||||
#if defined(UNIX) && defined(TERMINFO)
|
#if defined(UNIX) && defined(TERMINFO)
|
||||||
/*
|
/*
|
||||||
* Sets up color highlighting, using terminfo(4) escape sequences.
|
* Sets up color highlighting, using terminfo(4) escape sequences.
|
||||||
@@ -1218,9 +1212,9 @@ kill_hilite(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif /* UNIX && TERMINFO */
|
#endif /* UNIX && TERMINFO */
|
||||||
#endif /* TEXTCOLOR && TERMLIB */
|
#endif /* TERMLIB */
|
||||||
|
|
||||||
#if defined(TEXTCOLOR) && !defined(TERMLIB) && defined(ANSI_DEFAULT)
|
#if !defined(TERMLIB) && defined(ANSI_DEFAULT)
|
||||||
static char adef_nilstring[] = "";
|
static char adef_nilstring[] = "";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1256,7 +1250,7 @@ init_hilite(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See TEXTCOLOR && TERMLIB && UNIX && TERMINFO code above. */
|
/* See TERMLIB && UNIX && TERMINFO code above. */
|
||||||
if (iflags.wc2_darkgray) {
|
if (iflags.wc2_darkgray) {
|
||||||
/* Bright black is dark gray. */
|
/* Bright black is dark gray. */
|
||||||
hilites[CLR_BLACK] = (char *) alloc(sizeof "\033[1;30m");
|
hilites[CLR_BLACK] = (char *) alloc(sizeof "\033[1;30m");
|
||||||
@@ -1293,7 +1287,7 @@ kill_hilite(void)
|
|||||||
hilites[CLR_BLACK] = 0;
|
hilites[CLR_BLACK] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR && !TERMLIB && ANSI_DEFAULT */
|
#endif /* !TERMLIB && ANSI_DEFAULT */
|
||||||
|
|
||||||
static char nulstr[] = "";
|
static char nulstr[] = "";
|
||||||
|
|
||||||
@@ -1426,8 +1420,6 @@ term_end_raw_bold(void)
|
|||||||
xputs(soOff);
|
xputs(soOff);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
|
|
||||||
void
|
void
|
||||||
term_end_color(void)
|
term_end_color(void)
|
||||||
{
|
{
|
||||||
@@ -1448,7 +1440,6 @@ term_start_bgcolor(int color)
|
|||||||
Sprintf(tmp, "\033[%dm", ((color % 8) + 40));
|
Sprintf(tmp, "\033[%dm", ((color % 8) + 40));
|
||||||
xputs(tmp);
|
xputs(tmp);
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
|
|
||||||
|
|||||||
@@ -125,11 +125,7 @@ struct window_procs tty_procs = {
|
|||||||
| WC2_U_24BITCOLOR
|
| WC2_U_24BITCOLOR
|
||||||
#endif
|
#endif
|
||||||
),
|
),
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
|
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
|
||||||
#else
|
|
||||||
{1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1},
|
|
||||||
#endif
|
|
||||||
tty_init_nhwindows, tty_player_selection, tty_askname, tty_get_nh_event,
|
tty_init_nhwindows, tty_player_selection, tty_askname, tty_get_nh_event,
|
||||||
tty_exit_nhwindows, tty_suspend_nhwindows, tty_resume_nhwindows,
|
tty_exit_nhwindows, tty_suspend_nhwindows, tty_resume_nhwindows,
|
||||||
tty_create_nhwindow, tty_clear_nhwindow, tty_display_nhwindow,
|
tty_create_nhwindow, tty_clear_nhwindow, tty_display_nhwindow,
|
||||||
@@ -548,9 +544,7 @@ tty_init_nhwindows(int *argcp UNUSED, char **argv UNUSED)
|
|||||||
ttyDisplay->curx = ttyDisplay->cury = 0;
|
ttyDisplay->curx = ttyDisplay->cury = 0;
|
||||||
ttyDisplay->inmore = ttyDisplay->inread = ttyDisplay->intr = 0;
|
ttyDisplay->inmore = ttyDisplay->inread = ttyDisplay->intr = 0;
|
||||||
ttyDisplay->dismiss_more = 0;
|
ttyDisplay->dismiss_more = 0;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
ttyDisplay->color = NO_COLOR;
|
ttyDisplay->color = NO_COLOR;
|
||||||
#endif
|
|
||||||
ttyDisplay->attrs = 0;
|
ttyDisplay->attrs = 0;
|
||||||
ttyDisplay->topl_utf8 = 0;
|
ttyDisplay->topl_utf8 = 0;
|
||||||
ttyDisplay->mixed = 0;
|
ttyDisplay->mixed = 0;
|
||||||
@@ -1170,16 +1164,12 @@ set_item_state(
|
|||||||
HUPSKIP();
|
HUPSKIP();
|
||||||
tty_curs(window, 4, lineno);
|
tty_curs(window, 4, lineno);
|
||||||
term_start_attr(item->attr);
|
term_start_attr(item->attr);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (item->color != NO_COLOR)
|
if (item->color != NO_COLOR)
|
||||||
term_start_color(item->color);
|
term_start_color(item->color);
|
||||||
#endif
|
|
||||||
(void) putchar(ch);
|
(void) putchar(ch);
|
||||||
ttyDisplay->curx++;
|
ttyDisplay->curx++;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (item->color != NO_COLOR)
|
if (item->color != NO_COLOR)
|
||||||
term_end_color();
|
term_end_color();
|
||||||
#endif
|
|
||||||
term_end_attr(item->attr);
|
term_end_attr(item->attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1306,21 +1296,13 @@ toggle_menu_attr(boolean on, int color, int attr)
|
|||||||
{
|
{
|
||||||
if (on) {
|
if (on) {
|
||||||
term_start_attr(attr);
|
term_start_attr(attr);
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (color != NO_COLOR)
|
if (color != NO_COLOR)
|
||||||
term_start_color(color);
|
term_start_color(color);
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (color != NO_COLOR)
|
if (color != NO_COLOR)
|
||||||
term_end_color();
|
term_end_color();
|
||||||
#endif
|
|
||||||
term_end_attr(attr);
|
term_end_attr(attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TEXTCOLOR
|
|
||||||
nhUse(color);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -3549,12 +3531,10 @@ end_glyphout(void)
|
|||||||
graph_off();
|
graph_off();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (ttyDisplay->color != NO_COLOR) {
|
if (ttyDisplay->color != NO_COLOR) {
|
||||||
term_end_color();
|
term_end_color();
|
||||||
ttyDisplay->color = NO_COLOR;
|
ttyDisplay->color = NO_COLOR;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32CON
|
#ifndef WIN32CON
|
||||||
@@ -3701,12 +3681,10 @@ tty_print_glyph(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (iflags.use_color) {
|
if (iflags.use_color) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (color != ttyDisplay->color) {
|
if (color != ttyDisplay->color) {
|
||||||
if (ttyDisplay->color != NO_COLOR)
|
if (ttyDisplay->color != NO_COLOR)
|
||||||
term_end_color();
|
term_end_color();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
/* we don't link with termcap.o if NO_TERMS is defined */
|
/* we don't link with termcap.o if NO_TERMS is defined */
|
||||||
if ((tty_procs.wincap2 & WC2_U_24BITCOLOR) && SYMHANDLING(H_UTF8)
|
if ((tty_procs.wincap2 & WC2_U_24BITCOLOR) && SYMHANDLING(H_UTF8)
|
||||||
@@ -3720,13 +3698,11 @@ tty_print_glyph(
|
|||||||
colordone = TRUE;
|
colordone = TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
if (!colordone) {
|
if (!colordone) {
|
||||||
ttyDisplay->color = color;
|
ttyDisplay->color = color;
|
||||||
if (color != NO_COLOR)
|
if (color != NO_COLOR)
|
||||||
term_start_color(color);
|
term_start_color(color);
|
||||||
}
|
}
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
} /* iflags.use_color aka iflags.wc_color */
|
} /* iflags.use_color aka iflags.wc_color */
|
||||||
|
|
||||||
/* must be after color check; term_end_color may turn off inverse too;
|
/* must be after color check; term_end_color may turn off inverse too;
|
||||||
@@ -3735,10 +3711,8 @@ tty_print_glyph(
|
|||||||
to see although the Valkyrie quest ends up being hard on the eyes) */
|
to see although the Valkyrie quest ends up being hard on the eyes) */
|
||||||
if (iflags.use_color
|
if (iflags.use_color
|
||||||
&& bkglyphinfo && bkglyphinfo->framecolor != NO_COLOR) {
|
&& bkglyphinfo && bkglyphinfo->framecolor != NO_COLOR) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
ttyDisplay->framecolor = bkglyphinfo->framecolor;
|
ttyDisplay->framecolor = bkglyphinfo->framecolor;
|
||||||
term_start_bgcolor(bkglyphinfo->framecolor);
|
term_start_bgcolor(bkglyphinfo->framecolor);
|
||||||
#endif
|
|
||||||
} else if ((((special & MG_PET) != 0 && iflags.hilite_pet)
|
} else if ((((special & MG_PET) != 0 && iflags.hilite_pet)
|
||||||
|| ((special & MG_OBJPILE) != 0 && iflags.hilite_pile)
|
|| ((special & MG_OBJPILE) != 0 && iflags.hilite_pile)
|
||||||
|| ((special & MG_FEMALE) != 0 && wizard && iflags.wizmgender)
|
|| ((special & MG_FEMALE) != 0 && wizard && iflags.wizmgender)
|
||||||
@@ -3770,7 +3744,6 @@ tty_print_glyph(
|
|||||||
if (inverse_on)
|
if (inverse_on)
|
||||||
term_end_attr(ATR_INVERSE);
|
term_end_attr(ATR_INVERSE);
|
||||||
if (iflags.use_color) {
|
if (iflags.use_color) {
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/* turn off color as well, turning off ATR_INVERSE may have done
|
/* turn off color as well, turning off ATR_INVERSE may have done
|
||||||
this already and if so, we won't know the current state unless
|
this already and if so, we won't know the current state unless
|
||||||
we do it explicitly */
|
we do it explicitly */
|
||||||
@@ -3779,7 +3752,6 @@ tty_print_glyph(
|
|||||||
term_end_color();
|
term_end_color();
|
||||||
ttyDisplay->color = ttyDisplay->framecolor = NO_COLOR;
|
ttyDisplay->color = ttyDisplay->framecolor = NO_COLOR;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
if (color24bit_on)
|
if (color24bit_on)
|
||||||
term_end_24bitcolor();
|
term_end_24bitcolor();
|
||||||
@@ -4051,9 +4023,7 @@ extern boolean status_activefields[MAXBLSTATS];
|
|||||||
extern winid WIN_STATUS;
|
extern winid WIN_STATUS;
|
||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
static int condcolor(long, unsigned long *);
|
static int condcolor(long, unsigned long *);
|
||||||
#endif
|
|
||||||
static int condattr(long, unsigned long *);
|
static int condattr(long, unsigned long *);
|
||||||
static unsigned long *tty_colormasks;
|
static unsigned long *tty_colormasks;
|
||||||
static long tty_condition_bits;
|
static long tty_condition_bits;
|
||||||
@@ -4290,9 +4260,6 @@ tty_status_update(
|
|||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
attrmask = (color >> 8) & 0x00FF;
|
attrmask = (color >> 8) & 0x00FF;
|
||||||
#ifndef TEXTCOLOR
|
|
||||||
color = NO_COLOR;
|
|
||||||
#endif
|
|
||||||
fmt = status_fieldfmt[fldidx];
|
fmt = status_fieldfmt[fldidx];
|
||||||
if (!fmt)
|
if (!fmt)
|
||||||
fmt = "%s";
|
fmt = "%s";
|
||||||
@@ -4688,7 +4655,6 @@ check_windowdata(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
/*
|
/*
|
||||||
* Return what color this condition should
|
* Return what color this condition should
|
||||||
* be displayed in based on user settings.
|
* be displayed in based on user settings.
|
||||||
@@ -4705,13 +4671,6 @@ condcolor(long bm, unsigned long *bmarray)
|
|||||||
}
|
}
|
||||||
return NO_COLOR;
|
return NO_COLOR;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* might need something more elaborate if some compiler complains that
|
|
||||||
the condition where this gets used always has the same value */
|
|
||||||
#define condcolor(bm,bmarray) NO_COLOR
|
|
||||||
#define term_start_color(color) /*empty*/
|
|
||||||
#define term_end_color() /*empty*/
|
|
||||||
#endif /* TEXTCOLOR */
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
condattr(long bm, unsigned long *bmarray)
|
condattr(long bm, unsigned long *bmarray)
|
||||||
|
|||||||
@@ -1274,7 +1274,6 @@ void
|
|||||||
nhglyph2charcolor(short g, uchar *ch, int *color)
|
nhglyph2charcolor(short g, uchar *ch, int *color)
|
||||||
{
|
{
|
||||||
int offset;
|
int offset;
|
||||||
#ifdef TEXTCOLOR
|
|
||||||
|
|
||||||
#define zap_color(n) *color = iflags.use_color ? zapcolors[n] : NO_COLOR
|
#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 cmap_color(n) *color = iflags.use_color ? defsyms[n].color : NO_COLOR
|
||||||
@@ -1285,17 +1284,6 @@ nhglyph2charcolor(short g, uchar *ch, int *color)
|
|||||||
#define warn_color(n) \
|
#define warn_color(n) \
|
||||||
*color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR
|
*color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR
|
||||||
|
|
||||||
#else /* no text color */
|
|
||||||
|
|
||||||
#define zap_color(n)
|
|
||||||
#define cmap_color(n)
|
|
||||||
#define obj_color(n)
|
|
||||||
#define mon_color(n)
|
|
||||||
#define pet_color(c)
|
|
||||||
#define warn_color(c)
|
|
||||||
*color = CLR_WHITE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((offset = (g - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */
|
if ((offset = (g - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */
|
||||||
*ch = showsyms[offset + SYM_OFF_W];
|
*ch = showsyms[offset + SYM_OFF_W];
|
||||||
warn_color(offset);
|
warn_color(offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user