Mikołaj Piróg
2e7ff45fbf
Monster global constants cleanup ( #4827 )
...
* Change #defines to constexpr const, add constexpr where applicable, fix typos
4 years ago
Anders Jenbo
99181fd709
Move more files to the engine folder
4 years ago
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
4 years ago
Gleb Mazovetskiy
7f695c2835
Use SoundSample for music
...
Unifies audio handling between sound effects and music.
4 years ago
Gleb Mazovetskiy
b312edee49
Fix snd_deinit called even if snd_init failed
...
We were previously setting `was_sound_init` to true unconditionally
after calling `snd_init`.
However, `snd_init` can fail. Use `gbSndInited` instead.
4 years ago
qndel
d3995736b9
fix spawning unique monsters
4 years ago
qndel
b6e7c3818b
fix hellfire shareware monk
4 years ago
qndel
e087b109ea
fix hellfire shareware monk
4 years ago
Juliano Leal Goncalves
6146b828e9
🚚 Rename 'MonsterData' global to 'MonstersData'
...
This avoids conflicts with the struct name as we'll be renaming that next.
5 years ago
qndel
e82dc72d12
put commented out enums next to sounds
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
74b57558c9
🚚 Move local code to anonymous namespace
5 years ago
Anders Jenbo
352a0ca510
Place local symbols in an anonymous namespace
5 years ago
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
Anders Jenbo
07ad083fda
Rename monster globals
5 years ago
Anders Jenbo
bc0d1f7ac0
clang-tidy/Android Stuidio cleanups 3
5 years ago
Anders Jenbo
bc59218d0d
More clang-tidy/Android Studio cleanups
5 years ago
Anders Jenbo
ecea12fc15
Clang-tidy: ParameterCase
5 years ago
Anders Jenbo
a350fb0b15
Clang-tidy: FunctionCase part 1
5 years ago
Anders Jenbo
b1d237c823
More init clean up ( #2262 )
5 years ago
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
5 years ago
Anders Jenbo
8e07ef8fe5
Clang-tidy: misc-unused-parameters
5 years ago
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
5 years ago
Anders Jenbo
8a4d38dd74
Stabalize clang-tidy runs
5 years ago
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.
5 years ago
ephphatha
bccf88dd8e
Refactor PlaySFX_priv to take a Point instead of x/y params
5 years ago
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.
5 years ago
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
5 years ago
Anders Jenbo
1cc0eb25ca
♻️ Use ranges for loops (clang-tidy)
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
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.
5 years ago
Anders Jenbo
4a7ba94702
🎨 Run clang-format
5 years ago
thebigMuh
24f32a1d53
Fix sound volume/panning attenuation ( #1789 )
...
* Fixing volume adjustment and scaling
5 years ago
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.
5 years ago
Anders Jenbo
93f9b852a2
🐛 Do not stop music when calling sound_stop()
...
Fixes #1782
5 years ago
Gleb Mazovetskiy
7bdfb0655c
🐞 Support multiple playback of the same sound
5 years ago
Vladimir Olteanu
7aad72f96d
Use automatic memory management for sound stuff ( #1771 )
5 years ago
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.
5 years ago
obligaron
a3229741d1
🖌️ Refurbish tables in source code (clang-format off)
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
efbe8a8338
♻️ add possition points to monsters
5 years ago
Anders Jenbo
e4cfad3196
♻️ Use points instead of individual fileds for player structure
5 years ago
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
5 years ago
Gleb Mazovetskiy
a043aa4dd8
GetSFXLength: Respect streaming flag ( #1640 )
5 years ago
Anders Jenbo
593c6a6f17
🎨 Drop unused param and rename random_ to GenerateRnd
5 years ago
qndel
ec74917cb4
class sounds cleanup
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Gleb Mazovetskiy
95946e3a7c
🧹 Cleanup unused variables ( #1584 )
...
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago