]> granicus.if.org Git - nethack/commitdiff
Get wizmgender working again
authorMichael Meyer <me@entrez.cc>
Thu, 23 Jun 2022 15:19:28 +0000 (11:19 -0400)
committerPatR <rankin@nethack.org>
Sun, 3 Jul 2022 23:34:28 +0000 (16:34 -0700)
The wizard-mode option to highlight female monsters stopped having any
in-game effect after cb0c21e.  Formerly it caused female monsters to be
highlighted with a red background (red color + inverse); this commit
uses inverse video only without overriding their color.  Ensuring the
color override works consistently with the ENHANCED_SYMBOLS 24-bit color
doesn't seem worth it for what is a very niche debugging option, and I
think inverse video should probably suffice.

It also used to be a TTY-only option, but this enables it in curses as
well.

win/curses/cursmain.c
win/tty/wintty.c

index a1ce682235775e3d257cdec8dd3d0f73a19de966..be8074febb722591a9423fc644645827425edc1e 100644 (file)
@@ -806,7 +806,12 @@ curses_print_glyph(winid wid, coordxy x, coordxy y,
         /* 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; /* map_glyphinfo() only sets this if color is off */
+            /* reset_glyphmap() only sets MG_BW_foo if color is off */
+            attr = A_REVERSE; 
+        }
+        /* highlight female monsters (wizard mode option) */
+        if ((special & MG_FEMALE) && iflags.wizmgender) {
+            attr = A_REVERSE;
         }
     }
 
index df49869034a0da2382b9f563762ba3630800011d..794236ea5c1d1d84d3426e25f685085e74043090 100644 (file)
@@ -4257,6 +4257,7 @@ tty_print_glyph(
        to see although the Valkyrie quest ends up being hard on the eyes) */
     if (((special & MG_PET) != 0 && iflags.hilite_pet)
         || ((special & MG_OBJPILE) != 0 && iflags.hilite_pile)
+        || ((special & MG_FEMALE) != 0 && iflags.wizmgender)
         || ((special & (MG_DETECT | MG_BW_LAVA | MG_BW_ICE)) != 0
             && iflags.use_inverse)) {
         term_start_attr(ATR_INVERSE);