tty perm_invent: fix right-hand panel

Introducing 'maxslot' at the last second invalidated a ton of prior
testing.  This should fix all the modes of tty perm_invent, including
the missing bottom boundary for TTYINV=4 (show in-use items only, an
approximation of Qt's "paper doll" and of the '*' command).

The boundary box characters are set using cmap_to_glyph(S_<wall_type>)
which in theory makes them change depending on which branch of the
dungeon the hero is in.  That isn't noticeable since they aren't drawn
as tiles, but it doesn't seem right.
This commit is contained in:
PatR
2022-06-23 13:03:32 -07:00
parent 736e9f14f8
commit 64c1f83dd8
2 changed files with 44 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 wintty.h $NHDT-Date: 1596498572 2020/08/03 23:49:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.44 $ */
/* NetHack 3.7 wintty.h $NHDT-Date: 1656014599 2022/06/23 20:03:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.55 $ */
/* Copyright (c) David Cohrs, 1991,1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -12,9 +12,10 @@
#ifdef TTY_PERM_INVENT
enum { tty_pi_minrow = 28, tty_pi_mincol = 79 };
/* for static init of zerottycell, put pointer first */
union ttycellcontent {
char ttychar;
glyph_info *gi;
char ttychar;
};
struct tty_perminvent_cell {
Bitfield(refresh, 1);
@@ -24,7 +25,6 @@ struct tty_perminvent_cell {
union ttycellcontent content;
int32_t color;
};
extern struct tty_perminvent_cell zerottycell;
#endif
/* menu structure */