]> granicus.if.org Git - nethack/commitdiff
switch curses port to use the new tty_print_glyph argument
authornhmall <nhmall@nethack.org>
Sat, 26 Dec 2020 23:35:09 +0000 (18:35 -0500)
committernhmall <nhmall@nethack.org>
Sat, 26 Dec 2020 23:35:09 +0000 (18:35 -0500)
win/curses/cursdial.c
win/curses/cursmain.c

index 4912f722724ead8e3c23963ea49c2313376911d2..c8cb0c281ef58b4c913bb0640415efefa5187598 100644 (file)
@@ -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);
index baceb89015230153cf5c7bb843ddd42b29f8b377..0ee3c7f43f9f995af09870b61dec0ee780250a1a 100644 (file)
@@ -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 */
         }
     }