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.
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.
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.
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.
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.
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.
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?
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.
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
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.
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.
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
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.
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