more window port interface adjustments

further adjustments to the window port interface to pass a pointer
to a glyph_info struct which describes not just the glyph number
itself, but also the ttychar, the color, the glyphflags, and the
symset index.

This affects two existing window port calls that get passed glyphs
and does the parameter consistently for both of them using the
glyph_info struct pointer:
	print_glyph()
	add_menu().

The recently added glyphmod parameter is now unnecessary and has been
removed.
This commit is contained in:
nhmall
2021-01-05 10:09:37 -05:00
parent 2a9a18fa2f
commit c9673b3d9e
63 changed files with 841 additions and 705 deletions
+4 -7
View File
@@ -55,9 +55,8 @@ curses_update_inv(void)
/* Adds an inventory item. 'y' is 1 rather than 0 for the first item. */
void
curses_add_inv(int y,
int glyph UNUSED,
CHAR_P accelerator, attr_t attr, const char *str)
curses_add_inv(int y, const glyph_info *glyphinfo UNUSED, CHAR_P accelerator,
attr_t attr, const char *str)
{
WINDOW *win = curses_get_nhwin(INV_WIN);
int color = NO_COLOR;
@@ -120,13 +119,11 @@ curses_add_inv(int y,
}
#if 0 /* FIXME: MENU GLYPHS */
if (accelerator && glyph != NO_GLYPH && iflags.use_menu_glyphs) {
unsigned glyphmod[NUM_GLYPHMOD];
int symbol;
attr_t glyphclr;
map_glyphmod(0, 0, glyph, 0U, glyphmod);
symbol = (int) glyphmod[GM_TTYCHAR];
color = (int) glyphmod[GM_COLOR];
symbol = glyphinfo->ttychar;
color = glyphinfo->color;
glyphclr = curses_color_attr(color, 0);
wattron(win, glyphclr);