Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-11-30 15:41:52 -05:00
22 changed files with 102 additions and 63 deletions

View File

@@ -245,16 +245,11 @@ unsigned mgflags;
#ifdef TEXTCOLOR
/* Turn off color if no color defined, or rogue level w/o PC graphics. */
if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color))
color = NO_COLOR;
#endif
color = NO_COLOR;
*ochar = (int) ch;
*ospecial = special;
#ifdef TEXTCOLOR
*ocolor = color;
#else
nhUse(ocolor);
#endif
return idx;
}

View File

@@ -107,11 +107,7 @@ static const struct Bool_Opt {
#endif
{ "clicklook", &iflags.clicklook, FALSE, SET_IN_GAME },
{ "cmdassist", &iflags.cmdassist, TRUE, SET_IN_GAME },
#if defined(MICRO) || defined(WIN32) || defined(CURSES_GRAPHICS)
{ "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /*WC*/
#else /* systems that support multiple terminals, many monochrome */
{ "color", &iflags.wc_color, FALSE, SET_IN_GAME }, /*WC*/
#endif
{ "color", &iflags.wc_color, TRUE, SET_IN_GAME }, /* on/off: use WC or not */
{ "confirm", &flags.confirm, TRUE, SET_IN_GAME },
{ "dark_room", &flags.dark_room, TRUE, SET_IN_GAME },
{ "eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME }, /*WC*/

View File

@@ -523,7 +523,9 @@ static void FDECL(hup_void_fdecl_winid, (winid));
static void FDECL(hup_void_fdecl_constchar_p, (const char *));
static struct window_procs hup_procs = {
"hup", 0L, 0L, hup_init_nhwindows,
"hup", 0L, 0L,
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
hup_init_nhwindows,
hup_void_ndecl, /* player_selection */
hup_void_ndecl, /* askname */
hup_void_ndecl, /* get_nh_event */
@@ -1371,4 +1373,28 @@ boolean onoff_flag;
}
}
#ifdef TTY_GRAPHICS
#ifdef TEXTCOLOR
#ifdef TOS
extern const char *hilites[CLR_MAX];
#else
extern NEARDATA char *hilites[CLR_MAX];
#endif
#endif
#endif
int
has_color(color)
int color;
{
return (iflags.use_color && windowprocs.name
&& (windowprocs.wincap & WC_COLOR) && windowprocs.has_color[color]
#ifdef TTY_GRAPHICS
#if defined(TEXTCOLOR) && defined(TERMLIB) && !defined(NO_TERMS)
&& (hilites[color] != 0)
#endif
#endif
);
}
/*windows.c*/