Commit Graph

105 Commits

Author SHA1 Message Date
Bart House
74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -08:00
Bart House
605667b470 Add missing comment from hackpid declaration. 2018-12-19 21:27:31 -08:00
Bart House
576eece500 More globals moved to instance_globals. 2018-12-19 21:26:35 -08:00
Bart House
cb42021389 Last big push for moving globals to instance_globals. 2018-12-19 20:01:56 -08:00
Bart House
af949cb1df Moving globals to instance_globals part 10ish. 2018-12-19 20:01:56 -08:00
Bart House
f312b8cfe6 Even more globals moved to instance_globals. 2018-12-19 20:01:56 -08:00
Bart House
e4ab048c90 Even more globals moved to instance_globals.c 2018-12-19 20:01:55 -08:00
Bart House
ff5fe26e72 More globals moved to instance_globals. 2018-12-19 20:01:55 -08:00
Bart House
3645e415e3 Moved more globals to instance_globals. 2018-12-19 20:01:55 -08:00
Bart House
f1e48cddfe artifact.c, cmd.c and makemon.c 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
1c1e5b7e36 Removing spaces at end of lines. 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
e0a3bc928b Merge branch 'NetHack-3.6.2' 2018-12-10 09:18:20 -05:00
nhmall
3837df1221 Qt build 2018-12-10 09:00:50 -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
b286ed510a Merge branch 'NetHack-3.6.2' 2018-09-20 18:45:37 -04:00
nhmall
9eb7830819 Gnomish Mines changes involving "Orctown" level variant
Changes to be committed:
	modified:   include/decl.h
	modified:   include/dungeon.h
	modified:   include/extern.h
	modified:   include/hack.h
	modified:   src/decl.c
	modified:   src/do_name.c
	modified:   src/dog.c
	modified:   src/dokick.c
	modified:   src/makemon.c
	modified:   src/mkmaze.c
	modified:   src/mkobj.c
	modified:   src/pager.c

This commit is an attempt to address the complaints about
the orc town variation taking away lots of stuff that is
normally available in mine town. The statement in the level
description says "A tragic accident has occurred in Frontier
Town...It has been overrun by orcs."

The changes in this commit attempt to uphold that premise,
while making things a bit more interesting and perhaps
more palatable for the player.

This update does the following in keeping with the mythos:
- While many of the orcs still remain to wander about the
  level, many of the orcs took off deeper into the mines with
  some of the stuff that they plundered. You may now be
  able to hunt some of it down.

- Adds some appearance of this particular horde of marauding
  orcs working as part of a larger collective.

- This evolves the Orc Town mine town variation into a
  a feature over multiple levels of The Gnomish Mines,
  rather than just the single-level "feature" that it was
  previously.

- You may have to work longer and a bit harder for some
  things than other mine town variations, but at least with
  these changes, there is hope that some of it may be found
  elsewhere.

Game mechanics notes (maybe spoily?)

- Add mechanism to place objects into limbo (okay, really
  place them onto the migrating_objs list for transferring
  between levels etc.) and destine them
  to become part of the monster inventory of a particular
  species. In this particular usage case, it's using the
  M2_ORC flag setting to identify the recipients.

- At present, there is no mechanism in the level compiler
  for placing objects onto the migrating objects, nor
  with more sophisticated landing logic, so a somewhat
  kludgy hard-coded fixup and supporting routines were used.
  Some day the need for that might change if additional
  capabilities move to the level compiler.

This is a NetHack-3.6.2-beta01 update. Please give it a workout.

Fixes #127
2018-09-18 18:35:13 -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
keni
6afb3ead34 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2018-03-10 19:14:11 -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
f8b4f5672c Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-10-01 17:19:23 -04:00
Pasi Kallinen
69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
keni
eafdc9bf05 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-09-24 13:58:17 -04:00
PatR
cd8f028352 sys/unix/*.c formatting and PANICTRACE fix
I started out just reformatting the function header for regularize()
but ended up doing miscellaneous other stuff, including some code
changes.  I think the CHDIR code is a bit cleaner now, but shouldn't
have any differences in behavior.

Along the way I noticed that 'nethack -dpath' or 'nethack -d path'
modifies argv[] before PANICTRACE attempted to save argv[0], so would
break having nethack invoke gdb to get a backtrace.  ('ARGV0' seems to
be unnecessary since 'hname' holds the same value, but I didn't get rid
of it....)
2017-09-13 15:33:43 -07:00
keni
88ed50523d Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-08-15 07:59:38 -04:00
Pasi Kallinen
439028dcae Add whatis_filter option to filter eligible map locations for travel
Compound option whatis_filter, filters the eligible map locations
when getting a cursor location for targeting. Accepts 'n' (none),
'v' (map locations in view), or 'a' (map locations in the same area,
eg. room or corridor).
2017-07-31 16:58:23 +03:00
keni
4f22d5c84b Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-06-13 08:55:47 -04:00
PatR
3512297f59 fix #H5547 - named vampire shapeshifting message
Report was about "Pet vampire" but the relevant aspect was that the
vampire had been assigned a name, not that it was tame:
You observe a Hilda where a Hilda was.

Investigating this has uncovered two other bugs, one potentially
serious.  m_monnam() overrides hallucination but seems to be getting
used to some situations where hallucination should be honored (several
instances).  Dynamically constructed format strings are including
monster or object names in the format (rather than the usual use as
arguments), so player assigned names containing percent signs could
cause havoc (a few instances).  This fixes some of the former and one
of the latter, but doesn't deal with various other cases revealed by
grep.
2017-06-03 16:05:23 -07:00
keni
8ff16b07c1 Merge branch 'NetHack-3.6.0' 2016-06-21 10:29:14 -04:00
keni
83a0c37d13 Conway 2016-06-16 13:32:50 -04:00
PatR
4ff8d8ac7e fix #H4060 - sysconf is re-read if no config file
Config file handling remembers the name of the last config file
read in order for options processing to use it in messages, but
it was also reused as default config file name if user-supplied
config file name failed access() test.  So the SYSCF file became
the default user config file after it was used.  The config file
handling was a real mess.

This patch fixes it for Unix but there is a lot of scope for
typos in the changes for other platforms.  Testing is needed.
2016-06-12 17:52:12 -07:00
PatR
d6fa06f8e8 zeromonst
Make 'zeromonst' global instead of local to makemon.c.  Its address
isn't used as a special value like &zeroobj, but it is useful to
have available for initializing various pseudo-monsters.

modified:
  include/decl.h
  src/decl.c, makemon.c, mkobj.c, mplayer.c, teleport.c
2016-03-26 16:42:24 -07:00
PatR
2e2b54e548 overriding message suppression, revisited
This is more robust than the previous hack.  The issue of whether to
use it in other places is still unexplored.  Ultimately it's the user's
fault if overzealous message suppression hides something important.
[For an eerie game, try 'MSGTYPE=hide .'.]
2016-01-19 18:16:13 -08:00
Pasi Kallinen
f8b48490aa Comment typofixes 2015-10-17 12:28:52 +03:00
Pasi Kallinen
f0eca282a8 Add MSGTYPE config option
MSGTYPE allows the user to define how messages in the message
area behave. For example:

  MSGTYPE=stop "You swap places with "

would always make that message prompt for -more-.  Allowed types
are "show" (normal message), "hide" (do not show), "stop" (wait
for user), and "norep" (do not repeat message).

Adding this, because it's relatively simple, proven to work, and
it seemed to be the major thing betatesters felt was lacking when
compared to NAO.
2015-05-27 20:21:57 +03:00
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
Sean Hunt
8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00
Sean Hunt
b6f32e7eff Warning cleanup. 2015-05-24 11:12:58 -04:00
Sean Hunt
84d63e169b Use the common regex engine in more places.
In particular, in autopickup_exceptions and user sounds.
2015-05-24 10:17:58 -04:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
Pasi Kallinen
eba5bf7d5e Add litmus test
Original patch by Dylan O'Donnell
2015-04-13 18:30:53 +03:00
Pasi Kallinen
411ee58593 Add more explicit helpless reasons
Instead of just "while helpless", the death reason will tell
more explicitly why the player was helpless.  For example:
"while frozen by a monster's gaze"
2015-03-29 22:12:19 +03:00
nhmall
74c5f489ae adjust PREFIXES_IN_USE for SYSCF 2015-03-22 11:11:41 -04:00
nhmall
c3c968f87c options and config file handling
With SYSCF, the SYSCF_FILE name was overwriting the
default config file name making it unavailable for
subsequent user config file options handling.

- Keep the name of the last config file successfully opened.
- Do it without orphaning the default config file name needed
  for the next pass.
2015-03-22 10:44:36 -04:00
Pasi Kallinen
3cc3709d95 Save xlogfile time_t fields correctly 2015-03-19 17:41:14 +02:00
Pasi Kallinen
f8aced5480 Add Extended Logfile 2015-03-12 21:35:04 +02:00