]> granicus.if.org Git - nethack/log
nethack
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.

2 years agopull request #968 - offering on other alignment
PatR [Tue, 7 Feb 2023 00:05:59 +0000 (16:05 -0800)]
pull request #968 - offering on other alignment

Pull request from argrath:  split the code that handles offering
on an alter of another alignment out of dosacrifice() into its own
routine.

Closes #968

2 years agosplit offering to different alignment alter into a separate function
SHIRAKATA Kentaro [Sat, 28 Jan 2023 05:17:45 +0000 (14:17 +0900)]
split offering to different alignment alter into a separate function

2 years agofix github issue #972 - moving while trapped
PatR [Mon, 6 Feb 2023 23:50:39 +0000 (15:50 -0800)]
fix github issue #972 - moving while trapped

Reported by elunna:  a monster trapped in a pit or web that was
adjacent to a polymorph trap could enter that trap to change shape.
It would remain flagged as trapped but there's no way to escape
from a polymorph trap so it would be stuck.

Fix supplied by entrez:  when a monster is picking MUSE strategy,
don't allow it choose "enter polymorph trap" if it is currently
trapped.

I entered the changes from the diff manually and added a bunch of
minor formatting bits.

Fixes #972

2 years agoattempt to fix github issue #965 - place_object
PatR [Mon, 6 Feb 2023 19:47:37 +0000 (11:47 -0800)]
attempt to fix github issue #965 - place_object

Issue reported for a hardfought player by k2:  dying in a shop wall
produced "place_object: <item> [0] off map <0,0>" when hero's invent
was dropped.  It happened in Mine Town where multiple shopkeepers are
present and it is possible to have two shops share a wall.

I could not reprouce the problem, even after setting up--and dying
various times at a gap in--a wall shared by two shops.

paybill() -> inherits() -> set_repo_loc() sets up the destination
prior to disclosure and finish_paybill() -> drop_upon_death() later
places invent at the spot iff bones are going to he saved.  inherits()
is convoluted and evidently took at least one path that failed to
call set_repo_loc().  Change it to always call set_repo_loc() when
returning 'True' so that the destination should always be set if
really_done() calls finish_paybill().

Some followups by entrez are probably still useful.

Closes #965

2 years agoWalls of lava
Pasi Kallinen [Mon, 6 Feb 2023 17:23:39 +0000 (19:23 +0200)]
Walls of lava

Add "walls of lava", basically lava which blocks vision and
require a bit more than just levitation or flight to move through.

No levels use this yet, as testing isn't thorough enough.

2 years agoSplit itemaction key pushing to separate function
Pasi Kallinen [Sun, 5 Feb 2023 19:29:19 +0000 (21:29 +0200)]
Split itemaction key pushing to separate function

2 years agoSplit engulfer explosion message into separate function
Pasi Kallinen [Sun, 5 Feb 2023 18:26:52 +0000 (20:26 +0200)]
Split engulfer explosion message into separate function

2 years agomacsound: 2 params are UNUSED always
nhmall [Sun, 5 Feb 2023 16:53:19 +0000 (11:53 -0500)]
macsound: 2 params are UNUSED always

2 years agofixes3-7-0.txt update
nhmall [Sun, 5 Feb 2023 16:45:05 +0000 (11:45 -0500)]
fixes3-7-0.txt update

2 years agotypo fix in macsound.m
nhmall [Sun, 5 Feb 2023 16:41:59 +0000 (11:41 -0500)]
typo fix in macsound.m

2 years agoUnchanging and improvisations
nhmall [Sun, 5 Feb 2023 16:32:58 +0000 (11:32 -0500)]
Unchanging and improvisations

Adds a reveal.

Increments EDITLEVEL.

2 years agoupdate macsound to support 'volume' interface parameter
nhmall [Sun, 5 Feb 2023 16:32:12 +0000 (11:32 -0500)]
update macsound to support 'volume' interface parameter

2 years agoPrevent certain items from random erosion
Pasi Kallinen [Sun, 5 Feb 2023 14:46:49 +0000 (16:46 +0200)]
Prevent certain items from random erosion

Prevent wished for items (unless specified), artifacts,
armor and weapons of NPC heroes, and ammo from Longbow of Diana
being generated eroded.

2 years agoSplit peaceful responses into separate functions
Pasi Kallinen [Sun, 5 Feb 2023 06:24:34 +0000 (08:24 +0200)]
Split peaceful responses into separate functions

2 years agoFix: default lregion exclusion area occupied real space on the map
copperwater [Sat, 4 Feb 2023 20:21:23 +0000 (15:21 -0500)]
Fix: default lregion exclusion area occupied real space on the map

The intuitive behavior of des.levregion or des.teleport_region when
"exclude" is left unspecified is that there is no exclusion area.
However, this wasn't actually the case: since l_get_lregion defaulted
the exclusion area to (0,0,0,0) and exclude_islev to 0, this meant that
the 0,0 space on the map would always be excluded from regions. In cases
where a region was specified with its inclusion area constrained to the
0,0 space of the map, this would create a "Couldn't place lregion"
impossible message.

This fixes that issue by defaulting the exclusion area to (-1,-1,-1,-1),
and if the exclusion area is left unspecified, forces exclude_islev=1.
This means that the exclusion zone will be outside the walkable space of
the level where it can't cause any problems.

If a level designer puts negative coordinates in their inclusion or
exclusion parameters, this might not work correctly, but negative region
coordinates aren't currently used anywhere and probably shouldn't be
supported anyway.

2 years agoup/down level feedback
PatR [Sat, 4 Feb 2023 23:28:13 +0000 (15:28 -0800)]
up/down level feedback

With sounds on, using #levelchange to drop more than one level only
gave the level-loss sound effect once.  Level-gain sound was better
because the more verbose messaging triggered --More-- before moving
on.  Have both gain and loss use urgent_pline() in case messages
are being suppressed due to ESC, and have both request --More-- to
make the player acknowledge the message.  That has a side-effect of
letting the sound play to conclusion.

2 years agodepend.awk update
PatR [Sat, 4 Feb 2023 20:58:06 +0000 (12:58 -0800)]
depend.awk update

cppregex.cpp recently had `#include "extern.h"' added as the last
quoted include.  That gets set to "" while collecting dependencies,
then preceded by a space when output.  So the unexpected trailing
space was new and wasn't caused by a change of awk versions as I
was suspecting.  This removes it.

2 years agoThis is cron-daily v1-May-8-2022. 000files updated: Files
nhw_cron [Sat, 4 Feb 2023 20:24:09 +0000 (15:24 -0500)]
This is cron-daily v1-May-8-2022.  000files updated: Files

2 years agoenable achievement sounds in macsound
nhmall [Sat, 4 Feb 2023 20:37:17 +0000 (15:37 -0500)]
enable achievement sounds in macsound

Requires rebuild of your Makefiles via hints file (for new stock wav additions).

If you've been testing by copying the wav files manually to
~/Library/Sounds, you'll need to copy them again to pick up
the additional wav files.

2 years agostart to add some SOUND_TRIGGER_ACHIEVEMENTS code
nhmall [Sat, 4 Feb 2023 19:28:59 +0000 (14:28 -0500)]
start to add some SOUND_TRIGGER_ACHIEVEMENTS code

Start to add supporting code to windsound and macsound. The latter
remains commented out because I haven't had a chance to try
it on macOS yet.

In order to test it out, I added two more stock sounds:
sa2_xplevelup and sa2_xpleveldown.

2 years agoCeiling hiders on lava pools
Pasi Kallinen [Sat, 4 Feb 2023 17:39:25 +0000 (19:39 +0200)]
Ceiling hiders on lava pools

Lava pools are perfectly valid locations for ceiling hiders
if they're hiding there - aka hanging from the ceiling.

2 years agoFix segfault when farlooking monster under generic object
Pasi Kallinen [Sat, 4 Feb 2023 15:48:53 +0000 (17:48 +0200)]
Fix segfault when farlooking monster under generic object

A detected cave spider was hiding under a generic spellbook object;
farlooking at it produced a segfault.  OBJ_NAME is null for the generic
objects, so don't try to strcmp it.

2 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhkeni [Sat, 4 Feb 2023 14:51:44 +0000 (09:51 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

2 years agoleave a note on a potential future Lua sandbox issue
nhkeni [Sat, 4 Feb 2023 14:50:49 +0000 (09:50 -0500)]
leave a note on a potential future Lua sandbox issue

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

2 years agoGuidebook update
nhmall [Sat, 4 Feb 2023 13:52:47 +0000 (08:52 -0500)]
Guidebook update

2 years agoAdd chronicle and saveoptions to Guidebook
Pasi Kallinen [Sat, 4 Feb 2023 13:14:28 +0000 (15:14 +0200)]
Add chronicle and saveoptions to Guidebook

2 years agobreaking iron bars with weapon
PatR [Sat, 4 Feb 2023 01:01:49 +0000 (17:01 -0800)]
breaking iron bars with weapon

For strength over 18, A_CURR(A_STR) can return up to 125, giving
the chance to break bars by hitting them with a warhammer a 50:50
chance.  Switch to acurrstr() which returns at most 25.

Allow heavy iron balls (wielded or thrown, regardless of whether
they're chained to hero) to have a chance to break bars too.  They
are slightly more complicated because they don't use obj->spe like
a weapon but are otherwise straightfoward.

2 years ago3.7.x 'make depend'
PatR [Fri, 3 Feb 2023 23:48:46 +0000 (15:48 -0800)]
3.7.x 'make depend'

Makefile.src didn't know about 'sndprocs.h' yet.

Something weird is going on with 'make depend'.  It has started
adding a trailing space to
|$(TARGETPFX)cppregex.o: ../sys/share/cppregex.cpp $(CONFIG_H)
(actual trailing space omitted here).  It's repeatable.  I don't
understand it and have not tried to fix it, just removed the space
from the generated Makefile before putting into place as modified
Makefile.src and making this commit.

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

2 years agoGuidebook update
nhmall [Fri, 3 Feb 2023 21:50:38 +0000 (16:50 -0500)]
Guidebook update

2 years agodoc error for .nethackrc location on Windows
nhmall [Fri, 3 Feb 2023 21:45:32 +0000 (16:45 -0500)]
doc error for .nethackrc location on Windows

2 years agoCI not catching macOS sound-related warning/error
nhmall [Fri, 3 Feb 2023 20:33:47 +0000 (15:33 -0500)]
CI not catching macOS sound-related warning/error

Add WANT_MACSOUND=1 to the build so we get informed of warnings
and errors in any of the macsound-related files.

2 years agomac typo and some warnings
nhmall [Fri, 3 Feb 2023 20:12:42 +0000 (15:12 -0500)]
mac typo and some warnings

2 years agoanother follow-up: be consistent
nhmall [Fri, 3 Feb 2023 19:43:56 +0000 (14:43 -0500)]
another follow-up: be consistent

2 years agominor wording change
nhmall [Fri, 3 Feb 2023 19:40:58 +0000 (14:40 -0500)]
minor wording change

2 years agoupdated fixes3-7-0 with sound entries
nhmall [Fri, 3 Feb 2023 19:39:07 +0000 (14:39 -0500)]
updated fixes3-7-0 with sound entries

2 years agopaste error
nhmall [Fri, 3 Feb 2023 19:04:12 +0000 (14:04 -0500)]
paste error

2 years agofix #K3857 - hiding while trapped in a non-pit
PatR [Fri, 3 Feb 2023 18:45:59 +0000 (10:45 -0800)]
fix #K3857 - hiding while trapped in a non-pit

sanity_check feedback which occurred after using locking magic to
set off a bear trap at the location of a monster hiding under an
object.

Trivial bit: a recent change made stunning via knockback only occur
when not already stunned but was still adding the current stun time
to the new stun time even though current stun is now always zero.

Several formatting bits included.

2 years agofollow-up: a couple of documentation errors
nhmall [Fri, 3 Feb 2023 18:40:13 +0000 (13:40 -0500)]
follow-up: a couple of documentation errors

2 years agoupdate soundlib interface
nhmall [Fri, 3 Feb 2023 18:32:44 +0000 (13:32 -0500)]
update soundlib interface

Add SOUND_TRIGGER_AMBIENCE

2 years agoAdd some variation to minefill levels
Pasi Kallinen [Fri, 3 Feb 2023 17:03:43 +0000 (19:03 +0200)]
Add some variation to minefill levels

Randomize the number of objects and monsters a little bit,
they're still roughly the same as before.

2 years agoFix extern def
Pasi Kallinen [Fri, 3 Feb 2023 15:12:23 +0000 (17:12 +0200)]
Fix extern def

2 years agoFix punishment iron ball yanking hero on top of a monster
Pasi Kallinen [Fri, 3 Feb 2023 06:23:31 +0000 (08:23 +0200)]
Fix punishment iron ball yanking hero on top of a monster

When attached iron ball was in a pit (or a pool) with a monster,
and your levitation ended, you were put on top of the monster.

Add a sanity check for hero over monster.

2 years agoComment typofix
Pasi Kallinen [Thu, 2 Feb 2023 17:07:56 +0000 (19:07 +0200)]
Comment typofix

2 years agoFix ceiling hiders on pools
Pasi Kallinen [Thu, 2 Feb 2023 17:04:48 +0000 (19:04 +0200)]
Fix ceiling hiders on pools

While fuzzing, I saw a sanity checking error complaining about
a ceiling hider being on top of a pool; the rock piercer was
teleported on top of the pool while it was hiding in the ceiling.

Try to be a bit more consistent when a monster is hiding in ceiling,
and if it's valid for it to be on a pool.

2 years agoStun from knockback only if not already stunned
Pasi Kallinen [Thu, 2 Feb 2023 11:50:59 +0000 (13:50 +0200)]
Stun from knockback only if not already stunned

2 years agoMonsters never try to pick up ball or chain
Pasi Kallinen [Wed, 1 Feb 2023 19:38:26 +0000 (21:38 +0200)]
Monsters never try to pick up ball or chain

Apparently my m_move reorg made it possible for monsters to
pick up the chain attached to hero; explicitly prevent that.

2 years agocorrect a predefined preprocessor macro for clang
nhmall [Wed, 1 Feb 2023 19:15:34 +0000 (14:15 -0500)]
correct a predefined preprocessor macro for clang

2 years agoundefine X11_BUILD after hack.h or config.h
nhmall [Wed, 1 Feb 2023 19:04:20 +0000 (14:04 -0500)]
undefine X11_BUILD after hack.h or config.h

So as not to complicate any onefile efforts by leaving it defined.

2 years agoavoid some issues with c++ and X11
nhmall [Wed, 1 Feb 2023 15:41:04 +0000 (10:41 -0500)]
avoid some issues with c++ and X11

2 years agodon't make the catch inline
nhmall [Wed, 1 Feb 2023 15:16:22 +0000 (10:16 -0500)]
don't make the catch inline

2 years agorefine detection by compiler version in tradstdc.h
nhmall [Wed, 1 Feb 2023 14:55:41 +0000 (09:55 -0500)]
refine detection by compiler version in tradstdc.h

2 years agofollow-up
nhmall [Wed, 1 Feb 2023 14:41:35 +0000 (09:41 -0500)]
follow-up

2 years agocatch use of pre-C99 non-standard functions
nhmall [Wed, 1 Feb 2023 14:22:16 +0000 (09:22 -0500)]
catch use of pre-C99 non-standard functions

2 years agoUse strchr, not index
Pasi Kallinen [Wed, 1 Feb 2023 14:10:41 +0000 (16:10 +0200)]
Use strchr, not index

2 years agoSplit monster looking for items into separate function
Pasi Kallinen [Wed, 1 Feb 2023 12:37:12 +0000 (14:37 +0200)]
Split monster looking for items into separate function

2 years agoMonster movement and object pickup cleanup
Pasi Kallinen [Wed, 1 Feb 2023 08:23:20 +0000 (10:23 +0200)]
Monster movement and object pickup cleanup

Clean up some of the code for monster deciding what objects
to pick up, removing duplicate code.  There should be no real
difference in behaviour, other than monsters now can pick up
one stack of items at a time; previously monster could pick up
gold, then a practical item, followed by a magical item all
in a single turn, although this very rarely mattered.

Not extensively tested.

Code originally from NetHack4.

2 years agoprototype was within #ifdef block, function wasn't
nhmall [Wed, 1 Feb 2023 04:05:15 +0000 (23:05 -0500)]
prototype was within #ifdef block, function wasn't

Move the prototype in extern.h

2 years agofurther work on soundlib support code
nhmall [Wed, 1 Feb 2023 03:19:29 +0000 (22:19 -0500)]
further work on soundlib support code

move some inline code into functions
replace some magic numbers

The mingw code is not tested yet.

2 years agoUse could_reach_item
Pasi Kallinen [Tue, 31 Jan 2023 17:09:43 +0000 (19:09 +0200)]
Use could_reach_item

2 years agoSeparate function for monster safe touch object
Pasi Kallinen [Tue, 31 Jan 2023 16:44:10 +0000 (18:44 +0200)]
Separate function for monster safe touch object

Also added the check for touching an artifact to it

2 years agoOnly embed wav resources if soundlib defined
nhmall [Tue, 31 Jan 2023 07:22:25 +0000 (02:22 -0500)]
Only embed wav resources if soundlib defined

2 years agomissed a reference in a header file
nhmall [Tue, 31 Jan 2023 06:29:23 +0000 (01:29 -0500)]
missed a reference in a header file

2 years agomingw follow-up
nhmall [Tue, 31 Jan 2023 06:13:03 +0000 (01:13 -0500)]
mingw follow-up

2 years agofix a naming conflict
nhmall [Tue, 31 Jan 2023 06:10:02 +0000 (01:10 -0500)]
fix a naming conflict

2 years agomore windows Makefile tinkering
nhmall [Tue, 31 Jan 2023 05:45:27 +0000 (00:45 -0500)]
more windows Makefile tinkering

It looks like the Windows API call for PlaySound using SND_RESOURCE, from a
mingw32 built program, cannot find the resources that are
embeded into the .exe by the mingw32 resource compiler. That works fine
from visual studio.

For now, fall back to not using the SND_RESOURCE flag, use an ordinary
wav file name in the filesystem. Makefile.mingw32 has been modified
to copy the wav files to the binary directory along with the exe.

This probably won't be the final approach, but it will get things
working for now.

2 years agosome Makefile.nmake fixups
nhmall [Tue, 31 Jan 2023 00:24:21 +0000 (19:24 -0500)]
some Makefile.nmake fixups