]> granicus.if.org Git - nethack/commitdiff
catch-up on some updates to fixes37.0
authornhmall <nhmall@nethack.org>
Sun, 9 Feb 2020 02:07:04 +0000 (21:07 -0500)
committernhmall <nhmall@nethack.org>
Sun, 9 Feb 2020 02:07:04 +0000 (21:07 -0500)
Side note: Here's a correction for the commit
message for 330287da42a20017ec56de69099fd49afa0765d0:

The original incorrectly stated 'CONDITION_SIZE' (which
doesn't exist) instead of CONDITION_COUNT in one of the
paragraphs.

--- snip ---

eliminate the uses of the manually maintained BL_MASK_BITS

Use CONDITION_COUNT which does not require manual updating.

Also attempts to adjust win32 graphics window port for
the new fields.

That port has its own field names and should be adjusted
to using the following which are declared extern in
include/botl.h.

   struct conditions[CONDITION_COUNT];
   int cond_idx[CONDITION_COUNT];

The former contains the fields that were port-specifically
added to the win32 graphical port and more, plus it is
centrally maintained and currently utilized by tty and curses.

The cond_idx[] array contains the ranked ordering of the
condition fields from highest ranking to lowest. Instead
of indexing like this:
    int i;
    for (i = 0; i < CONDITION_COUNT; ++i) {
        ...conditons[i].enabled;
        ...condtions[i].text[0];
    }

you can use the ranked ordering like this:
    int i, ci;
    for (i = 0; i < CONDITION_COUNT; ++i) {
        ci = cond_idx[i];
        ...conditons[ci].enabled;
        ...condtions[ci].text[0];
    }

doc/fixes37.0

index 4c39dfb0a1b2e5246c56c521242f3ec48235323e..5f994a98abf53e33dd026b451770b4235a0ad1db 100644 (file)
@@ -92,6 +92,7 @@ prevent "you materialize on a different level" after "a mysterious force
        stairs down from the quest home level before being granted access
 set g.context.botl for glove and wielding actions that could start or end
        bare-handedness in support of condtests[bl_bareh]
+reinstate ranked ordering of the status condition fields
 
 
 Platform- and/or Interface-Specific Fixes
@@ -100,6 +101,7 @@ msdos:  Add -DSTATUES_LOOK_LIKE_MONSTERS to Makefile1.cross so the VESA mode
        can display statue glyphs. 
 tty: role and race selection menus weren't filtering out potential choices
        which got excluded by OPTIONS=align:!lawful or !neutral or !chaotic
+windows: update for new status condition fields
 
 
 General New Features
@@ -196,5 +198,12 @@ window-port-interface: add_menu() modified to take a more general itemflags
        parameter to support uses beyond just 'preselected'
 add some bounds checking to tabexpand (doesn't prevent the apparent compiler
        optimization bug that put homebrew OSX executable into endless loop)
-
+unified breamm and breamu
+added some stair helper functions
+unified the code for finding a queen bee
+unified the code for multishot class bonus code
+unified the code for obtaining the inventory letter value for sortloot
+unified the code for (un)locking boxes in inventory
+unified the code for finding room pos for some features
+unified the code for revealing hiding monsters for mvm attacks