toggling persistent inventory window

Something else noticed while testing #H8271:  toggling perm_invent on
with 'O' didn't show anything (at least with curses) until some later
action caused it to be updated.  Make updating persistent inventory be
included with full redraw and set the need_redraw flag when toggling
perm_invent.
This commit is contained in:
PatR
2019-02-25 15:48:29 -08:00
parent 4df491e47d
commit 5a432d0c97
3 changed files with 16 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 display.c $NHDT-Date: 1540502147 2018/10/25 21:15:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.94 $ */
/* NetHack 3.6 display.c $NHDT-Date: 1551138503 2019/02/25 23:48:23 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.97 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1374,6 +1374,9 @@ docrt()
/* overlay with monsters */
see_monsters();
/* perm_invent */
update_inventory();
context.botlx = 1; /* force a redraw of the bottom line */
}

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 options.c $NHDT-Date: 1546657409 2019/01/05 03:03:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.351 $ */
/* NetHack 3.6 options.c $NHDT-Date: 1551138503 2019/02/25 23:48:23 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.355 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
@@ -440,7 +440,7 @@ static struct Comp_Opt {
{ "DECgraphics", "load DECGraphics display symbols", 70, SET_IN_FILE },
{ "IBMgraphics", "load IBMGraphics display symbols", 70, SET_IN_FILE },
#ifdef CURSES_GRAPHICS
{"cursesgraphics", "load curses display symbols", 70, SET_IN_FILE},
{ "cursesgraphics", "load curses display symbols", 70, SET_IN_FILE },
#endif
#ifdef MAC_GRAPHICS_ENV
{ "Macgraphics", "load MACGraphics display symbols", 70, SET_IN_FILE },
@@ -3987,8 +3987,11 @@ boolean tinitial, tfrom_file;
#endif
context.botl = TRUE;
} else if (boolopt[i].addr == &flags.invlet_constant) {
if (flags.invlet_constant)
if (flags.invlet_constant) {
reassign();
if (iflags.perm_invent)
need_redraw = TRUE;
}
} else if (boolopt[i].addr == &flags.lit_corridor
|| boolopt[i].addr == &flags.dark_room) {
/*
@@ -4006,6 +4009,10 @@ boolean tinitial, tfrom_file;
|| boolopt[i].addr == &iflags.use_inverse
|| boolopt[i].addr == &iflags.hilite_pile
|| boolopt[i].addr == &iflags.hilite_pet
|| boolopt[i].addr == &iflags.perm_invent
#ifdef CURSES_GRAPHICS
|| boolopt[i].addr == &iflags.cursesgraphics
#endif
|| boolopt[i].addr == &iflags.wc_ascii_map
|| boolopt[i].addr == &iflags.wc_tiled_map) {
need_redraw = TRUE;
@@ -4014,10 +4021,6 @@ boolean tinitial, tfrom_file;
status_initialize(REASSESS_ONLY);
need_redraw = TRUE;
#endif
#ifdef CURSES_GRAPHICS
} else if ((boolopt[i].addr) == &iflags.cursesgraphics) {
need_redraw = TRUE;
#endif
#ifdef TEXTCOLOR
} else if (boolopt[i].addr == &iflags.use_color) {
need_redraw = TRUE;