Commit Graph
100 Commits
Author SHA1 Message Date
nhmall cc61ac61a4 README bit 2020-03-06 11:00:51 -05:00
nhmall 2af37f44d4 Merge March 2020 changes into NetHack 3.7 2020-03-06 10:59:50 -05:00
nhmall e20024e42b March 2020 updates 2020-03-06 10:31:51 -05:00
nhmall 998893ac32 fixes update 2020-03-04 16:01:50 -05:00
nhmall abdd3254ae updates for 3.6 March 2020 2020-03-04 10:41:57 -05:00
nhmall 1e5fd608bf update to Install.nt 2020-03-04 10:31:48 -05:00
nhmall 7902bacf70 build fix for vs2019
src\nhlsel.c(604) : error C4703: potentially uninitialized local pointer variable 'mf' used
2020-03-03 18:34:27 -05:00
nhmall ee2821e7e8 action after parse_role_opts() returns FALSE
The old parseoptions() would get a FALSE return from parse_role_opts() and
then exit FALSE.

The new parseoptions() was printing an error message due to the FALSE return
value, and then exiting FALSE.

Have it behave the original way following parse_role_opts().
2020-03-02 01:11:51 -05:00
nhmall 0f3719d15e typos in doc/options.doc 2020-03-01 11:04:02 -05:00
nhmall 058fbc1cd5 more duplicate detect; also copy-and-paste for vt_tiledata entry left it enabled by default 2020-03-01 10:48:46 -05:00
nhmall 16e5b27054 Merge 2020-02-29 18:49:16 -05:00
nhmall 2f1be94bfa since sole argument to set_duplicate_opt_detection was unused, eliminate it altogether 2020-02-29 18:47:34 -05:00
nhmall c4b5d2f54b some warnings 2020-02-29 18:36:03 -05:00
nhmall 5d310d815d options follow-up: fix up duplicate_option_detection and !pet 2020-02-29 17:54:41 -05:00
nhmall cca2bcaa84 minor flavor bit of the day 2020-02-29 13:57:31 -05:00
nhmall 74b7ca1ad9 update a parameter in some ancient platforms 2020-02-26 21:53:07 -05:00
nhmall 3c95cba526 fix build break when there's no #define for CLIPPING 2020-02-26 21:38:38 -05:00
nhmall 9f01b33d9f fixes entry
This issue was present prior to the options overhaul; a fix
was embedded in the options overhaul code changes
2020-02-26 15:45:04 -05:00
nhmall e05a6d411d Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-26 15:36:53 -05:00
nhmall 21ae547dec typo in fixes 2020-02-26 15:30:10 -05:00
nhmall 5f430f8105 fix warning observed on Mac OS X 2020-02-26 15:20:08 -05:00
nhmall d609314d64 transpose error in comments bit 2020-02-26 15:03:58 -05:00
nhmall 1115402c14 Merge branch 'options-overhaul' into NetHack-3.7 2020-02-26 14:36:20 -05:00
nhmall 64e3cd72a4 fixes37.0 update for options overhaul 2020-02-26 14:32:07 -05:00
nhmall 96a559e392 fix the menu_* options which had valok set to No 2020-02-26 14:23:26 -05:00
nhmall 68fdc3bbcb February 2020 options.c overhaul
combine boolean and compound options into a single allopt[] array for
processing in options.c.

move the definitions of the options into new include/optlist.h file which
uses a set of macros to define them appropriately.

during compile of options.c each option described in include/optlist.h:
   1. automatically results in a function prototype for an optfn called
      optfn_xxxx (xxxx is the option name).
   2. automatically results in an opt_xxxx enum value for referencing
      its index throughout options.c (xxxx is the option name).
   3. is used to initialize an element of the allopt[] array at index
      opt_xxxx (xxxx is the option name) based on the settings in the
      NHOPTB, NHOPTC, NHOPTP macros. Those macros only live during the
      compilation of include/optlist.h.

each optfn_xxxx() function can be called with a req id of: do_init, do_set,
get_val or do_handler.

req do_init is called from options_init, and if initialization or memory
allocation or other initialization for that particular option is needed,
it can be done in response to the init req.

req do_set is called from parseoptions() for each option it encounters
and the optfn_xxxx() function is expected to react and set the option
based on the string values that parseoptions() passes to it.

req get_val expects each optfn_xxxx() function to write the current
option value into the buffer it is passed.

req do_handler is called during doset() operations in response to player
selections most likely from the 'O' option-setting menu, but only if the
option is identified as having do_handler support in the allopts[]
'has_handler' boolean flag. Not every optfn_xxxx() does.

function special_handling() is eliminated. It's code has been redistributed
to individual handler functions for the option or purpose that they serve.

moved reglyph_darkroom() function from options.c to display.c
2020-02-26 00:24:37 -05:00
nhmall 1003a8142e fix a couple of warnings seen on visual studio 2019
src/sp_lev.c(4278): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int(__cdecl *)(int,int)'
  src/sp_lev.c(5021): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(int,int)'
2020-02-25 22:56:50 -05:00
nhmall a7c143c8f9 fix a pair of warnings received with visual studio
src/sp_lev.c(4278): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int(__cdecl *)(int,int)'
src/sp_lev.c(5021): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(int,int)'

Add prototype prior to first reference
2020-02-25 21:37:10 -05:00
nhmall 86f5e73ef3 ensure condition menu always starts the same way even under "play again" 2020-02-20 20:36:37 -05:00
nhmall 3bc346868e flag an unused parameter 2020-02-20 20:23:33 -05:00
nhmall 67df8dd784 add an entry for the start_menu change to fixes37.0 2020-02-20 20:19:49 -05:00
nhmall 9462b230c6 Merge branch 'menu-interface' into NetHack-3.7 2020-02-20 20:17:40 -05:00
nhmall d81c096ce6 window port interface change - add mbehavior flags to start_menu()
Provide a way to communicate additional behaviors and/or appearances
desired from NetHack window port menus.

This is foundation work for changes to follow at a future date.
2020-02-20 20:12:51 -05:00
nhmall 8e6e4922f8 preserve menu sort between 'O' commands in same instance
Also, only execute the change settings loop when the
menu response was > 0
2020-02-20 16:56:05 -05:00
nhmall d50c3577e9 some more status condition follow-up
- Don't display 'Held' when swallowed.
- Don't display 'Held' when the hero is doing the holding; add a condition display
  entry "UHold" for that (the opt_in option is "holding")
- Allow resorting of the 'O' menu for status condition fields. Default is alphabetical, but you
  can sort by condition field ranking now.
2020-02-20 01:22:27 -05:00
nhmall f177675cbc Guidebook.txt update from cron-NetHack-3.7 2020-02-17 14:39:24 -05:00
nhmall 73ffb61e7e typo in .tex and replacement of obsolete OS reference 2020-02-17 13:39:04 -05:00
nhmall f9c9c8262c Guidebook.txt and Files from cron daily 2020-02-16 00:26:43 -05:00
nhmall f37dd40110 Guidebook date bump and .txt sync 2020-02-15 13:24:48 -05:00
nhmall 334db31cd0 Guidebook update from latest cron-daily 2020-02-13 22:10:37 -05:00
nhmall 751f1f47ab Windows options dynamically
There are two executables int the windows binary, each of which
have different options and capabilities. Sharing of one dat/options
file hasn't really been an accurate approach.

Produce that information dynamically for the Windows exe files.

This impacts alt-v results.
2020-02-13 21:24:24 -05:00
nhmall 878ec6ee2a Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-13 18:19:35 -05:00
nhmall a213811975 stone/unexplored glyph follow-up
typo
2020-02-13 17:37:55 -05:00
nhmall 5ca2cdbd86 eliminate an odd line wrapping noticed on windows 2020-02-13 00:59:04 -05:00
nhmall 2c69ad8771 improve the g.multi condition results 2020-02-11 14:04:19 -05:00
nhmall 40bb0b2bb8 update Guidebook.txt from cron-NetHack-3.7 2020-02-11 00:25:27 -05:00
nhmall b7e0a9a9dc version bit 2020-02-11 00:04:28 -05:00
nhmall 0342a2b029 bump Guidebook date 2020-02-10 23:56:46 -05:00
nhmall 7421c989e5 accuracy bit 2020-02-10 23:39:37 -05:00
nhmall a7122a0656 minor correction to Guidebook.tex 2020-02-10 23:33:34 -05:00
nhmall 4a7cb8d3d7 Merge branch 'chasonr-msdos-video-doc' into NetHack-3.7 2020-02-10 23:26:26 -05:00
nhmall e779165733 Guidebook corrections for msdos video_width and video_height
merge pull request #294 from chasonr

Closes #294
2020-02-10 23:20:58 -05:00
nhmall de339ce14d Merge branch 'msdos-video-doc' of https://github.com/chasonr/NetHack into chasonr-msdos-video-doc 2020-02-10 23:05:33 -05:00
nhmall 1566063b4c bump editlevel
the code in pr298 altered the sound bit for one existing monster
2020-02-10 22:12:38 -05:00
nhmall 292d681efa sounds for minotaurs pr298
Closes #298
2020-02-10 22:04:10 -05:00
nhmall 0b15b99b12 Merge branch 'NullCGT-minotaurs-pr298' into NetHack-3.7 2020-02-10 22:02:26 -05:00
nhmall 9b0ded6ff6 Merge branch 'feature/sounds' of https://github.com/NullCGT/NetHack into NullCGT-minotaurs-pr298 2020-02-09 20:38:22 -05:00
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