Juliano Leal Goncalves
6146b828e9
🚚 Rename 'MonsterData' global to 'MonstersData'
...
This avoids conflicts with the struct name as we'll be renaming that next.
2021-09-02 21:57:50 +02:00
qndel
e82dc72d12
put commented out enums next to sounds
2021-08-24 12:30:18 +02:00
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
2021-07-14 20:22:35 -07:00
Anders Jenbo
74b57558c9
🚚 Move local code to anonymous namespace
2021-07-10 17:30:15 -07:00
Anders Jenbo
352a0ca510
Place local symbols in an anonymous namespace
2021-07-09 16:54:01 -07:00
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
2021-07-08 08:14:03 -07:00
Anders Jenbo
96bf75b502
Rename player globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
07ad083fda
Rename monster globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
bc0d1f7ac0
clang-tidy/Android Stuidio cleanups 3
2021-07-04 16:09:32 -07:00
Anders Jenbo
bc59218d0d
More clang-tidy/Android Studio cleanups
2021-07-04 19:34:37 +02:00
Anders Jenbo
ecea12fc15
Clang-tidy: ParameterCase
2021-07-03 15:46:39 -07:00
Anders Jenbo
a350fb0b15
Clang-tidy: FunctionCase part 1
2021-07-03 03:45:33 +02:00
Anders Jenbo
b1d237c823
More init clean up ( #2262 )
2021-06-29 06:37:38 +02:00
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
2021-06-28 20:37:44 -07:00
Anders Jenbo
8e07ef8fe5
Clang-tidy: misc-unused-parameters
2021-06-27 17:34:32 +02:00
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
2021-06-27 03:09:41 -07:00
Anders Jenbo
8a4d38dd74
Stabalize clang-tidy runs
2021-06-27 03:42:51 +02:00
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