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

2 years agoThis is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt
nhw_cron [Mon, 30 Jan 2023 17:24:08 +0000 (12:24 -0500)]
This is cron-daily v1-May-8-2022.  005guidebook updated: doc/Guidebook.txt

2 years agoadd a master off/on switch for sounds
nhmall [Mon, 30 Jan 2023 17:07:03 +0000 (12:07 -0500)]
add a master off/on switch for sounds

sounds can be set in the config file or on the fly with the Options menu.

This also adds a mechanism for specifying a terminology preference
for a boolean option in the options menu.

The choices are: Term_False, Term_Off, Term_Disabled

Term_False, the default, will use the terms "false" and "true" in the
Options menu.
Term_Off will use the terms "off" and "on" in the Options menu.
Term_Disabled will use the terms "disabled" and "enabled" in the Options
menu.

I didn't review any of the existing options to see if one of the new
alternative terms might be a better fit. They were all left at the default.

2 years agoHellfill: Lich
Pasi Kallinen [Mon, 30 Jan 2023 16:30:33 +0000 (18:30 +0200)]
Hellfill: Lich

Similar to the fake wizard towers.

2 years agoAdd helltweaks to fake wiz towers
Pasi Kallinen [Mon, 30 Jan 2023 15:58:51 +0000 (17:58 +0200)]
Add helltweaks to fake wiz towers

2 years agoAdd helltweaks to wizard3
Pasi Kallinen [Mon, 30 Jan 2023 15:47:21 +0000 (17:47 +0200)]
Add helltweaks to wizard3

2 years agoAdd helltweaks to wizard2
Pasi Kallinen [Mon, 30 Jan 2023 15:43:34 +0000 (17:43 +0200)]
Add helltweaks to wizard2

2 years agoAdd helltweaks to wizard1
Pasi Kallinen [Mon, 30 Jan 2023 15:31:25 +0000 (17:31 +0200)]
Add helltweaks to wizard1

2 years agoHelltweaks: improve lava river
Pasi Kallinen [Mon, 30 Jan 2023 15:07:40 +0000 (17:07 +0200)]
Helltweaks: improve lava river

The lava river will now draw another river, until a certain
amount of map locations have been turned into lava, so you don't
get a teensy "river" made out of 2 lava pools.

Add a lua selection method to count the number of locations
in the selection.

2 years agopurge some never-used fields from iflags
nhmall [Mon, 30 Jan 2023 14:03:47 +0000 (09:03 -0500)]
purge some never-used fields from iflags

2 years agoAvoid repeating the god ray
Pasi Kallinen [Mon, 30 Jan 2023 10:39:32 +0000 (12:39 +0200)]
Avoid repeating the god ray

My recent change to hit and wake monsters caused a recursive
ghod_hitsu -> wakeup -> dobuzz -> buzz -> ghod_hitsu loop.
Don't call the ghod_hitsu again if the priest is already angry.

2 years agoremove a value used for a test run of nmake
nhmall [Mon, 30 Jan 2023 03:09:54 +0000 (22:09 -0500)]
remove a value used for a test run of nmake

2 years agoWindows Makefiles easier soundlib opt-in or opt-out
nhmall [Mon, 30 Jan 2023 03:07:31 +0000 (22:07 -0500)]
Windows Makefiles easier soundlib opt-in or opt-out

2 years agoRemove obsolete comment
Pasi Kallinen [Sun, 29 Jan 2023 16:49:58 +0000 (18:49 +0200)]
Remove obsolete comment

2 years agoNazgul can see invisible
Pasi Kallinen [Sun, 29 Jan 2023 16:07:03 +0000 (18:07 +0200)]
Nazgul can see invisible

2 years agoFix teleported eel hiding in dry land
Pasi Kallinen [Sun, 29 Jan 2023 12:25:01 +0000 (14:25 +0200)]
Fix teleported eel hiding in dry land

2 years agoGenerate random eroded, erodeproof, or greased items
Pasi Kallinen [Sun, 29 Jan 2023 09:15:38 +0000 (11:15 +0200)]
Generate random eroded, erodeproof, or greased items

Items in initial hero inventory, or generated via lua in
special levels or themed rooms are not subject to this.

Code via xnethack by copperwater <aosdict@gmail.com>,
with some modifications.

2 years agoThis is cron-daily v1-May-8-2022. 000files updated: Files
nhw_cron [Sun, 29 Jan 2023 04:24:09 +0000 (23:24 -0500)]
This is cron-daily v1-May-8-2022.  000files updated: Files

2 years agosoundlib in the Makefile hints updated
nhmall [Sun, 29 Jan 2023 03:43:48 +0000 (22:43 -0500)]
soundlib in the Makefile hints updated

Move pieces of the Makefile hints sound-related changes that
are not macOS-specific from sys/unix/hints/macOS.370 to some new
include files. The WANT_MACSOUND block stays in
sys/unix/hints/macOS.370 because it is system-specific.

Before this change, the various Makefiles were assembled via
hints files macOS.370 or linux.370. Both were using included
portions from the following files in the sys/unix/hints/include
directory, in this sequence:

    -INCLUDE multiw-1.370
    -INCLUDE multiw-2.370
    -INCLUDE compiler.370
    -INCLUDE multiw-3.370
    -INCLUDE cross-pre.370
    -INCLUDE gbdates-pre.370
    -INCLUDE gbdates-post.370
    -INCLUDE cross-post.370

After this change, the various Makefiles will still be assembled
via hints files macOS.370 or linux.370. They will continue to use
included portions from the following files in the
sys/unix/hints/include directory, but with three additional
include files related to sound and soundlibs. This is the new
sequence:

    -INCLUDE multiw-1.370
    -INCLUDE multiw-2.370
    -INCLUDE compiler.370
    -INCLUDE multiw-3.370
+   -INCLUDE multisnd1-pre.370
    -INCLUDE cross-pre.370
    -INCLUDE gbdates-pre.370
+   -INCLUDE multisnd2-pre.370
    -INCLUDE gbdates-post.370
+   -INCLUDE multisnd-post.370
    -INCLUDE cross-post.370

The include mechanism continues to allow common portions that can
be shared between macOS and Linux to be maintained in a single
place only, with minimal duplication. Now, that has been extended
to include Makefile lines related to sounds and soundlib.

2 years agodo warning suppression for soundlib vars another way
nhmall [Sat, 28 Jan 2023 19:55:54 +0000 (14:55 -0500)]
do warning suppression for soundlib vars another way

Instead of introducing a bunch of preprocessor #ifdef blocks,
this approach is less-intrusive.

2 years agoDon't let monsters loot Schroedinger's box
Pasi Kallinen [Sat, 28 Jan 2023 18:25:49 +0000 (20:25 +0200)]
Don't let monsters loot Schroedinger's box

2 years agoFix shopkeeper getting mad when monster triggers a trap
Pasi Kallinen [Sat, 28 Jan 2023 18:01:07 +0000 (20:01 +0200)]
Fix shopkeeper getting mad when monster triggers a trap

When a monster triggered a rolling boulder trap which buried
a shop item in a pit, the shopkeeper would bill the hero.
(Or get mad at hero, if they were out of the shop)

The fix might not be quite right - should the shopkeeper get
mad at hero when monster triggers a trap created by hero?
Or when an item is buried in a pit created by a hero?

2 years agoFix open showing wrong glyph
Pasi Kallinen [Sat, 28 Jan 2023 17:11:29 +0000 (19:11 +0200)]
Fix open showing wrong glyph

Trying to open a location where a pet was removed the glyph
and showed the underlying terrain glyph instead.
Just use newsym - it'll use feel_location when Blind.

2 years agowarning fix if no added soundlib compiled in
nhmall [Sat, 28 Jan 2023 14:09:39 +0000 (09:09 -0500)]
warning fix if no added soundlib compiled in

2 years agocut-and-paste error
nhmall [Sat, 28 Jan 2023 04:58:46 +0000 (23:58 -0500)]
cut-and-paste error

2 years agofollow-up bit sndprocs.h
nhmall [Sat, 28 Jan 2023 04:56:25 +0000 (23:56 -0500)]
follow-up bit sndprocs.h

2 years agomore Soundeffects tinkering
nhmall [Sat, 28 Jan 2023 04:41:54 +0000 (23:41 -0500)]
more Soundeffects tinkering

2 years agosoundlib terminology update - sound_triggers
nhmall [Sat, 28 Jan 2023 03:21:53 +0000 (22:21 -0500)]
soundlib terminology update - sound_triggers

Switch to using the term "sound triggers" for things that
result in a call to one of the soundlib routines.

SNDCAP_* renamed to SOUND_TRIGGER_*
sndcap field in the sound_procs struct changed to sound_triggers

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

2 years agocounting to 10
nhmall [Fri, 27 Jan 2023 22:01:17 +0000 (17:01 -0500)]
counting to 10

2 years agotypo fix
nhmall [Fri, 27 Jan 2023 21:58:45 +0000 (16:58 -0500)]
typo fix

2 years agodocument doc/sound.txt
nhmall [Fri, 27 Jan 2023 21:48:37 +0000 (16:48 -0500)]
document doc/sound.txt

2 years agoshop object sanity - buried objects
PatR [Fri, 27 Jan 2023 19:01:24 +0000 (11:01 -0800)]
shop object sanity - buried objects

This fixes the reported sanity check warning about a buried object
within shop boundary staying flagged no_charge after the shopkeeper
leaves the shop.  Leaving the shop to pursue the hero moves unpaid
items off the bill to owed-as-robbery and changes no_charge items
to shop-owned but it wasn't doing the latter for buried objects.

I haven't attempted to test on a level with multiple shopkeepers.
If that was working correctly for unpaid items than I think it
ought to work correctly for no_charge items now.  I'm not sure how
thoroughly the handling for unpaid items was tested though.

2 years agoAdd hellfill.lua to VMS install
Pasi Kallinen [Fri, 27 Jan 2023 17:48:13 +0000 (19:48 +0200)]
Add hellfill.lua to VMS install

2 years agoadd comment above two sound delivery macros
nhmall [Fri, 27 Jan 2023 15:05:16 +0000 (10:05 -0500)]
add comment above two sound delivery macros

2 years agosuppress "set but not used" warning if no soundlib
nhmall [Fri, 27 Jan 2023 14:57:54 +0000 (09:57 -0500)]
suppress "set but not used" warning if no soundlib

2 years agopaste error
nhmall [Fri, 27 Jan 2023 06:29:09 +0000 (01:29 -0500)]
paste error

2 years agoadditional Soundeffect, additional SoundAchievement
nhmall [Fri, 27 Jan 2023 06:25:05 +0000 (01:25 -0500)]
additional Soundeffect, additional SoundAchievement

Also adds a macro SoundeffectEvenIfDeaf for a couple of proposed
special cases where Deafness shouldn't factor in.

2 years agoa missing break and an incorrect magic number
nhmall [Fri, 27 Jan 2023 03:39:14 +0000 (22:39 -0500)]
a missing break and an incorrect magic number

2 years agofix the missing break mentioned in previous commit
nhmall [Thu, 26 Jan 2023 22:38:18 +0000 (17:38 -0500)]
fix the missing break mentioned in previous commit

... but inadvertently left out of that commit.

2 years ago1st of a few sequencing changes
nhmall [Thu, 26 Jan 2023 22:15:59 +0000 (17:15 -0500)]
1st of a few sequencing changes

rename display_gamewindows() to init_sound_and_display_gamewindows()
(I know that's getting pretty long-named).

move activate_chosen_soundlib() into init_sound_and_display_gamewindows()
from moveloop_preamble().

Also included was a missing break in a switch related to sounds.

2 years agofix github issue #967 - nearby objects
PatR [Thu, 26 Jan 2023 22:05:03 +0000 (14:05 -0800)]
fix github issue #967 - nearby objects

Issue reported by entrez:  distant_name() used different criteria
for 'nearby' than map_object() and see_nearby_objects(), so it could
mark objects as seen when they were being displayed as generic,
without redisplaying them as a specific.  Generic object with dknown
set leads to confusion.  Example was "a spellbook spellbook".

I think this should fix things, but I've only done a small amount of
testing so far.

Fixes #967

2 years agooffer_real_amulet() tweaks
PatR [Thu, 26 Jan 2023 21:39:00 +0000 (13:39 -0800)]
offer_real_amulet() tweaks

Mote PR #965.  Add a couple of comments and fix up some formatting.

2 years ago\#version warning fix
PatR [Thu, 26 Jan 2023 17:10:24 +0000 (09:10 -0800)]
\#version warning fix

Avoid #ifdef/#else/#endif inside expansion of Strcat() macro.

Also, change constructed
|soundlib_nosound, soundlib_macsound, and soundlib_qtsound, user sounds.
to be
|nosound, macsound, qtsound, and user sounds.

OPTIONS=soundlib:somelib doesn't--or won't, when finished being
implemented--include the "soundlib_" prefix in the user-visible
value, and placement of "and" vs "user sounds" was odd.

The code should probably be reorganized so that makedefs can put that
into dat/options or at least have it put a placeholder for the missing
paragraph.

2 years agopull request #965 - split offering the Amulet
PatR [Thu, 26 Jan 2023 16:28:27 +0000 (08:28 -0800)]
pull request #965 - split offering the Amulet

into a separate routine

Pull request from argrath:  move the code used when offering the
Amulet of Yendor on a high altar out of dosacrifice() into a new
routine.

Closes #965

2 years agoTiny chance of breaking iron bars with war hammer
Pasi Kallinen [Thu, 26 Jan 2023 16:21:50 +0000 (18:21 +0200)]
Tiny chance of breaking iron bars with war hammer

Also add some different sounds to hitting the iron bars,
and make it noisy.

2 years agosplit offering the real amulet into a separate function
SHIRAKATA Kentaro [Wed, 25 Jan 2023 19:21:42 +0000 (04:21 +0900)]
split offering the real amulet into a separate function

2 years agoFix: use-after-free in dog_eat()
Michael Meyer [Wed, 25 Jan 2023 20:11:14 +0000 (15:11 -0500)]
Fix: use-after-free in dog_eat()

I think moving the m_consume_obj call (which will free the eaten item)
further down should fix this without causing any really wacky message
sequencing issues, but if maintaining the exact order is important
obj->unpaid and its price could be cached before the free instead.

2 years agofix warning
nhmall [Thu, 26 Jan 2023 05:49:11 +0000 (00:49 -0500)]
fix warning

In file included from makedefs.c:180:
./../src/mdlib.c:92:12: warning: unused function 'count_and_validate_soundlibopts' [-Wunused-function]
static int count_and_validate_soundlibopts(void);
           ^
1 warning generated.

Function definition is in the #ifndef MAKEDEFS_C section, so move the prototype there too.

2 years agolist which soundlib support is compiled in
nhmall [Thu, 26 Jan 2023 05:45:32 +0000 (00:45 -0500)]
list which soundlib support is compiled in

2 years agotranscription error
nhmall [Thu, 26 Jan 2023 04:10:51 +0000 (23:10 -0500)]
transcription error

2 years agosmooth use of soundlib(s) in Makefile.nmake
nhmall [Thu, 26 Jan 2023 04:05:36 +0000 (23:05 -0500)]
smooth use of soundlib(s) in Makefile.nmake

Related: also add a preprocesor #if defined(SND_LIB_WINDSOUND) around the
assign_soundlib() call in sys/windows/windmain.c