Commit Graph

4273 Commits

Author SHA1 Message Date
Derek S. Ray
12ca92aa42 Fix 'fetch' syntax, include sparkly 'git log' trick
And bolt a couple more Win32-folders onto .gitignore.
2015-03-25 17:07:10 -04:00
Pasi Kallinen
2be9f41885 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-25 22:15:16 +02:00
Pasi Kallinen
f41c51aef0 Show object symbols in menu headings
... in menus where those object symbols act as menu accelerators.
Toggleable via "menu_objsyms" boolean option, defaults to off.
2015-03-25 22:13:28 +02:00
Sean Hunt
907a2dfee0 Fix a memory leak on termination.
Found by Alex Smith.
2015-03-25 14:34:28 -04:00
nhmall
a355911c2c no hiding under nothing
On 3/23/2015 6:41 PM, a bug reporter wrote:
> When you're hiding under an item (e.g. via garter snake polyform), and
> that item gets polyshuddered into nonexistence, you continue hiding
> (under nothing).

This addresses the "hiding under nothing" bug, but does not
address this flavor comment also included in the report:
> (Incidentally, it's a bit weird that you use > to aim at items that are
> flavorwise above you at the time.)
2015-03-24 22:07:16 -04:00
nhmall
dde4f6322c Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-24 19:29:11 -04:00
nhmall
a1cc33d6ae fix invalid pointer dereference in morguemon
On 3/23/2015 6:41 PM, a bug reporter wrote:
> If the game generates a graveyard, the graveyard places a normal
> demon, but all normal demons are extinct at the time, then morguemon (at
> mkroom.c line 423) indexes mons with NON_PM (the return value of
> ndemon() if it can't find a reference), which is an invalid pointer
> dereference. According to the testbench, this mostly seems to happen on
> dlvl 12.

This fixes the code violation, but the logic will now drop down to the
ghost/wraith/zombie code when that happens.

Is that desireable, or should something else happen (for variety)?
2015-03-24 19:20:14 -04:00
keni
2ae33fa514 NHsubst bugfixes and hack for whitespace errors. 2015-03-24 18:29:02 -04:00
Pasi Kallinen
d787f45dcb Add an option to give feedback when bumping walls
Boolean option "mention_walls", defaults to off.
Useful for blind players.
2015-03-24 22:01:29 +02:00
Pasi Kallinen
dfe967732d Add more hallu sounds monsters make when hit 2015-03-24 21:14:49 +02:00
Sean Hunt
e41b3f7143 Fix use-after-frees on dipped objects. 2015-03-23 11:42:36 -04:00
PatR
97ffd73add {DEC,IBM,MAC}graphics (2 of 2: unixmain)
Unix command line processing required that the initial 'd' of
"-DECgraphics" be lowercase so that it wouldn't conflict with -D for
wizard mode.  This retains -D for wizard mode and now also recognizes
"-debug" (case insensitive, but full 5 letters necessary) for the same
thing, and allows "-DECgraphics" to be capitalized as it is throughout
the rest of the program (actual matching is case-insensitive, so "-dec"
and "-decgraphics" still work.  It now requires that anything  after
"DEC" match the rest of that string instead of accepting "-DECanthing"
as a synonym for "-DECgraphics".  Likewise for "-IBMgraphics":  when
more than 3 letters are supplied, the extra ones must be an initial
substring of "graphics" rather than arbitrary characters.

The raw_printf() warnings don't actually work as intended, but that
isn't a change from the old behavior so I've left them in for now.
2015-03-22 18:29:37 -07:00
PatR
7b571b72f2 {DEC,IBM,MAC}graphics (1 of 2: core)
DECgraphics, IBMgraphics, and MACgraphics used to be recognized when
at least 3 letters were supplied back when they were true boolean
options.  When they got demoted to shortcuts for the symset option,
they started needing 10 (DEC and IBM) or all 11 (MAC), otherwise
triggering "bad syntax in NETHACKOPTIONS" (or config file).  Revert
to having the first three letters be sufficient.
2015-03-22 18:22:36 -07:00
nhmall
a948e6aafb remove stale feature alert
This old feature alert from 3.3.0 is pretty stale, so remove
if from the code because everybody has probably suppressed
it by now.

	/* Because 'Q' used to be quit... */
	if (flags.suppress_alert < FEATURE_NOTICE_VER(3,3,0))
		pline("Note: Please use #quit if you wish to exit the game.");
2015-03-22 18:11:49 -04:00
nhmall
0e6355e017 Add note about feature alert mechanism 2015-03-22 18:04:18 -04:00
nhmall
3b064145a3 File for explaining code quirks/features/caveats
- added NOCWD_ASSUMPTIONS and PREFIXES_IN_USE section.
2015-03-22 15:05:18 -04: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
PatR
86959fe242 fix "mysterious force" probabilities in do.c comment
Reported by Alex, the probabilites shown in the comment about the effect
of the mysterious force have been wrong ever since they were added 20 or
so years ago.  Lawfuls and neutrals are much more likely to go down just
one level rather than 2 or 3.
2015-03-21 19:24:08 -07:00
PatR
91b13d939a wishing fix for "eyes"
No, not a blindness cure. :-}  Post-3.4.3 revisions to makesingular()
inadvertently made it impossible to successfully wish for "the Eyes
of the Overworld" because the string got changed into "the Eye of the
Overworld" which doesn't match anything.  So don't singularize "eyes".

(After this fix, wishing for "the Eyes of the Aethiopica" no longer
yields the Eye of same, but I think that's the correct behavior.)
2015-03-21 15:36:47 -07:00
nhmall
af9af8b701 put mystery line back but !WIN32
Since that line of code is used by a lot of different ports, I decided to
recant its removal and just add #ifdef to ensure it isn't compiled on WIN32.

I think other ports might encounter the same issue where the first pass with
filename set to 'sysconf', is then going to overwrite the hard-coded user
config file name, but I can't fix or test those so for those ports, it
will be now be back the way it was.
2015-03-21 16:17:17 -04:00
nhmall
349e264ac3 remove a troublesome line of code
Whenever SYSCF was enabled on Windows, the option
processing would go bonkers with illegal options
at startup. I noticed it months ago, and Derek
had it happen the other evening.

It turns out, the hard-coded 'defaults.nh' setting
was being overwritten with the name sysconf on
the first SET_IN_SYS pass, so all subsequent passes
were re-opening the SYSC_FILE instead of the
user config file.

I opted to take it out as I couldn't ascertain
why it was there in the first place.
2015-03-21 16:01:03 -04:00
nhmall
b8515fb5fd throw in a windows sysconf skeleton 2015-03-21 15:54:30 -04:00
nhmall
734d118d39 a sys/winnt/Makefile.msc update 2015-03-21 15:50:03 -04:00
nhmall
41ac4aef92 fix SYSCF so that things build when first defined
Things won't build for ports that first
define SYSCF.

This moves assure_syscf_file() from unixmain.c
to files.c and adjusts extern.h to get it
out from under #ifdef UNIX.

The call to assure_syscf_file() in options.c was
only #ifdef SYSCF, SYSCF_FILE and not UNIX,
so new ports #defining SYSCF would get an erro.

assure_syscf_file() will be utilized by mswin
when SYSCF is defined.
2015-03-21 15:38:31 -04:00
nhmall
297e7c6d5f Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-21 10:53:42 -04:00
Pasi Kallinen
c9df82fb42 Update hacklib func comment doc 2015-03-21 16:49:31 +02:00
nhmall
e3eb74166f obj change to support some upcoming work
This is an enabling patch for upcoming work. It breaks
save/bones so editlevel is incremented.

I'd like to a second overloadable int field in struct obj,
instead of just the one that is typically overloaded - corpsenm.

The second one can be used for things that are being tallied
up as opposed to a static one time assignment for reference/linkage
purposes.

The differentiation will allow both uses to co-exist for the
same object.
2015-03-21 10:46:11 -04:00
Pasi Kallinen
6fcc030f37 Make HoOA alignment change depend on object ID
The same Helm of opposite alignment will always make
the same alignment change for neutrals.
2015-03-21 13:40:19 +02:00
Pasi Kallinen
3434a157f8 More C343-108: Handle "rub on the stone" 2015-03-21 11:03:54 +02:00
nhmall
66d642fad9 more mswin cmdline Makefile tweaks 2015-03-20 22:06:28 -04:00
Pasi Kallinen
2ec4ff0b8c Fix C343-108 (e- leaves prompt on screen)
You'll get "You mime eating something."
2015-03-20 19:25:24 +02:00
PatR
f2dc48086f acid explosion messages from water_damage()
Restore the variant phrasing used when more than one stack of potions of
acid explode while being inflicted with water damage.  First message:
"a potion explodes" or "some potions explode"; second and subsequent
messages: "another potion explodes" or "more potions explode".  This
trivial feature stopped working when erosion handling was overhauled and
old water_damage was split into current water_damage_chain+water_damage.

Augment the message so that vague "potion" is only used when the object's
dknown flag isn't set (ie, object hasn't been seen yet).  Use "<color>
potion" or "potion of acid" otherwise, depending upon whether such potions
have been fully discovered.
2015-03-19 15:54:17 -07:00
Pasi Kallinen
384f519cc8 Add lots of new random epitaphs 2015-03-19 22:01:16 +02:00
Pasi Kallinen
1fd371600d Add some new random engravings 2015-03-19 21:13:24 +02:00
Pasi Kallinen
f5ea4e0d1f Add lots of new hallu monsters 2015-03-19 18:43:35 +02:00
Pasi Kallinen
3cc3709d95 Save xlogfile time_t fields correctly 2015-03-19 17:41:14 +02:00
nhmall
02cdaf5a09 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-03-18 23:01:34 -04:00
nhmall
d182920655 update cmdline Makefile 2015-03-18 23:00:46 -04:00
PatR
357115ae80 add bogusmon,engrave,epitaph to dat/.gitignore 2015-03-18 19:24:43 -07:00
PatR
4b0a1af482 xlogfile tweak to avoid forcing ANSI C
Avoid the C89/C90 feature of implicit concatentation of string literals.
XLOG_SEP handling becomes clumsier but will work with pre-ANSI compilers.
2015-03-18 19:21:29 -07:00
Pasi Kallinen
debdf7ca48 Move some hard-coded string arrays into data files.
Random epitaphs, engravings and hallucinatory monsters now
live in text data files.
2015-03-18 22:05:10 +02:00
Pasi Kallinen
e93add8cb8 Prevent segfault, water_damage may get a NULL obj 2015-03-18 21:40:54 +02:00
Pasi Kallinen
27add21e7e Merge branch 'paxed-xlogfile' 2015-03-18 18:57:52 +02:00
nhmall
c80828fe7a Start to prepare dat/history for release
This gets the history started. Please review/correct/improve and
fill in the various <FIXME> items I've flagged.
2015-03-17 22:40:57 -04:00
Pasi Kallinen
379c23096a More getpos improvements
Look up remembered dungeon features, not user-visible glyphs,
and ignore uninteresting features (room, corridor and wall tiles).

Original patch by Patric Mueller, from UnNetHack
2015-03-17 21:29:54 +02:00
PatR
ad03a7fb7a some lint cleanup 2015-03-16 19:22:49 -07:00
PatR
562fa952ce allow DEBUGFILES to be overridden via getenv()
If getenv("DEBUGFILES") yields a value then it takes precedence over
sysconf.DEBUGFILES or sys.c's #define DEBUGFILES.  (It probably should
only be controlled via environment since it is not a system-wide
attribute, but I haven't taken out the SYSCF handling for it.)
2015-03-16 15:54:10 -07:00
Derek S. Ray
4914e256bf finally remember to add the 'nh-' versions 2015-03-16 17:26:31 -04:00
nhmall
c24dcf76b2 dungeoneers update March 16, 2015 2015-03-16 06:04:43 -04:00