Bart House [Tue, 20 Nov 2018 18:46:45 +0000 (10:46 -0800)]
Addressed compiler warnings.
Fixed declarations of draw_classic, draw_vertical and draw_horizontal.
Moved definitions of locals before code. Added initialization of
locals. Changed comments to c-style.
PatR [Mon, 19 Nov 2018 02:48:59 +0000 (18:48 -0800)]
fix #H7573 - impossible zero payment in money2mon
When paying for shop door or wall damage, if the entire amount was
covered by shop credit then impossible "zero payment in money2mon"
would occur as the shop code tried to transfer 0 zorkmids from hero
to shopkeeper after using credit to pay.
Bart House [Sun, 18 Nov 2018 07:56:31 +0000 (23:56 -0800)]
Build curses if PDCurses is available.
There are two ways to enable curses in the build. Either set the
environment variable PDCURSES to a folder containing a PDCurses repository
OR place the PDCurses folder alongside the NetHack source repository.
PatR [Sun, 18 Nov 2018 00:40:53 +0000 (16:40 -0800)]
src/ formatting
Clean up quite a bit of minor things found with simple grep patterns:
operator at end of continued line instead of beginning of continuation
(and a few comments which produced false matches, so that they won't
do so next time), trailing spaces (only one or two of those), tabs (a
dozen or so of those), several casts which didn't have a space between
the type and the expression (I wasn't systematic about finding these).
I think the only code change was in the function for the help command.
PatR [Sat, 17 Nov 2018 02:49:12 +0000 (18:49 -0800)]
feedback for missing readonly data files
If bogusmon, engrave, epitaph, oralces, or rumors won't open, assume
it's because the file is missing so don't have impossible() tack on
"saving and restoring might fix this" when telling the player.
(Missing rumors or oracles previously only used pline() rather than
impossible() so this hadn't been an issue for them. Now it would be.)
PatR [Fri, 16 Nov 2018 23:34:09 +0000 (15:34 -0800)]
more vms (vmsbuild.com vs monstr.c)
Apparently I exited emacs without saving and the revised vmsbuild.com
ended up as a backup file that 'git nhadd' wouldn't see. This was
supposed to be included in the patch committed several hours ago....
PatR [Fri, 16 Nov 2018 17:16:48 +0000 (09:16 -0800)]
vms build/install update
New-ish files 'engrave', 'epitaph', and 'bogusmon' added for 3.6.0
were not handled by playground setup. NetHack runs without them so
limited testing didn't notice.
Add 'makedefs -s' to build them and include them in installed files.
Bart House [Fri, 16 Nov 2018 05:42:23 +0000 (21:42 -0800)]
Remap unicode control codes.
When running NetHack.exe in a console set to code page 850, the
multi-byte to wide character mapping will generate unicode values
in the unicode control code range. These values need to be re-mapped
to unicode renderable glyphs using the same mappings we use for
control page 437 otherwise the console font might not render a character
for these unicode control values.
nhmall [Thu, 15 Nov 2018 07:34:45 +0000 (02:34 -0500)]
stale gold symbol displayed after symset change
a stale gold symbol could be displayed on the status line following a switch
to a new symset, as observed and reported for Windows RogueEpyx symset.
An update is required for gold in the status line for a change to
any of the following:
context.rndencode value
the encoded glyph value for COIN_CLASS
the gold amount
PatR [Thu, 15 Nov 2018 01:26:10 +0000 (17:26 -0800)]
X11 menu searching
I was experimenting with some potential changes to menu searching but
have not been satisfied with the result. However, this bit of code
consolidation is worthwhile regardless of that.
PatR [Thu, 15 Nov 2018 01:18:12 +0000 (17:18 -0800)]
X11 resource defaults
Some of the items in NetHack.ad were separated from others by "!"
comment line rather than plain blank line and that tended to make it
look like the two items were directly related. For the ones which
aren't, remove '!'.
I also expanded some comments and reordered a couple of resources,
moving 'slow' closer to top and advanced 'translations' farther down.
PatR [Wed, 14 Nov 2018 00:29:48 +0000 (16:29 -0800)]
fix #H7536 - pet vampire behavior
Vampires tend to take vampire bat form and stay that way, unless/until
there's a closed door they want to pass in which case they change to
fog cloud form. Those shifted forms are weak, so pet vampires tend
not to attack other monsters, and if they don't take damage, they
won't change to vampire form. So, when comparing relative strength of
self and foe while deciding whether to attack another monster, treat
their own strength in weak form as if in vampire form, making them be
more aggressive.
Hostile vampires shouldn't need any comparable change. They don't use
relative strengths when deciding whether to attack something.
PatR [Tue, 13 Nov 2018 23:05:54 +0000 (15:05 -0800)]
fix github issue #159 - eating nurse corpses
Fixes #159
The nurse monster definition is flagged to be able to convery poison
resistance when a corpse or tin is eaten, but the post-corpse code
for nurse healed HP and cured blindness then skipped the intrinsic
handling.