Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-11-16 17:01:49 -05:00
5 changed files with 90 additions and 63 deletions

View File

@@ -209,8 +209,8 @@ static void
draw_status()
{
WINDOW *win = curses_get_nhwin(STATUS_WIN);
int orient = curses_get_window_orientation(STATUS_WIN);
boolean horiz = (orient != ALIGN_RIGHT && orient != ALIGN_LEFT);
orient statorient = (orient) curses_get_window_orientation(STATUS_WIN);
boolean horiz = (statorient != ALIGN_RIGHT && statorient != ALIGN_LEFT);
boolean border = curses_window_has_border(STATUS_WIN);
/* Figure out if we have proper window dimensions for horizontal
@@ -1722,18 +1722,14 @@ void
curses_update_stats(void)
{
WINDOW *win = curses_get_nhwin(STATUS_WIN);
orient statorient = (orient) curses_get_window_orientation(STATUS_WIN);
boolean horiz = (statorient != ALIGN_RIGHT && statorient != ALIGN_LEFT);
boolean border = curses_window_has_border(STATUS_WIN);
/* Clear the window */
werase(win);
int orient = curses_get_window_orientation(STATUS_WIN);
boolean horiz = FALSE;
if ((orient != ALIGN_RIGHT) && (orient != ALIGN_LEFT))
horiz = TRUE;
boolean border = curses_window_has_border(STATUS_WIN);
/* Figure out if we have proper window dimensions for horizontal statusbar. */
/* Figure out if we have proper window dimensions for horizontal status */
if (horiz) {
/* correct y */
int cy = 3;
@@ -1752,7 +1748,8 @@ curses_update_stats(void)
curses_last_messages();
doredraw();
/* Reset XP highlight (since classic_status and new show different numbers) */
/* Reset XP highlight (since classic_status and new show
different numbers) */
prevexp.highlight_turns = 0;
curses_update_stats();
return;
@@ -1778,7 +1775,7 @@ curses_update_stats(void)
hpmax = u.mhmax;
}
if (orient != ALIGN_RIGHT && orient != ALIGN_LEFT)
if (horiz)
draw_horizontal(x, y, hp, hpmax);
else
draw_vertical(x, y, hp, hpmax);
@@ -1791,7 +1788,8 @@ curses_update_stats(void)
if (first) {
first = FALSE;
/* Zero highlight timers. This will call curses_update_status again if needed */
/* Zero highlight timers. This will call curses_update_status again
if needed */
curses_decrement_highlights(TRUE);
}
}