Merge remote-tracking branch 'origin/NetHack-3.6.0'

This commit is contained in:
keni
2017-10-01 17:19:23 -04:00
53 changed files with 3458 additions and 1640 deletions

View File

@@ -51,13 +51,8 @@ struct window_procs amii_procs = {
/* other defs that really should go away (they're tty specific) */
amii_delay_output, amii_delay_output, amii_outrip, genl_preference_update,
genl_getmsghistory, genl_putmsghistory,
#ifdef STATUS_VIA_WINDOWPORT
genl_status_init, genl_status_finish, genl_status_enablefield,
genl_status_update,
#ifdef STATUS_HILITES
genl_status_threshold,
#endif
#endif
genl_can_suspend_yes,
};
@@ -88,13 +83,8 @@ struct window_procs amiv_procs = {
/* other defs that really should go away (they're tty specific) */
amii_delay_output, amii_delay_output, amii_outrip, genl_preference_update,
genl_getmsghistory, genl_putmsghistory,
#ifdef STATUS_VIA_WINDOWPORT
genl_status_init, genl_status_finish, genl_status_enablefield,
genl_status_update,
#ifdef STATUS_HILITES
genl_status_threshold,
#endif
#endif
genl_can_suspend_yes,
};

View File

@@ -73,13 +73,8 @@ struct window_procs mswin_procs = {
/* other defs that really should go away (they're tty specific) */
mswin_start_screen, mswin_end_screen, mswin_outrip,
mswin_preference_update, genl_getmsghistory, genl_putmsghistory,
#ifdef STATUS_VIA_WINDOWPORT
genl_status_init, genl_status_finish, genl_status_enablefield,
genl_status_update,
#ifdef STATUS_HILITES
genl_status_threshold,
#endif
#endif
genl_can_suspend_no,
};

View File

@@ -66,9 +66,6 @@ MENUCOLOR=" cursed .* (being worn)" = orange&underline
# Turn off all status hilites.
#OPTIONS=!statushilites
#
# General options. You might also set "silent" so as not to attract
# the boss's attention.
#
@@ -185,3 +182,45 @@ OPTIONS=vary_msgcount:1
#OPTIONS=palette:bright cyan-0-255-255
#OPTIONS=palette:white-255-255-255
# Status hilites
OPTIONS=statushilites
# HP
OPTIONS=hitpointbar
OPTIONS=hilite_status:hitpoints/100%/gray&normal
OPTIONS=hilite_status:hitpoints/<100%/green&normal
OPTIONS=hilite_status:hitpoints/<66%/yellow&normal
OPTIONS=hilite_status:hitpoints/<50%/orange&normal
OPTIONS=hilite_status:hitpoints/<33%/red&bold
OPTIONS=hilite_status:hitpoints/<15%/red&inverse
## Pw
OPTIONS=hilite_status:power/100%/gray&normal
OPTIONS=hilite_status:power/<100%/green&normal
OPTIONS=hilite_status:power/<66%/yellow&normal
OPTIONS=hilite_status:power/<50%/orange&normal
OPTIONS=hilite_status:power/<33%/red&bold
## Carry
OPTIONS=hilite_status:cap/burdened/yellow/stressed/orange/strained/red&bold/overtaxed/red&inverse/overloaded/red&inverse&blink
## Hunger
OPTIONS=hilite_status:hunger/satiated/yellow/hungry/orange/weak/red&bold/fainting/red&inverse/fainted/red&inverse&blink
## Mental
OPTIONS=hilite_status:condition/hallu/yellow
OPTIONS=hilite_status:condition/conf/orange
OPTIONS=hilite_status:condition/stun/red&bold
## Health
OPTIONS=hilite_status:condition/termill/red&inverse
OPTIONS=hilite_status:condition/foodpois/red&inverse
OPTIONS=hilite_status:condition/slime/red&inverse
# gold
OPTIONS=hilite_status:gold/up/yellow/down/brown
# St, Dx, Co, In, Wi, Ch
OPTIONS=hilite_status:characteristics/up/green/down/red

View File

@@ -42,9 +42,7 @@ void FDECL(cmov, (int, int));
void FDECL(nocmov, (int, int));
int FDECL(process_keystroke,
(INPUT_RECORD *, boolean *, BOOLEAN_P numberpad, int portdebug));
#ifdef TEXTCOLOR
static void NDECL(init_ttycolor);
#endif
static void NDECL(really_move_cursor);
/* Win32 Console handles for input and output */
@@ -111,8 +109,10 @@ static DWORD ccount, acount;
#ifndef CLR_MAX
#define CLR_MAX 16
#endif
int ttycolors[CLR_MAX];
int ttycolors_inv[CLR_MAX];
#define MAX_OVERRIDES 256
unsigned char key_overrides[MAX_OVERRIDES];
static char nullstr[] = "";
@@ -158,7 +158,7 @@ gettty()
init_ttycolor();
#else
for (k = 0; k < CLR_MAX; ++k)
ttycolors[k] = 7;
ttycolors[k] = NO_COLOR;
#endif
}
@@ -692,6 +692,7 @@ tty_delay_output()
static void
init_ttycolor()
{
#ifdef TEXTCOLOR
ttycolors[CLR_BLACK] = FOREGROUND_INTENSITY; /* fix by Quietust */
ttycolors[CLR_RED] = FOREGROUND_RED;
ttycolors[CLR_GREEN] = FOREGROUND_GREEN;
@@ -728,6 +729,15 @@ init_ttycolor()
ttycolors_inv[CLR_BRIGHT_CYAN] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_INTENSITY;
ttycolors_inv[CLR_WHITE] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED
| BACKGROUND_INTENSITY;
#else
int k;
ttycolors[0] = FOREGROUND_INTENSITY;
ttycolors_inv[0] = BACKGROUND_INTENSITY;
for (k = 1; k < SIZE(ttycolors); ++k) {
ttycolors[k] = FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED;
ttycolors_inv[k] = BACKGROUND_GREEN | BACKGROUND_BLUE | BACKGROUND_RED;
}
#endif
init_ttycolor_completed = TRUE;
}
#endif /* TEXTCOLOR */
@@ -739,7 +749,7 @@ has_color(int color)
if ((color >= 0) && (color < CLR_MAX))
return 1;
#else
if ((color == CLR_BLACK) || (color == CLR_WHITE))
if ((color == CLR_BLACK) || (color == CLR_WHITE) || (color == NO_COLOR))
return 1;
#endif
else
@@ -794,7 +804,7 @@ term_start_color(int color)
console.current_nhcolor = color;
} else
#endif
console.current_nhcolor = color;
console.current_nhcolor = NO_COLOR;
}
void