Commit Graph
100 Commits
Author SHA1 Message Date
nhmall bea4fb9166 remove an unused variable 2020-02-09 15:21:35 -05:00
nhmall 2ed0270e7e Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-09 14:57:15 -05:00
nhmall c7c0c87859 move status condition field selection to its own menu 2020-02-09 14:56:37 -05:00
nhmall 5e0c668e83 set g.opt_need_redraw on ingame cond_foo change 2020-02-08 21:38:14 -05:00
nhmall 4d42d44c02 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];
    }
2020-02-08 21:07:04 -05:00
nhmall 330287da42 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 20:51:10 -05:00
nhmall 2da95e4dc0 eliminate the uses of the manually maintained BL_MASK_BITS
Use CONDITION_SIZE 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];
	}
2020-02-08 20:40:38 -05:00
nhmall 4096ce8454 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 19:52:22 -05:00
nhmall 67cc0183b0 ranking of new status conditions 2020-02-08 19:51:04 -05:00
nhmall ce235dc94b more condition_aliases 2020-02-08 14:26:03 -05:00
nhmall cef50363ca adjust condition_aliases to include new macro masks 2020-02-08 14:01:57 -05:00
nhmall e12cab4ee1 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 11:06:04 -05:00
nhmall 5116ad4eed Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 11:05:26 -05:00
nhmall ffd9eedb2c condtests[bl_bareh] requires a couple of additional g.context.botl = 1 2020-02-08 11:03:46 -05:00
nhmall d02bf5d1d0 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 07:40:47 -05:00
nhmall 27ab3e66ba options.c initializers got misaligned
Correct the initializers in options.c for the cond_ options.
2020-02-08 07:39:21 -05:00
nhmall a781b295a5 OS X warning 2020-02-08 01:44:56 -05:00
nhmall 57d25ad826 fixes37.0 update for unexplored changes and new status conditions 2020-02-08 01:30:14 -05:00
nhmall 4f2375ffe5 Merge branch 'new-status-conditions' into NetHack-3.7 2020-02-08 01:24:51 -05:00
nhmall 07a9a67fb2 expand the pool of status condition fields
Most of the additional ones are "opt-in" meaning that unless you add them
to your config file to enable them, they won't show up.

Two that aren't "opt-in", but can be "opted-out" (as can they all) are
cond_grab (for an eel grabbing you and drowing being imminent) and
cond_lava which leads to a fatality.

All the ones that already existed are "opt-out" options, meaning that
they will still show if you do nothing.

Here's the complete list of status conditions following this patch:
 config option     internal     default mask id            mask        text1    tex2   text3
"cond_barehanded"  bl_bareh     opt_in  BL_MASK_BAREH      0x00000001L Bare     Bar    Bh
"cond_blind"       bl_blind     opt_out BL_MASK_BLIND      0x00000002L Blind    Blnd   Bl
"cond_busy"        bl_busy      opt_in  BL_MASK_BUSY       0x00000004L Busy     Bsy    By
"cond_conf"        bl_conf      opt_out BL_MASK_CONF       0x00000008L Conf     Cnf    Cf
"cond_deaf"        bl_deaf      opt_out BL_MASK_DEAF       0x00000010L Deaf     Def    Df
"cond_iron"        bl_elf_iron  opt_out BL_MASK_ELF_IRON   0x00000020L Iron     Irn    Fe
"cond_fly"         bl_fly       opt_out BL_MASK_FLY        0x00000040L Fly      Fly    Fl
"cond_foodPois"    bl_foodpois  opt_out BL_MASK_FOODPOIS   0x00000080L FoodPois Fpois  Poi
"cond_glowhands"   bl_glowhands opt_in  BL_MASK_GLOWHANDS  0x00000100L Glow     Glo    Gl
"cond_grab"        bl_grab      opt_out BL_MASK_GRAB       0x00000200L Grab     Grb    Gr
"cond_hallu"       bl_hallu     opt_out BL_MASK_HALLU      0x00000400L Hallu    Hal    Hl
"cond_held"        bl_held      opt_in  BL_MASK_HELD       0x00000800L Held     Hld    Hd
"cond_ice"         bl_icy       opt_in  BL_MASK_ICY        0x00001000L Icy      Icy    Ic
"cond_lava"        bl_inlava    opt_out BL_MASK_INLAVA     0x00002000L Lava     Lav    La
"cond_lev"         bl_lev       opt_out BL_MASK_LEV        0x00004000L Lev      Lev    Lv
"cond_paralyze"    bl_parlyz    opt_in  BL_MASK_PARLYZ     0x00008000L Parlyz   Para   Par
"cond_ride"        bl_ride      opt_out BL_MASK_RIDE       0x00010000L Ride     Rid    Rd
"cond_sleep"       bl_sleeping  opt_in  BL_MASK_SLEEPING   0x00020000L Zzz      Zzz    Zz
"cond_slime"       bl_slime     opt_out BL_MASK_SLIME      0x00040000L Slime    Slim   Slm
"cond_slip"        bl_slippery  opt_in  BL_MASK_SLIPPERY   0x00080000L Slip     Sli    Sl
"cond_stone"       bl_stone     opt_out BL_MASK_STONE      0x00100000L Stone    Ston   Sto
"cond_strngl"      bl_strngl    opt_out BL_MASK_STRNGL     0x00200000L Strngl   Stngl  Str
"cond_stun"        bl_stun      opt_out BL_MASK_STUN       0x00400000L Stun     Stun   St
"cond_submerged"   bl_submerged opt_in  BL_MASK_SUBMERGED  0x00800000L Sub      Sub    Sw
"cond_termIll"     bl_termill   opt_out BL_MASK_TERMILL    0x01000000L TermIll  Ill    Ill
"cond_tethered"    bl_tethered  opt_in  BL_MASK_TETHERED   0x02000000L Teth     Tth    Te
"cond_trap"        bl_trapped   opt_in  BL_MASK_TRAPPED    0x04000000L Trap     Trp    Tr
"cond_unconscious" bl_unconsc   opt_in  BL_MASK_UNCONSC    0x08000000L Out      Out    KO
"cond_woundedl"    bl_woundedl  opt_in  BL_MASK_WOUNDEDL   0x10000000L Legs     Leg    Lg
2020-02-08 01:03:25 -05:00
nhmall d37fa196b2 make a distinction between rock and unexplored area
This adds a pair of new glyphs: GLYPH_UNEXPLORED and GLYPH_NOTHING

GLYPH_UNEXPLORED is meant to be the glyph for areas of the map that
haven't been explored yet.

GLYPH_NOTHING is a glyph that represents that which cannot be seen,
for instance the dark part of a room when the dark_room option is
not set.  Since the symbol for stone can now be overridden to
a players choice, it no longer made sense using S_stone for the
dark areas of the room with dark_room off. This allows the same
intended result even if S_stone symbol is mapped to something visible.

GLYPH_UNEXPLORED is what areas of the map get initialized to now
instead of STONE.

This adds a pair of new symbols: S_unexplored and S_nothing.

S_nothing is meant to be left as an unseen character (space) in
order to achieve the intended effect on the display.

S_unexplored is the symbol that is mapped to GLYPH_UNEXPLORED, and
is a distinct symbol from S_stone, even if they are set to the same
character. They don't have to be set to the same character.

Hopefully there are minimal bugs, but it is a deviation from a
fairly long-standing approach so there could be some unintended
glitches that will need repair.
2020-02-08 00:48:03 -05:00
nhmall 690e072a49 is_elf(), is_dwarf(), is_gnome(), is_orc(), is_human()
Those tests were only checking the permonst mflags2 field
so anytime those tests were used in the code, they came
up false for things like an elven ranger. An elven ranger
should return true for an is_elf() test, as an example.

That happens because the profession monsters in monst.c
are defined with M2_HUMAN.

This augments those is_*() race tests to also check for a
matching player race as well.
2020-02-06 12:09:24 -05:00
nhmall 0673328696 resolve a couple of build failures when STATUS_HILITES is not defined
This addresses the build failures but it is unknown
whether the logic remains sound.
2020-02-05 12:24:15 -05:00
nhmall c234f5a97d version bit 2020-02-04 07:57:43 -05:00
nhmall 0f27a8e71d fix copy-and-paste error 2020-02-03 03:54:14 -05:00
nhmall 816e2285ea add recent file addition to msdos Makefile2.cross 2020-02-03 03:51:30 -05:00
nhmall 1dfab5fe11 remove an argument that is no longer necessary from a few functions
Passing a boolean 'ghostly' argument to some functions that are also passed
an NHFILE * is unnecessary now.
2020-02-02 22:54:44 -05:00
nhmall 56b196772e windows vs Makefile follow-up bit 2020-02-02 21:04:45 -05:00
nhmall 80a602d344 add recent file addition to windows visual studio project and Makefile 2020-02-02 20:59:41 -05:00
nhmall f41e0b9eec add recent file addition to Xcode project 2020-02-02 20:43:00 -05:00
nhmall bfd180a5ac mention a pair of recent file additions in Cross-compiling
[skip travis]
2020-02-01 22:49:21 -05:00
nhmall 09d82164fc msdos fix from chasonr 2020-02-01 22:08:41 -05:00
nhmall 04b609a020 Merge branch 'chasonr-statue-glyphs' into NetHack-3.7 2020-02-01 22:08:22 -05:00
nhmall eaebc2c9e0 Merge branch 'statue-glyphs' of https://github.com/chasonr/NetHack into chasonr-statue-glyphs 2020-02-01 22:05:55 -05:00
nhmall a42cdd6cc7 more sys/winnt/Makefile.msc
Remove nmake conditional bits for some things that
aren't optional anymore
2020-01-30 14:04:10 -05:00
nhmall 5f4b0b0003 updates for Windows command line Makefile with visual studio 2020-01-30 13:50:26 -05:00
nhmall 63310076bb fnamesiz comment bit 2020-01-29 10:29:37 -05:00
nhmall c97cabb92e fnamesiz bit 2020-01-29 10:09:45 -05:00
nhmall e39ec5ce3e rename new header file to fnamesiz.h
Changes to be committed:
renamed:    include/filesize.h -> include/fnamesiz.h
2020-01-29 09:56:43 -05:00
nhmall 209fab138b recover fix
recover had deviated somewhat from NetHack in its
file expectations:
1) A couple of 3.7 fields needed to be accommodated.
2) hard-coded file size values had deviated.

The file sizes are now in an added header file named "filesize.h",
which is included at the bottom of config.h.

There will likely be another commit to write the filename size ahead
of the file name so that the precise number of characters can be read,
but since that will break existing saves, it can go in along with another
save-breaking commit.

This commit doesn't not alter savefiles written by nethack so does not
require an editlevel bump. It does alter the read-in expectation in
recover to match the game and this get recover working again.
2020-01-29 09:15:55 -05:00
nhmall 7b8c6d6b84 msdos has been tested with 3.7 2020-01-28 19:16:07 -05:00
nhmall ab1af58711 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-01-28 19:10:07 -05:00
nhmall 82bfec24f9 update some version bits 2020-01-28 19:09:40 -05:00
nhmall 9f06c0139e whitespace cleanup on options.c 2020-01-27 20:54:09 -05:00
nhmall bd88ab6151 msdos follow-up bit 2020-01-27 17:54:13 -05:00
nhmall efd0911f89 Merge recent changes into NetHack-3.7 2020-01-27 16:49:31 -05:00
nhmall bd83b6e194 one more missed inconsistency and README updates 2020-01-27 15:05:45 -05:00
nhmall d7844a9fcd bit 2020-01-27 14:44:29 -05:00
nhmall becd823136 Revert "This is cron-daily v1-Jan-20-2020. manpages updated: makedefs.txt"
This reverts commit 9e0c450d2e.
2020-01-27 14:42:39 -05:00
nhmall f4d100ea5f Merge branch 'NetHack-3.7-Jan2020' into NetHack-3.7 2020-01-27 13:24:15 -05:00
nhmall 4302b7404c more typo propagation 2020-01-27 12:56:34 -05:00
nhmall 78d206398d another typo 2020-01-27 12:27:41 -05:00
nhmall b04028ec81 typo 2020-01-27 11:50:19 -05:00
nhmall 0f92e67e6a travis updates 2020-01-27 11:28:21 -05:00
nhmall 183f9bca41 quiet a couple of warnings
..\src\nhlua.c(893): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'lua_CFunction'
..\src\nhlua.c(894): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'lua_CFunction'
2020-01-27 10:54:39 -05:00
nhmall 54600e3e5c doc/Guidebook.txt update from daily cron 2020-01-27 10:31:37 -05:00
nhmall 62a3bf250f Guidebook date-stamp 2020-01-27 09:27:03 -05:00
nhmall bbac985cf0 Guidebook date stamp 2020-01-27 09:25:40 -05:00
nhmall 86b045f80c Merge updates from 'NetHack-3.6' into NetHack-3.7-Jan2020 2020-01-27 09:02:05 -05:00
nhmall 033894d784 Merge branch 'NetHack-3.7' into NetHack-3.7-Jan2020 2020-01-27 08:52:17 -05:00
nhmall 0305d0ae41 avoid link error with gcc 10 which enables -fno-common by default 2020-01-27 08:46:48 -05:00
nhmall 61d0d21f47 avoid link error with gcc 10 which enables -fno-common by default 2020-01-27 08:23:56 -05:00
nhmall 391e100d38 doc/Guidebook.txt update from daily cron 2020-01-26 10:03:15 -05:00
nhmall 3c968a09a3 Merge 'NetHack-3.6' updates into NetHack-3.7-Jan2020 2020-01-25 23:45:38 -05:00
nhmall 9e165b9e2a release prep bits 2020-01-25 23:42:36 -05:00
nhmall 47b18d7bde Merge 'NetHack-3.6' changes into NetHack-3.7-Jan2020 2020-01-25 22:17:42 -05:00
nhmall 80486912c2 Merge branch 'NetHack-3.7' into NetHack-3.7-Jan2020 2020-01-25 17:26:23 -05:00
nhmall 24f2e098c5 Xcode build fixes 2020-01-25 12:34:06 -05:00
nhmall 42c4600ba7 Merge build tools updates from 'NetHack-3.6' into NetHack-3.7-Jan2020 2020-01-25 12:29:31 -05:00
nhmall f72df6c21f exec commands in MSBUILD *.proj files didn't handle spaces in directory names 2020-01-25 12:23:54 -05:00
nhmall b443dea158 Merge branch 'NetHack-3.7' into NetHack-3.7-Jan2020 2020-01-25 09:41:21 -05:00
nhmall 97b74e6f7b Merge branch 'NetHack-3.7' into NetHack-3.7-Jan2020 2020-01-24 17:27:48 -05:00
nhmall 36bb4334e8 Merge fixes from 'NetHack-3.6' into NetHack-3.7-Jan2020 2020-01-20 21:33:20 -05:00
nhmall 30fc4b9e05 windows vsprintf bit 2020-01-20 20:59:41 -05:00
nhmall 775519f851 more vsnprintf 2020-01-20 19:22:18 -05:00
nhmall d61bfc98b4 more vsnprintf 2020-01-20 18:14:19 -05:00
nhmall b6efb765dc update README and patchlevel.h 2020-01-20 16:58:12 -05:00
nhmall 92deddd6a3 use vsnprintf instead of vsprintf in pline.c 2020-01-20 16:09:00 -05:00
nhmall 57e0e30d10 travis-ci bits: try to avoid failure-flagging on transient connectivity issues
Attempt to test whether Lua fetch succeeded (and pdcurses for windows
and msdos as well)

If those prerequisite fetches and untars didn't work, just exit without
marking the travis-ci build as a failure so that the development team
isn't notified about something transient that they don't need to fix
in the code.
2020-01-20 11:10:16 -05:00
nhmall 8061291c36 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-01-19 23:11:31 -05:00
nhmall 5175c6ab07 doc bit; closes #287
closes #287
2020-01-19 23:09:53 -05:00
nhmall 56be3361e3 update a sentence in README 2020-01-18 11:46:35 -05:00
nhmall 76dd55a7b0 fixes37.0 update 2020-01-18 11:43:12 -05:00
nhmall b537d36275 updated files from cron-NetHack-3.7 2020-01-18 11:37:45 -05:00
nhmall 585511e89e Merge 'NetHack-3.6' changes into NetHack-3.7-Jan2020 2020-01-18 11:35:26 -05:00
nhmall a8208b44c8 fixes update 2020-01-16 10:18:37 -05:00
nhmall fe4bdae740 closes #282
closes #282
2020-01-14 23:50:06 -05:00
nhmall d5174323eb Merge 'NetHack-3.6' updates into NetHack-3.7-Jan2020 2020-01-14 22:09:29 -05:00
nhmall 4b052f753e Merge branch 'NetHack-3.6-housekeeping-for-3.6.5' into NetHack-3.6 2020-01-14 21:58:55 -05:00
nhmall 41137101a4 documentation updates 2020-01-14 11:44:02 -05:00
nhmall a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
nhmall 07f9e329b6 Merge changes from NetHack-3.6 into NetHack-3.7-Jan2020 2020-01-14 09:28:38 -05:00
nhmall cad10295b1 Merge some bug1 fixes from NetHack-3.6 2020-01-13 15:55:01 -05:00
nhmall 25c9fb8d2f fixes update 2020-01-13 15:30:23 -05:00
nhmall d6183d065e windows intermediate file into .gitignore 2020-01-13 15:23:42 -05:00
nhmall 6397f0d895 remove unintended src file 2020-01-13 15:03:03 -05:00
nhmall 5b0f3ae7bf fix bug1
have string_for_opt() return the value string or empty_optstr to
provide some level of crash protection if some future added option
processing misbehaves. Callers of string_for_opt() and
string_for_env_opt() should always check for a match to empty_optstr.
2020-01-13 14:54:48 -05:00
nhmall bb715bc824 ignore lib folder 2020-01-13 11:25:38 -05:00
nhmall 1efc2d8e5e support haggis when pluralizing thus avoiding haggi 2020-01-11 20:04:32 -05:00
nhmall 14929f797d silence a warning about use of potentially uninitialized variable 2020-01-10 15:10:47 -05:00