summaryrefslogtreecommitdiff
path: root/src/code/z_lib.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2025-06-16 00:28:37 +0200
committerGitHub <noreply@github.com>2025-06-15 18:28:37 -0400
commitfd1ea6bc1a0682b887977041e2759fa1f2af079a (patch)
tree710ea8fca24f08f6d1cfb0f804fb41a38c57deba /src/code/z_lib.c
parent05a281855740f2c7dc4a9fef482286b3032a9a7e (diff)
Macroify PlaySfxGeneral calls: introduce `SFX_PLAY_CENTERED` and `SFX_PLAY_AT_POS` (#2633)
* Add `SFX_PLAY_CENTERED` * Add `SFX_PLAY_AT_POS`
Diffstat (limited to 'src/code/z_lib.c')
-rw-r--r--src/code/z_lib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index e4d56b8da..b9aa15ca4 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -608,22 +608,19 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
* Play a sound effect at the center of the screen.
*/
void Sfx_PlaySfxCentered(u16 sfxId) {
- Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
- &gSfxDefaultReverb);
+ SFX_PLAY_CENTERED(sfxId);
}
/**
* Play a sound effect at the center of the screen. Identical to `Sfx_PlaySfxCentered`.
*/
void Sfx_PlaySfxCentered2(u16 sfxId) {
- Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
- &gSfxDefaultReverb);
+ SFX_PLAY_CENTERED(sfxId);
}
/**
* Play a sound effect at the requested position.
*/
void Sfx_PlaySfxAtPos(Vec3f* projectedPos, u16 sfxId) {
- Audio_PlaySfxGeneral(sfxId, projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
- &gSfxDefaultReverb);
+ SFX_PLAY_AT_POS(projectedPos, sfxId);
}