]> granicus.if.org Git - nethack/log
nethack
2 years agopaste error
nhmall [Tue, 28 Feb 2023 05:09:37 +0000 (00:09 -0500)]
paste error

2 years agoreturn correct ALT-key sequences with PDCurses
nhmall [Tue, 28 Feb 2023 05:05:04 +0000 (00:05 -0500)]
return correct ALT-key sequences with PDCurses

They weren't working at all because the values of ALT_A through ALT_Z
were out of the normal char range with PDCurses, and caught by the default
case in the switch, where reject got set.

/* use key as-is unless it's out of normal char range */
        reject = ((uchar) ret < 1 || ret > 255);

2 years agomore macOS.370 macro usage
nhmall [Mon, 27 Feb 2023 16:47:09 +0000 (11:47 -0500)]
more macOS.370 macro usage

2 years agofix a 'make bundle' error
nhmall [Mon, 27 Feb 2023 16:08:51 +0000 (11:08 -0500)]
fix a 'make bundle' error

make[1]: *** No rule to make target `../util/uudecode', needed by `/Users/testuser/nethack/NHsource/bundle/NetHackTerm.app/Contents/Resources/NetHackTerm.icns'.  Stop.
make: *** [bundle] Error 2

2 years agoStart using 3 part version numbers.
nhkeni [Mon, 27 Feb 2023 15:18:14 +0000 (10:18 -0500)]
Start using 3 part version numbers.

2 years agoremove an unused, incorrectly-spelled soundeffect
nhmall [Sun, 26 Feb 2023 20:44:04 +0000 (15:44 -0500)]
remove an unused, incorrectly-spelled soundeffect

2 years agofollow-up for seffects.h
nhmall [Sun, 26 Feb 2023 14:46:45 +0000 (09:46 -0500)]
follow-up for seffects.h

Make it emit nothing without one of the expected #defines.

2 years agoRevert "update Makefile.nmake"
nhmall [Sun, 26 Feb 2023 14:42:35 +0000 (09:42 -0500)]
Revert "update Makefile.nmake"

This reverts commit 8c7922635edacea230b55176a90162f7e7db7189.

2 years agopull request #973 - antagonostic undecagonstring
PatR [Sun, 26 Feb 2023 07:55:22 +0000 (23:55 -0800)]
pull request #973 - antagonostic undecagonstring

Pull request from Kufat:  add new hallucinatory monster from Iain
M. Banks' _The_Culture_ book series:  "antagonistic undecagonstring".

I was a bit concerned about the length, but it is quite a bit
shorter than the longest entry:  "one-eyed one-horned flying purple
people eater".

Closes #973

2 years agoBogusmon from The Culture (Iain M. Banks)
Kufat [Mon, 6 Feb 2023 02:57:09 +0000 (21:57 -0500)]
Bogusmon from The Culture (Iain M. Banks)

Add the antagonistic undecagonstring from The Hydrogen Sonata as a hallucinatory monster.

2 years agoThis is cron-daily v1-May-8-2022. 000files updated: Files
nhw_cron [Sat, 25 Feb 2023 21:24:08 +0000 (16:24 -0500)]
This is cron-daily v1-May-8-2022.  000files updated: Files

2 years agoupdate Makefile.nmake
nhmall [Sat, 25 Feb 2023 21:28:58 +0000 (16:28 -0500)]
update Makefile.nmake

2 years agoupdate Xcode project
nhmall [Sat, 25 Feb 2023 21:20:10 +0000 (16:20 -0500)]
update Xcode project

2 years agonew file include/seffects.h
nhmall [Sat, 25 Feb 2023 21:07:29 +0000 (16:07 -0500)]
new file include/seffects.h

2 years agoremove a maintenance/synchronization requirement
nhmall [Sat, 25 Feb 2023 21:05:27 +0000 (16:05 -0500)]
remove a maintenance/synchronization requirement

adds a file include/seffects.h

2 years agoadd a comment to include/sndprocs.h
nhmall [Sat, 25 Feb 2023 19:51:59 +0000 (14:51 -0500)]
add a comment to include/sndprocs.h

2 years agoadd comment prior to soundeffect_automapping table
nhmall [Sat, 25 Feb 2023 19:38:53 +0000 (14:38 -0500)]
add comment prior to soundeffect_automapping table

2 years agoinclude the two new sounds to list of sought files
nhmall [Sat, 25 Feb 2023 19:26:15 +0000 (14:26 -0500)]
include the two new sounds to list of sought files

2 years agoLua: Traps without victims
Pasi Kallinen [Sat, 25 Feb 2023 15:56:44 +0000 (17:56 +0200)]
Lua: Traps without victims

Traps may get corpses generated on them on early dungeon levels,
to warn off fragile starting heroes. Allow creating traps in lua
without the corpse.

2 years agofix #H2694 - egg hatching feedback
PatR [Sat, 25 Feb 2023 15:02:19 +0000 (07:02 -0800)]
fix #H2694 - egg hatching feedback

A bug report from ten and half years ago...
If a carried egg hatches, the message is
|<foo> drops from your pack.
and if tame, is followed by
|Its cries sound like {mommy,daddy}.
The latter was issued even when <foo> has no speech capability.

Replace "its cries sound like" with "its <vocalize>ing sounds like"
for suitable value of <vocalize>.

This adds two new monster sounds, MS_BELLOW and MS_CHIRP, also two
new sound effect codes, se_chirp and se_croc_bellow.

We had MS_SILENT for crocodile.  On wikipedia, crocodile is described
as the most vocal reptile.  Adult males make a load bellowing noise
and hatchlings make a chirping noise.

This changes crocodile, titanothere, and baluchitherium from MS_SILENT
to MS_BELLOW and baby crocodile from MS_SILENT to MS_CHIRP.  Chirp
might be appropriate for lizards and lizard-like amphibians but I've
left those as MS_SILENT.

[Noticed but not changed:  lizards and lizard-like amphibians aren't
flagged as oviparous.  Shouldn't they be?]

2 years agoMakefile.mingw32 placement
nhmall [Fri, 24 Feb 2023 22:45:02 +0000 (17:45 -0500)]
Makefile.mingw32 placement

2 years agoWindows: add lua files dependency
nhmall [Fri, 24 Feb 2023 22:40:35 +0000 (17:40 -0500)]
Windows: add lua files dependency

2 years agoaddress github issue #987 - curses: arrow keys
PatR [Thu, 23 Feb 2023 22:02:28 +0000 (14:02 -0800)]
address github issue #987 - curses: arrow keys

Issue reported by jeremyhetzler:  left and right arrows produced
unexpected characters when trying to use them to edit text that is
being entered.

The curses interface converts arrow keys and function keys related
to the keypad into movement keys (hjkl or 4286 depending on the
number_pad setting).  But it was doing that all the time, not just
when nethack wanted movement keys.  This extends the existing
program_state.getting_a_command flag to getdir() so that it can be
used for controlling that in addition to 'altmeta' support.

Typing an arrow when interacting with the map (actual command or
getpos, now getdir too) will still work.  Typing one when making a
wish or naming a pet will issue a beep and be treated as if '\0' had
been typed, and that normally gets treated as if ESC had been typed.
[Possible room for improvement there.  Losing the whole text when
trying to back up a character feels a bit harsh.]

Treating left arrow as escape rather than as h or 4 will probably be
enough to train players not to try to edit text with it after they
get burned by that a time or two.

Bonus fix:  curses' keystroke conversion only supported traditional
number_pad behavior, not the inverted phone number pad layout.

Closes #987

2 years agoLava walls vs cold rays
Pasi Kallinen [Wed, 22 Feb 2023 09:55:18 +0000 (11:55 +0200)]
Lava walls vs cold rays

Lava walls have a small chance of turning into solid stone wall
when hit by a cold ray. Before this they turned to floor, which
was obviously wrong.

2 years agoupdate tested versions of Visual Studio 2023-02-21
nhmall [Wed, 22 Feb 2023 04:51:02 +0000 (23:51 -0500)]
update tested versions of Visual Studio 2023-02-21

2 years agoGuidebook update
nhmall [Wed, 22 Feb 2023 04:03:19 +0000 (23:03 -0500)]
Guidebook update

2 years agoremove some macgraphics references; some Amiga
nhmall [Wed, 22 Feb 2023 03:54:56 +0000 (22:54 -0500)]
remove some macgraphics references; some Amiga

Also closes #183

2 years agotty_display_file()
PatR [Tue, 21 Feb 2023 22:00:31 +0000 (14:00 -0800)]
tty_display_file()

For the !defined(DEF_PAGER) config, if the file to be displayed
can't be opened, refresh the screen after complaining about that
rather than when no complaint is issued.

2 years agonon-Unix sysconf updates
PatR [Tue, 21 Feb 2023 19:15:08 +0000 (11:15 -0800)]
non-Unix sysconf updates

For non-Unix systems, disable the "description of NetHack's command
line" entry in the help command's menu.

2 years agopaste error in read.c
nhmall [Tue, 21 Feb 2023 16:52:36 +0000 (11:52 -0500)]
paste error in read.c

2 years agoRemove extra backslash from EOL
Pasi Kallinen [Tue, 21 Feb 2023 15:34:06 +0000 (17:34 +0200)]
Remove extra backslash from EOL

2 years agoLava walls cover objects
Pasi Kallinen [Tue, 21 Feb 2023 14:52:22 +0000 (16:52 +0200)]
Lava walls cover objects

Items landing into a wall of lava are covered up by it.
Kicking behaves the same as wall of water: splashes,
but doesn't move the item.

2 years agofixes entry for PR #978 - suppress monster's name
PatR [Mon, 20 Feb 2023 21:04:44 +0000 (13:04 -0800)]
fixes entry for PR #978 - suppress monster's name

for <new form> portion of messages "<old form> turns into <new form>"
to avoid named vampires yielding "Dracula turns into Dracula".

Pull request from entrez:  a couple of engulf messages used regular
monster naming for vamp-shifters transforming rather than dying.
3.6.1 had fixes for this for basic monster death but didn't handle
engulfing.

Fixes #978

2 years agoAvoid "It turns into [Name]" on vamp engulf
Michael Meyer [Fri, 10 Feb 2023 19:07:49 +0000 (14:07 -0500)]
Avoid "It turns into [Name]" on vamp engulf

Apply a similar fix as a791b4b and f441696 ended up settling on for
normal vampire transformation to the vampire transformation that happens
when their shapeshifted form is engulfed.

2 years agofix #K3863 - replace 'for (int i=0;...' in core
PatR [Mon, 20 Feb 2023 20:22:14 +0000 (12:22 -0800)]
fix #K3863 - replace 'for (int i=0;...' in core

The Makefiles and some of the hints have already been updated to
specify that C99 is required in response to #K3863.  The code was
evidently being compiled in the default mode of an old version of
gcc and that mode complained that C99 was required to specify a
declaration in the initializer clause of a
'for(initialize;test;update)statement'.  Other C99 features used
by nethack were apparently accepted as extensions in the default
conformance mode.

There's only one such declaration in the core code so replace it
with a separate declaration and ordinary 'for' loop.

win/Qt/{lots}.cpp and win/win32/{few}.c have these declarations but
the core didn't.

2 years agofix issue in Guidebook.tex
nhmall [Mon, 20 Feb 2023 02:40:52 +0000 (21:40 -0500)]
fix issue in Guidebook.tex

2 years agofix recover on Linux
nhmall [Sun, 19 Feb 2023 20:06:55 +0000 (15:06 -0500)]
fix recover on Linux

Also, recover should be a target-side utility, not host. That
really only makes a difference if you are cross-compiling.

2 years ago[un]compress wait() feedback
PatR [Sun, 19 Feb 2023 19:18:56 +0000 (11:18 -0800)]
[un]compress wait() feedback

At some point this may need to be commented out, but for the time
being report failure by wait() during the fork()+exec()+wait()
sequence when compressing or uncompressing a save file.

For the benefit of 'git log':  uncompressing an old save file or
compressing a new one fails when running nethack under control of
gdb (GNU Project's debugger) on OSX.  Noticed and reproducible on
OSX 10.11.6; no idea about more recent versions.  wait() returns -1
and sets errno to 4, "interrupted system call", and leaves the
variable that receives the child process's exit status as is.
NetHack has been relying on that exit status variable without
checking whether wait() returns success or failure.

This changes nethack's behavior when wait() fails.  It is now
intentionally failing compress/uncompress (by init'ing the status
to 1) after it was briefly treated as success (due to a recent
commit that set status to 0 before calling wait()), after a long
time of accidentally failing due to not setting varible 'i' (was 2
after being used for another purpose).  In addition to initializing
to failure prior to calling wait(), replace use of 'i' with a new
variable that is only used for this, possibly making the code more
comprehensible.

By the way, the issue with compress and uncompress failure when
running under control of gdb on OSX is not new.  I don't use gdb
a lot and have gotten tired of rediscovering this misbehavior.

2 years agoGuidebook update
nhmall [Sun, 19 Feb 2023 15:52:56 +0000 (10:52 -0500)]
Guidebook update

2 years agoTips and option to disable them
Pasi Kallinen [Sun, 19 Feb 2023 13:44:29 +0000 (15:44 +0200)]
Tips and option to disable them

Adds a more general way to handle gameplay tips, and adds
a boolean option "tips", which can be used to disable all
tips.  Adds a helpful longer message when the game goes
into the "farlook" mode.

Also adds a lua binding to easily show multi-line text
in a menu window.

Breaks save compat.

2 years agoreverse main bit of 'build fix: COMPRESS_OPTIONS'
PatR [Sun, 19 Feb 2023 02:03:21 +0000 (18:03 -0800)]
reverse main bit of 'build fix: COMPRESS_OPTIONS'

I realized that I put opts[] inside a block that would go out of
scope while it was still needed.  When I went to fix that, I
discovered that it is already present where it ought to be.  My
'experimentation' should have defined COMPRESS_OPTIONS sooner so
that the outer scope would see it.

This doesn't revert the previous commit because a couple of comments
and a bit of reformatting from it are still useful.

2 years agobuild fix: COMPRESS_OPTIONS
PatR [Sun, 19 Feb 2023 01:32:26 +0000 (17:32 -0800)]
build fix: COMPRESS_OPTIONS

While experimenting I tried defining COMPRESS_OPTIONS and files.c
would no longer compile.  Evidently nobody has been using that.

2 years agoexpand C99=1 with macOS.370 and linux.370 hints
nhmall [Sat, 18 Feb 2023 16:35:40 +0000 (11:35 -0500)]
expand C99=1 with macOS.370 and linux.370 hints

In addition to C99=1 on the make command line, also allow
C89=1 or C11=1 or C23=1.

NOTE: Those won't all lead to a successful build of NetHack,
and the use of C23=1 (-std=c2x) will only be valid on recent
compiler versions (clang-15, for one, accepts it).

2 years agoCross-compiling update
nhmall [Sat, 18 Feb 2023 05:55:01 +0000 (00:55 -0500)]
Cross-compiling update

2 years agopyrolisk feedback
PatR [Fri, 17 Feb 2023 22:40:26 +0000 (14:40 -0800)]
pyrolisk feedback

From a report 9 years ago, a pet pyrolisk was repeatedly gazing at a
grey-elf and nothing happened.  It turned out that the elf was wearing
an elven cloak which was negating damage some of the time (most of the
time back then) but with no indication that that's what was happening.

This makes many types of damage that are negated by MC say so.
Probably other types of damage should do likewise.

2 years ago fix a warning on Linux for X11 if -std=c99
nhmall [Fri, 17 Feb 2023 21:56:27 +0000 (16:56 -0500)]
 fix a warning on Linux for X11 if -std=c99

2 years agoAddress github issue #983 - getpos valid locations
PatR [Fri, 17 Feb 2023 20:21:54 +0000 (12:21 -0800)]
Address github issue #983 - getpos valid locations

Issue reported by entrez:  when getpos() is being used to have the
player pick a map location, if player types '$' (for some operations
like jumping or applying a polearm) then valid spots are highlighted
but the highlighting obscures what was shown on the map.  I'm not
sure whether this 'fixes' the issue but it's probably good enough.
Allow typing another '$' to toggle the highlighting back off,
redisplaying the map in the process, without needing to move the
cursor or type ^R to accomplish that.  Toggling seems more intuitive.

This is a lot more complicated than it needs to be because I assumed
that the background aspect of highlighting stayed visible when the
glyphs were reverted.  It doesn't work that way but I haven't thrown
out the effort to make toggling the highlights work sanely.  Prior
to this, typing '$' again just redrew the highlighting again, with
no visible effect.

Closes #983

2 years agoallow setting the standard
nhmall [Fri, 17 Feb 2023 15:23:40 +0000 (10:23 -0500)]
allow setting the standard

CSTD can be manually set near the top of src/Makefile, util/Makefile
or by including c99=1 or C99=1 on the build make command line if
using the linux.370 or macOS.370 hints files.

2 years agoThis is cron-daily v1-May-8-2022. 000files updated: Files
nhw_cron [Fri, 17 Feb 2023 08:24:08 +0000 (03:24 -0500)]
This is cron-daily v1-May-8-2022.  000files updated: Files

2 years ago3.7: add doc/fixes36.7 as doc/fixes3-6-7.txt
PatR [Fri, 17 Feb 2023 07:43:37 +0000 (23:43 -0800)]
3.7: add doc/fixes36.7 as doc/fixes3-6-7.txt

2 years agoupdate patchlevel.h with NetHack 3.6.7 release info
nhmall [Fri, 17 Feb 2023 02:06:06 +0000 (21:06 -0500)]
update patchlevel.h with NetHack 3.6.7 release info

2 years agoGuidebook update
nhmall [Fri, 17 Feb 2023 01:56:33 +0000 (20:56 -0500)]
Guidebook update

2 years agoMerge branch 'naming-overflow-fix2' into NetHack-3.7
nhmall [Thu, 16 Feb 2023 23:52:47 +0000 (18:52 -0500)]
Merge branch 'naming-overflow-fix2' into NetHack-3.7

2 years agoFix angering monsters with non-hero magic rays
Pasi Kallinen [Wed, 15 Feb 2023 09:24:01 +0000 (11:24 +0200)]
Fix angering monsters with non-hero magic rays

Can't use gc.context.mon_moving to check if the ray was caused
by hero, as some rays can happen while hero is moving in response
to their action - for example a bolt of lightning from a god.
dobuzz() uses positive type values for magic rays caused by hero,
so just use that.

2 years agoDon't anger target via mon vs mon zap/breath
Michael Meyer [Mon, 13 Feb 2023 22:11:07 +0000 (17:11 -0500)]
Don't anger target via mon vs mon zap/breath

dobuzz() was modified in 677b32c2a7 to anger the target, but beams
handled by dobuzz() don't necessarily originate from the hero.  Monsters
can zap wands that hit other monsters, dragons can use their breath
attacks, etc.  Those things were causing the targets to become angry at
the hero.

2 years agoFix: message when pet moves from water to eat
Michael Meyer [Mon, 13 Feb 2023 19:21:44 +0000 (14:21 -0500)]
Fix: message when pet moves from water to eat

The <x,y> params of dog_eat are the pet's starting position that turn,
not necessarily the position of the object being eaten.  If the pet is
doing a combined move-and-eat action, <x,y> will be its original spot,
but it will have already moved to <mtmp->mx,mtmp->my>, where the food
object also is.

The attempt to check whether the eating was happening out-of-sight
underwater (to suppress the message in that case) was checking the pet's
starting location, not its new location/the location of the food object.
So if a pet moved from water to land to eat something, the chowing-down
message would be improperly suppressed (and presumably the message for a
pet moving from land to water to eat would be improperly left
_un_suppressed, though I didn't actually try to reproduce that).

2 years agosplit kicking a door into a separate function
SHIRAKATA Kentaro [Fri, 27 Jan 2023 16:22:14 +0000 (01:22 +0900)]
split kicking a door into a separate function

2 years agoFix: Change gradient math to avoid isqrt
copperwater [Fri, 10 Feb 2023 22:23:32 +0000 (17:23 -0500)]
Fix: Change gradient math to avoid isqrt

isqrt adds some noticeable distortion artifacts to gradients (test case
I used is to draw a line from 10,10 to 20,15 with mindist = maxdist = 2
and see how the gradient is biased towards the upper right); changing
the distance calculations to use the square of the distance rather than
the raw distance avoids this. This makes radial gradients more radial,
and square gradients more square.

There still appears to be a bit of bias, but I think this is due to the
line algorithm not lining up perfectly with the tiles.

2 years agoInvert the behavior of selection.gradient
copperwater [Fri, 10 Feb 2023 12:38:22 +0000 (07:38 -0500)]
Invert the behavior of selection.gradient

selection.gradient has some pretty unintuitive behavior, in that it
selects points that are NOT close to the defined center. I've used
gradient selections several times and so far all of them have had to be
negated, because I wanted to select points close to the center with a
decreasing probability further out.

This implements that behavior, and also fixes a bug in which the x,y
coordinates of the gradient center(s) were not converted properly when
used within a des.room or des.map. Also updated the lua documentation
for gradient.

I removed the "limited" argument, as it was previously used to control
whether the rest of the map outside the max given distance would be
included in the selection; now that the area beyond maxdist is naturally
never in the selection, it doesn't have much use. (And I can't think of
a reasonable use case for the inverse: wanting to select points close to
the center, with decreasing chance towards maxdist, but then select the
entire map beyond maxdist.)

Currently this does not affect any special levels or themed rooms
because none of them use selection.gradient.

2 years agomore bundle work for macOS
nhmall [Sun, 12 Feb 2023 06:19:05 +0000 (01:19 -0500)]
more bundle work for macOS

This iteration:

Places the resulting bundle folder off the top of the tree, rather than as a subdirectory of src.

Leaves the Applescript files out for now.

Builds the Info.plist (for now) via hard-coded values in the Makefile.

Builds the bundle launch script on the fly at make-time.

I think this revision may be working, at lease on my test machine.
There are more improvements to be done.

2 years agofixes entry for #genocided
PatR [Sat, 11 Feb 2023 19:49:12 +0000 (11:49 -0800)]
fixes entry for #genocided

2 years agoadd #genocided command
PatR [Sat, 11 Feb 2023 19:35:06 +0000 (11:35 -0800)]
add #genocided command

Comparable to #vanquished, be able to view info normally available
during end of game disclosure while the game is still in progress.
The new #genocided command lists all genocided and extincted types
of monsters.  Unlike #vanquished, there aren't any sorting choices.

Potential future enhancement:  provide a way to view the genocided
list at the "what do you want to genocide?" prompt.

2 years agoMakefile management
PatR [Sat, 11 Feb 2023 00:42:01 +0000 (16:42 -0800)]
Makefile management

Have 'make clean' and 'make spotless' in 3.7 cleanup include/tile.h
from 3.6.  Otherwise use of 'cc -I../include -I../win/share' in
util/Makefile will get 3.6's include/tile.h instead of 3.7's
win/share/tile.h; use of FDECL() causes the old header to break when
used in various tiles utilities.

2 years agoX11_hangup()
PatR [Fri, 10 Feb 2023 23:19:13 +0000 (15:19 -0800)]
X11_hangup()

I was looking at backporting an X11 build fix to 3.6 and decided
that the hangup handling wasn't correct if SAFERHANGUP is defined
(which it is by default).  It didn't attempt to perform a hangup
save.  Also, the handler might return when the X code calling it
expected it to not do so.

I don't know how to force a hangup within X11 so haven't tested
this properly.  It works fine when there's no hangup.  :-/

2 years agomissed one, there were two
nhmall [Fri, 10 Feb 2023 19:28:27 +0000 (14:28 -0500)]
missed one, there were two

2 years agoprevent a static analyzer warning
nhmall [Fri, 10 Feb 2023 13:56:06 +0000 (08:56 -0500)]
prevent a static analyzer warning

2 years agomore work on bundle and starting from Finder
nhmall [Fri, 10 Feb 2023 06:55:49 +0000 (01:55 -0500)]
more work on bundle and starting from Finder

2 years agoThis is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt
nhw_cron [Fri, 10 Feb 2023 01:24:09 +0000 (20:24 -0500)]
This is cron-daily v1-May-8-2022.  005guidebook updated: doc/Guidebook.txt

2 years agoMerge branch 'pr977' into NetHack-3.7
nhmall [Fri, 10 Feb 2023 01:08:39 +0000 (20:08 -0500)]
Merge branch 'pr977' into NetHack-3.7

2 years agoSet up *roff hyphenation more carefully.
G. Branden Robinson [Thu, 9 Feb 2023 23:44:52 +0000 (17:44 -0600)]
Set up *roff hyphenation more carefully.

* doc/Guidebook.mn: Remove workaround, in favor of...
* doc/tmac.n: ...setting automatic hyphenation mode appropriate to
  hyphenation systems used by AT&T-descended troffs on the one hand
  ("suftab") and groff (TeX hyphenation patterns) on the other.

modify results of pull request #977 to target tmac.nh instead.

Guidebook update to trigger the process following pull request 977.

2 years agopull request #976 - D of AP
PatR [Thu, 9 Feb 2023 23:48:45 +0000 (15:48 -0800)]
pull request #976 - D of AP

Pull request from entrez:  combining just-picked-up (P) with explicit
accept without confirmation (A) for multi-drop (D) ignored the
just-picked-up part and dropped everything.

Affects menustyle:Full.  For menustyle:Traditional, 'A' operates very
differently and combining 'a' with 'P' or vice versa already does the
right thing.

Closes #976

2 years agoFix: 'A'+'P' regression when dropping by type
Michael Meyer [Thu, 9 Feb 2023 19:40:52 +0000 (14:40 -0500)]
Fix: 'A'+'P' regression when dropping by type

Selecting both 'P' (the just-picked-up items category) and 'A' (the
'auto-select relevant items' flag) when dropping items by type with 'D'
was automatically dropping every item in inventory instead of only items
that were marked as just having been picked up.  Basically, it was
causing 'A' to act like it did before b65c93c amended its functionality.

This commit is more-or-less identical to 991e739, both in terms of the
problem and the fix, except that it applies to dropping items instead of
looting.

2 years agopull request #975 - maybe_unhide_at()
PatR [Thu, 9 Feb 2023 23:31:41 +0000 (15:31 -0800)]
pull request #975 - maybe_unhide_at()

Pull request from entrez:  mayby_unhide_at() operating on the hero
rather than on a monster was buggy because it was looking at the wrong
fields when checking for being hidden (recently fixed) and for being
trapped (fixed here) because those are tracked by fields in 'u' rather
than in 'youmonst'.

Closes #975

2 years agoTweak maybe_unhide_at() a bit more
Michael Meyer [Thu, 9 Feb 2023 16:38:59 +0000 (11:38 -0500)]
Tweak maybe_unhide_at() a bit more

A monster may be unhidden if it's caught in a trap, but maybe_unhide_at
was checking mtmp->mtrapped across the board, which wouldn't work for
the hero.  Use u.utrap instead under those circumstances.  Also refactor
a bit so it shouldn't need the repeated guards against mtmp being null.

2 years agoupdated to Makefile bundling
nhmall [Thu, 9 Feb 2023 20:25:42 +0000 (15:25 -0500)]
updated to Makefile bundling

2 years agowintty.c and cursstat.c formatting bits
PatR [Thu, 9 Feb 2023 18:48:04 +0000 (10:48 -0800)]
wintty.c and cursstat.c formatting bits

Apply another old stashed commit.

2 years agoeliminate some Xcode warnings on macsound.m
nhmall [Thu, 9 Feb 2023 17:10:22 +0000 (12:10 -0500)]
eliminate some Xcode warnings on macsound.m

2 years agoFix the part I forgot
Pasi Kallinen [Thu, 9 Feb 2023 06:33:32 +0000 (08:33 +0200)]
Fix the part I forgot

2 years agomore follow-up
nhmall [Wed, 8 Feb 2023 23:12:15 +0000 (18:12 -0500)]
more follow-up

2 years agocorrect a typo
nhmall [Wed, 8 Feb 2023 22:48:26 +0000 (17:48 -0500)]
correct a typo

2 years agoadd new macOS target 'bundle'
nhmall [Wed, 8 Feb 2023 22:17:43 +0000 (17:17 -0500)]
add new macOS target 'bundle'

This creates a new target 'bundle' for make on macOS, when using
sys/hints/macOS.370.

The 'bundle' recipe:
    - creates a subdirectory of src called 'bundle', and creates
      a bundle (nethack.app/ etc) below that.
    - the executable that is placed inside the bundle
      (bundle/nethack.app/Contents/MacOS/nethack) will find resources
      within the bundle, including the sounds, so a manual placement
      of the sounds into your '~/Library/Sounds' is no longer
      required when using the executable that's inside the bundle.
    - the sounds are included in the bundle if a soundlib option is
      chose at build time (for example 'make WANT_MACSOUND=1'), such
      that the bundled executable supports sounds.
    - the executable inside the bundle seems to find the resources
      it needs, even if invoked through a symlink elsewhere that points
      to the executable that's inside the bundle (only limited testing of that
      has been done).
    - at some point, its probably appropriate to add a
      'mv bundle/nethack.app <proper location>', possibly under
      a subsequent 'make install' step.
    - right now, the bundle step has a dependency on 'update'. I don't
      know if that's the right ordering or not, yet.

make WANT_MACSOUND=1 update
make WANT_MACSOUND=1 bundle

or, you can probably get away with:

make WANT_MACSOUND=1 bundle

if the nethack bundle is the goal anyway.

make clean
will clear the bundle subdirectory and everything below it.

2 years agomread() in restore.c
PatR [Wed, 8 Feb 2023 20:59:47 +0000 (12:59 -0800)]
mread() in restore.c

Update and apply an old stashed commit:  hide the casts in calls to
mread() made in restore.c.  Some split lines get recombined and there
is less clutter when reading the code.

2 years agoUnix Makefiles
PatR [Wed, 8 Feb 2023 19:38:47 +0000 (11:38 -0800)]
Unix Makefiles

Move building uudecode for unpacking .Wav files from Makefile.dat to
Makefile.utl and add uudecode to util's 'make spotless'.

2 years agosuppress one more warning
nhmall [Wed, 8 Feb 2023 18:07:37 +0000 (13:07 -0500)]
suppress one more warning

2 years agosuppress some warnings if SND_SPEECH is not defined
nhmall [Wed, 8 Feb 2023 17:44:14 +0000 (12:44 -0500)]
suppress some warnings if SND_SPEECH is not defined

apply.c:1413:27: warning: unused variable 'shkp' [-Wunused-variable]
            struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE));
                          ^
apply.c:1570:27: warning: unused variable 'shkp' [-Wunused-variable]
            struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE));
                          ^
apply.c:1650:31: warning: unused variable 'shkp' [-Wunused-variable]
                struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE));
                              ^
apply.c:1697:23: warning: unused variable 'shkp' [-Wunused-variable]
        struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE));
                      ^
apply.c:2157:31: warning: unused variable 'shkp' [-Wunused-variable]
                struct monst *shkp = shop_keeper(*in_rooms(u.ux, u.uy, SHOPBASE));
                              ^
apply.c:2165:31: warning: unused variable 'shkp' [-Wunused-variable]
                struct monst *shkp = shop_keeper(*in_rooms(corpse->ox,

2 years agoFix hero unhiding
Pasi Kallinen [Wed, 8 Feb 2023 15:08:20 +0000 (17:08 +0200)]
Fix hero unhiding

maybe_unhide_at tried to handle both a monster and hero, but
hero being hidden is in u.uundetected flag, and the code was
only checking the monster mundetected field.

The code should probably be changed, either to change all uses
of the u.uundetected to gy.youmonster.mundetected, or perhaps
use a macro ... but these changes are all too big for me
to tackle for now.

2 years agofollow-up - Change the terminology in mO menu
nhmall [Wed, 8 Feb 2023 05:06:56 +0000 (00:06 -0500)]
follow-up - Change the terminology in mO menu

2 years agoOptions menu should indicate unavailability of voices
nhmall [Wed, 8 Feb 2023 04:41:12 +0000 (23:41 -0500)]
Options menu should indicate unavailability of voices

If SND_SPEECH is not defined (such as via Makefile WANT_SPEECH=1),
indicate so on the options menu.

2 years agotry work-around for Guidebook.txt nroff ver diffs
nhmall [Wed, 8 Feb 2023 02:40:36 +0000 (21:40 -0500)]
try work-around for Guidebook.txt nroff ver diffs

2 years agogeneric objects refinement
PatR [Wed, 8 Feb 2023 00:47:42 +0000 (16:47 -0800)]
generic objects refinement

Give generic objects a name as well as a description to avoid some
potential object formatting problems.  Also remove the 'unique' flag
from them to avoid confusion.  Not exhaustively tested.

2 years agoThis is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt
nhw_cron [Tue, 7 Feb 2023 20:24:09 +0000 (15:24 -0500)]
This is cron-daily v1-May-8-2022.  005guidebook updated: doc/Guidebook.txt

2 years agostill more shop shared wall
PatR [Tue, 7 Feb 2023 22:02:06 +0000 (14:02 -0800)]
still more shop shared wall

Neither my fix for #969 nor the followup by entrez dealt with this:
if you were in one shop and dug the wall it shared with another shop,
sometimes the shopkeeper for the room your were in would teleport to
you and demand payment--or attack if you lacked funds--other times the
one from the far room would do so.  For the latter, if you maneuvered
to the gap in the wall (possibly declining to die if angry shopkeeper
managed to kill you) you would get "this shop is deserted" (which is
accurate) but if you subsequently died there, you could get "Welcome
to so-and-so's shop" when the shopkeeper who abandoned her shop was
returned to occupancy after one of them took possession of invent.
And the welcome message might come from the shop that hadn't been
deserted and that you had never left.  (Perhaps always from that one;
I'm not sure.)

Possibly the shopkeeper for the room you're in should get priority
when demanding payment for repairs so that the other one won't
abandon the far shop, but I didn't attempt to tackle that.  This
just suppresses room entry messages when returning the shopkeeper to
her shop if the game is ending.

Not fixed, but amusing:  in one of the tests, the 'far' shopkeeper
who had teleported into the near shop to demand payment for the dug
wall picked up an item from the near shop (in the case I noticed, a
hardware store shk picked up a food ration; just an ordinary item
owned by the stop) while pursuing me to the wall gap.  One shk was
stealing from the other.  :-)

2 years agopull request #969 - dying in shared shop wall
PatR [Tue, 7 Feb 2023 21:49:44 +0000 (13:49 -0800)]
pull request #969 - dying in shared shop wall

Pull request by entrez, following up issue by k2:  when deciding
whether a shopkeeper should taken possession of dying heros invent,
check all rooms the hero is in rather than just the first.  Deals
with dying in a gap of a wall shared by two shops.

Original issue was about "place_object: <item> off map <0,0>" but
an earlier commit fixed that (I hope).  That commit had a typo in
the issue number and closed #965 (which was already closed) instead
of #969 (which this pull request reopened anyway).

Closes #969

2 years agoMore #969: handle shared walls in inherits()
Michael Meyer [Mon, 6 Feb 2023 18:41:55 +0000 (13:41 -0500)]
More #969: handle shared walls in inherits()

inherits() only examined the first item in u.ushops, so some shopkeepers
that should have had first dibs were ignoring the hero, one of the
causes of #969.  Examine the entire u.ushops array instead of just the
first item so that the hero's position within the shop will be correctly
identified (and do the same in set_repo_loc, though it's probably not
really necessary there).

2 years agoupdate GB
nhmall [Tue, 7 Feb 2023 19:38:07 +0000 (14:38 -0500)]
update GB

2 years agoAdd S_lavawall to Guidebook
Pasi Kallinen [Tue, 7 Feb 2023 19:32:18 +0000 (21:32 +0200)]
Add S_lavawall to Guidebook

2 years agofix macsound build error with certain combo of preprocess defines
nhmall [Tue, 7 Feb 2023 06:09:08 +0000 (01:09 -0500)]
fix macsound build error with certain combo of preprocess defines

2 years agoanother update to the soundlib interface
nhmall [Tue, 7 Feb 2023 05:44:36 +0000 (00:44 -0500)]
another update to the soundlib interface

sound_verbal(char *text, int32_t gender, int32_t tone, int32_t vol,
             int32_t moreinfo);
    -- NetHack will call this function when it wants to pass text of
       spoken language by a character or creature within the game.
    -- text is a transcript of what has been spoken.
    -- gender indicates MALE or FEMALE sounding voice.
    -- tone indicates the tone of the voice.
    -- vol is the volume (1% - 100%) for the sound.
    -- moreinfo is used to provide additional information to the soundlib.
    -- there may be some accessibility uses for this function.

It may be useful for accessibility purposes too.

A preliminary implementation has been attempted for macsound to test
the interface on macOS. No tinkering of the voices has been done.

Use of the test implementation requires the following at build time with make.
    WANT_SPEECH=1
That needs to be included on the make command line to enable the test code,
otherwise just the interface update is compiled in.

I don't know for certain when AVSpeechSynthesizer went into macOS, but older versions
likely don't support it, and would just leave off the WANT_SPEECH=1.

If built with WANT_SPEECH=1, the 'voices' NetHack option needs to be enabled.

It was a bit strange, when I first started up the test, to hear Asidonhopo,
the shopkeeper, talking to me as I entered his shop and interacted with him.

2 years agoPickaxing or whipping a liquid wall
Pasi Kallinen [Tue, 7 Feb 2023 05:36:51 +0000 (07:36 +0200)]
Pickaxing or whipping a liquid wall

2 years agotweaks to offering on other alignment's altar
PatR [Tue, 7 Feb 2023 00:24:03 +0000 (16:24 -0800)]
tweaks to offering on other alignment's altar

Mostly formatting, but also moves the call to the new routine.