From: nhmall Date: Sat, 26 Dec 2020 23:35:09 +0000 (-0500) Subject: switch curses port to use the new tty_print_glyph argument X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7c63f8abcca5298eeee2d99719879926ca25503;p=nethack switch curses port to use the new tty_print_glyph argument --- diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index 4912f7227..c8cb0c281 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -1182,7 +1182,7 @@ menu_display_page(nhmenu *menu, WINDOW * win, int page_num, char *selectors) if (menu_item_ptr->glyph != NO_GLYPH && iflags.use_menu_glyphs) { unsigned special; /*notused */ - mapglyph(menu_item_ptr->glyph, &curletter, &color, &special, 0, 0, 0); +// mapglyph(menu_item_ptr->glyph, &curletter, &color, &special, 0, 0, 0); curses_toggle_color_attr(win, color, NONE, ON); mvwaddch(win, menu_item_ptr->line_num + 1, start_col, curletter); curses_toggle_color_attr(win, color, NONE, OFF); diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index baceb8901..0ee3c7f43 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -667,8 +667,13 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, unsigned int special; int attr = -1; +#if 0 /* map glyph to character and color */ - mapglyph(glyph, &ch, &color, &special, x, y, 0); + mapglyph(glyph, &ch, &color, &special, x, y, 0); */ +#endif + special = glyphmod[GM_FLAGS]; + ch = (int) glyphmod[GM_TTYCHAR]; + color = (int) glyphmod[GM_COLOR]; if ((special & MG_PET) && iflags.hilite_pet) { attr = iflags.wc2_petattr; } @@ -693,7 +698,7 @@ curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, /* water and lava look the same except for color; when color is off, render lava in inverse video so that they look different */ if ((special & (MG_BW_LAVA | MG_BW_ICE)) != 0 && iflags.use_inverse) { - attr = A_REVERSE; /* mapglyph() only sets this if color is off */ + attr = A_REVERSE; /* map_glyphmod() only sets this if color is off */ } }