]> granicus.if.org Git - nethack/commitdiff
monster gender-related follow-ups
authornhmall <nhmall@nethack.org>
Sun, 27 Dec 2020 15:45:13 +0000 (10:45 -0500)
committernhmall <nhmall@nethack.org>
Sun, 27 Dec 2020 15:45:13 +0000 (10:45 -0500)
remove unintentionally left M2_MALE flag on dwarf lord/lady/leader

provide a way to verify gender information relayed from the core
in debug mode on tty via #wizmgender debugging extended command

doc/fixes37.0
include/extern.h
include/flag.h
src/cmd.c
src/detect.c
src/monst.c
win/tty/wintty.c

index db04f0163d1b31060ee6e5d41d33143f51988e3b..52a6f0dedca82534f7ee33e6f23398f529846e5d 100644 (file)
@@ -457,6 +457,8 @@ adding displacer beast inadvertently introduced a regression in swapping with
 splitting #if MAIL into #if MAIL_STRUCTURES and #if MAIL made it possible to
        wish for and write scrolls of mail with MAIL disabled, but attempting
        to read such a scroll issued impossible "What weird effect is this?"
+remove M2_MALE flag that was unintentionally left on dwarf lord/lady/leader
+       entry and was preventing female incarnations
 
 curses: 'msg_window' option wasn't functional for curses unless the binary
        also included tty support
@@ -709,6 +711,9 @@ add support for a single monster species to have distinct male and female
        tiles
 consolidate several monsters that differed only by their gender into their
        single species
+added wizmgender debugging command to display female monsters in red inverse;
+       helpful for debugging gender-related matters on tty; currently ignored
+       on other window ports
 
 
 Platform- and/or Interface-Specific New Features
index cf66dd4ffe66ba9e1953c358ca91e38d2b26a6d6..0d9b86a5237d18ab0050a33a4e2e2f963e2f3286 100644 (file)
@@ -295,6 +295,7 @@ E void NDECL(sokoban_detect);
 E void NDECL(dump_map);
 #endif
 E void FDECL(reveal_terrain, (int, int));
+E int NDECL(wiz_mgender);
 
 /* ### dig.c ### */
 
index 4122dd046c715eb0078a48675ad2a1587930d546..1e45e948a46a812bb954f564e475c5ec5cd67c47 100644 (file)
@@ -294,6 +294,7 @@ struct instance_flags {
     boolean cmdassist;       /* provide detailed assistance for some comnds */
     boolean time_botl;       /* context.botl for 'time' (moves) only */
     boolean wizweight;       /* display weight of everything in wizard mode */
+    boolean wizmgender;      /* test gender info from core in window port */
     /*
      * Window capability support.
      */
index 0ae12b0dba65fcbda01155895bfa60d33a70e333..7425264f5707af9b048b16c3b7643ec8ea13bd32 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1844,6 +1844,8 @@ struct ext_func_tab extcmdlist[] = {
             wiz_level_change, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
     { '\0', "lightsources", "show mobile light sources",
             wiz_light_sources, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
+    { '\0', "wizmgender", "force added info about monster gender",
+            wiz_mgender, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
     { ':', "look", "look at what is here", dolook, IFBURIED },
     { M('l'), "loot", "loot a box on the floor", doloot, AUTOCOMPLETE },
 #ifdef DEBUG_MIGRATING_MONS
index db5e84895674b79995cc08cd659d3208222a80ed..efb56d7b37df3d36b92aceba76e3d4b067745634 100644 (file)
@@ -2096,4 +2096,15 @@ int which_subset; /* when not full, whether to suppress objs and/or traps */
     return;
 }
 
+int
+wiz_mgender(VOID_ARGS)
+{
+    iflags.wizmgender = !iflags.wizmgender;
+    pline("wizmgender toggled %s", iflags.wizmgender ? "on" : "off");
+    if (!u.uswallow)
+        see_monsters();
+    map_redisplay();
+    return 0;  /* no time */
+}
+
 /*detect.c*/
index ac2700d6f389bc330b4b79c4873e9932ad22e9c7..fbd1f8a997b1a1a22777a14b22a265d9cb507ec3 100644 (file)
@@ -448,8 +448,7 @@ NEARDATA struct permonst mons_init[] = {
           NO_ATTK, NO_ATTK, NO_ATTK),
         SIZ(900, 300, MS_HUMANOID, MZ_HUMAN), 0, 0,
         M1_TUNNEL | M1_NEEDPICK | M1_HUMANOID | M1_OMNIVORE,
-        M2_DWARF | M2_STRONG | M2_LORD | M2_MALE | M2_GREEDY | M2_JEWELS
-            | M2_COLLECT,
+        M2_DWARF | M2_STRONG | M2_LORD | M2_GREEDY | M2_JEWELS | M2_COLLECT,
         M3_INFRAVISIBLE | M3_INFRAVISION, 6, CLR_BLUE),
     MON3("dwarf king", "dwarf queen", "dwarf ruler",
         S_HUMANOID, LVL(6, 6, 10, 20, 6), (G_GENO | 1),
index c59ea8fe5952fa850c177f2b2840fcc2895ea771..8d96256ebbac07be65c781b03fc026fc7ee728d6 100644 (file)
@@ -1,4 +1,4 @@
- /* NetHack 3.7        wintty.c        $NHDT-Date: 1608861214 2020/12/25 01:53:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.264 $ */
+/* NetHack 3.7 wintty.c        $NHDT-Date: 1608861214 2020/12/25 01:53:34 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.264 $ */
 /* Copyright (c) David Cohrs, 1991                                */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -3453,7 +3453,14 @@ unsigned *glyphmod;     /* don't mark UNUSED as we need to revisit */
 #endif
 
 #ifdef TEXTCOLOR
-    if (color != ttyDisplay->color) {
+    if (iflags.wizmgender && (special & MG_FEMALE) && iflags.use_inverse) {
+        if (ttyDisplay->color != NO_COLOR)
+            term_end_color();
+        term_start_attr(ATR_INVERSE);
+        inverse_on = TRUE;
+        ttyDisplay->color = CLR_RED;
+        term_start_color(ttyDisplay->color);
+    } else if (color != ttyDisplay->color) {
         if (ttyDisplay->color != NO_COLOR)
             term_end_color();
         ttyDisplay->color = color;