diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2025-06-16 00:28:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-15 18:28:37 -0400 |
| commit | fd1ea6bc1a0682b887977041e2759fa1f2af079a (patch) | |
| tree | 710ea8fca24f08f6d1cfb0f804fb41a38c57deba /src/code/z_actor.c | |
| parent | 05a281855740f2c7dc4a9fef482286b3032a9a7e (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_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index dfec9188f..1e02acdc8 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2030,8 +2030,7 @@ void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 sp * Play a sound effect at the player's position */ void Player_PlaySfx(Player* player, u16 sfxId) { - Audio_PlaySfxGeneral(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, - &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + SFX_PLAY_AT_POS(&player->actor.projectedPos, sfxId); } /** @@ -2641,8 +2640,7 @@ void Actor_Draw(PlayState* play, Actor* actor) { void Actor_UpdateFlaggedAudio(Actor* actor) { if (actor->flags & ACTOR_FLAG_SFX_ACTOR_POS_2) { - Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, - &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + SFX_PLAY_AT_POS(&actor->projectedPos, actor->sfx); } else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) { Sfx_PlaySfxCentered(actor->sfx); } else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) { @@ -5670,8 +5668,7 @@ void func_80036E50(u16 textId, s16 arg1) { Flags_SetInfTable(INFTABLE_0C); return; case 0x1033: - Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, - &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME); Flags_SetEventChkInf(EVENTCHKINF_04); Flags_SetInfTable(INFTABLE_0E); return; @@ -6136,8 +6133,7 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) { case TEXT_STATE_CHOICE: case TEXT_STATE_EVENT: if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) { - Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, - &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + SFX_PLAY_CENTERED(NA_SE_SY_CANCEL); msgCtx->msgMode = MSGMODE_TEXT_CLOSING; ret = true; } |
