]> granicus.if.org Git - nethack/log
nethack
6 years agoMerge branch 'NetHack-3.6.2-beta01' into macosx-minor
nhmall [Wed, 5 Dec 2018 02:39:16 +0000 (21:39 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into macosx-minor

6 years agofix #H7667 - maybe_reset_pick(), other bad context
PatR [Wed, 5 Dec 2018 01:10:15 +0000 (17:10 -0800)]
fix #H7667 - maybe_reset_pick(), other bad context

When deciding whether to discard interrupted lock/unlock context while
changing levels, maybe_reset_pick() checks whether xlock.box is being
carried.  But it was doing so after the old level had been saved and
memory for non-carried container there had been freed.

That led to a couple of other issues.  context.travelcc was using -1
for 'no cached value', but the fields of travelcc have type 'xchar' and
shouldn't be given negative values.  0 should be fine for 'no cache'.

Failed partial restore which occurred after old game's context had been
loaded would begin a new game with old game's stale context.  Restoring
goes out of its way to avoid that for 'flags' but didn't for 'context'.

6 years agoRevert "some fixes provided from Hardfought"
nhmall [Tue, 4 Dec 2018 16:59:41 +0000 (11:59 -0500)]
Revert "some fixes provided from Hardfought"

This reverts commit ab9e28d1aaa7a009e5051dcbee6bbbccf62804e5.

6 years agosome fixes provided from Hardfought
nhmall [Tue, 4 Dec 2018 16:58:05 +0000 (11:58 -0500)]
some fixes provided from Hardfought

6 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Tue, 4 Dec 2018 16:46:19 +0000 (11:46 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

6 years agobit-use collision on WC2_TERM_SIZE, WC2_RESET_STATUS
nhmall [Tue, 4 Dec 2018 16:45:41 +0000 (11:45 -0500)]
bit-use collision on WC2_TERM_SIZE, WC2_RESET_STATUS

6 years agofix #H7659 - accessing freed memory by cutworm()
PatR [Tue, 4 Dec 2018 02:57:01 +0000 (18:57 -0800)]
fix #H7659 - accessing freed memory by cutworm()

hmon() can destroy the weapon being used, and known_hitum() would
still pass the pointer to the freed object to cutworm().  Remember the
relevant weapon attribute before using and maybe freeing the object,
then pass that attribute instead of the whole weapon.  Also pass
'more-likely-to-cut' for axes in addition to blades.

thimonst() behaved similarly, although due to much different code
paths none of the objects that might get to hmon() were then passed to
cutworm(), so it wasn't vulnerable.  But pass 'more-likely-to-cut'
for axes instead of for blades when thrown.

6 years agomore !SHELL, !SUSPEND
PatR [Mon, 3 Dec 2018 09:46:01 +0000 (01:46 -0800)]
more !SHELL, !SUSPEND

Update tty command completion to ignore #shell and #suspend when
they're disabled.  (Since they aren't flagged for command completion,
this should be unnoticeable.)

Update X11 extended command selection to not show shell and suspend
in the menu when they're disabled.  (Trickier than I expected.)

X11 currently rejects #suspend (at run time, not compile time) but
allows #shell.  If it was launched syncronously from a terminal
window, shell escape behaves sanely.  Otherwise, that seems like
asking for trouble.

6 years agoMerge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win...
Bart House [Mon, 3 Dec 2018 04:23:03 +0000 (20:23 -0800)]
Merge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win-minor

6 years agoFix for NetHackW.exe menu icon rendering.
Bart House [Mon, 3 Dec 2018 04:22:47 +0000 (20:22 -0800)]
Fix for NetHackW.exe menu icon rendering.

6 years agoMerge branch 'win-minor' into NetHack-3.6.2-beta01
nhmall [Mon, 3 Dec 2018 02:26:54 +0000 (21:26 -0500)]
Merge branch 'win-minor' into NetHack-3.6.2-beta01

6 years agoAdded some missing header files to VS2017 NetHackW project.
Bart House [Mon, 3 Dec 2018 02:15:02 +0000 (18:15 -0800)]
Added some missing header files to VS2017 NetHackW project.

6 years agoSplash dialog and main window handle dpi change notifications.
Bart House [Mon, 3 Dec 2018 02:09:34 +0000 (18:09 -0800)]
Splash dialog and main window handle dpi change notifications.

6 years agocommand handling for !SHELL and !SUSPEND
PatR [Mon, 3 Dec 2018 00:43:53 +0000 (16:43 -0800)]
command handling for !SHELL and !SUSPEND

Change the command list to always include #shell and #suspend so that
a user's preferred key bindings can span platforms without worrying
about whether those exist or not.  They're still effectively no-ops
when compiled out.

'#?' suppresses them from the list of displayed commands.  Interface-
specific extended command handling may want to check new extcmd.flag
value CMD_NOT_AVAILABLE to do the same, but failing to do so shouldn't
pose a problem.  They behave sanely if executed when not supported.

6 years agoMerge branch 'win-minor' into NetHack-3.6.2-beta01
nhmall [Mon, 3 Dec 2018 00:42:12 +0000 (19:42 -0500)]
Merge branch 'win-minor' into NetHack-3.6.2-beta01

6 years ago'curses_display_nhmenu' should return a value
nhmall [Sun, 2 Dec 2018 23:47:23 +0000 (18:47 -0500)]
'curses_display_nhmenu' should return a value

Caught by automated build test

../win/curses/cursdial.c:598:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
        ^
../win/curses/cursdial.c:605:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;

6 years agoUpdate comment within mswin_status_string.
Bart House [Sun, 2 Dec 2018 21:35:48 +0000 (13:35 -0800)]
Update comment within mswin_status_string.

6 years agoRespect BL_FLUSH and BL_RESET indications to mswin_status_update.
Bart House [Sun, 2 Dec 2018 21:33:07 +0000 (13:33 -0800)]
Respect BL_FLUSH and BL_RESET indications to mswin_status_update.

6 years agoNetHackW status hilite support improved to include support for attributes.
Bart House [Sun, 2 Dec 2018 21:25:03 +0000 (13:25 -0800)]
NetHackW status hilite support improved to include support for attributes.

6 years agoremove slipped-in partial bits from another feature
nhmall [Sun, 2 Dec 2018 16:54:42 +0000 (11:54 -0500)]
remove slipped-in partial bits from another feature

Some bits from another feature by Tangles had
slipped into our merge of curses a while back.

Remove the partial bits as feature bits should
be complete or not at all, unless foundational
for something to come.

6 years agocurses - reinstate guicolors
Tangles [Wed, 16 May 2018 11:43:05 +0000 (21:43 +1000)]
curses - reinstate guicolors

6 years agocurses - don't use popup for count selection.
Tangles [Mon, 28 May 2018 11:55:24 +0000 (21:55 +1000)]
curses - don't use popup for count selection.

There are issues with dismissing the popup afterwards.  These
were not really investigated as a count-selection doesn't really
warrant a popup anyway.

6 years agocurses - fix hero turning into # when selecting a count of items.
Tangles [Sun, 27 May 2018 12:49:54 +0000 (22:49 +1000)]
curses - fix hero turning into # when selecting a count of items.

Why was that line in there anyway?

6 years agocurses - don't autocomplete wiz cmds except in wizmode
Tangles [Fri, 25 May 2018 13:06:51 +0000 (23:06 +1000)]
curses - don't autocomplete wiz cmds except in wizmode

6 years agocurses - change some panics to impossibles.
Tangles [Wed, 25 Jul 2018 12:06:33 +0000 (22:06 +1000)]
curses - change some panics to impossibles.

6 years agoadd a macro to ease conditional testing based on active window port
nhmall [Sun, 2 Dec 2018 14:56:44 +0000 (09:56 -0500)]
add a macro to ease conditional testing based on active window port

Add WINDOWPORT macro

example:
if (WINDOWPORT("tty"))
pline("Look at me, I'm on tty at the moment!");

6 years agofix a build error in cmd.c
nhmall [Sun, 2 Dec 2018 14:45:07 +0000 (09:45 -0500)]
fix a build error in cmd.c

6 years agoSting revisited
PatR [Sun, 2 Dec 2018 10:09:22 +0000 (02:09 -0800)]
Sting revisited

Replace recent "(light blue aura)" with
"(flickering light blue)" if there are 1..4 orcs,
"(glimmering light blue)" if 5..12, or
"(gleaming light blue)" if there are 13 or more, and move its place
in the formatted name.
_3.6.1_: Sting (weapon in hand) (glowing light blue)
_recent: Sting (weapon in hand) (light blue aura)
_now___: Sting (weapon in hand, flickering light blue)

The thresholds for intensity may need to be tweaked.  The start
message has been changed from "glows" to "flickers/glimmers/gleams"
and is given when the intensity changes (up or down) as well as when
first glowing.  Stop message will usually be "stops flickering" but
some form of mass kill (genocide for sure, maybe explosion, probably
not wand zap) might result in stopping directly from higher intensity.

It still "quivers" if hero is blind when there are orcs on the level,
but no name augmentation shows in inventory for that situation;
describing it as "(weapon in hand, quivering)" would be too silly.
Also, the quiver or glow intermediate message if blindness is toggled
while Sting is active only worked for make_blinded(), not for putting
on and taking off a blindfold.  Now fixed.  I think becoming blind due
to polymorphing into an eyeless form is still not handled, but there
are no eyeless creatures capable of wielding weapons so that can wait.
Polymorphing from eyeless to sighted is handled but moot for Sting.

6 years agozap.c formatting bit
PatR [Sun, 2 Dec 2018 09:51:23 +0000 (01:51 -0800)]
zap.c formatting bit

that's been sitting around for a while and I want to get out of the way.

6 years agodebug_fuzzer vs '!' and ^Z
PatR [Sun, 2 Dec 2018 00:43:13 +0000 (16:43 -0800)]
debug_fuzzer vs '!' and ^Z

My sysconf allows shell escape, and the fuzzer seems fond of that.
Suppress '!' and also '^Z', although I didn't notice it execute the
latter.  Without this hack, the sequence '!', sub-shell exit, '&'
causes nethack to be killed via SIGTTOU while fiddling with terminal
settings for introff().

6 years agoRemove some Windows-specific code from src/cmd.c
nhmall [Sun, 2 Dec 2018 00:24:22 +0000 (19:24 -0500)]
Remove some Windows-specific code from src/cmd.c

6 years agomake curses commented out by default (again)
nhmall [Sat, 1 Dec 2018 16:31:08 +0000 (11:31 -0500)]
make curses commented out by default (again)

6 years agoget rid of some gcc warnings with Windows build
nhmall [Sat, 1 Dec 2018 14:41:22 +0000 (09:41 -0500)]
get rid of some gcc warnings with Windows build

6 years agoglyph variable is actually used
Pasi Kallinen [Sat, 1 Dec 2018 06:58:36 +0000 (08:58 +0200)]
glyph variable is actually used

6 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Sat, 1 Dec 2018 01:20:05 +0000 (20:20 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

6 years agomore gcc work for Windows
nhmall [Sat, 1 Dec 2018 01:17:42 +0000 (20:17 -0500)]
more gcc work for Windows

tty builds and executes
curses builds but crashes

gui - not even trying right now

6 years agoX11 text popup fix
PatR [Sat, 1 Dec 2018 00:02:55 +0000 (16:02 -0800)]
X11 text popup fix

Text popups on OSX could be dismissed with <space> or <return> or
<esc> if user's X resources had 'NetHack*autofocus' set to True, but
for the default of False they ignored all keystrokes even if you
clicked inside the popup window to set focus explicitly.  Clicking
on the Close Window button of the popup's title bar was the only way
to get the popup to go away.  Fix suggested by Pasi.

6 years agomore Windows Makefile synch and gcc Makefile updates
nhmall [Fri, 30 Nov 2018 23:44:37 +0000 (18:44 -0500)]
more Windows Makefile synch and gcc Makefile updates

The gcc-built tty version builds fully now, but it won't play.

The GUI version definitely does not build right now.

6 years agocurses follow-up bits
nhmall [Fri, 30 Nov 2018 21:00:24 +0000 (16:00 -0500)]
curses follow-up bits

Move the curses global variable defininitions to cursmain.c.

Make the references to those global variables extern in
include/wincurs.h

Get rid of a warning:
../win/curses/cursmesg.c:379:9: warning: declaration shadows a
variable in the global scope [-Wshadow] int orig_cursor = curs_set(0);

Kludge for Visual Studio compiler: Add a stub- file for use
in Windows curses port builds to ensure that a needed #pragma
is invoked prior to compiling the file pdcscrn.c in the
PDCurses source distribution. All command line options and
compile of the file. It is unreasonable to expect a NetHack
builder to have to tinker with the PDCurses source files in
order to build NetHack. This kludge means the NetHack builder
doesn't have to.
The file stub-pdcscrn.c contains only two lines:
#pragma warning(disable : 4996)
#include "pdcscrn.c"
Some day, if the PDCurses sources corrects the issue, this
can go away.

6 years agoX11: Disable menucolors when showing text files
Pasi Kallinen [Fri, 30 Nov 2018 13:26:38 +0000 (15:26 +0200)]
X11: Disable menucolors when showing text files

6 years agotypos
nhmall [Fri, 30 Nov 2018 03:37:54 +0000 (22:37 -0500)]
typos

6 years agomore Windows gcc cleanup
nhmall [Fri, 30 Nov 2018 03:32:36 +0000 (22:32 -0500)]
more Windows gcc cleanup

Still not finished

6 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Fri, 30 Nov 2018 03:23:58 +0000 (22:23 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

6 years agomore Makefile.gcc work
nhmall [Fri, 30 Nov 2018 03:23:17 +0000 (22:23 -0500)]
more Makefile.gcc work

Still not completed

6 years agovms/Makefile.src
PatR [Fri, 30 Nov 2018 02:45:37 +0000 (18:45 -0800)]
vms/Makefile.src

Catch up with recent changes to vmsbuild.com and unix/Makefile.src.

6 years agoworkaround for ^G "senior moment"
PatR [Fri, 30 Nov 2018 02:33:34 +0000 (18:33 -0800)]
workaround for ^G "senior moment"

The less said, the better.

6 years agodowngrade Sting's glow
PatR [Fri, 30 Nov 2018 02:19:20 +0000 (18:19 -0800)]
downgrade Sting's glow

Change "(glowing light blue)" to "(light blue aura)" so that there's
less suggestion that it might function as a light source.

6 years agomore steed dismount
PatR [Fri, 30 Nov 2018 02:02:52 +0000 (18:02 -0800)]
more steed dismount

By creating a spot of lava, filling up the whole level, and creating
a lurker above, I managed to trigger the impossible "Dismount: can't
place former steed on map" that was added earlier today.  I also was
told that my god was displeased even though the engulfer's attack was
responsible.  This addresses both situations.  I can't trigger that
impossible any more, and only voluntary dismount blames the hero if
it's killed because there's nowhere to place it.  Hero is still blamed
for any dismount that kills the steed while flying or levitating over
dangerous terrain--hero took steed into jeopardy.

6 years agomake some progress on mingw build
nhmall [Fri, 30 Nov 2018 01:59:03 +0000 (20:59 -0500)]
make some progress on mingw build

Still not quite there yet though.
Focusing on tty (maybe curses) right now.

The gui has had significant code deviation from
prior gcc builds for windows and will take more
work.

6 years agoMore Makefiles
nhmall [Thu, 29 Nov 2018 22:41:20 +0000 (17:41 -0500)]
More Makefiles

6 years agomore Makefile for Windows
nhmall [Thu, 29 Nov 2018 21:36:07 +0000 (16:36 -0500)]
more Makefile for Windows

6 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Thu, 29 Nov 2018 21:27:48 +0000 (16:27 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

6 years agoWindows Makefile updates (first batch)
nhmall [Thu, 29 Nov 2018 21:27:02 +0000 (16:27 -0500)]
Windows Makefile updates (first batch)

6 years agosteed vs "no monster to remove"
PatR [Thu, 29 Nov 2018 20:15:14 +0000 (12:15 -0800)]
steed vs "no monster to remove"

Noticed whlie testing the steed-in-pit fix.  The EXTRA_SANITY_CHECKS
for remove_monster() are being tripped if riding hero has steed killed
out from under him because the steed is not on the map.  This started
out simple but got a bit complicated.  It seems to be sufficient but
I'm not very confident about it.

Being engulfed while mounted gave "placing monster over another?" due
to a change made along with EXTRA_SANITY_CHECKS but not conditional on
it.  (The change was to issue a warning about an actual problem which
was previously undiagnosed.)  I think bumping the engulfer off the map
in favor of the former steed only worked because some u.uswallow code
eventually used the hero's location to put the engulfer back.  I didn't
pursue that to try to figure what really happened, just prevent it.

The DISMOUNT_BONES handling was being executed even if the steed was
dead.  DISMOUNT_BONES only happens if the hero is dead.  Since I don't
know whether it's possible for dead hero and dead steed to happen at
the same time, move it inside the steed-not-dead block just in case.

6 years agofix github issue #164 - lack of steed-in-pit mesg
PatR [Thu, 29 Nov 2018 18:24:50 +0000 (10:24 -0800)]
fix github issue #164 - lack of steed-in-pit mesg

Fixes #164

No message was shown when riding a steed into a pit or spiked pit.
Setup for the message was done, but post-3.4.3 insertion of else-if
into the previous if/else/endif cut off its delivery.

6 years agofix #H7631 - wielding cursed weptool via 'apply'
PatR [Thu, 29 Nov 2018 11:49:16 +0000 (03:49 -0800)]
fix #H7631 - wielding cursed weptool via 'apply'

Applying a non-wielded cursed pick-axe first wielded it, then dug,
but it didn't report "pick-axe is welded to your hand".  (Attempting
to drop it or wield something else did report that, after the fact.)
The same thing happened if you used a pole-arm rather than pick-axe.

6 years agoearlier Guidebook change neglected to update the date
nhmall [Thu, 29 Nov 2018 05:24:35 +0000 (00:24 -0500)]
earlier Guidebook change neglected to update the date

6 years agonot everyone has PDCurses so re-comment it in the official sources
nhmall [Thu, 29 Nov 2018 05:15:34 +0000 (00:15 -0500)]
not everyone has PDCurses so re-comment it in the official sources

6 years agoMerge branch 'win-minor' into NetHack-3.6.2-beta01
nhmall [Thu, 29 Nov 2018 05:08:09 +0000 (00:08 -0500)]
Merge branch 'win-minor' into NetHack-3.6.2-beta01

6 years agoAdding manifest to NetHackW.exe in nmake build.
Bart House [Thu, 29 Nov 2018 05:06:39 +0000 (21:06 -0800)]
Adding manifest to NetHackW.exe in nmake build.

6 years agofix nethackw start without arguments
nhmall [Thu, 29 Nov 2018 04:29:28 +0000 (23:29 -0500)]
fix nethackw start without arguments

The Windows graphical version in NetHackW.exe is meant to lock
itself to its own windowtype and ignore the OPTIONS=windowtype
setting in the config file, but the code to perform the lock
only did so if (argc > 1).

6 years agoMerge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource...
nhmall [Thu, 29 Nov 2018 02:47:34 +0000 (21:47 -0500)]
Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01

6 years agodungeoneers update - Karl Garrison
nhmall [Thu, 29 Nov 2018 02:46:52 +0000 (21:46 -0500)]
dungeoneers update - Karl Garrison

6 years agofix #H7618 - gas cloud affects underwater monsters
PatR [Thu, 29 Nov 2018 01:43:53 +0000 (17:43 -0800)]
fix #H7618 - gas cloud affects underwater monsters

Stinking cloud placed near water or poison gas breathed across it
would affect and potentially kill underwater monsters.  Most swimmers
are on the surface and should be affected, but eels and other fish
shouldn't be.

This also changes minliquid() to not treat flying and levitating as
ways to survive water when on the Plane of Water.

I think goodpos() needs to be taught about that Plane (where many ways
of existing at a water location don't apply).  This doesn't do that.

6 years agocatch up on some fixes36.2 entries
nhmall [Thu, 29 Nov 2018 01:39:09 +0000 (20:39 -0500)]
catch up on some fixes36.2 entries

6 years agoUpdate header at the top of the curses files
nhmall [Thu, 29 Nov 2018 01:00:20 +0000 (20:00 -0500)]
Update header at the top of the curses files

Place the copyright notice within the win/curses files as confirmed
by the original curses port author on November 28, 2018.

6 years agobring ms and gcc Makefiles into better alignment
nhmall [Thu, 29 Nov 2018 00:47:58 +0000 (19:47 -0500)]
bring ms and gcc Makefiles into better alignment

Makefile.msc has been tested.
Makefile.gcc has not been tested yet.

6 years ago'make depend' update for unix/Makefile.src
PatR [Wed, 28 Nov 2018 23:23:02 +0000 (15:23 -0800)]
'make depend' update for unix/Makefile.src

The dependency for pcmain.o is different from depend.awk generates
so re-running 'make depend' after this will think another change is
needed.

6 years agoX11 bit prior to 'make depend'
PatR [Wed, 28 Nov 2018 23:22:14 +0000 (15:22 -0800)]
X11 bit prior to 'make depend'

6 years agoTypofix
Pasi Kallinen [Wed, 28 Nov 2018 13:59:48 +0000 (15:59 +0200)]
Typofix

6 years agoadd a comment to sample config file showing how to enable curses
nhmall [Wed, 28 Nov 2018 13:43:05 +0000 (08:43 -0500)]
add a comment to sample config file showing how to enable curses

6 years agomouse_support compile bits
PatR [Wed, 28 Nov 2018 09:02:44 +0000 (01:02 -0800)]
mouse_support compile bits

There was a spurious seli-colon after an if's test, making a boundary
check be ineffective.  When looking at that, I noticed that the 'O'
command's display of the current value for mouse_support ("0=off" and
so forth) was relying on implicit concatenation of adjacent string
literals, which would break K&R compilation.  Do that concatenation
the old fashioned way....

While testing (after temporarily adding WC_MOUSE_SUPPORT to tty's
window_procs), I also noticed that wording used by config_error_add
looked strange when it was in response to giving a bad value via 'O'
command.  Suppress its "config_error_add: " prefix is that situation.

6 years agoMerge branch 'mouse_support' into NetHack-3.6.2-beta01
nhmall [Wed, 28 Nov 2018 03:58:42 +0000 (22:58 -0500)]
Merge branch 'mouse_support' into NetHack-3.6.2-beta01

6 years agomouse_support docs
nhmall [Wed, 28 Nov 2018 03:56:19 +0000 (22:56 -0500)]
mouse_support docs

6 years agoexpand mouse_support to three values rather than boolean
nhmall [Wed, 28 Nov 2018 03:15:34 +0000 (22:15 -0500)]
expand mouse_support to three values rather than boolean

On Windows only:
   0 = turn off mouse_support
   1 = turn on mouse_support and turn off QuickEdit mode
   2 = turn on mouse_support and leave QuickEdit mode untouched

More generally, but not implemented anywhere:
   0 = turn off mouse_support
   1 = turn on mouse_support and make supporting O/S adjustments
       (O/S adjustments not implented beyond Windows as yet)
   2 = turn on mouse_support and do not make OS adjustments
       (unimplemented as yet so behaves as 1)

6 years agoupdated sys/share/lev_comp.h, lev_{lex,yacc}.c
PatR [Wed, 28 Nov 2018 02:42:47 +0000 (18:42 -0800)]
updated sys/share/lev_comp.h, lev_{lex,yacc}.c

dgn_comp isn't affected.

6 years agolev_comp int vs long
PatR [Wed, 28 Nov 2018 02:21:58 +0000 (18:21 -0800)]
lev_comp int vs long

Fix lev_comp's variable argument usage by changing it to make
add_opvars() expect an int rather than a long when given the "i"
indicator, and add "l" for really passing a long.  The ints are
conveted to longs when setting up the interpreter.  I think I changed
just about all the integer opvars to int, although there is one use
of "l" in lev_main.c just to make sure it works.  There could be
arguments that really do need to be 'long'; if so, the add_opvars()
calls for them will have to have its indicator string updated and
possibly add or remove some casts.

There's a lot of reformatting included but it's not consistent about
tab replacement.  Some of the changes are due to renaming long-named
'variable_definitions' to 'vardefs' to shorten a bunch of lines.

Updated sys/share/*_yacc.c will be checked in separately.  The ones
currently in the repository won't work with patched lev_main.c due to
that renamed variable.

6 years agoMerge branch 'macosx-minor' into NetHack-3.6.2-beta01
nhmall [Tue, 27 Nov 2018 13:02:38 +0000 (08:02 -0500)]
Merge branch 'macosx-minor' into NetHack-3.6.2-beta01

6 years agoMacosx post install script fix to avoid changing save games owner to root.
Bart House [Tue, 27 Nov 2018 06:33:21 +0000 (22:33 -0800)]
Macosx post install script fix to avoid changing save games owner to root.

6 years agoMerge branch 'NetHack-3.6.2-beta01' into macosx-minor
Bart House [Tue, 27 Nov 2018 06:45:22 +0000 (22:45 -0800)]
Merge branch 'NetHack-3.6.2-beta01' into macosx-minor

6 years agoRemove unnecessary define
Pasi Kallinen [Tue, 27 Nov 2018 05:38:03 +0000 (07:38 +0200)]
Remove unnecessary define

6 years agocorrect sz error when gang parameter is null
nhmall [Mon, 26 Nov 2018 15:59:57 +0000 (10:59 -0500)]
correct sz error when gang parameter is null

6 years agoAdded support for color condition hilites to tile mode.
Bart House [Mon, 26 Nov 2018 05:04:30 +0000 (21:04 -0800)]
Added support for color condition hilites to tile mode.

Code is complete but might take another pass over the code to simplify
where we can.

6 years agoFix map clearing when in tile mode and tile is set to NO_GLYPH.
Bart House [Mon, 26 Nov 2018 04:31:50 +0000 (20:31 -0800)]
Fix map clearing when in tile mode and tile is set to NO_GLYPH.

6 years agoMerge branch 'NetHack-3.6.2-beta01' into win-minor
nhmall [Mon, 26 Nov 2018 00:38:45 +0000 (19:38 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into win-minor

6 years agogithub pull request #163 - bag of holding weight
PatR [Sun, 25 Nov 2018 23:36:54 +0000 (15:36 -0800)]
github pull request #163 - bag of holding weight

Fixes #163
Fixes #153

Encumbrance calculations for taking things out of a bag of holding
where subject to rounding issues due to integer division.  This may
improve things, although I think taking out a partial stack might not
be much better than before.

I simplified the contributed code, then decided that it wasn't an
improvement.  In the process of switching back and forth I may have
introduced bugs which weren't present originally.

6 years agowarning fixups
PatR [Sun, 25 Nov 2018 22:31:20 +0000 (14:31 -0800)]
warning fixups

Non-const string literals.

6 years agoMerge branch 'NetHack-3.6.2-beta01' into win-minor
nhmall [Sun, 25 Nov 2018 20:16:13 +0000 (15:16 -0500)]
Merge branch 'NetHack-3.6.2-beta01' into win-minor

6 years agomore warning quiet
nhmall [Sun, 25 Nov 2018 19:16:22 +0000 (14:16 -0500)]
more warning quiet

6 years agotry to silence clang warning
nhmall [Sun, 25 Nov 2018 18:39:48 +0000 (13:39 -0500)]
try to silence clang warning

6 years agomore orctown-related follow-up
nhmall [Sun, 25 Nov 2018 17:47:53 +0000 (12:47 -0500)]
more orctown-related follow-up

Under some circumstances, when all the marauding orcs belonging to the
horde operating within the gnomish mines had been provided with their
spoils and placed appropriately, there could still be some pillaged stuff
left-over on the migrating obj chain. Orcs created by regular monster
generation elsewhere would then be susceptable to receiving that stuff
until it was used up. That part is fine, except that the orcs were then
being named as part of the same horde operating within the mines. Now
they will no longer be named as part of the Gnomish Mines horde.

Mythos: There's a good chance that these particular orcs received the
stolen goods from the Gnomish Mines horde.

6 years agoadjust sample config file when STATUS_HILITES isn't defined
nhmall [Sun, 25 Nov 2018 04:14:20 +0000 (23:14 -0500)]
adjust sample config file when STATUS_HILITES isn't defined

On Windows, if you build without STATUS_HILITES defined,
you'll be greeted by the following barrage of errors when
you start the game.

On Windows, use makedefs to detect that STATUS_HILITES
isn't defined, and comment out the offending lines in
the sample config file.

Errors received before this change:

OPTIONS=statushilites
  * Line 197: 'statushilites' is not supported.

 OPTIONS=hilite_status:hitpoints/100%/gray&normal
  * Line 200: 'hilite_status' is not supported.

 OPTIONS=hilite_status:hitpoints/<100%/green&normal
  * Line 201: 'hilite_status' is not supported.

 OPTIONS=hilite_status:hitpoints/<66%/yellow&normal
  * Line 202: 'hilite_status' is not supported.

 OPTIONS=hilite_status:hitpoints/<50%/orange&normal
  * Line 203: 'hilite_status' is not supported.

 OPTIONS=hilite_status:hitpoints/<33%/red&bold
  * Line 204: 'hilite_status' is not supported.

 OPTIONS=hilite_status:hitpoints/<15%/red&inverse
  * Line 205: 'hilite_status' is not supported.

 OPTIONS=hilite_status:power/100%/gray&normal
  * Line 208: 'hilite_status' is not supported.

 OPTIONS=hilite_status:power/<100%/green&normal
  * Line 209: 'hilite_status' is not supported.

 OPTIONS=hilite_status:power/<66%/yellow&normal
  * Line 210: 'hilite_status' is not supported.

 OPTIONS=hilite_status:power/<50%/orange&normal
  * Line 211: 'hilite_status' is not supported.

 OPTIONS=hilite_status:power/<33%/red&bold
  * Line 212: 'hilite_status' is not supported.

 OPTIONS=hilite_status:cap/burdened/yellow/stressed/orange/strained/red&bold/ove
 rtaxed/red&inverse/overloaded/red&inverse&blink
  * Line 215: 'hilite_status' is not supported.

 OPTIONS=hilite_status:hunger/satiated/yellow/hungry/orange/weak/red&bold/fainti
 ng/red&inverse/fainted/red&inverse&blink
  * Line 218: 'hilite_status' is not supported.
 Hit <Enter> to continue.

6 years agobuild fix when STATUS_HILITES is not defined
nhmall [Sun, 25 Nov 2018 02:41:22 +0000 (21:41 -0500)]
build fix when STATUS_HILITES is not defined

6 years agofix github pull request #161 - scatter()
PatR [Sat, 24 Nov 2018 23:22:33 +0000 (15:22 -0800)]
fix github pull request #161 - scatter()

Fixes #161

Report states that scattering objects might leave a 'pile' glyph when
no longer appropriate.  I didn't try to reproduce that, just took it
on faith.  The fix tried to be too efficient and might have missed
fixing the display if breaks() or ohitmon() destroyed the objects
being scattered and left 'total' at 0.

6 years agofix #H7596 - magic trap 'deafening roar' outcome
PatR [Sat, 24 Nov 2018 23:01:30 +0000 (15:01 -0800)]
fix #H7596 - magic trap 'deafening roar' outcome

doesn't wake monsters.  Now it does.

6 years agofix #H7591 - migrating monsters vs full levels
PatR [Sat, 24 Nov 2018 09:45:09 +0000 (01:45 -0800)]
fix #H7591 - migrating monsters vs full levels

During level change, when a monster from mydogs (monsters accompaying
hero, usually pets) couldn't be placed because the level was full, it
was set to migrate to that level (in order to get another chance to
arrive if hero left and returned).  The code sequence
 mon_arrive()-> mnexto()-> m_into_limbo()-> migrate_to_level()-> relmon()
tried to remove the monster from the map, but it wasn't necessarily on
the map (depending upon whether it couldn't arrive at all, or arrived
at the hero's spot and couldn't be moved out of the hero's way).  The
EXTRA_SANITY_CHECKS for remove_monster() issued impossible "no monster
to remove".  relmon() now checks whether monster is already off the map.

While investigating that, I discovered that pets set to re-migrate
to the same level to try again on hero's next visit didn't work at all.
migrating_mons gets processed after mydogs so moving something from
the latter to the former after arrival failure just resulted in
immediate second failure when the more general list was handled during
the hero's current arrival.  And failure to arrive from migrating_mons
would kill the monster instead of scheduling another attempt.

The sanest fix for that turned out to be to have all monsters who
can't arrive be put back on the migrating_mons list to try again upon
hero's next visit.  Pets still fail twice but are no longer discarded
during the second time, and now do arrive when hero leaves and comes
back provided he or she has opened up some space before leaving.  If
there's still no space on the next visit, monsters who can't arrive
then are scheduled to try again on the visit after that.

Recent fix for invalid corpses becomes moot.  Monsters aren't killed
during arrival failure so there are no resulting corpses to deal with.

6 years agoRevert "Revert "Send travis notification mails to mailing list""
Patric Mueller [Sat, 24 Nov 2018 09:07:38 +0000 (10:07 +0100)]
Revert "Revert "Send travis notification mails to mailing list""

This reverts commit 8edaa021d5a64ca9eb6896d7e0e929dc62682b34.

6 years agoRevert "Send travis notification mails to mailing list"
nhmall [Sat, 24 Nov 2018 03:17:40 +0000 (22:17 -0500)]
Revert "Send travis notification mails to mailing list"

This reverts commit d60097b2868d1f7403ddaa10d48d3be59bc7c1bb.

6 years agoRevert "Removed unnecessary use of static for nocreate values."
nhmall [Sat, 24 Nov 2018 03:17:38 +0000 (22:17 -0500)]
Revert "Removed unnecessary use of static for nocreate values."

This reverts commit 74fc1403e308fef55768ab44e72f6a8074cc3458.

6 years agoRevert "Modified how we initialize save file info."
nhmall [Sat, 24 Nov 2018 03:17:35 +0000 (22:17 -0500)]
Revert "Modified how we initialize save file info."

This reverts commit 44b002c9f3dbaea045fa83affb488adfb2a597e1.