Commit Graph
237 Commits
Author SHA1 Message Date
nhmall 08af2b3b92 Merge branch 'NetHack-3.6.2' 2019-04-10 13:06:37 -04:00
PatR 14ad5356e5 another STATUS_HILITES optimization
When highlighting is disabled due to 'statushilites' being 0, don't
bother checking whether any temporary highlights are timing out.
2019-04-10 04:29:10 -07:00
PatR 2e30f6916f more !STATUS_HILITES
No point in checking for timed out temporary highlights if there aren't
any highlights.
2019-04-09 17:45:32 -07:00
nhmall ea1f04959f Merge branch 'NetHack-3.6.2' 2019-04-06 21:08:01 -04:00
PatR 0e425d645f curses vs !HILITE_STATUS
The curses interface wouldn't build with HILITE_STATUS disabled.  I
started adapting it to handle genl_status_update() but that was taking
too much effort with each niggling detail leading to another.  This
goes the opposite direction:  forcing the old STATUS_VIA_WINDOWPORT
behavior without having that #define available.  That dragged along a
bunch of unexpected changes too.
2019-04-06 15:53:51 -07:00
nhmall abfd80d3d7 Merge branch 'NetHack-3.6.2' 2019-04-02 12:25:16 -04:00
PatR 0a847f46f9 streamlined status update for 'time'
When the 'time' option is on and context.botl isn't already set,
call a simpler status update routine that ignores all other fields.
When that flag is already set, full status update takes care of time
along with the other fields.

Expected to reduce bottom lines processing time but not screen I/O.
Only lightly tested.
2019-03-31 08:23:36 -07:00
nhmall 1d0b00b735 Merge branch 'NetHack-3.6.2' part 2 2019-03-23 17:20:11 -04:00
nhmall 23c1217e18 Merge branch 'NetHack-3.6.2' 2019-03-23 17:17:42 -04:00
PatR c57b32f5fe status updating: a*.c
I went through the places that set context.botl/botlx in src/a*.c to
see whether I could find any unnecessary status updates.  I didn't
find anything interesting, mostly some minor sequencing issues plus
a couple of redundant sets (call foo() which includes setting botl,
then explicitly set botl after it returns).  If you issue pline first
and then set context.botl, bottom lines won't be updated until the
next message or next pass through moveloop.  If you order those the
other way around, status will be updated as the message describing
the reason for the update is being delivered.
2019-03-23 10:50:26 -07:00
nhmall d9b11e791c domove_ variables did not need to be in saved context 2019-01-27 15:12:55 -05:00
nhmall 96f1d0e207 Merge branch 'NetHack-3.6.2' 2019-01-27 12:39:52 -05:00
Bart House ed096f74c3 shk followmsg moved to instance globals. early_init introduced. 2018-12-25 17:46:52 -08:00
Bart House 769ad91cc3 mthrowu, nhlan, options, regions, rip and role globals moved to g. 2018-12-25 16:26:27 -08:00
Bart House b1ab64db43 program_state moved to g. 2018-12-25 10:09:04 -08:00
Bart House 1c65e6afe0 context to g.context 2018-12-25 07:29:38 -08:00
Bart House 8c1a4d9a97 invent, youmonst, hackdir moved to g. 2018-12-24 21:04:15 -08:00
Bart House 90547edb83 moves, monstermoves, wailmsg, migrating_objs and billobjs moved to g. 2018-12-24 20:22:33 -08:00
Bart House be5cdcf77a killer, level and rooms move to instance globals. 2018-12-24 19:50:08 -08:00
Bart House 572ee347b9 Another round of instance globals changes. 2018-12-24 16:43:50 -08:00
Bart House e5e906dc3b Changes needed in various ports due to globals changes. 2018-12-24 14:47:51 -08:00
Bart House 74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -08:00
Bart House 576eece500 More globals moved to instance_globals. 2018-12-19 21:26:35 -08:00
Bart House ff5fe26e72 More globals moved to instance_globals. 2018-12-19 20:01:55 -08:00
Bart House 74caa8d8e4 Moved pray.c globals to instance_globals. 2018-12-19 20:00:35 -08:00
Bart House 912886a73f First set of changes to move globals to instance_globals. 2018-12-19 20:00:35 -08:00
nhmall ca84486133 clean master after moving of newer content to feature branch 2018-12-10 22:16:08 -05:00
nhmall 47d4dc50a5 Merge branch 'NetHack-3.6.2' 2018-11-17 08:32:59 -05:00
nhmall 96ec49213f Add some windows command line option hooks 2018-11-16 19:32:00 -05:00
nhmall adbe567ba1 Merge branch 'NetHack-3.6.2' 2018-11-10 15:09:41 -05:00
Pasi Kallinen 0bb6754998 Fuzz testing debug tool
Add code to run a fuzz tester, simulating (more-or-less) random
keyboard mashing. There's no option to turn it on, you need to
set iflags.debug_fuzzer on via a debugger or something along
those lines.
2018-11-08 15:55:49 +02:00
nhmall 968a958853 Merge branch 'NetHack-3.6.2' 2018-10-25 17:54:37 -04:00
keni 870b71de8c Deprecate "makedefs -m".
mons[].difficulty takes over for monstr[]
Invoking "makedefs -m" gives a deprecation message; it is also included
in the (now mostly empty) monstr.c.
Ports should now remove "makedefs -m" from their build procedures but this
commit does not include that change.
2018-10-21 08:45:55 -04:00
keni f222023bd8 Deprecate "makedefs -m".
mons[].difficulty takes over for monstr[]
Invoking "makedefs -m" gives a deprecation message; it is also included
in the (now mostly empty) monstr.c.
Ports should now remove "makedefs -m" from their build procedures but this
commit does not include that change.
2018-10-20 23:14:33 -04:00
nhmall 41a10e28ae Merge branch 'NetHack-3.6.2' 2018-10-06 12:54:27 -04:00
PatR 14bef9a02d formatting cleanup src/*.c
Remove trailing spaces, and remove tabs from the files that had
trailing spaces.

Also, rndorcname() was using a random value to terminate a loop
and was recalculating a new one each iteration.
2018-10-02 16:53:22 -07:00
nhmall e058df508e Merge branch 'NetHack-3.6.0' 2018-05-15 01:21:54 -04:00
nhmall 9a87064cca some build fixes for compile issues reported 2018-05-12 06:57:34 -04:00
nhmall 702154529f provide some debug developer controls - part 1 2018-05-10 10:05:29 -04:00
nhmall 0e2555881a Merge branch 'NetHack-3.6.0' 2018-04-25 18:15:49 -04:00
keni d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
nhmall df7d10bec8 Merge branch 'NetHack-3.6.0' 2018-04-23 21:41:06 -04:00
Pasi Kallinen 4a5115b417 Prevent hp-full or pw-full interrupt when running
The "You are in full health" and "You feel full of energy"
should only happen when repeating a command, not when running.
2018-04-20 23:35:59 +03:00
keni 6afb3ead34 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-03-10 19:14:11 -05:00
keni cf9cf038f3 gitinfo.pl: special case code to allow running it from $TOP or DEVEL without
installing the hooks first
NHgithook.pm: add some warnings if nhversioning can't open files
make sure nhversioning fails before opening gitinfo.txt if it can't get valid
 data
2018-02-23 19:50:15 -05:00
nhmall 65655d2cee Incorporate some git information into NetHack
Incorporate some git information into NetHack so that it
is potentially visible to a player. That's useful when
collecting details about the version that they are
running and, if the gitinfo is present, it can tie the
code to a specific git commit in the repository.

This modifies 'makedefs -v' to check for the presence of a data file
called dat/gitinfo.txt and if it is there, parse out its
contents, then write additional lines to include/date.h beyond
what 'makedefs -v' was previously putting in there, similar to
this sample:

      #define NETHACK_GIT_SHA "0c84e564c78e2024e562d39539376ce2e21eec8e"
      #define NETHACK_GIT_BRANCH "NetHack-3.6.0"

The contents of an appropriate dat/gitinfo.txt are as follows,
and trailing/leading whitespace is not significant:

      githash = 0c84e564c78e2024e562d39539376ce2e21eec8e
      gitbranch = NetHack-3.6.0

It also adjusts the contents of the 'v' version information to
include the additional git info when available.

Also adds some hooks DEVEL/hooksdir and a perl file to DEVEL
for simplifying and automating the deposit of dat/gitinfo.txt
so that it generally reflects the most current git commit.

DEVEL/gitinfo.pl can be used to build dat/gitinfo.txt at any
time without doing a commit, merge, or checkout.
    	perl DEVEL/gitinfo.pl

command line --version and -version support

To complement the extra information being provided in the
version by the 'v' command, this also adds support for the
following new command line arguments:
    --version
     -version            Output the NetHack version string then exit.

    --version:paste      Output the NetHack version string and also copy it to
     -version:paste      the platform's paste buffer for insertion somewhere,
                         then exit.

If the paste variation of -version is requested on a platform that
hasn't incorporated any support for the capability, it will deliver
the version info then an error message, prior to exiting.

To support the extended -version:paste variation, a port needs to:
    - provide a port-specific routine to perform
      the paste buffer copy in a port code file.
    - #define RUNTIME_PASTEBUF_SUPPORT in the include/portconf.h header file.

    --skeleton--
    void port_insert_pastebuf(buf)
    char *buf;
    {
    	/* insert code to copy the version info from buf into
    	   platform's paste buffer in a supported way */
    }

macosx and Windows have both added support for RUNTIME_PASTEBUF_SUPPORT
2018-02-23 19:34:44 -05:00
keni 3bcf6a0c95 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-12-24 15:28:18 -05:00
PatR b4540086f8 self-genocide's "you feel dead inside"
It seems to me that the reaction to "you feel dead inside" when you're
polymorphed into an undead creature at the time would be "so what else
is new?".  Vary the "dead" when current form is something which gets
reported as "destroyed" rather than "killed" when killed.  That happens
for things flagged as non-living.  Now undead "feel condemned inside"
and golems "feel empty inside".  Neither of those are ideal but they're
more interesting than "feel dead inside".

After becoming dead inside, give a reminder about that during
enlightenment and if you restore a saved game in that condition.  It
was the latter that set this in motion:  I wanted to confirm that
restoring with u.uhp == -1 didn't give "you aren't healthy enough to
survive restoration" when polymorphed.  (It doesn't; the game resumes
and you'll die if/when you rehumanize.)
2017-12-12 17:53:54 -08:00
keni a66e017314 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-10-08 14:00:50 -04:00
Pasi Kallinen 22ad104318 Master Key of Thievery warns about undetected traps
If the key is wielded and touching skin (that is, you're not
wearing gloves), it will give heat-related messages like
minesweeper, counting the undetected traps around player.
2017-10-06 01:21:06 +03:00