Audio Sfx Functions Decompiled and Documented (code_8019AF00.c) (#1242)

* sfx decomp and docs

* function headers

* namefixer

* oops

* better sfx name

* PR review

* namefixer

* PR review

* float

* namefixer

* namefixer

* namefixer

* PR Suggestions
This commit is contained in:
engineer124
2023-06-21 13:13:51 +10:00
committed by GitHub
parent 7194936203
commit 9c0fc94fe3
256 changed files with 1837 additions and 1401 deletions
+72 -45
View File
@@ -32,6 +32,20 @@ extern s16 D_801ED8DC; // 2 funcs
extern Mtx D_801ED8E0; // 1 func
extern Actor* D_801ED920; // 2 funcs. 1 out of z_actor
#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS (1 << 0)
#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 1)
#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 2)
#define ACTOR_AUDIO_FLAG_SFX_CENTERED_3 (1 << 3)
#define ACTOR_AUDIO_FLAG_SFX_TIMER (1 << 4)
#define ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE (1 << 5)
#define ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE (1 << 6)
#define ACTOR_AUDIO_FLAG_SFX_ALL \
(ACTOR_AUDIO_FLAG_SFX_TIMER | ACTOR_AUDIO_FLAG_SFX_CENTERED_3 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | \
ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_ACTOR_POS)
#define ACTOR_AUDIO_FLAG_SEQ_ALL (ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE | ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE)
#define ACTOR_AUDIO_FLAG_ALL (ACTOR_AUDIO_FLAG_SFX_ALL | ACTOR_AUDIO_FLAG_SEQ_ALL)
// Internal forward declarations
void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx);
Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayState* play);
@@ -663,7 +677,7 @@ void func_800B5814(TargetContext* targetCtx, Player* player, Actor* actor, GameS
sfxId =
CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_4 | ACTOR_FLAG_1) ? NA_SE_SY_LOCK_ON : NA_SE_SY_LOCK_ON_HUMAN;
play_sound(sfxId);
Audio_PlaySfx(sfxId);
}
targetCtx->targetCenterPos.x = actor->world.pos.x;
@@ -2164,7 +2178,7 @@ void func_800B8E1C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
*/
void Player_PlaySfx(Player* player, u16 sfxId) {
if (player->currentMask == PLAYER_MASK_GIANT) {
func_8019F170(&player->actor.projectedPos, sfxId);
Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb(&player->actor.projectedPos, sfxId);
} else {
AudioSfx_PlaySfx(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -2175,10 +2189,10 @@ void Player_PlaySfx(Player* player, u16 sfxId) {
* Play a sound effect at the actor's position
*/
void Actor_PlaySfx(Actor* actor, u16 sfxId) {
Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
Audio_PlaySfx_AtPos(&actor->projectedPos, sfxId);
}
void func_800B8EF4(PlayState* play, Actor* actor) {
void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor) {
SurfaceSfxOffset surfaceSfxOffset;
if (actor->bgCheckFlags & BGCHECKFLAG_WATER) {
@@ -2191,41 +2205,53 @@ void func_800B8EF4(PlayState* play, Actor* actor) {
surfaceSfxOffset = SurfaceType_GetSfxOffset(&play->colCtx, actor->floorPoly, actor->floorBgId);
}
Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
Audio_PlaySfxAtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
Audio_PlaySfx_AtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
Audio_PlaySfx_AtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
}
void func_800B8F98(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the center of the screen using the shared audioFlag system
*/
void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x02;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_1;
}
void func_800B8FC0(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the center of the screen using the shared audioFlag system
*/
void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 4;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2;
}
void func_800B8FE8(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the center of the screen using the shared audioFlag system
*/
void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x08;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_3;
}
void func_800B9010(Actor* actor, u16 sfxId) {
/**
* Play a sfx at the actor's position using the shared audioFlag system
*/
void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId) {
actor->sfxId = sfxId;
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x01;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS;
}
void func_800B9038(Actor* actor, s32 timer) {
actor->audioFlags &= ~(0x10 | 0x08 | 0x04 | 0x02 | 0x01);
actor->audioFlags |= 0x10;
void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer) {
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL;
actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_TIMER;
// The sfxId here are not actually sound effects, but instead this is data that gets sent into
// the io ports of the music macro language (func_801A0810 / Audio_PlaySfxAtPosWithSoundScriptIO is
// the function that it's used for)
// the io ports of the music macro language (Audio_PlaySfx_AtPosWithChannelIO / Audio_PlaySfxAtPosWithSoundScriptIO
// is the function that it's used for)
if (timer < 40) {
actor->sfxId = 3;
} else if (timer < 100) {
@@ -2235,12 +2261,12 @@ void func_800B9038(Actor* actor, s32 timer) {
}
}
void func_800B9084(Actor* actor) {
actor->audioFlags |= 0x20;
void Actor_PlaySeq_FlaggedKamaroDance(Actor* actor) {
actor->audioFlags |= ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE;
}
void func_800B9098(Actor* actor) {
actor->audioFlags |= 0x40;
void Actor_PlaySeq_FlaggedMusicBoxHouse(Actor* actor) {
actor->audioFlags |= ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE;
}
s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4) {
@@ -2368,7 +2394,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
}
actor->sfxId = 0;
actor->audioFlags &= ~0x7F;
actor->audioFlags &= ~ACTOR_AUDIO_FLAG_ALL;
if (actor->init != NULL) {
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
@@ -2545,7 +2571,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor = NULL;
if (actorCtx->targetContext.unk4B != 0) {
actorCtx->targetContext.unk4B = 0;
play_sound(NA_SE_SY_LOCK_OFF);
Audio_PlaySfx(NA_SE_SY_LOCK_OFF);
}
}
@@ -2630,31 +2656,32 @@ void Actor_Draw(PlayState* play, Actor* actor) {
CLOSE_DISPS(play->state.gfxCtx);
}
void func_800B9D1C(Actor* actor) {
void Actor_UpdateFlaggedAudio(Actor* actor) {
s32 sfxId = actor->sfxId;
if (sfxId != 0) {
if (actor->audioFlags & 2) {
if (sfxId != NA_SE_NONE) {
if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) {
AudioSfx_PlaySfx(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else if (actor->audioFlags & 4) {
play_sound(sfxId);
} else if (actor->audioFlags & 8) {
func_8019F128(sfxId);
} else if (actor->audioFlags & 0x10) {
func_801A0810(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1));
} else if (actor->audioFlags & 1) {
Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) {
Audio_PlaySfx(sfxId);
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_3) {
Audio_PlaySfx_2(sfxId);
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_TIMER) {
Audio_PlaySfx_AtPosWithChannelIO(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1));
} else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS) {
Audio_PlaySfx_AtPos(&actor->projectedPos, sfxId);
}
}
if (sfxId) {}
//! FAKE:
if (sfxId != NA_SE_NONE) {}
if (actor->audioFlags & 0x40) {
if (actor->audioFlags & ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE) {
func_801A1FB4(SEQ_PLAYER_BGM_SUB, &actor->projectedPos, NA_BGM_MUSIC_BOX_HOUSE, 1500.0f);
}
if (actor->audioFlags & 0x20) {
if (actor->audioFlags & ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE) {
func_801A1FB4(SEQ_PLAYER_BGM_MAIN, &actor->projectedPos, NA_BGM_KAMARO_DANCE, 900.0f);
}
}
@@ -2866,8 +2893,8 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &actor->world.pos, &actor->projectedPos,
&actor->projectedW);
if (actor->audioFlags & 0x7F) {
func_800B9D1C(actor);
if (actor->audioFlags & ACTOR_AUDIO_FLAG_ALL) {
Actor_UpdateFlaggedAudio(actor);
}
if (func_800BA2D8(play, actor)) {
+6 -6
View File
@@ -7403,7 +7403,7 @@ void Camera_EarthquakeDay3(Camera* camera) {
if (sEarthquakeTimer != 0) {
sEarthquakeTimer--;
func_8019F128(NA_SE_SY_EARTHQUAKE_OUTDOOR - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_SY_EARTHQUAKE_OUTDOOR - SFX_FLAG);
}
}
}
@@ -7869,24 +7869,24 @@ s32 Camera_ChangeModeFlags(Camera* camera, s16 mode, u8 forceChange) {
if (camera->status == CAM_STATUS_ACTIVE) {
switch (sModeChangeFlags) {
case CAM_CHANGE_MODE_0:
play_sound(0);
Audio_PlaySfx(0);
break;
case CAM_CHANGE_MODE_1:
if (camera->play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) {
play_sound(NA_SE_SY_ATTENTION_URGENCY);
Audio_PlaySfx(NA_SE_SY_ATTENTION_URGENCY);
} else {
play_sound(NA_SE_SY_ATTENTION_ON);
Audio_PlaySfx(NA_SE_SY_ATTENTION_ON);
}
break;
case CAM_CHANGE_MODE_BATTLE:
play_sound(NA_SE_SY_ATTENTION_URGENCY);
Audio_PlaySfx(NA_SE_SY_ATTENTION_URGENCY);
break;
case CAM_CHANGE_MODE_FOLLOW_TARGET:
play_sound(NA_SE_SY_ATTENTION_ON);
Audio_PlaySfx(NA_SE_SY_ATTENTION_ON);
break;
default:
+16 -16
View File
@@ -1534,9 +1534,9 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
if ((flags == TOUCH_SFX_NORMAL) && (collider->colType != COLTYPE_METAL)) {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx_AtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == TOUCH_SFX_NORMAL) {
EffectSsHitmark_SpawnFixedScale(play, 3, hitPos);
@@ -1548,16 +1548,16 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
} else if (flags == TOUCH_SFX_HARD) {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx_AtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == TOUCH_SFX_WOOD) {
EffectSsHitmark_SpawnFixedScale(play, 1, hitPos);
if (collider->actor == NULL) {
play_sound(NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx(NA_SE_IT_REFLECTION_WOOD);
} else {
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx_AtPos(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
}
}
}
@@ -1568,13 +1568,13 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
if ((at->actor != NULL) && (at->actor->category == ACTORCAT_PLAYER)) {
if (acInfo->elemType == ELEMTYPE_UNK0) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, 0);
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
Audio_PlaySfx_AtPos(&at->actor->projectedPos, 0);
}
}
return 1;
@@ -1614,7 +1614,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
if (at->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos);
play_sound(NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx(NA_SE_IT_REFLECTION_WOOD);
} else {
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
}
@@ -1627,9 +1627,9 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
} else {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
if (ac->actor == NULL) {
play_sound(NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxAtPos(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
Audio_PlaySfx_AtPos(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
}
}
@@ -3873,7 +3873,7 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticles(play, v);
play_sound(NA_SE_IT_SHIELD_REFLECT_SW);
Audio_PlaySfx(NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3881,7 +3881,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySfxAtPos(pos, NA_SE_IT_SHIELD_REFLECT_SW);
Audio_PlaySfx_AtPos(pos, NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3921,7 +3921,7 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* p
shieldParticleInitWood.lightPoint.z = shieldParticleInitWood.position.z;
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &shieldParticleInitWood);
Audio_PlaySfxAtPos(pos, NA_SE_IT_REFLECTION_WOOD);
Audio_PlaySfx_AtPos(pos, NA_SE_IT_REFLECTION_WOOD);
}
/**
+9 -11
View File
@@ -199,7 +199,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
break;
case CS_MISC_EARTHQUAKE_MEDIUM:
func_8019F128(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG);
if (isFirstFrame) {
sCutsceneQuakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_6);
Quake_SetSpeed(sCutsceneQuakeIndex, 22000);
@@ -260,7 +260,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
if (isFirstFrame) {
play->envCtx.sandstormState = 1;
}
func_8019F128(NA_SE_EV_SAND_STORM - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_EV_SAND_STORM - SFX_FLAG);
break;
case CS_MISC_SUNSSONG_START:
@@ -307,7 +307,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
break;
case CS_MISC_EARTHQUAKE_STRONG:
func_8019F128(NA_SE_EV_EARTHQUAKE_LAST2 - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_EV_EARTHQUAKE_LAST2 - SFX_FLAG);
if (isFirstFrame) {
sCutsceneQuakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_6);
Quake_SetSpeed(sCutsceneQuakeIndex, 30000);
@@ -368,7 +368,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
break;
case CS_MISC_EARTHQUAKE_WEAK:
func_8019F128(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG);
if (isFirstFrame) {
sCutsceneQuakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_6);
Quake_SetSpeed(sCutsceneQuakeIndex, 22000);
@@ -442,15 +442,13 @@ void CutsceneCmd_StartAmbience(PlayState* play, CutsceneContext* csCtx, CsCmdSta
void Cutscene_SetSfxReverbIndexTo2(PlayState* play, CutsceneContext* csCtx, CsCmdSfxReverbIndexTo2* cmd) {
if (csCtx->curFrame == cmd->startFrame) {
// Audio_SetSfxReverbIndexExceptOcarinaBank
func_801A4428(2);
Audio_SetSfxReverbIndexExceptOcarinaBank(2);
}
}
void Cutscene_SetSfxReverbIndexTo1(PlayState* play, CutsceneContext* csCtx, CsCmdSfxReverbIndexTo1* cmd) {
if (csCtx->curFrame == cmd->startFrame) {
// Audio_SetSfxReverbIndexExceptOcarinaBank
func_801A4428(1);
Audio_SetSfxReverbIndexExceptOcarinaBank(1);
}
}
@@ -840,7 +838,7 @@ void CutsceneCmd_Transition(PlayState* play, CutsceneContext* csCtx, CsCmdTransi
if (cmd->type == CS_TRANS_GRAY_FILL_IN) {
play->envCtx.screenFillColor[3] = 255.0f * lerp;
if (lerp == 0.0f) {
func_8019F128(NA_SE_EV_S_STONE_FLASH);
Audio_PlaySfx_2(NA_SE_EV_S_STONE_FLASH);
}
} else {
play->envCtx.screenFillColor[3] = (1.0f - lerp) * 255.0f;
@@ -1064,7 +1062,7 @@ void CutsceneCmd_Text(PlayState* play, CutsceneContext* csCtx, CsCmdText* cmd) {
if (play->msgCtx.choiceIndex == 0) {
if (cmd->textId == 0x33BD) {
// Gorman Track: do you understand?
func_8019F230();
Audio_PlaySfx_MessageCancel();
}
if (cmd->altTextId1 != 0xFFFF) {
@@ -1082,7 +1080,7 @@ void CutsceneCmd_Text(PlayState* play, CutsceneContext* csCtx, CsCmdText* cmd) {
} else {
if (cmd->textId == 0x33BD) {
// Gorman Track: do you understand?
func_8019F208();
Audio_PlaySfx_MessageDecide();
}
if (cmd->altTextId2 != 0xFFFF) {
+2 -2
View File
@@ -670,7 +670,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
if ((this->actor.params <= ITEM00_RUPEE_RED) || (this->actor.params == ITEM00_RUPEE_HUGE)) {
play_sound(NA_SE_SY_GET_RUPY);
Audio_PlaySfx(NA_SE_SY_GET_RUPY);
} else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, play)) {
Flags_SetCollectible(play, this->collectibleFlag);
@@ -678,7 +678,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
return;
} else {
play_sound(NA_SE_SY_GET_ITEM);
Audio_PlaySfx(NA_SE_SY_GET_ITEM);
}
Flags_SetCollectible(play, this->collectibleFlag);
+2 -2
View File
@@ -216,11 +216,11 @@ void CutsceneManager_End(void) {
switch (csEntry->endSfx) {
case CS_END_SFX_TRE_BOX_APPEAR:
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR);
break;
case CS_END_SFX_CORRECT_CHIME:
play_sound(NA_SE_SY_CORRECT_CHIME);
Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME);
break;
default: // CS_END_SFX_NONE
+1 -1
View File
@@ -114,7 +114,7 @@ void KaleidoSetup_Update(PlayState* play) {
if (ShrinkWindow_Letterbox_GetSizeTarget() != 0) {
ShrinkWindow_Letterbox_SetSizeTarget(0);
}
func_801A3AEC(1);
Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_OPEN);
}
}
}
+7 -6
View File
@@ -639,16 +639,17 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
dst->a = src->a;
}
void func_801000A4(u16 sfxId) {
play_sound(sfxId);
void Lib_PlaySfx(u16 sfxId) {
Audio_PlaySfx(sfxId);
}
void func_801000CC(u16 sfxId) {
func_8019F128(sfxId);
void Lib_PlaySfx_2(u16 sfxId) {
Audio_PlaySfx_2(sfxId);
}
void Lib_PlaySfxAtPos(Vec3f* pos, u16 sfxId) {
Audio_PlaySfxAtPos(pos, sfxId);
// Unused
void Lib_PlaySfx_AtPos(Vec3f* pos, u16 sfxId) {
Audio_PlaySfx_AtPos(pos, sfxId);
}
void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src, Vec3f* dst) {
+1 -1
View File
@@ -407,7 +407,7 @@ void LifeMeter_UpdateSizeAndBeep(PlayState* play) {
interfaceCtx->lifeSizeChangeDirection = 0;
if (!Player_InCsMode(play) && (play->pauseCtx.state == PAUSE_STATE_OFF) &&
(play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) && LifeMeter_IsCritical() && !Play_InCsMode(play)) {
play_sound(NA_SE_SY_HITPOINT_ALARM);
Audio_PlaySfx(NA_SE_SY_HITPOINT_ALARM);
}
}
} else {
+2 -2
View File
@@ -230,9 +230,9 @@ void Map_Update(PlayState* play) {
if ((play->pauseCtx.state <= PAUSE_STATE_OPENING_2) && (CHECK_BTN_ALL(controller->press.button, BTN_L)) &&
!Play_InCsMode(play) && !func_80106530(play)) {
if (!R_MINIMAP_DISABLED) {
play_sound(NA_SE_SY_CAMERA_ZOOM_UP);
Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP);
} else {
play_sound(NA_SE_SY_CAMERA_ZOOM_DOWN);
Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_DOWN);
}
R_MINIMAP_DISABLED ^= 1;
+6 -6
View File
@@ -93,13 +93,13 @@ s32 Message_ShouldAdvance(PlayState* play) {
if ((msgCtx->unk12020 == 0x10) || (msgCtx->unk12020 == 0x11)) {
if (CHECK_BTN_ALL(controller->press.button, BTN_A)) {
play_sound(NA_SE_SY_MESSAGE_PASS);
Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS);
}
return CHECK_BTN_ALL(controller->press.button, BTN_A);
} else {
if (CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) ||
CHECK_BTN_ALL(controller->press.button, BTN_CUP)) {
play_sound(NA_SE_SY_MESSAGE_PASS);
Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS);
}
return CHECK_BTN_ALL(controller->press.button, BTN_A) || CHECK_BTN_ALL(controller->press.button, BTN_B) ||
CHECK_BTN_ALL(controller->press.button, BTN_CUP);
@@ -125,7 +125,7 @@ void Message_CloseTextbox(PlayState* play) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = 0x43;
msgCtx->unk12020 = 0;
play_sound(NA_SE_NONE);
Audio_PlaySfx(NA_SE_NONE);
}
}
@@ -147,7 +147,7 @@ void func_80148B98(PlayState* play, u8 arg1) {
if (msgCtx->choiceIndex > 128) {
msgCtx->choiceIndex = 0;
} else {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
}
return;
} else if ((curInput->rel.stick_y < -29) && held == 0) {
@@ -156,7 +156,7 @@ void func_80148B98(PlayState* play, u8 arg1) {
if (msgCtx->choiceIndex > arg1) {
msgCtx->choiceIndex = arg1;
} else {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
}
return;
} else {
@@ -422,7 +422,7 @@ u32 func_80151C9C(PlayState* play) {
Message_ContinueTextbox(
play, sBombersNotebookEventMessages
[msgCtx->bombersNotebookEventQueue[msgCtx->bombersNotebookEventQueueCount]]);
play_sound(NA_SE_SY_SCHEDULE_WRITE);
Audio_PlaySfx(NA_SE_SY_SCHEDULE_WRITE);
return true;
}
}
+23 -23
View File
@@ -2331,7 +2331,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
} else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) || (func_801A5100() == 1)) {
if (!(CHECK_EVENTINF(EVENTINF_41)) ||
((CHECK_EVENTINF(EVENTINF_41)) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE))) {
play_sound(NA_SE_SY_CAMERA_SHUTTER);
Audio_PlaySfx(NA_SE_SY_CAMERA_SHUTTER);
SREG(89) = 1;
play->haltAllActors = true;
sPictoState = PICTO_BOX_STATE_SETUP_PHOTO;
@@ -2344,13 +2344,13 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
player->stateFlags1 &= ~PLAYER_STATE1_200;
Message_CloseTextbox(play);
if (play->msgCtx.choiceIndex != 0) {
func_8019F230();
Audio_PlaySfx_MessageCancel();
func_80115844(play, DO_ACTION_STOP);
Interface_SetHudVisibility(HUD_VISIBILITY_A_B);
sPictoState = PICTO_BOX_STATE_LENS;
REMOVE_QUEST_ITEM(QUEST_PICTOGRAPH);
} else {
func_8019F208();
Audio_PlaySfx_MessageDecide();
interfaceCtx->unk_222 = interfaceCtx->unk_224 = 0;
restoreHudVisibility = true;
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
@@ -3250,7 +3250,7 @@ void func_80115428(InterfaceContext* interfaceCtx, u16 doAction, s16 loadOffset)
*/
s32 Health_ChangeBy(PlayState* play, s16 healthChange) {
if (healthChange > 0) {
play_sound(NA_SE_SY_HP_RECOVER);
Audio_PlaySfx(NA_SE_SY_HP_RECOVER);
} else if (gSaveContext.save.saveInfo.playerData.doubleDefense && (healthChange < 0)) {
healthChange >>= 1;
}
@@ -3369,7 +3369,7 @@ s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type) {
// Not enough magic available to consume
if ((gSaveContext.save.saveInfo.playerData.magic - magicToConsume) < 0) {
if (gSaveContext.magicCapacity != 0) {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
}
return false;
}
@@ -3390,7 +3390,7 @@ s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
return true;
} else {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
return false;
}
@@ -3409,7 +3409,7 @@ s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3;
return true;
} else {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
return false;
}
@@ -3440,7 +3440,7 @@ s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2;
return true;
} else {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
return false;
}
@@ -3484,7 +3484,7 @@ s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type) {
gSaveContext.save.saveInfo.playerData.magic -= magicToConsume;
return true;
} else {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
return false;
}
}
@@ -3495,7 +3495,7 @@ s32 Magic_Consume(PlayState* play, s16 magicToConsume, s16 type) {
void Magic_UpdateAddRequest(void) {
if (gSaveContext.isMagicRequested) {
gSaveContext.save.saveInfo.playerData.magic += 4;
play_sound(NA_SE_SY_GAUGE_UP - SFX_FLAG);
Audio_PlaySfx(NA_SE_SY_GAUGE_UP - SFX_FLAG);
if (((void)0, gSaveContext.save.saveInfo.playerData.magic) >= ((void)0, gSaveContext.magicCapacity)) {
gSaveContext.save.saveInfo.playerData.magic = gSaveContext.magicCapacity;
@@ -3599,7 +3599,7 @@ void Magic_Update(PlayState* play) {
gSaveContext.save.saveInfo.playerData.magic += 0x10;
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) && (gSaveContext.sceneLayer < 4)) {
play_sound(NA_SE_SY_GAUGE_UP - SFX_FLAG);
Audio_PlaySfx(NA_SE_SY_GAUGE_UP - SFX_FLAG);
}
if (((void)0, gSaveContext.save.saveInfo.playerData.magic) >= ((void)0, gSaveContext.magicFillTarget)) {
@@ -3655,7 +3655,7 @@ void Magic_Update(PlayState* play) {
!play->actorCtx.lensActive) {
// Deactivate Lens of Truth and set magic state to idle
play->actorCtx.lensActive = false;
play_sound(NA_SE_SY_GLASSMODE_OFF);
Audio_PlaySfx(NA_SE_SY_GLASSMODE_OFF);
gSaveContext.magicState = MAGIC_STATE_IDLE;
sMagicMeterOutlinePrimRed = sMagicMeterOutlinePrimGreen = sMagicMeterOutlinePrimBlue = 255;
break;
@@ -5761,16 +5761,16 @@ void Interface_DrawTimers(PlayState* play) {
// Use seconds to determine when to beep
if (gSaveContext.timerCurTimes[sTimerId] > SECONDS_TO_TIMER(60)) {
if ((sTimerBeepSfxSeconds != sTimerDigits[4]) && (sTimerDigits[4] == 1)) {
play_sound(NA_SE_SY_MESSAGE_WOMAN);
Audio_PlaySfx(NA_SE_SY_MESSAGE_WOMAN);
sTimerBeepSfxSeconds = sTimerDigits[4];
}
} else if (gSaveContext.timerCurTimes[sTimerId] > SECONDS_TO_TIMER(10)) {
if ((sTimerBeepSfxSeconds != sTimerDigits[4]) && ((sTimerDigits[4] % 2) != 0)) {
play_sound(NA_SE_SY_WARNING_COUNT_N);
Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_N);
sTimerBeepSfxSeconds = sTimerDigits[4];
}
} else if (sTimerBeepSfxSeconds != sTimerDigits[4]) {
play_sound(NA_SE_SY_WARNING_COUNT_E);
Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_E);
sTimerBeepSfxSeconds = sTimerDigits[4];
}
} else { // TIMER_COUNT_UP
@@ -5814,7 +5814,7 @@ void Interface_DrawTimers(PlayState* play) {
(gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0))) {
if ((gSaveContext.timerCurTimes[sTimerId] > SECONDS_TO_TIMER(110)) &&
(sTimerBeepSfxSeconds != sTimerDigits[4])) {
play_sound(NA_SE_SY_WARNING_COUNT_E);
Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_E);
sTimerBeepSfxSeconds = sTimerDigits[4];
}
} else if (CHECK_EVENTINF(EVENTINF_34) && (play->sceneId == SCENE_DEKUTES)) {
@@ -5822,7 +5822,7 @@ void Interface_DrawTimers(PlayState* play) {
(gSaveContext.save.saveInfo.dekuPlaygroundHighScores[CURRENT_DAY - 1] -
SECONDS_TO_TIMER(9))) &&
(sTimerBeepSfxSeconds != sTimerDigits[4])) {
play_sound(NA_SE_SY_WARNING_COUNT_E);
Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_E);
sTimerBeepSfxSeconds = sTimerDigits[4];
}
}
@@ -6716,7 +6716,7 @@ void Interface_Update(PlayState* play) {
gSaveContext.save.saveInfo.playerData.health += 4;
if ((gSaveContext.save.saveInfo.playerData.health & 0xF) < 4) {
play_sound(NA_SE_SY_HP_RECOVER);
Audio_PlaySfx(NA_SE_SY_HP_RECOVER);
}
if (((void)0, gSaveContext.save.saveInfo.playerData.health) >=
@@ -6749,7 +6749,7 @@ void Interface_Update(PlayState* play) {
if (gSaveContext.save.saveInfo.playerData.rupees < CUR_CAPACITY(UPG_WALLET)) {
gSaveContext.rupeeAccumulator--;
gSaveContext.save.saveInfo.playerData.rupees++;
play_sound(NA_SE_SY_RUPY_COUNT);
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
} else {
// Max rupees
gSaveContext.save.saveInfo.playerData.rupees = CUR_CAPACITY(UPG_WALLET);
@@ -6762,11 +6762,11 @@ void Interface_Update(PlayState* play) {
if (gSaveContext.save.saveInfo.playerData.rupees < 0) {
gSaveContext.save.saveInfo.playerData.rupees = 0;
}
play_sound(NA_SE_SY_RUPY_COUNT);
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
} else {
gSaveContext.rupeeAccumulator++;
gSaveContext.save.saveInfo.playerData.rupees--;
play_sound(NA_SE_SY_RUPY_COUNT);
Audio_PlaySfx(NA_SE_SY_RUPY_COUNT);
}
} else {
gSaveContext.rupeeAccumulator = 0;
@@ -6799,9 +6799,9 @@ void Interface_Update(PlayState* play) {
interfaceCtx->minigameState++;
if (interfaceCtx->minigameState == MINIGAME_STATE_COUNTDOWN_GO) {
interfaceCtx->minigameCountdownScale = 160;
play_sound(NA_SE_SY_START_SHOT);
Audio_PlaySfx(NA_SE_SY_START_SHOT);
} else {
play_sound(NA_SE_SY_WARNING_COUNT_E);
Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_E);
}
break;
+3 -3
View File
@@ -824,7 +824,7 @@ void Play_UpdateTransition(PlayState* this) {
break;
case TRANS_MODE_SANDSTORM:
func_8019F128(NA_SE_EV_SAND_STORM - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_EV_SAND_STORM - SFX_FLAG);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA < 110) {
gTransitionTileState = TRANS_TILE_OFF;
@@ -859,7 +859,7 @@ void Play_UpdateTransition(PlayState* this) {
break;
case TRANS_MODE_SANDSTORM_END:
func_8019F128(NA_SE_EV_SAND_STORM - SFX_FLAG);
Audio_PlaySfx_2(NA_SE_EV_SAND_STORM - SFX_FLAG);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA <= 0) {
@@ -1064,7 +1064,7 @@ void Play_Update(PlayState* this) {
this->msgCtx.msgMode = 0;
this->msgCtx.currentTextId = 0;
this->msgCtx.stateTimer = 0;
play_sound(NA_SE_SY_CANCEL);
Audio_PlaySfx(NA_SE_SY_CANCEL);
}
if (sBombersNotebookOpen) {
BombersNotebook_Update(this, &sBombersNotebook, this->state.input);
+8 -8
View File
@@ -1223,13 +1223,13 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input
while (true) {
cursorEntryScan -= BOMBERS_NOTEBOOK_ENTRY_SIZE;
if (cursorEntryScan == 0) {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
break;
}
if (CHECK_WEEKEVENTREG(gBombersNotebookWeekEventFlags[BOMBERS_NOTEBOOK_ENTRY_GET_EVENT(
this->cursorPageRow + this->cursorPage,
cursorEntryScan - BOMBERS_NOTEBOOK_ENTRY_SIZE)])) {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
break;
}
}
@@ -1238,7 +1238,7 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input
if (CHECK_WEEKEVENTREG(gBombersNotebookWeekEventFlags[BOMBERS_NOTEBOOK_ENTRY_GET_EVENT(
this->cursorPageRow + this->cursorPage,
cursorEntryScan - BOMBERS_NOTEBOOK_ENTRY_SIZE)])) {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
break;
}
}
@@ -1250,7 +1250,7 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input
if (CHECK_WEEKEVENTREG(gBombersNotebookWeekEventFlags[BOMBERS_NOTEBOOK_ENTRY_GET_EVENT(
this->cursorPageRow + this->cursorPage,
cursorEntryScan - BOMBERS_NOTEBOOK_ENTRY_SIZE)])) {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
break;
}
} while (cursorEntryScan != 0);
@@ -1276,7 +1276,7 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input
if (stickAdjY < -30) {
if (this->cursorPageRow < 3) {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
this->cursorEntry = 0;
this->cursorPageRow++;
} else if (this->cursorPage < (BOMBERS_NOTEBOOK_PERSON_MAX - 4)) {
@@ -1290,11 +1290,11 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input
}
} else if (stickAdjY > 30) {
if (this->cursorPageRow > 0) {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
this->cursorEntry = 0;
this->cursorPageRow--;
} else if (this->cursorPage != 0) {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
this->cursorPage--;
if (sStickYRepeatState == 1) {
this->scrollAmount = 24;
@@ -1308,7 +1308,7 @@ void BombersNotebook_Update(PlayState* play, BombersNotebook* this, Input* input
} else if (this->scrollAmount < 0) {
this->scrollOffset += this->scrollAmount;
if (ABS_ALT(this->scrollOffset) >= 48) {
play_sound(NA_SE_SY_CURSOR);
Audio_PlaySfx(NA_SE_SY_CURSOR);
this->scrollOffset = 0;
this->scrollAmount = 0;
this->cursorPage++;
+1 -1
View File
@@ -637,7 +637,7 @@ PlayerItemAction func_80123810(PlayState* play) {
Interface_SetHudVisibility(play->msgCtx.unk_120BC);
if ((itemId >= ITEM_FD) || ((itemAction = play->unk_18794(play, player, itemId)) <= PLAYER_IA_MINUS1)) {
play_sound(NA_SE_SY_ERROR);
Audio_PlaySfx(NA_SE_SY_ERROR);
return PLAYER_IA_MINUS1;
} else {
s32 pad;
+2 -2
View File
@@ -21,7 +21,7 @@ void SoundSource_UpdateAll(PlayState* play) {
} else {
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
if (source->playSfxEachFrame) {
Audio_PlaySfxAtPos(&source->projectedPos, source->sfxId);
Audio_PlaySfx_AtPos(&source->projectedPos, source->sfxId);
}
}
}
@@ -64,7 +64,7 @@ void SoundSource_Add(PlayState* play, Vec3f* worldPos, u32 duration, u16 sfxId,
source->sfxId = sfxId;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
Audio_PlaySfxAtPos(&source->projectedPos, sfxId);
Audio_PlaySfx_AtPos(&source->projectedPos, sfxId);
}
void SoundSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, u32 duration, u16 sfxId) {