catch-up on some updates to fixes37.0

Side note: Here's a correction for the commit
message for 330287da42:

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];
    }
This commit is contained in:
nhmall
2020-02-08 21:07:04 -05:00
parent 330287da42
commit 4d42d44c02

View 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