summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/code/audio/code_8019AF00.c2
-rw-r--r--src/code/audio/code_801A5BD0.c2
-rw-r--r--src/code/code_800F0390.c11
-rw-r--r--src/code/z_actor.c14
-rw-r--r--src/code/z_collision_check.c20
-rw-r--r--src/code/z_effect_soft_sprite.c4
-rw-r--r--src/code/z_en_item00.c8
-rw-r--r--src/code/z_fireobj.c2
-rw-r--r--src/code/z_lib.c4
-rw-r--r--src/code/z_sound_source.c75
-rw-r--r--src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c6
-rw-r--r--src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c2
-rw-r--r--src/overlays/actors/ovl_Boss_02/z_boss_02.c2
-rw-r--r--src/overlays/actors/ovl_Boss_04/z_boss_04.c2
-rw-r--r--src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c8
-rw-r--r--src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c6
-rw-r--r--src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c2
-rw-r--r--src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c2
-rw-r--r--src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c2
-rw-r--r--src/overlays/actors/ovl_En_Fish2/z_en_fish2.c2
-rw-r--r--src/overlays/actors/ovl_En_Fishing/z_en_fishing.c16
-rw-r--r--src/overlays/actors/ovl_En_Floormas/z_en_floormas.c2
-rw-r--r--src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c2
-rw-r--r--src/overlays/actors/ovl_En_In/z_en_in.c4
-rw-r--r--src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c2
-rw-r--r--src/overlays/actors/ovl_En_Ishi/z_en_ishi.c10
-rw-r--r--src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c2
-rw-r--r--src/overlays/actors/ovl_En_Kame/z_en_kame.c3
-rw-r--r--src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c8
-rw-r--r--src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c2
-rw-r--r--src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c4
-rw-r--r--src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c2
-rw-r--r--src/overlays/actors/ovl_En_Peehat/z_en_peehat.c8
-rw-r--r--src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c8
-rw-r--r--src/overlays/actors/ovl_En_Rr/z_en_rr.c2
-rw-r--r--src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c2
-rw-r--r--src/overlays/actors/ovl_En_Sb/z_en_sb.c2
-rw-r--r--src/overlays/actors/ovl_En_Skb/z_en_skb.c4
-rw-r--r--src/overlays/actors/ovl_En_St/z_en_st.c2
-rw-r--r--src/overlays/actors/ovl_En_Suttari/z_en_suttari.c2
-rw-r--r--src/overlays/actors/ovl_En_Sw/z_en_sw.c2
-rw-r--r--src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c2
-rw-r--r--src/overlays/actors/ovl_En_Tite/z_en_tite.c4
-rw-r--r--src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c16
-rw-r--r--src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c8
-rw-r--r--src/overlays/actors/ovl_En_Wf/z_en_wf.c3
-rw-r--r--src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c6
-rw-r--r--src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c2
-rw-r--r--src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c6
-rw-r--r--src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c4
-rw-r--r--src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c4
-rw-r--r--src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c12
-rw-r--r--src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c2
-rw-r--r--src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c2
55 files changed, 202 insertions, 136 deletions
diff --git a/src/code/audio/code_8019AF00.c b/src/code/audio/code_8019AF00.c
index 9354af188..5d0a166a2 100644
--- a/src/code/audio/code_8019AF00.c
+++ b/src/code/audio/code_8019AF00.c
@@ -134,7 +134,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F170.s")
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F1C0.s")
+#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_PlaySfxAtPos.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F208.s")
diff --git a/src/code/audio/code_801A5BD0.c b/src/code/audio/code_801A5BD0.c
index 0a13b00ec..7d796aa9f 100644
--- a/src/code/audio/code_801A5BD0.c
+++ b/src/code/audio/code_801A5BD0.c
@@ -24,7 +24,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7284.s")
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A72CC.s")
+#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_StopSfxByPos.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7328.s")
diff --git a/src/code/code_800F0390.c b/src/code/code_800F0390.c
deleted file mode 100644
index f495cfe5e..000000000
--- a/src/code/code_800F0390.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "global.h"
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F0390.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F03C0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F048C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/Audio_PlaySoundAtPosition.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F0590.s")
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 49eee7235..0b38d135f 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -2139,7 +2139,7 @@ void func_800B8E58(Player* player, u16 sfxId) {
* Plays the sound effect at the actor's position
*/
void Actor_PlaySfxAtPos(Actor* actor, u16 sfxId) {
- func_8019F1C0(&actor->projectedPos, sfxId);
+ Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
}
void func_800B8EF4(GlobalContext* globalCtx, Actor* actor) {
@@ -2155,8 +2155,8 @@ void func_800B8EF4(GlobalContext* globalCtx, Actor* actor) {
sfxId = SurfaceType_GetSfx(&globalCtx->colCtx, actor->floorPoly, actor->floorBgId);
}
- func_8019F1C0(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
- func_8019F1C0(&actor->projectedPos, sfxId + SFX_FLAG);
+ Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
+ Audio_PlaySfxAtPos(&actor->projectedPos, sfxId + SFX_FLAG);
}
void func_800B8F98(Actor* actor, u16 sfxId) {
@@ -2580,7 +2580,7 @@ void func_800B9D1C(Actor* actor) {
} else if (actor->audioFlags & 0x10) {
func_801A0810(&D_801DB4A4, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1));
} else if (actor->audioFlags & 1) {
- func_8019F1C0(&actor->projectedPos, sfxId);
+ Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
}
}
@@ -3345,7 +3345,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalC
actorCtx->targetContext.bgmEnemy = NULL;
}
- func_801A72CC(&actor->projectedPos);
+ Audio_StopSfxByPos(&actor->projectedPos);
Actor_Destroy(actor, globalCtx);
newHead = Actor_RemoveFromCategory(globalCtx, actorCtx, actor);
@@ -3487,7 +3487,7 @@ void func_800BB8EC(GameState* gameState, ActorContext* actorCtx, Actor** arg2, A
*/
void Enemy_StartFinishingBlow(GlobalContext* globalCtx, Actor* actor) {
globalCtx->actorCtx.freezeFlashTimer = 5;
- Audio_PlaySoundAtPosition(globalCtx, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
}
// blinking routine
@@ -4717,7 +4717,7 @@ void Actor_SpawnIceEffects(GlobalContext* globalCtx, Actor* actor, Vec3f limbPos
s16 yaw;
s32 j;
- Audio_PlaySoundAtPosition(globalCtx, &actor->world.pos, 30, NA_SE_EV_ICE_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &actor->world.pos, 30, NA_SE_EV_ICE_BROKEN);
for (i = 0; i < limbPosCount; i++) {
yaw = Actor_YawToPoint(actor, limbPos);
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index 44885d6c7..ddf21fe17 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -1525,7 +1525,7 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli
if (collider->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
} else {
- func_8019F1C0(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
+ Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == TOUCH_SFX_NORMAL) {
EffectSsHitMark_SpawnFixedScale(globalCtx, 3, hitPos);
@@ -1539,14 +1539,14 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli
if (collider->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
} else {
- func_8019F1C0(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
+ Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == TOUCH_SFX_WOOD) {
EffectSsHitMark_SpawnFixedScale(globalCtx, 1, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_REFLECTION_WOOD);
} else {
- func_8019F1C0(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
+ Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
}
}
}
@@ -1557,13 +1557,13 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
if (acInfo->elemType == ELEMTYPE_UNK0) {
- func_8019F1C0(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
+ Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
- func_8019F1C0(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
+ Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
- func_8019F1C0(&at->actor->projectedPos, 0);
+ Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
- func_8019F1C0(&at->actor->projectedPos, 0);
+ Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
}
}
return 1;
@@ -1618,7 +1618,7 @@ void CollisionCheck_HitEffects(GlobalContext* globalCtx, Collider* at, ColliderI
if (ac->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
} else {
- func_8019F1C0(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
+ Audio_PlaySfxAtPos(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
}
}
@@ -3905,7 +3905,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v
*/
void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(globalCtx, v);
- func_8019F1C0(pos, NA_SE_IT_SHIELD_REFLECT_SW);
+ Audio_PlaySfxAtPos(pos, NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3945,7 +3945,7 @@ void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* v,
shieldParticleInitWood.lightPoint.z = shieldParticleInitWood.position.z;
Effect_Add(globalCtx, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &shieldParticleInitWood);
- func_8019F1C0(pos, NA_SE_IT_REFLECTION_WOOD);
+ Audio_PlaySfxAtPos(pos, NA_SE_IT_REFLECTION_WOOD);
}
/**
diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c
index fddcf7f95..11545da01 100644
--- a/src/code/z_effect_soft_sprite.c
+++ b/src/code/z_effect_soft_sprite.c
@@ -58,11 +58,11 @@ EffectSs* EffectSS_GetTable() {
void EffectSS_Delete(EffectSs* effectSs) {
if (effectSs->flags & 2) {
- func_801A72CC(&effectSs->pos);
+ Audio_StopSfxByPos(&effectSs->pos);
}
if (effectSs->flags & 4) {
- func_801A72CC(&effectSs->vec);
+ Audio_StopSfxByPos(&effectSs->vec);
}
EffectSS_ResetEntry(effectSs);
diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c
index ec32550f8..2f0668c66 100644
--- a/src/code/z_en_item00.c
+++ b/src/code/z_en_item00.c
@@ -858,7 +858,7 @@ Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 param
spawnedActor = Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) << 9) & 0xFE00) | 0x102);
if (!Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F)) {
- Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
spawnedActor =
@@ -866,7 +866,7 @@ Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 param
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
if (param20000 == 0) {
if (!Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F)) {
- Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
}
}
@@ -924,7 +924,7 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s32 para
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
}
if (Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F) == 0) {
- Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
params = func_800A7650(params & 0xFF);
@@ -1080,7 +1080,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
if (gSaveContext.health <= 0x10) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, 2);
- Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
return;
}
diff --git a/src/code/z_fireobj.c b/src/code/z_fireobj.c
index 7c5de646a..2cf05e02a 100644
--- a/src/code/z_fireobj.c
+++ b/src/code/z_fireobj.c
@@ -131,7 +131,7 @@ void FireObj_UpdateStateTransitions(GlobalContext* globalCtx, FireObj* fire) {
}
} else if (player->unk_B28 == 0) {
player->unk_B28 = 0xD2;
- Audio_PlaySoundAtPosition(globalCtx, &fire->position, 20, NA_SE_EV_FLAME_IGNITION);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &fire->position, 20, NA_SE_EV_FLAME_IGNITION);
} else if (player->unk_B28 < 0xC8) {
player->unk_B28 = 0xC8;
}
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index 5bc49c8ac..84eb8c051 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -647,8 +647,8 @@ void func_801000CC(u16 sfxId) {
func_8019F128(sfxId);
}
-void func_801000F4(s32 a0, u16 sfxId) {
- func_8019F1C0(a0, sfxId);
+void Lib_PlaySfxAtPos(Vec3f* pos, u16 sfxId) {
+ Audio_PlaySfxAtPos(pos, sfxId);
}
void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 a, Vec3f* src, Vec3f* dst) {
diff --git a/src/code/z_sound_source.c b/src/code/z_sound_source.c
new file mode 100644
index 000000000..ba7036a4c
--- /dev/null
+++ b/src/code/z_sound_source.c
@@ -0,0 +1,75 @@
+#include "global.h"
+
+void SoundSource_InitAll(GlobalContext* globalCtx) {
+ SoundSource* sources = &globalCtx->soundSources[0];
+ s32 i;
+
+ // clang-format off
+ for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); i++) { sources[i].countdown = 0; }
+ // clang-format on
+}
+
+void SoundSource_UpdateAll(GlobalContext* globalCtx) {
+ SoundSource* source = &globalCtx->soundSources[0];
+ s32 i;
+
+ for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); i++) {
+ if (source->countdown != 0) {
+ if (DECR(source->countdown) == 0) {
+ Audio_StopSfxByPos(&source->projectedPos);
+ } else {
+ SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
+ if (source->playSfxEachFrame) {
+ Audio_PlaySfxAtPos(&source->projectedPos, source->sfxId);
+ }
+ }
+ }
+
+ source++;
+ }
+}
+
+void SoundSource_Add(GlobalContext* globalCtx, Vec3f* worldPos, u32 duration, u16 sfxId, u32 playSfxEachFrame) {
+ s32 countdown;
+ SoundSource* source;
+ s32 smallestCountdown = 0xFFFF;
+ SoundSource* backupSource = NULL;
+ s32 i;
+
+ source = &globalCtx->soundSources[0];
+ for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); i++) {
+ if (source->countdown == 0) {
+ break;
+ }
+
+ // Store the sound source with the smallest remaining countdown
+ countdown = source->countdown;
+ if (countdown < smallestCountdown) {
+ smallestCountdown = countdown;
+ backupSource = source;
+ }
+ source++;
+ }
+
+ // If no sound source is available, replace the sound source with the smallest remaining countdown
+ if (i >= ARRAY_COUNT(globalCtx->soundSources)) {
+ source = backupSource;
+ Audio_StopSfxByPos(&source->projectedPos);
+ }
+
+ source->worldPos = *worldPos;
+ source->countdown = duration;
+ source->playSfxEachFrame = playSfxEachFrame;
+ source->sfxId = sfxId;
+
+ SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
+ Audio_PlaySfxAtPos(&source->projectedPos, sfxId);
+}
+
+void SoundSource_PlaySfxAtFixedWorldPos(GlobalContext* globalCtx, Vec3f* worldPos, u32 duration, u16 sfxId) {
+ SoundSource_Add(globalCtx, worldPos, duration, sfxId, false);
+}
+
+void SoundSource_PlaySfxEachFrameAtFixedWorldPos(GlobalContext* globalCtx, Vec3f* worldPos, u32 duration, u16 sfxId) {
+ SoundSource_Add(globalCtx, worldPos, duration, sfxId, true);
+}
diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
index 6e4841bce..104597698 100644
--- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
+++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
@@ -149,7 +149,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
}
}
this->timer = 0;
- func_8019F1C0(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_CRE);
+ Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_CRE);
return;
}
@@ -265,10 +265,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
}
}
func_808C1154(this);
- func_8019F1C0(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_OBJ);
+ Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_OBJ);
} else {
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &this->actor.world.pos);
- func_8019F1C0(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT);
+ Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT);
}
} else {
if (CHECK_BTN_ANY(CONTROLLER1(globalCtx)->press.button,
diff --git a/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c b/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c
index 389f80809..e75367f60 100644
--- a/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c
+++ b/src/overlays/actors/ovl_Bg_Goron_Oyu/z_bg_goron_oyu.c
@@ -78,7 +78,7 @@ void func_80B40160(BgGoronOyu* this, GlobalContext* globalCtx) {
func_80B40080(this);
}
- func_8019F1C0(&D_80B40780, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
+ Audio_PlaySfxAtPos(&D_80B40780, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
}
void func_80B401F8(BgGoronOyu* this, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c b/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c
index 44f67c5bd..d497492f3 100644
--- a/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c
+++ b/src/overlays/actors/ovl_Bg_Icicle/z_bg_icicle.c
@@ -107,7 +107,7 @@ void BgIcicle_Break(BgIcicle* this, GlobalContext* globalCtx, f32 arg2) {
s32 j;
s32 i;
- Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
for (i = 0; i < 2; i++) {
for (j = 0; j < 10; j++) {
diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c
index 2d404126d..f60141c5d 100644
--- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c
+++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c
@@ -1103,7 +1103,7 @@ void func_809DBFB4(Boss02* this, GlobalContext* globalCtx) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
this->unk_015C = 1;
} else {
- func_8019F1C0(&this->unk_167C, NA_SE_EN_INBOSS_DAMAGE_OLD);
+ Audio_PlaySfxAtPos(&this->unk_167C, NA_SE_EN_INBOSS_DAMAGE_OLD);
this->unk_015C = 10;
}
diff --git a/src/overlays/actors/ovl_Boss_04/z_boss_04.c b/src/overlays/actors/ovl_Boss_04/z_boss_04.c
index 6e3fa14e3..67ea1702e 100644
--- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c
+++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c
@@ -551,7 +551,7 @@ void func_809ED2A0(Boss04* this, GlobalContext* globalCtx) {
if ((this->unk_1F8 == 2) || (this->unk_1F8 == 5)) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_LARGE_EXPLOSION);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_BIG_BOMB_EXPLOSION);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_BIG_BOMB_EXPLOSION);
}
if (this->unk_1FA == 3) {
diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c
index ef6f258a7..99a46c1e2 100644
--- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c
+++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c
@@ -668,7 +668,7 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 64:
- func_8019F1C0(&this->unk_310, NA_SE_EN_STAL06_SURPRISED);
+ Audio_PlaySfxAtPos(&this->unk_310, NA_SE_EN_STAL06_SURPRISED);
break;
case 327:
@@ -688,11 +688,11 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
case 486:
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
- func_8019F1C0(&this->unk_310, NA_SE_EN_STAL08_CRY_BIG);
+ Audio_PlaySfxAtPos(&this->unk_310, NA_SE_EN_STAL08_CRY_BIG);
break;
case 496:
- func_8019F1C0(&this->unk_310, NA_SE_EN_STAL09_SCREAM);
+ Audio_PlaySfxAtPos(&this->unk_310, NA_SE_EN_STAL09_SCREAM);
break;
case 590:
@@ -704,7 +704,7 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
break;
case 594:
- func_8019F1C0(&this->unk_310, NA_SE_EN_STAL24_SCREAM2);
+ Audio_PlaySfxAtPos(&this->unk_310, NA_SE_EN_STAL24_SCREAM2);
break;
}
diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
index 9f55e3e0b..d32947951 100644
--- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
+++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
@@ -388,7 +388,7 @@ void EnBigslime_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
Collider_DestroyCylinder(globalCtx, &this->gekkoCollider);
- func_801A72CC(&this->gekkoProjectedPos);
+ Audio_StopSfxByPos(&this->gekkoProjectedPos);
}
void EnBigslime_DynamicVtxCopyState(EnBigslime* this) {
@@ -894,7 +894,7 @@ void EnBigslime_SetTargetVtxFromPreFrozen(EnBigslime* this) {
* Plays the standard Gekko sound effects without reverb
*/
void EnBigslime_GekkoSfxOutsideBigslime(EnBigslime* this, u16 sfxId) {
- func_8019F1C0(&this->gekkoProjectedPos, sfxId);
+ Audio_PlaySfxAtPos(&this->gekkoProjectedPos, sfxId);
}
/**
@@ -2436,7 +2436,7 @@ void EnBigslime_SetupFrogSpawn(EnBigslime* this, GlobalContext* globalCtx) {
worldPos = &this->actor.world.pos;
dustPos.z = (Math_CosS(yawReverse) * 20.0f) + this->actor.world.pos.z;
- Audio_PlaySoundAtPosition(globalCtx, worldPos, 40, NA_SE_EN_NPC_APPEAR);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, worldPos, 40, NA_SE_EN_NPC_APPEAR);
// dust cloud where the red frog appears
func_800B0DE0(globalCtx, &dustPos, &gZeroVec3f, &gZeroVec3f, &dustPrimColor, &dustEnvColor, 500, 50);
diff --git a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c
index 084439a4b..4664f2b9f 100644
--- a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c
+++ b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c
@@ -421,7 +421,7 @@ void func_80BFEB64(EnBomjima* this, GlobalContext* globalCtx) {
sp40.y = this->unk_2F0->actor.world.pos.y - randPlusMinusPoint5Scaled(40.0f);
sp40.z = (Math_CosS(sp3E) * (Rand_ZeroFloat(20.0f) + 40.0f)) + this->unk_2F0->actor.world.pos.z;
- Audio_PlaySoundAtPosition(globalCtx, &sp40, 50, NA_SE_EV_BOMBERS_SHOT_EXPLOSUIN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &sp40, 50, NA_SE_EV_BOMBERS_SHOT_EXPLOSUIN);
EffectSsHitMark_SpawnFixedScale(globalCtx, 0, &sp40);
this->unk_2BC++;
diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
index 30b749c0d..e75bbade9 100644
--- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
+++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
@@ -548,7 +548,7 @@ void func_808BE4D4(EnDekunuts* this, GlobalContext* globalCtx) {
sp40.y = this->actor.world.pos.y + 18.0f;
sp40.z = this->actor.world.pos.z;
EffectSsDeadDb_Spawn(globalCtx, &sp40, &gZeroVec3f, &gZeroVec3f, &D_808BEF90, &D_808BEF94, 200, 0, 13);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
sp40.y = this->actor.world.pos.y + 10.0f;
EffectSsHahen_SpawnBurst(globalCtx, &sp40, 3.0f, 0, 12, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xE0);
diff --git a/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c b/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c
index 0bf4b18ed..e0eed3f3c 100644
--- a/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c
+++ b/src/overlays/actors/ovl_En_Elfbub/z_en_elfbub.c
@@ -117,7 +117,7 @@ void EnElfbub_Pop(EnElfbub* this, GlobalContext* globalCtx) {
Rand_S16Offset(100, 50), 25, 0);
}
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK);
Actor_MarkForDeath(&this->actor);
}
}
diff --git a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c
index dcb634f42..ee36b9107 100644
--- a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c
+++ b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c
@@ -912,7 +912,7 @@ void func_80B2A498(EnFish2* this, GlobalContext* globalCtx) {
Vec3f sp6C;
s32 i;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_BOMB_DROP_WATER);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_BOMB_DROP_WATER);
for (i = 0; i < 10; i++) {
Math_Vec3f_Copy(&sp6C, &this->actor.world.pos);
diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c
index a1fedd7a9..4de4d0955 100644
--- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c
+++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c
@@ -2196,7 +2196,7 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
D_8091726C = 0.5f;
D_80917268 = Rand_ZeroFloat(1.9f);
sFishMouthOffset.y = 500.0f;
- func_8019F1C0(&D_8090D614, NA_SE_IT_SWORD_SWING_HARD);
+ Audio_PlaySfxAtPos(&D_8090D614, NA_SE_IT_SWORD_SWING_HARD);
}
}
break;
@@ -2275,8 +2275,8 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
D_809101D0 = 0.0;
} else {
Math_ApproachF(&D_809101C4, 0.0f, 1.0f, 0.05f);
- func_8019F1C0(&D_8090D614,
- NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT
+ Audio_PlaySfxAtPos(&D_8090D614,
+ NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT
}
} else {
f32 sp7C = WATER_SURFACE_Y(globalCtx);
@@ -2296,7 +2296,7 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
if ((sLurePos.y <= sp7C) && (sp7C < spE0) && (sp7C == WATER_SURFACE_Y(globalCtx))) {
D_80917264 = 10;
- func_8019F1C0(&D_8090D614, NA_SE_EV_BOMB_DROP_WATER);
+ Audio_PlaySfxAtPos(&D_8090D614, NA_SE_EV_BOMB_DROP_WATER);
D_80917248.y = 0.0f;
D_80917238.y *= 0.2f;
@@ -2322,8 +2322,8 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
}
} else {
Math_ApproachZeroF(&D_809101C4, 1.0f, 0.05f);
- func_8019F1C0(&D_8090D614,
- NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT
+ Audio_PlaySfxAtPos(&D_8090D614,
+ NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT
}
}
@@ -2460,7 +2460,7 @@ void EnFishing_UpdateLure(EnFishing* this, GlobalContext* globalCtx) {
sLureRot.x = 0.0f;
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
D_809101C0 += 6.0f;
- func_8019F1C0(&D_8090D614, NA_SE_PL_WALK_SAND);
+ Audio_PlaySfxAtPos(&D_8090D614, NA_SE_PL_WALK_SAND);
}
} else {
if (D_809101C0 > 150.0f) {
@@ -5593,7 +5593,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &sStreamSoundPos, &sStreamSoundProjectedPos,
&sProjectedW);
- func_8019F1C0(&sStreamSoundProjectedPos, NA_SE_EV_WATER_WALL - SFX_FLAG);
+ Audio_PlaySfxAtPos(&sStreamSoundProjectedPos, NA_SE_EV_WATER_WALL - SFX_FLAG);
if (gSaveContext.language == 0) { // Added in MM
gSaveContext.minigameScore = D_8090CCF8;
diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c
index d7ccc8b15..fe7422610 100644
--- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c
+++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c
@@ -683,7 +683,7 @@ void func_808D1ED4(EnFloormas* this, GlobalContext* globalCtx) {
sp34.y = this->actor.world.pos.y + 15.0f;
sp34.z = this->actor.world.pos.z;
func_800B3030(globalCtx, &sp34, &gZeroVec3f, &gZeroVec3f, 150, -10, 2);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
this->actionFunc = func_808D1F7C;
}
diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
index dc8e0bfa5..7fbf4213f 100644
--- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
+++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
@@ -965,7 +965,7 @@ void func_80941060(EnGoroiwa* this, GlobalContext* globalCtx) {
}
void func_80941274(EnGoroiwa* this, GlobalContext* globalCtx) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_SNOWBALL_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_SNOWBALL_BROKEN);
}
void EnGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c
index 627aec919..66300dda5 100644
--- a/src/overlays/actors/ovl_En_In/z_en_in.c
+++ b/src/overlays/actors/ovl_En_In/z_en_in.c
@@ -351,9 +351,9 @@ void func_808F374C(EnIn* this, GlobalContext* globalCtx) {
if (Animation_OnFrame(&this->skelAnime, 8.0f)) {
func_8019F88C(&this->actor.projectedPos, NA_SE_VO_IN_LASH_0, 2);
if (Rand_ZeroOne() < 0.3f) {
- func_8019F1C0(&this->actor.projectedPos, NA_SE_IT_INGO_HORSE_NEIGH);
+ Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_INGO_HORSE_NEIGH);
}
- func_8019F1C0(&this->actor.projectedPos, NA_SE_IT_LASH);
+ Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_LASH);
}
}
if (this->skelAnime.animation == &D_060198A8 && Animation_OnFrame(&this->skelAnime, 20.0f)) {
diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c
index 37b6aace5..f6b2438d4 100644
--- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c
+++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c
@@ -2371,7 +2371,7 @@ void func_80B47D30(Actor* thisx, GlobalContext* globalCtx) {
thisx->gravity = 0.0f;
thisx->velocity.y = acAttached->velocity.y * 0.5f;
thisx->velocity.y = CLAMP(thisx->velocity.y, -30.0f, 30.0f);
- Audio_PlaySoundAtPosition(globalCtx, &thisx->world.pos, 50, NA_SE_EN_INVADER_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &thisx->world.pos, 50, NA_SE_EN_INVADER_DEAD);
func_80B47830(this);
}
diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
index abc5474d8..f4bef2866 100644
--- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
+++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
@@ -467,7 +467,7 @@ void func_8095E660(EnIshi* this, GlobalContext* globalCtx) {
if (Actor_HasParent(&this->actor, globalCtx)) {
func_8095E934(this);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, D_8095F7AC[sp38]);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, D_8095F7AC[sp38]);
if (ENISHI_GET_2(&this->actor)) {
func_8095E204(this, globalCtx);
}
@@ -482,7 +482,7 @@ void func_8095E660(EnIshi* this, GlobalContext* globalCtx) {
return;
}
func_8095DF90(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, D_8095F6D4[sp38], D_8095F6D0[sp38]);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, D_8095F6D4[sp38], D_8095F6D0[sp38]);
D_8095F6D8[sp38](&this->actor, globalCtx);
D_8095F6E0[sp38](this, globalCtx);
Actor_MarkForDeath(&this->actor);
@@ -585,7 +585,7 @@ void func_8095EBDC(EnIshi* this, GlobalContext* globalCtx) {
D_8095F6D8[sp70](&this->actor, globalCtx);
if (!(this->actor.bgCheckFlags & 0x20)) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, D_8095F6D4[sp70], D_8095F6D0[sp70]);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, D_8095F6D4[sp70], D_8095F6D0[sp70]);
D_8095F6E0[sp70](this, globalCtx);
}
@@ -632,7 +632,7 @@ void func_8095EBDC(EnIshi* this, GlobalContext* globalCtx) {
D_8095F690 >>= 2;
D_8095F694 >>= 2;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
this->actor.bgCheckFlags &= ~0x40;
}
@@ -660,7 +660,7 @@ void func_8095F0A4(EnIshi* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, D_8095F6D4[sp28], D_8095F6D0[sp28]);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, D_8095F6D4[sp28], D_8095F6D0[sp28]);
D_8095F6D8[sp28](&this->actor, globalCtx);
D_8095F6E0[sp28](this, globalCtx);
this->actor.draw = NULL;
diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
index 60857e860..0ccec5015 100644
--- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
+++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
@@ -1011,7 +1011,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, GlobalContext* globalCtx) {
if (globalCtx->sceneNum == SCENE_8ITEMSHOP) {
EffectSsGSplash_Spawn(globalCtx, &tempWorldPos, 0, 0, 0, randPlusMinusPoint5Scaled(100.0f) + 200.0f);
- Audio_PlaySoundAtPosition(globalCtx, &tempWorldPos, 0x32, NA_SE_EV_BOMB_DROP_WATER);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &tempWorldPos, 0x32, NA_SE_EV_BOMB_DROP_WATER);
} else {
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos,
diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.c b/src/overlays/actors/ovl_En_Kame/z_en_kame.c
index 7aae7b7dd..86c924298 100644
--- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c
+++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c
@@ -593,7 +593,8 @@ void func_80AD8388(EnKame* this, GlobalContext* globalCtx) {
if (this->unk_29E > 0) {
this->unk_29E--;
if (this->unk_29E == 0) {
- func_800F0590(globalCtx, &this->actor.world.pos, 21, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
+ SoundSource_PlaySfxEachFrameAtFixedWorldPos(globalCtx, &this->actor.world.pos, 21,
+ NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
}
} else {
this->actor.scale.x -= 0.001f;
diff --git a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c
index 8fd3a4075..d32735035 100644
--- a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c
+++ b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c
@@ -342,7 +342,7 @@ void func_80A5BDB0(EnKusa2* this, GlobalContext* globalCtx) {
sp50.z = this->actor.world.pos.z;
EffectSsGSplash_Spawn(globalCtx, &sp50, NULL, NULL, 0, 280);
EffectSsGRipple_Spawn(globalCtx, &sp50, 300, 700, 0);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
}
void func_80A5BF38(EnKusa2* this, s32 arg1) {
@@ -375,7 +375,7 @@ s32 func_80A5BFD8(EnKusa2* this, GlobalContext* globalCtx) {
func_80A5CF44(this);
func_80A5BD14(this, globalCtx, (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1000000) ? 1 : 0);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
func_80A5BD94(this);
Actor_MarkForDeath(&this->actor);
return true;
@@ -959,7 +959,7 @@ void func_80A5D7C4(EnKusa2* this, GlobalContext* globalCtx) {
s16 sp2A;
if (Actor_HasParent(&this->actor, globalCtx)) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_PL_PULL_UP_PLANT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_PL_PULL_UP_PLANT);
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
this->actor.shape.shadowAlpha = 60;
this->actor.room = -1;
@@ -1200,7 +1200,7 @@ void func_80A5E210(EnKusa2* this, GlobalContext* globalCtx) {
this->actor.speedXZ *= 0.4f;
if (this->actor.bgCheckFlags & 2) {
func_80A5D178(this);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_KUSAMUSHI_HIDE);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_KUSAMUSHI_HIDE);
}
}
diff --git a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c
index 9892af79b..eecc28790 100644
--- a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c
+++ b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c
@@ -288,7 +288,7 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, GlobalContext* globalCtx) {
default:
func_801477B4(globalCtx);
EnMinifrog_SetCamera(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_NPC_FADEAWAY);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_NPC_FADEAWAY);
if (this->actor.cutscene != -1) {
if (ActorCutscene_GetCurrentIndex() == this->actor.cutscene) {
ActorCutscene_Stop(this->actor.cutscene);
diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
index 1af1ec8b8..c99daf298 100644
--- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
+++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
@@ -121,9 +121,9 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) {
spawnBurstPos.z = this->actor.world.pos.z;
EffectSsHahen_SpawnBurst(globalCtx, &spawnBurstPos, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
if (this->actor.params == 1) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_NUTS_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_NUTS_BROKEN);
} else {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
}
Actor_MarkForDeath(&this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c
index c85f1ac49..22f969379 100644
--- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c
+++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c
@@ -964,7 +964,7 @@ void EnPametfrog_SetupSpawnFrog(EnPametfrog* this, GlobalContext* globalCtx) {
vec1.z = (Math_CosS(yaw) * 20.0f) + this->actor.world.pos.z;
this->collider.base.ocFlags1 &= ~OC1_ON;
func_800B0DE0(globalCtx, &vec1, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 800, 50);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_NPC_APPEAR);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_NPC_APPEAR);
Flags_SetClearTemp(globalCtx, globalCtx->roomCtx.currRoom.num);
for (i = 0; i < 25; i++) {
diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
index 11a15bdc2..c47f67c27 100644
--- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
+++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
@@ -434,9 +434,9 @@ void func_80897A94(EnPeehat* this, GlobalContext* globalCtx) {
func_808982E0(this);
} else if ((this->colliderCylinder.base.acFlags & AC_HIT) || (this->actor.bgCheckFlags & 1)) {
func_800B3030(globalCtx, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 40, 7, 0);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
if (!(this->actor.bgCheckFlags & 1)) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_PIHAT_SM_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_PIHAT_SM_DEAD);
}
Actor_MarkForDeath(&this->actor);
} else if (this->colliderTris.base.atFlags & AT_HIT) {
@@ -586,8 +586,8 @@ void func_80898338(EnPeehat* this, GlobalContext* globalCtx) {
if (Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f)) {
if (this->actor.params != 0) {
func_800B3030(globalCtx, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 40, 7, 0);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_EXTINCT);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_PIHAT_SM_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_PIHAT_SM_DEAD);
Actor_MarkForDeath(&this->actor);
} else {
func_80897864(this);
diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c
index d287414b3..8f1500810 100644
--- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c
+++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c
@@ -355,7 +355,7 @@ void func_80B7114C(EnRailSkb* this, GlobalContext* globalCtx) {
this->unk_402 |= 1;
func_80B712FC(this);
} else {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
func_80B71488(this);
}
} else if (this->unk_3F0 == 1) {
@@ -379,7 +379,7 @@ void func_80B7123C(EnRailSkb* this, GlobalContext* globalCtx) {
this->unk_402 |= 1;
func_80B712FC(this);
} else {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
func_80B71488(this);
}
}
@@ -881,7 +881,7 @@ void func_80B726B4(EnRailSkb* this, GlobalContext* globalCtx) {
end = ARRAY_COUNT(this->unk_234);
}
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
for (i = 0; i < end; i++) {
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_234[i]);
@@ -967,7 +967,7 @@ void func_80B72970(EnRailSkb* this, GlobalContext* globalCtx) {
if ((Actor_ApplyDamage(&this->actor) == 0) && (this->actor.colChkInfo.damageEffect != 3) &&
(this->actor.colChkInfo.damageEffect != 4)) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
func_80B71488(this);
return;
}
diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c
index c52c7c178..f1c6e9a16 100644
--- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c
+++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c
@@ -721,7 +721,7 @@ void func_808FB42C(EnRr* this, GlobalContext* globalCtx) {
sp74.y = this->actor.world.pos.y + 20.0f;
sp74.z = this->actor.world.pos.z;
func_800B3030(globalCtx, &sp74, &gZeroVec3f, &gZeroVec3f, 100, 0, 0);
- Audio_PlaySoundAtPosition(globalCtx, &sp74, 11, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &sp74, 11, NA_SE_EN_EXTINCT);
} else {
temp_f20 = this->actor.scale.y * 66.66667f;
diff --git a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c
index cebb90123..414e1123b 100644
--- a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c
+++ b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c
@@ -613,7 +613,7 @@ void EnRuppecrow_FallToDespawn(EnRuppecrow* this, GlobalContext* globalCtx) {
func_800B3030(globalCtx, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, (this->actor.scale.x * 10000.0f),
0x0, 0x0);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0xB, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 0xB, NA_SE_EN_EXTINCT);
Actor_MarkForDeath(&this->actor);
return;
}
diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c
index 78f36abfd..59417e2b2 100644
--- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c
+++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c
@@ -343,7 +343,7 @@ void EnSb_UpdateDamage(EnSb* this, GlobalContext* globalCtx) {
}
this->isDead = true;
Enemy_StartFinishingBlow(globalCtx, &this->actor);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EN_BEE_FLY);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EN_BEE_FLY);
return;
}
hitPoint.x = this->collider.info.bumper.hitPos.x;
diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c
index 333717941..32802fb01 100644
--- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c
+++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c
@@ -734,7 +734,7 @@ void func_809961E4(EnSkb* this, GlobalContext* globalCtx) {
}
this->unk_3E4 = 0;
this->actor.flags &= ~1;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALKID_DEAD);
this->unk_3DE = 7;
this->actionFunc = func_80996284;
}
@@ -1011,7 +1011,7 @@ void func_80996BEC(EnSkb* this, GlobalContext* globalCtx) {
end = 14;
}
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
for (i = 0; i < end; i++) {
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_234[i]);
diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c
index 4d6520bb3..e3116fb3c 100644
--- a/src/overlays/actors/ovl_En_St/z_en_st.c
+++ b/src/overlays/actors/ovl_En_St/z_en_st.c
@@ -611,7 +611,7 @@ s32 func_808A6580(EnSt* this, GlobalContext* globalCtx) {
if (ENST_GET_3F(&this->actor) != ENST_3F_63) {
Flags_SetSwitch(globalCtx, ENST_GET_3F(&this->actor));
}
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALTU_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALTU_DEAD);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c
index 55fae4cad..dc1064040 100644
--- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c
+++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c
@@ -1191,7 +1191,7 @@ void func_80BAD380(EnSuttari* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 0.0f;
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_SMALL_EXPLOSION);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_IT_BOMB_EXPLOSION);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_IT_BOMB_EXPLOSION);
Actor_MarkForDeath(&this->actor);
return;
}
diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c
index d7d547afd..a851f2ee9 100644
--- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c
+++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c
@@ -686,7 +686,7 @@ s32 func_808DA08C(EnSw* this, GlobalContext* globalCtx) {
this->unk_45C = 0;
} else if (!func_808D90C4(this)) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALTU_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALTU_DEAD);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
if (!ENSW_GET_3(&this->actor)) {
diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c
index b28c8b1cc..cee811bdf 100644
--- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c
+++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c
@@ -661,7 +661,7 @@ void func_80C11DF0(EnThiefbird* this, GlobalContext* globalCtx) {
func_800B3030(globalCtx, &this->unk_350[i], &gZeroVec3f, &gZeroVec3f, 0x8C, 0, 0);
}
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
Item_DropCollectible(globalCtx, &this->actor.world.pos, ITEM00_RUPEE_HUGE);
for (i = 0; i < ARRAY_COUNT(D_80C13664); i++) {
diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c
index 041a68818..5afdd500f 100644
--- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c
+++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c
@@ -644,7 +644,7 @@ void func_80895020(EnTite* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 0.0f;
this->collider.base.acFlags &= ~AC_ON;
this->actor.colorFilterTimer = 0;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_TEKU_DEAD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_TEKU_DEAD);
this->actor.flags &= ~1;
this->actor.flags |= 0x10;
this->unk_2BA = 1;
@@ -678,7 +678,7 @@ void func_808951B8(EnTite* this, GlobalContext* globalCtx) {
if (this->unk_2BC == 0) {
for (i = 0; i < ARRAY_COUNT(this->unk_2D0); i++) {
func_800B3030(globalCtx, &this->unk_2D0[i], &gZeroVec3f, &gZeroVec3f, 40, 7, 1);
- Audio_PlaySoundAtPosition(globalCtx, &this->unk_2D0[i], 11, NA_SE_EN_EXTINCT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->unk_2D0[i], 11, NA_SE_EN_EXTINCT);
}
Actor_MarkForDeath(&this->actor);
} else {
diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
index b09eb87ae..05f4e76d7 100644
--- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
+++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
@@ -175,7 +175,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 0x20) && (this->actor.depthInWater > 15.0f)) {
EnTuboTrap_SpawnEffectsInWater(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_BOMB_DROP_WATER);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_BOMB_DROP_WATER);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_MarkForDeath(&this->actor);
return;
@@ -184,8 +184,8 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if (this->collider.base.atFlags & AT_BOUNCED) {
this->collider.base.atFlags &= ~AT_BOUNCED;
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_SHIELD_REFLECT_SW);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_SHIELD_REFLECT_SW);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_MarkForDeath(&this->actor);
return;
@@ -194,8 +194,8 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_MarkForDeath(&this->actor);
return;
@@ -206,8 +206,8 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if (&player->actor == this->collider.base.at) {
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
- Audio_PlaySoundAtPosition(globalCtx, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_MarkForDeath(&this->actor);
return;
@@ -216,7 +216,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1)) {
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_MarkForDeath(&this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c
index 843294728..5e45f8c03 100644
--- a/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c
+++ b/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.c
@@ -198,11 +198,11 @@ void EnWaterEffect_Update(Actor* thisx, GlobalContext* globalCtx2) {
if (phi_v0) {
ptr->unk_00 = 0;
- Audio_PlaySoundAtPosition(globalCtx, &ptr->unk_04, 30, NA_SE_EV_BOMB_DROP_WATER);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &ptr->unk_04, 30, NA_SE_EV_BOMB_DROP_WATER);
} else {
ptr->unk_04.y = this->actor.floorHeight;
if (ptr->unk_2A == 0) {
- Audio_PlaySoundAtPosition(globalCtx, &ptr->unk_04, 30, NA_SE_EV_WATERDROP_GRD);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &ptr->unk_04, 30, NA_SE_EV_WATERDROP_GRD);
ptr->unk_00 = 3;
ptr->unk_2C.x = 0.1f;
ptr->unk_2C.y = 0.6f;
@@ -215,7 +215,7 @@ void EnWaterEffect_Update(Actor* thisx, GlobalContext* globalCtx2) {
EffectSsGSplash_Spawn(globalCtx, &sp98, NULL, NULL, 1, 100);
} else {
ptr->unk_00 = 0;
- Audio_PlaySoundAtPosition(globalCtx, &ptr->unk_04, 30, NA_SE_EV_WATERDROP);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &ptr->unk_04, 30, NA_SE_EV_WATERDROP);
EffectSsGRipple_Spawn(globalCtx, &ptr->unk_04, 70, 500, 0);
EffectSsGRipple_Spawn(globalCtx, &ptr->unk_04, 70, 500, 10);
Math_Vec3f_Copy(&sp98, &ptr->unk_04);
@@ -493,7 +493,7 @@ void func_80A59C04(Actor* thisx, GlobalContext* globalCtx2) {
for (j = 0; j < 5; j++) {
func_80A599E8(this, &ptr->unk_04, 2);
}
- Audio_PlaySoundAtPosition(globalCtx, &ptr->unk_04, 30, NA_SE_EV_PLANT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &ptr->unk_04, 30, NA_SE_EV_PLANT_BROKEN);
}
ptr->unk_2A++;
}
diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c
index e1786b78c..a453e23e7 100644
--- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c
+++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c
@@ -1201,7 +1201,8 @@ void func_80992E0C(EnWf* this, GlobalContext* globalCtx) {
Vec3f sp60;
if (this->unk_2A0 == 25) {
- func_800F0590(globalCtx, &this->actor.world.pos, 36, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
+ SoundSource_PlaySfxEachFrameAtFixedWorldPos(globalCtx, &this->actor.world.pos, 36,
+ NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
}
this->unk_2A0--;
diff --git a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c
index 4dd2db5a5..0bdbf8679 100644
--- a/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c
+++ b/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.c
@@ -262,7 +262,7 @@ void func_80A49A44(EnWizFire* this, GlobalContext* globalCtx) {
if (this->collider.info.acHitInfo->toucher.dmgFlags == 0x1000) {
this->unk_168 = 0;
this->unk_148 = 1;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
}
}
@@ -317,7 +317,7 @@ void func_80A49FD8(EnWizFire* this, GlobalContext* globalCtx) {
if (this->collider.info.acHitInfo->toucher.dmgFlags == 0x1000) {
this->unk_168 = 0;
this->unk_148 = 1;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
}
}
}
@@ -382,7 +382,7 @@ void func_80A4A11C(EnWizFire* this, GlobalContext* globalCtx) {
D_80A4C1C0 = 1;
this->unk_148 = 1;
this->unk_16A = 0;
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
}
}
this->actor.world.pos.y = this->actor.floorHeight + 10.0f;
diff --git a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c
index 385ca2cc2..8e168cba8 100644
--- a/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c
+++ b/src/overlays/actors/ovl_Obj_Aqua/z_obj_aqua.c
@@ -184,7 +184,7 @@ void func_80ACBC8C(ObjAqua* this, GlobalContext* globalCtx) {
func_80ACBD34(this);
} else {
func_80ACB6A0(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EV_BOMB_DROP_WATER);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EV_BOMB_DROP_WATER);
Actor_MarkForDeath(&this->actor);
}
} else if (this->counter <= 0) {
diff --git a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c
index bd91aaaf0..e72dfb836 100644
--- a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c
+++ b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c
@@ -200,11 +200,11 @@ void func_80A1B914(ObjFlowerpot* this, GlobalContext* globalCtx) {
}
void func_80A1B994(ObjFlowerpot* this, GlobalContext* globalCtx) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
}
void func_80A1B9CC(ObjFlowerpot* this, GlobalContext* globalCtx) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
}
void func_80A1BA04(ObjFlowerpot* this, Vec3f* arg1) {
@@ -620,7 +620,7 @@ void func_80A1CEF4(ObjFlowerpot* this2, GlobalContext* globalCtx) {
}
func_80A1BD80(this, globalCtx);
func_80A1B994(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
Actor_MarkForDeath(&this->actor);
return;
}
diff --git a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c
index 49a5a7dbe..060a4e0c0 100644
--- a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c
+++ b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c
@@ -140,9 +140,9 @@ void func_80B3C624(ObjGhaka* this, GlobalContext* globalCtx) {
func_80B3C2C4(this, globalCtx);
gSaveContext.weekEventReg[20] |= 0x20;
func_80B3C260(this);
- func_8019F1C0(&D_80B3C960, NA_SE_EV_BLOCK_BOUND);
+ Audio_PlaySfxAtPos(&D_80B3C960, NA_SE_EV_BLOCK_BOUND);
} else {
- func_8019F1C0(&D_80B3C960, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
+ Audio_PlaySfxAtPos(&D_80B3C960, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
}
}
diff --git a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c
index 2c204e7ba..b4004c180 100644
--- a/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c
+++ b/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.c
@@ -410,9 +410,9 @@ void func_80A54CEC(ObjHugebombiwa* this, GlobalContext* globalCtx) {
}
if (!(ENHUGEBOMBIWA_GET_100(&this->actor))) {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 80, NA_SE_EV_WALL_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 80, NA_SE_EV_WALL_BROKEN);
} else {
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 80, NA_SE_EV_SNOWBALL_BROKEN);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 80, NA_SE_EV_SNOWBALL_BROKEN);
}
if (!(ENHUGEBOMBIWA_GET_100(&this->actor))) {
diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
index 8558127c8..34d45038a 100644
--- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
+++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
@@ -282,13 +282,13 @@ void ObjKibako_Idle(ObjKibako* this, GlobalContext* globalCtx) {
} else if ((this->actor.bgCheckFlags & 0x20) && (this->actor.depthInWater > 19.0f)) {
ObjKibako_WaterBreak(this, globalCtx);
ObjKibako_SpawnCollectible(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
Actor_MarkForDeath(&this->actor);
} else if (this->collider.base.acFlags & AC_HIT) {
ObjKibako_AirBreak(this, globalCtx);
ObjKibako_SpawnCollectible(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
Actor_MarkForDeath(&this->actor);
} else {
Actor_MoveWithGravity(&this->actor);
@@ -387,14 +387,14 @@ void ObjKibako_Thrown(ObjKibako* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 0xB) || (atHit) || (this->timer <= 0)) {
ObjKibako_AirBreak(this, globalCtx);
ObjKibako_SpawnCollectible(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
Actor_MarkForDeath(&this->actor);
} else {
if (this->actor.bgCheckFlags & 0x40) {
ObjKibako_WaterBreak(this, globalCtx);
ObjKibako_SpawnCollectible(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
- Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
Actor_MarkForDeath(&this->actor);
} else {
if (this->actor.velocity.y < -0.05f) {
diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
index 478dd0cf7..dd8029eca 100644
--- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
+++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
@@ -209,7 +209,7 @@ s32 ObjKibako2_ShouldBreak(ObjKibako2* this) {
void ObjKibako2_Idle(ObjKibako2* this, GlobalContext* globalCtx) {
if (ObjKibako2_ShouldBreak(this)) {
ObjKibako2_Break(this, globalCtx);
- Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
+ SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
this->dyna.actor.flags |= 0x10;
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
index 5454c9be3..d1fb1b23e 100644
--- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
+++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
@@ -209,7 +209,7 @@ void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx2) {
if (interaction <= OBJ_SYOKUDAI_INTERACTION_STICK) {
if (player->unk_B28 == 0) {
player->unk_B28 = 0xD2;
- func_8019F1C0(&thisx->projectedPos, NA_SE_EV_FLAME_IGNITION);
+ Audio_PlaySfxAtPos(&thisx->projectedPos, NA_SE_EV_FLAME_IGNITION);
} else if (player->unk_B28 < 0xC8) {
player->unk_B28 = 0xC8;
}