Commit Graph

14837 Commits

Author SHA1 Message Date
nhmall
e6012ab658 Only embed wav resources if soundlib defined 2023-01-31 02:22:25 -05:00
nhmall
f2dc7f308d missed a reference in a header file 2023-01-31 01:29:23 -05:00
nhmall
20c7a217ba mingw follow-up 2023-01-31 01:13:03 -05:00
nhmall
2c5bbdc0ed fix a naming conflict 2023-01-31 01:10:02 -05:00
nhmall
ce0a4f60ca 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.
2023-01-31 00:45:27 -05:00
nhmall
a7b8099ecb some Makefile.nmake fixups 2023-01-30 19:24:21 -05:00
nhw_cron
5bf0bc3ba4 This is cron-daily v1-May-8-2022. 005guidebook updated: doc/Guidebook.txt 2023-01-30 12:37:14 -05:00
nhmall
9bbb2e17cf 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.
2023-01-30 12:07:03 -05:00
Pasi Kallinen
fe99bcd591 Hellfill: Lich
Similar to the fake wizard towers.
2023-01-30 18:30:39 +02:00
Pasi Kallinen
71f900f174 Add helltweaks to fake wiz towers 2023-01-30 17:58:51 +02:00
Pasi Kallinen
a4c15f23bc Add helltweaks to wizard3 2023-01-30 17:47:21 +02:00
Pasi Kallinen
788492bdcd Add helltweaks to wizard2 2023-01-30 17:43:34 +02:00
Pasi Kallinen
7def7ece92 Add helltweaks to wizard1 2023-01-30 17:31:25 +02:00
Pasi Kallinen
744d64487b 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.
2023-01-30 17:10:39 +02:00
nhmall
c7464e8aa5 purge some never-used fields from iflags 2023-01-30 09:03:47 -05:00
Pasi Kallinen
8eeeec41f5 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.
2023-01-30 12:39:35 +02:00
nhmall
8bb1feab61 remove a value used for a test run of nmake 2023-01-29 22:09:54 -05:00
nhmall
6ce2994646 Windows Makefiles easier soundlib opt-in or opt-out 2023-01-29 22:07:31 -05:00
Pasi Kallinen
77797450f5 Remove obsolete comment 2023-01-29 18:49:58 +02:00
Pasi Kallinen
05f6a33092 Nazgul can see invisible 2023-01-29 18:07:03 +02:00
Pasi Kallinen
394a46ab13 Fix teleported eel hiding in dry land 2023-01-29 14:25:01 +02:00
Pasi Kallinen
7c2c692ee5 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.
2023-01-29 11:20:03 +02:00
nhw_cron
76bac9efe3 This is cron-daily v1-May-8-2022. 000files updated: Files 2023-01-28 23:29:02 -05:00
nhmall
86368148bf 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.
2023-01-28 22:43:48 -05:00
nhmall
4575d564c7 do warning suppression for soundlib vars another way
Instead of introducing a bunch of preprocessor #ifdef blocks,
this approach is less-intrusive.
2023-01-28 14:55:54 -05:00
Pasi Kallinen
734dcfdabe Don't let monsters loot Schroedinger's box 2023-01-28 20:27:36 +02:00
Pasi Kallinen
60cbab1130 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?
2023-01-28 20:03:23 +02:00
Pasi Kallinen
cb81631a38 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.
2023-01-28 19:12:24 +02:00
nhmall
44677e82ab warning fix if no added soundlib compiled in 2023-01-28 09:09:39 -05:00
nhmall
f91292b349 cut-and-paste error 2023-01-27 23:58:46 -05:00
nhmall
60f62bc4ef follow-up bit sndprocs.h 2023-01-27 23:56:25 -05:00
nhmall
5b3a8b5774 more Soundeffects tinkering 2023-01-27 23:41:54 -05:00
nhmall
90895330c5 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
2023-01-27 22:21:53 -05:00
nhw_cron
8560e61c96 This is cron-daily v1-May-8-2022. 000files updated: Files 2023-01-27 17:30:16 -05:00
nhmall
90425082ca counting to 10 2023-01-27 17:01:17 -05:00
nhmall
afb4d90989 typo fix 2023-01-27 16:58:45 -05:00
nhmall
f57f31335c document doc/sound.txt 2023-01-27 16:48:37 -05:00
PatR
47efcd90c7 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.
2023-01-27 11:01:24 -08:00
Pasi Kallinen
777f53c212 Add hellfill.lua to VMS install 2023-01-27 19:48:13 +02:00
nhmall
a8ddb61c60 add comment above two sound delivery macros 2023-01-27 10:05:16 -05:00
nhmall
5401983d76 suppress "set but not used" warning if no soundlib 2023-01-27 09:57:54 -05:00
nhmall
42171ca070 paste error 2023-01-27 01:29:09 -05:00
nhmall
aee2ff57e8 additional Soundeffect, additional SoundAchievement
Also adds a macro SoundeffectEvenIfDeaf for a couple of proposed
special cases where Deafness shouldn't factor in.
2023-01-27 01:25:05 -05:00
nhmall
219c1155f8 a missing break and an incorrect magic number 2023-01-26 22:39:14 -05:00
nhmall
049b90e25e fix the missing break mentioned in previous commit
... but inadvertently left out of that commit.
2023-01-26 17:38:18 -05:00
nhmall
446044e1d5 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.
2023-01-26 17:15:59 -05:00
PatR
52a44b3255 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
2023-01-26 14:05:03 -08:00
PatR
b684f2c401 offer_real_amulet() tweaks
Mote PR #965.  Add a couple of comments and fix up some formatting.
2023-01-26 13:39:00 -08:00
PatR
cef8206af4 \#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.
2023-01-26 09:10:24 -08:00
PatR
3a2d6d6d0a 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
2023-01-26 08:28:27 -08:00