ephphatha
f4f6a8a51e
Refactor PlaySfxLoc to take a Point instead of x/y params
...
Because of the heavy usage of this function in objects.cpp and the mixed use of aliases and direct references to the active object in Operate*Door functions I've done some refactoring of those areas beyond what is strictly necessary. Hopefully this makes sense and is reasonable to include in this change.
2021-06-26 10:12:28 -07:00
ephphatha
bccf88dd8e
Refactor PlaySFX_priv to take a Point instead of x/y params
2021-06-26 10:12:28 -07:00
ephphatha
15c285c879
Refactor calc_snd_position to take a Point instead of x/y params
...
Appears this function is only called internally despite being in the effects header.
2021-06-26 10:12:28 -07:00
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
2021-06-26 08:57:59 -07:00
Anders Jenbo
1cc0eb25ca
♻️ Use ranges for loops (clang-tidy)
2021-06-25 13:22:08 +02:00
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract Point, Direction, clamp
...
`engine.h` is getting quite bloated. Moves this code to their own files.
2021-06-21 01:36:20 -07:00
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
2021-05-24 21:00:32 +02:00
Anders Jenbo
4a7ba94702
🎨 Run clang-format
2021-05-07 23:26:39 +02:00
thebigMuh
24f32a1d53
Fix sound volume/panning attenuation ( #1789 )
...
* Fixing volume adjustment and scaling
2021-05-03 02:11:22 +02:00
Gleb Mazovetskiy
559229dea1
🐞 Duplicate sounds: Fix data race
...
This fixes a data race by deleting the sound exactly when it finishes
playing.
Previously, a data race could happen in
`CleanupFinishedDuplicateSounds`, where the sound would be destroyed
while Aulib was reading from its buffer.
2021-05-02 14:15:35 +01:00
Anders Jenbo
93f9b852a2
🐛 Do not stop music when calling sound_stop()
...
Fixes #1782
2021-05-02 00:47:27 +02:00
Gleb Mazovetskiy
7bdfb0655c
🐞 Support multiple playback of the same sound
2021-05-02 00:36:36 +02:00
Vladimir Olteanu
7aad72f96d
Use automatic memory management for sound stuff ( #1771 )
2021-04-30 09:02:07 +02:00
Gleb Mazovetskiy
acee2ef14c
🎉 Switch from SDL_mixer to SDL_audiolib
...
SDL_mixer can only stream a single music track
SDL_audiolib has unlimited streams.
With this change, we finally have streaming sounds (respecting
sfx_STREAM).
Audio options can now also be set via diablo.ini, which should help us
better diagnose the static noise issues.
2021-04-27 00:54:50 +01:00
obligaron
a3229741d1
🖌️ Refurbish tables in source code (clang-format off)
2021-04-25 23:48:25 +02:00
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
2021-04-25 01:25:48 +02:00
Anders Jenbo
efbe8a8338
♻️ add possition points to monsters
2021-04-24 20:29:52 +02:00
Anders Jenbo
e4cfad3196
♻️ Use points instead of individual fileds for player structure
2021-04-24 04:46:08 +02:00
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
2021-04-23 02:48:25 +02:00
Gleb Mazovetskiy
a043aa4dd8
GetSFXLength: Respect streaming flag ( #1640 )
2021-04-22 16:19:27 +02:00
Anders Jenbo
593c6a6f17
🎨 Drop unused param and rename random_ to GenerateRnd
2021-04-22 00:08:19 +02:00
qndel
ec74917cb4
class sounds cleanup
2021-04-20 23:35:16 +02:00
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
2021-04-19 16:02:05 +02:00
Gleb Mazovetskiy
95946e3a7c
🧹 Cleanup unused variables ( #1584 )
...
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
2021-04-18 18:15:47 +02:00
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
2021-04-16 01:04:54 +02:00
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
2021-04-16 01:04:54 +02:00
Juliano Leal Goncalves
28ad9d43c5
🎨 Rename 'plr_class' enum to 'HeroClass'
...
Members were renamed as well for readability.
2021-04-12 20:00:53 +02:00
Juliano Leal Goncalves
7d95bfed39
♻️ Convert 'plr_class' to a scoped enumeration
2021-04-12 20:00:53 +02:00
Anders Jenbo
20186e0370
🎨 Replace TRUE/FALSE with true/false
...
fix
Fix
fix
2021-04-09 15:13:02 +02:00
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
2021-04-09 15:13:02 +02:00
Anders Jenbo
af96de4038
♻️ Move a large part of enums to there respective headers
2021-04-08 19:20:55 +02:00
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
2021-04-06 15:21:25 +02:00
Anders Jenbo
630e507f63
🚚 Apply namespace
2021-04-06 15:21:25 +02:00
Anders Jenbo
cee6029da0
🔥 Rely less on storm.h
2021-03-27 17:46:09 +01:00
Gleb Mazovetskiy
88a68f503a
Disable streaming music and sound for 3DS / Switch ( #1264 )
...
Works around https://github.com/devkitPro/SDL/issues/72 at the cost of
~50 MiB extra RAM usage.
2021-03-25 08:58:54 +01:00
Anders Jenbo
8f09cc3034
[diablo] 🐛 Correct spelling of Sorcerer
...
Fixes #1074
2021-03-21 12:18:10 +01:00
Gleb Mazovetskiy
0c2284a091
Respect sfx_STREAM in PlaySFX
...
Changes audio playback of sounds with the `sfx_STREAM` flag, such as towner lines, to stream.
2021-03-17 18:52:09 +01:00
Juliano Goncalves
379b7c92be
✨ Allow playing specific sounds with 'PlaySfx'
2021-03-11 05:24:59 +01:00
Anders Jenbo
44a4224aad
🐛 Fix audio enum order
2021-03-10 00:09:16 +01:00
qndel
ab9911064f
unify checks for single and multiplayer
2021-02-18 22:32:01 +01:00
Anders Jenbo
88a715cdcc
Clean up narator sound logic
...
Also this provides a helper function for calculating the length of a
sound
2021-01-24 07:08:11 +01:00
Anders Jenbo
6f8f4c3293
Unify another chunk of simple Hellfire code paths
2021-01-07 07:19:07 +01:00
Anders Jenbo
e609e170d0
Merge a large chunk of Hellfire the code paths
2021-01-06 08:07:20 +01:00
Anders Jenbo
fa3785a475
Merge branch 'master' of github.com:diasurgical/devilution
2020-11-04 03:02:48 +01:00
Anders Jenbo
43b5dea6e5
Merge branch 'master' of github.com:diasurgical/devilution
2020-11-03 00:56:51 +01:00
Anders Jenbo
95173539ce
Reorder effects.cpp
2020-11-02 15:50:09 +01:00
Anders Jenbo
72e2637061
Merge branch 'master' of github.com:diasurgical/devilution
2020-10-25 17:38:06 +01:00
Gleb Mazovetskiy
ec329e645c
Fix all "no-write-strings" warnings
2020-10-25 15:37:51 +01:00
Anders Jenbo
7ffb595370
Load rouge and sorceror sounds in multiplayer
2020-10-20 20:54:30 +02:00
Anders Jenbo
e073422ce7
Unify executable for Spawn and Retail
...
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.
This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
2020-10-20 19:42:01 +02:00