diff --git a/docs/tutorial/advanced_control_flow.md b/docs/tutorial/advanced_control_flow.md index aa4ba36217..0217cdde21 100644 --- a/docs/tutorial/advanced_control_flow.md +++ b/docs/tutorial/advanced_control_flow.md @@ -181,23 +181,23 @@ void func_809527F8(EnMs* this, PlayState* play) { if (temp_v0_2 != 1) { } - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); // Duplicate return node #17. Try simplifying control flow for better match return; } Message_CloseTextbox(play); if ((s32) gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; } if ((s32) gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); return; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; @@ -277,24 +277,24 @@ block_11: if ((s32) gSaveContext.save.saveInfo.playerData.rupees >= 0xA) { goto block_13; } - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; block_13: if ((s32) gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] < 0x14) { goto block_15; } - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); return; block_15: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; return; block_16: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); block_17: return; @@ -315,17 +315,17 @@ The simplest sort of block label to eliminate is one that is only used once, and if ((s32) gSaveContext.save.saveInfo.playerData.rupees >= 0xA) { goto block_13; } - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; block_13: ``` -Currently, this says to jump over the code block `play_sound...` if the condition in the if is satisfied. In non-goto terms, this means that the block should be run if the condition is *not* satisfied. This also illustrates a general property of goto-only mode: you have to reverse the senses of all of the ifs. Therefore the appropriate approach is to swap the if round, put the code block inside, and remove the goto and the label: +Currently, this says to jump over the code block `Audio_PlaySfx...` if the condition in the if is satisfied. In non-goto terms, this means that the block should be run if the condition is *not* satisfied. This also illustrates a general property of goto-only mode: you have to reverse the senses of all of the ifs. Therefore the appropriate approach is to swap the if round, put the code block inside, and remove the goto and the label: ```C if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; } @@ -379,23 +379,23 @@ block_11: Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; } if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); return; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; return; block_16: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); block_17: return; @@ -448,23 +448,23 @@ block_11: Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; } if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); return; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; return; block_16: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); } ``` @@ -498,17 +498,17 @@ So let us rewrite the entire second half as a switch: Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); return; } if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); return; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; @@ -517,7 +517,7 @@ So let us rewrite the entire second half as a switch: case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); break; } @@ -534,13 +534,13 @@ There's a couple of other obvious things here: Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); } else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; @@ -549,7 +549,7 @@ There's a couple of other obvious things here: case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); break; } @@ -599,13 +599,13 @@ block_7: Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); } else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; @@ -614,7 +614,7 @@ block_7: case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); break; } @@ -664,13 +664,13 @@ void func_809527F8(EnMs* this, PlayState* play) { Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); } else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; @@ -679,7 +679,7 @@ void func_809527F8(EnMs* this, PlayState* play) { case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); break; } @@ -716,13 +716,13 @@ void func_809527F8(EnMs* this, PlayState* play) { Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 0xA) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x935U); } else if (gSaveContext.save.saveInfo.inventory.ammo[gItemSlots[0xA]] >= 0x14) { - play_sound(0x4806U); + Audio_PlaySfx(0x4806U); Message_ContinueTextbox(play, 0x937U); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem((Actor *) this, play, 0x35, 90.0f, 10.0f); Rupees_ChangeBy(-0xA); this->actionFunc = func_809529AC; @@ -731,7 +731,7 @@ void func_809527F8(EnMs* this, PlayState* play) { case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934U); break; } diff --git a/include/functions.h b/include/functions.h index b6d6964bc3..c64fd607dc 100644 --- a/include/functions.h +++ b/include/functions.h @@ -649,14 +649,14 @@ void func_800B8DD4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, void func_800B8E1C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4); void Player_PlaySfx(Player* player, u16 sfxId); void Actor_PlaySfx(Actor* actor, u16 sfxId); -void func_800B8EF4(PlayState* play, Actor* actor); -void func_800B8F98(Actor* actor, u16 sfxId); -void func_800B8FC0(Actor* actor, u16 sfxId); -void func_800B8FE8(Actor* actor, u16 sfxId); -void func_800B9010(Actor* actor, u16 sfxId); -void func_800B9038(Actor* actor, s32 timer); -void func_800B9084(Actor* actor); -void func_800B9098(Actor* actor); +void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor); +void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId); +void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId); +void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId); +void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId); +void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer); +void Actor_PlaySeq_FlaggedKamaroDance(Actor* actor); +void Actor_PlaySeq_FlaggedMusicBoxHouse(Actor* actor); s32 func_800B90AC(PlayState* play, Actor* actor, CollisionPoly* polygon, s32 bgId, Vec3f* arg4); void Actor_DeactivateLens(PlayState* play); void Actor_InitHalfDaysBit(ActorContext* actorCtx); @@ -900,9 +900,9 @@ void* Lib_MemSet(void* buffer, s32 value, size_t size); void func_800FF3A0(f32* distOut, s16* angleOut, Input* input); void Actor_ProcessInitChain(Actor* actor, InitChainEntry* ichain); void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src); -void func_801000A4(u16 sfxId); -void func_801000CC(u16 sfxId); -void Lib_PlaySfxAtPos(Vec3f* pos, u16 sfxId); +void Lib_PlaySfx(u16 sfxId); +void Lib_PlaySfx_2(u16 sfxId); +void Lib_PlaySfx_AtPos(Vec3f* pos, u16 sfxId); void Lib_Vec3f_TranslateAndRotateY(Vec3f* translation, s16 rotAngle, Vec3f* src, Vec3f* dst); void Lib_LerpRGB(Color_RGB8* a, Color_RGB8* b, f32 t, Color_RGB8* dst); void Lib_Nop801004FC(void); @@ -1873,53 +1873,12 @@ void AudioOcarina_PlayLongScarecrowSong(void); void Audio_Update(void); void AudioSfx_SetProperties(u8 bankId, u8 entryIndex, u8 channelIndex); -void play_sound(u16 sfxId); -void func_8019F128(u16 sfxId); -void func_8019F170(Vec3f* pos, u16 sfxId); -void Audio_PlaySfxAtPos(Vec3f* pos, u16 sfxId); -void func_8019F208(void); // decide sfx -void func_8019F230(void); // cancel sfx -void func_8019F420(Vec3f* pos, u16 sfxId); -void func_8019F4AC(Vec3f* pos, u16 sfxId); -void func_8019F540(s8 arg0); void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered); -f32 func_8019F5AC(f32 arg0); -void func_8019F638(Vec3f* arg0, u16 sfxId, f32 arg2); -void func_8019F780(Vec3f* arg0, u16 sfxId, f32 arg2); -// void func_8019F7D8(void); -void func_8019F830(Vec3f* arg0, u16 arg1); -void func_8019F88C(Vec3f* arg0, u16 sfxId, UNK_TYPE arg2); -void func_8019F900(Vec3f* pos, u8 chargeLevel); -// void func_8019FA18(void); -void func_8019FAD8(Vec3f* param_1, u16 sfxId, f32 param_3); -void func_8019FB0C(Vec3f* arg0, u16 sfxId, f32 arg2, s32 arg3); -void func_8019FC20(Vec3f* pos, u16 sfxId); -void func_8019FCB8(Vec3f* arg0, u16 arg1, f32 arg2); -void func_8019FD90(s8 arg0, s8 arg1); -void func_8019FDC8(UNK_PTR arg0, u16 sfxId, UNK_TYPE arg2); -// void func_8019FE1C(void); -void func_8019FE74(f32* arg0, f32 arg1, s32 arg2); -// void func_8019FEDC(void); -// void func_8019FF38(void); -void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale); -// void Audio_PlaySfxForWaterfall(void); -// void Audio_StepFreqLerp(void); -void func_801A0124(Vec3f* pos, u8 arg1); void Audio_SetBgmVolumeOff(void); void Audio_SetBgmVolumeOn(void); void func_801A0204(s8 seqId); void Audio_SetMainBgmVolume(u8 targetVolume, u8 volumeFadeTimer); -// void Audio_SetGanonsTowerBgmVolumeLevel(void); -// void Audio_SetGanonsTowerBgmVolume(void); -// void Audio_UpdateRiverSoundVolumes(void); -// void func_801A0554(void); -// void func_801A05F0(void); void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData); -void func_801A0810(Vec3f* arg0, u16 sfxId, u8 arg2); -void func_801A0868(Vec3f* pos, u16 sfxId, u8 val); -// void func_801A09D4(void); -// void Audio_SplitBgmChannels(void); -// void func_801A0E44(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); // void func_801A1290(void); // void func_801A1348(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); // void func_801A13BC(void); @@ -1958,7 +1917,6 @@ u8 func_801A3950(s32 playerIndex, s32 isChannelIOSet); u8 func_801A39F8(void); void func_801A3A7C(s32 arg0); // void func_801A3AC0(void); -void func_801A3AEC(s32 arg0); void func_801A3B48(UNK_TYPE arg0); // void func_801A3B90(void); void func_801A3CD8(s8 param_1); @@ -1967,23 +1925,15 @@ void func_801A3D98(s8 audioSetting); void func_801A3E38(u8 arg0); void func_801A3EC0(u8 arg0); void Audio_SetCutsceneFlag(s8 flag); -// void func_801A3F6C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); -// void func_801A3FB4(void); -// void func_801A3FFC(UNK_TYPE1 param_1); void Audio_SetSpec(u32 specId); void func_801A4058(UNK_TYPE arg0); void func_801A41C8(s32 arg0); void func_801A41F8(UNK_TYPE arg0); -// void func_801A429C(void); // void func_801A42C8(void); // void func_801A4324(void); // void func_801A4348(void); -void Audio_SetSfxVolumeExceptSystemAndOcarinaBanks(u8 arg0); -void func_801A4428(u8 reverbIndex); void Audio_PreNMI(void); s32 func_801A46F8(void); -void func_801A4748(Vec3f* pos, u16 sfxId); -void func_801A479C(Vec3f* arg0, u16 sfxId, s32 arg2); void Audio_SetAmbienceChannelIO(u8 channelIndexRange, u8 ioPort, u8 ioData); void Audio_PlayAmbience(u8 ambienceId); void Audio_Init(void); diff --git a/include/sfx.h b/include/sfx.h index b55fbb357c..98192ec58a 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -1,6 +1,8 @@ #ifndef SFX_H #define SFX_H +#include "z64math.h" + /** * With `SFX_FLAG` on, play the entire sfx audio clip. * Requesting the sfx while playing will restart the sfx from the beginning. @@ -2354,4 +2356,44 @@ typedef enum { #undef DEFINE_SFX */ +typedef enum SfxPauseMenu { + /* 0 */ SFX_PAUSE_MENU_CLOSE, + /* 1 */ SFX_PAUSE_MENU_OPEN +} SfxPauseMenu; + +// Various wrappers to AudioSfx_PlaySfx +void Audio_PlaySfx(u16 sfxId); +void Audio_PlaySfx_2(u16 sfxId); +void Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_AtPos(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_MessageDecide(void); +void Audio_PlaySfx_MessageCancel(void); +void Audio_PlaySfx_Underwater(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_WithSfxSettingsReverb(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqVolParam); +void Audio_PlaySfx_AtPosWithSyncedFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqVolParam); +void Audio_PlaySfx_GiantsMask(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_Randomized(Vec3f* pos, u16 baseSfxId, u8 randLim); +void Audio_PlaySfx_SwordCharge(Vec3f* pos, u8 chargeLevel); +void Audio_PlaySfx_AtPosWithFreq(Vec3f* pos, u16 sfxId, f32 freqScale); +void Audio_PlaySfx_AtPosWithFreqAndChannelIO(Vec3f* pos, u16 sfxId, f32 freqScale, u8 arg3); +void Audio_PlaySfx_WaterWheel(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_AtPosWithTimer(Vec3f* pos, u16 sfxId, f32 timerShiftedLerp); +void Audio_PlaySfx_AtPosWithReverb(Vec3f* pos, u16 sfxId, s8 reverbAdd); +void Audio_PlaySfx_AtPosWithVolume(Vec3f* pos, u16 sfxId, f32 volume); +void Audio_PlaySfx_River(Vec3f* pos, f32 freqScale); +void Audio_PlaySfx_BigBells(Vec3f* pos, u8 volumeIndex); +void Audio_PlaySfx_AtPosWithChannelIO(Vec3f* pos, u16 sfxId, u8 ioData); +void Audio_PlaySfx_AtPosWithAllChannelsIO(Vec3f* pos, u16 sfxId, u8 ioData); +void Audio_PlaySfx_PauseMenuOpenOrClose(u8 pauseMenuOpenOrClose); +void Audio_PlaySfx_IfNotInCutscene(u16 sfxId); +void Audio_PlaySfx_AtFixedPos(Vec3f* pos, u16 sfxId); +void Audio_PlaySfx_AtPosWithVolumeTransition(Vec3f* pos, u16 sfxId, u16 duration); + +// Sfx helper functions +void Audio_SetSfxUnderwaterReverb(s8 isUnderwaterReverbActivated); +void Audio_SetSfxTimerLerpInterval(s8 timerLerpRange1, s8 timerLerpRange2); +void Audio_SetSfxVolumeTransition(f32* volume, f32 volumeTarget, u16 duration); +void Audio_SetSfxReverbIndexExceptOcarinaBank(u8 reverbIndex); + #endif diff --git a/src/audio/code_8019AF00.c b/src/audio/code_8019AF00.c index 40c457cb32..8b13e0030e 100644 --- a/src/audio/code_8019AF00.c +++ b/src/audio/code_8019AF00.c @@ -63,7 +63,7 @@ typedef struct { s32 AudioOcarina_MemoryGameNextNote(void); void AudioSfx_ProcessSfxSettings(void); -void func_8019FEDC(void); +void Audio_UpdateSfxVolumeTransition(void); void Audio_StepFreqLerp(FreqLerp* lerp); s32 Audio_SetGanonsTowerBgmVolume(u8 targetVolume); @@ -71,7 +71,7 @@ s32 Audio_SetGanonsTowerBgmVolume(u8 targetVolume); void Audio_StartMorningSceneSequence(u16 seqId); void Audio_StartSceneSequence(u16 seqId); void Audio_PlaySequenceWithSeqPlayerIO(s8 seqPlayerIndex, u16 seqId, u8 fadeInDuration, s8 ioPort, u8 ioData); -void func_801A4428(u8 reverbIndex); +void Audio_SetSfxReverbIndexExceptOcarinaBank(u8 reverbIndex); void func_801A3038(void); void Audio_PlayAmbience(u8 ambienceId); void Audio_SetSfxVolumeExceptSystemAndOcarinaBanks(u8 volume); @@ -210,7 +210,7 @@ u16 sSfxVolumeDuration = 0; // System Data s8 sSoundMode = SOUNDMODE_STEREO; -s8 sAudioIsWindowOpen = false; +s8 sAudioPauseMenuOpenOrClose = SFX_PAUSE_MENU_CLOSE; s8 sAudioCutsceneFlag = false; s8 sSpecReverb = 0; s8 sAudioEnvReverb = 0; @@ -3638,7 +3638,7 @@ void Audio_Update(void) { Audio_UpdateRiverSoundVolumes(); Audio_UpdateSceneSequenceResumePoint(); func_801A312C(); - func_8019FEDC(); + Audio_UpdateSfxVolumeTransition(); func_801A1E0C(); func_801A1904(); func_801A2090(); @@ -3654,10 +3654,10 @@ void Audio_Update(void) { } } -void Audio_Noop4(s32 arg0) { +void Audio_Noop4(UNK_TYPE arg0) { } -void Audio_Noop5(s32 arg0, s32 arg1) { +void Audio_Noop5(UNK_TYPE arg0, UNK_TYPE arg1) { } /** @@ -4111,17 +4111,39 @@ void AudioSfx_ResetSfxChannelState(void) { sAudioCodeReverb = 0; } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/play_sound.s") +void Audio_PlaySfx(u16 sfxId) { + AudioSfx_PlaySfx(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); + if (sfxId == NA_SE_OC_TELOP_IMPACT) { + Audio_SetSequenceMode(SEQ_MODE_DEFAULT); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F128.s") +void Audio_PlaySfx_2(u16 sfxId) { + AudioSfx_PlaySfx(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F170.s") +/** + * Bends the pitch of the sfx by a little under two semitones and adds reverb + */ +void Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb(Vec3f* pos, u16 sfxId) { + AudioSfx_PlaySfx(sfxId, pos, 4, &sTwoSemitonesLoweredFreq, &gSfxDefaultFreqAndVolScale, &sSfxIncreasedReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_PlaySfxAtPos.s") +void Audio_PlaySfx_AtPos(Vec3f* pos, u16 sfxId) { + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F208.s") +void Audio_PlaySfx_MessageDecide(void) { + Audio_PlaySfx(NA_SE_SY_DECIDE); + AudioSfx_StopById(NA_SE_SY_MESSAGE_PASS); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F230.s") +void Audio_PlaySfx_MessageCancel(void) { + Audio_PlaySfx(NA_SE_SY_CANCEL); + AudioSfx_StopById(NA_SE_SY_MESSAGE_PASS); +} SfxSettings* AudioSfx_AddSfxSetting(Vec3f* pos) { SfxSettings* sfxSettings; @@ -4163,8 +4185,8 @@ void AudioSfx_ProcessSfxSettings(void) { while (sfxSettingsFlags != 0) { bankId = BANK_ENV; - if ((sfxSettingsFlags & (1 << sfxSettingIndex))) { + if ((sfxSettingsFlags & (1 << sfxSettingIndex))) { found = false; while ((bankId <= BANK_ENEMY) && !found) { entryIndex = gSfxBanks[bankId]->next; @@ -4193,11 +4215,43 @@ void AudioSfx_ProcessSfxSettings(void) { } } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F420.s") +/** + * Used for Gyorg and Bigslime + */ +void Audio_PlaySfx_Underwater(Vec3f* pos, u16 sfxId) { + if ((sfxId == NA_SE_EN_KONB_JUMP_OLD) || (sfxId == NA_SE_EN_KONB_SINK_OLD)) { + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + } else { + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gUnderwaterSfxReverbAdd); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F4AC.s") +/** + * Used only for eating the goron sirloin by the goron with Don Gero's Mask + */ +void Audio_PlaySfx_WithSfxSettingsReverb(Vec3f* pos, u16 sfxId) { + SfxSettings* sfxSettings; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F540.s") + if ((sfxId == NA_SE_EN_KONB_JUMP_OLD) || (sfxId == NA_SE_EN_KONB_SINK_OLD)) { + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + } else { + sfxSettings = AudioSfx_AddSfxSetting(pos); + + if (sfxSettings != NULL) { + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &sfxSettings->reverbAdd); + } + } +} + +void Audio_SetSfxUnderwaterReverb(s8 isUnderwaterReverbActivated) { + if (isUnderwaterReverbActivated) { + gUnderwaterSfxReverbAdd = -0x80; + } else { + gUnderwaterSfxReverbAdd = 0; + } +} void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered) { SfxSettings* sfxSettings = AudioSfx_AddSfxSetting(pos); @@ -4211,46 +4265,246 @@ void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered) { } } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F5AC.s") +f32 Audio_SetSyncedSfxFreqAndVolume(f32 freqVolParam) { + f32 ret = 1.0f; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F638.s") + if (freqVolParam > 6.0f) { + sSfxSyncedVolume = 1.0f; + sSfxSyncedFreq = 1.1f; + } else { + ret = freqVolParam / 6.0f; + sSfxSyncedVolume = ret * (1.0f - 0.775f) + 0.775f; + sSfxSyncedFreq = (ret * 0.2f) + 0.9f; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F780.s") + return ret; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F7D8.s") +/** + * Adjusts both frequency and volume based on a single parameter "freqVolParam" + * When freqVolParam >= 6.0f, frequency is increased to 1.1f and volume remains fixed at 1.0f + * For every -1.0f taken from freqVolParam (eg. 5.0f, 4.0f, 3.0f...): + * - volume will decrease by 0.0375f + * - frequency will decrease by 0.0333333f + */ +void Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqVolParam) { + f32 sp2C; + f32 phi_f0; + u8 phi_v0; + u16 metalSfxId = NA_SE_NONE; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F830.s") + sp2C = Audio_SetSyncedSfxFreqAndVolume(freqVolParam); + AudioSfx_PlaySfx(sfxId, pos, 4, &sSfxSyncedFreq, &sSfxSyncedVolume, &gSfxDefaultReverb); -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F88C.s") + if ((sfxId & 0xF0) == 0xB0) { + // Crawlspaces (unused remnant of OoT) + phi_f0 = 0.3f; + phi_v0 = true; + sp2C = 1.0f; + } else { + phi_f0 = 1.1f; + phi_v0 = gAudioCtx.audioRandom & 1; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F900.s") + if (phi_f0 < freqVolParam) { + if (phi_v0) { + if ((sfxId & 0x1FF) < 0x80) { + metalSfxId = NA_SE_PL_METALEFFECT_KID; + } else if ((sfxId & 0x1FF) < 0xF0) { + metalSfxId = NA_SE_PL_METALEFFECT_ADULT; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FA18.s") + if (metalSfxId != NA_SE_NONE) { + sSfxSyncedVolumeForMetalEffects = (sp2C * 0.7) + 0.3; + AudioSfx_PlaySfx(metalSfxId, pos, 4, &sSfxSyncedFreq, &sSfxSyncedVolumeForMetalEffects, + &gSfxDefaultReverb); + } + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FAD8.s") +/** + * Adjusts both frequency and volume based on a single parameter "freqVolParam" + * When freqVolParam >= 6.0f, frequency is increased to 1.1f and volume remains fixed at 1.0f + * For every -1.0f taken from freqVolParam (eg. 5.0f, 4.0f, 3.0f...): + * - volume will decrease by 0.0375f + * - frequency will decrease by 0.0333333f + */ +void Audio_PlaySfx_AtPosWithSyncedFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqVolParam) { + Audio_SetSyncedSfxFreqAndVolume(freqVolParam); + AudioSfx_PlaySfx(sfxId, pos, 4, &sSfxSyncedFreq, &sSfxSyncedVolume, &gSfxDefaultReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FB0C.s") +void Audio_PlaySfx_GiantsMaskUnused(Vec3f* pos, u16 sfxId) { + AudioSfx_PlaySfx(sfxId | 0xE0, pos, 4, &sGiantsMaskFreq, &gSfxDefaultFreqAndVolScale, &sGiantsMaskReverbAdd); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FC20.s") +void Audio_PlaySfx_GiantsMask(Vec3f* pos, u16 sfxId) { + AudioSfx_PlaySfx((sfxId & 0x681F) + 0x20, pos, 4, &sGiantsMaskFreq, &gSfxDefaultFreqAndVolScale, + &sGiantsMaskReverbAdd); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FCB8.s") +void Audio_PlaySfx_Randomized(Vec3f* pos, u16 baseSfxId, u8 randLim) { + u8 offset = AudioThread_NextRandom() % randLim; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FD90.s") + AudioSfx_PlaySfx(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FDC8.s") +/** + * Plays increasingly high-pitched sword charging sfx as Player charges up the sword + */ +void Audio_PlaySfx_SwordCharge(Vec3f* pos, u8 chargeLevel) { + chargeLevel %= 4U; + if (chargeLevel != sPrevChargeLevel) { + sCurChargeLevelSfxFreq = sChargeLevelsSfxFreq[chargeLevel]; + switch (chargeLevel) { + case 1: + AudioSfx_PlaySfx(NA_SE_PL_SWORD_CHARGE, pos, 4, &sCurChargeLevelSfxFreq, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FE1C.s") + case 2: + AudioSfx_PlaySfx(NA_SE_PL_SWORD_CHARGE, pos, 4, &sCurChargeLevelSfxFreq, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FE74.s") + default: + break; + } + sPrevChargeLevel = chargeLevel; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FEDC.s") + if (chargeLevel != 0) { + AudioSfx_PlaySfx(NA_SE_IT_SWORD_CHARGE - SFX_FLAG, pos, 4, &sCurChargeLevelSfxFreq, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019FF38.s") +void Audio_PlaySfx_AtPosWithFreqAndVolume(Vec3f* pos, u16 sfxId, f32 freqScale, f32* volume) { + SfxSettings* sfxSettings = AudioSfx_AddSfxSetting(pos); + f32* freqScaleAdj; + + if (sfxSettings != NULL) { + freqScaleAdj = &sfxSettings->freqScale; + if (freqScale < 0.75f) { + *freqScaleAdj = ((freqScale / 0.75f) * 0.25f) + 0.5f; + } else { + *freqScaleAdj = freqScale; + } + + if (*freqScaleAdj > 0.5f) { + AudioSfx_PlaySfx(sfxId, pos, 4, freqScaleAdj, volume, &gSfxDefaultReverb); + } + } +} + +void Audio_PlaySfx_AtPosWithFreq(Vec3f* pos, u16 sfxId, f32 freqScale) { + Audio_PlaySfx_AtPosWithFreqAndVolume(pos, sfxId, freqScale, &gSfxDefaultFreqAndVolScale); +} + +void Audio_PlaySfx_AtPosWithFreqAndChannelIO(Vec3f* pos, u16 sfxId, f32 freqScale, u8 arg3) { + if (freqScale > 1.0f) { + freqScale = 1.0f; + } + + AudioSfx_SetChannelIO(pos, sfxId, (arg3 - (u32)(freqScale * arg3)) & 0xFF); + Audio_PlaySfx_AtPosWithFreq(pos, sfxId, freqScale); +} + +void Audio_PlaySfx_WaterWheel(Vec3f* pos, u16 sfxId) { + u8 isWaterWheelSfxNotPlaying = false; + + switch (sfxId) { + case NA_SE_EV_DUMMY_WATER_WHEEL_LR - SFX_FLAG: + if (!AudioSfx_IsPlaying(NA_SE_EV_BIG_WATER_WHEEL_LR - SFX_FLAG)) { + isWaterWheelSfxNotPlaying = true; + } + break; + + case NA_SE_EV_DUMMY_WATER_WHEEL_RR - SFX_FLAG: + if (!AudioSfx_IsPlaying(NA_SE_EV_BIG_WATER_WHEEL_RR - SFX_FLAG)) { + isWaterWheelSfxNotPlaying = true; + } + break; + + default: + break; + } + + if (isWaterWheelSfxNotPlaying) { + AudioSfx_SetChannelIO(pos, sfxId, 0); + Audio_PlaySfx_AtPosWithFreqAndVolume(pos, sfxId, 1.0f, &sWaterWheelVolume); + } +} + +/** + * at timerShiftedLerp == 1: use sSfxTimerLerpRange1 + * at timerShiftedLerp == 2: use sSfxTimerLerpRange2 + * + * sSfxAdjustedFreq was modified in OoT, but remains 1.0f in MM + * + * Used for "NA_SE_IT_DEKUNUTS_FLOWER_ROLL" and "NA_SE_IT_FISHING_REEL_SLOW" + */ +void Audio_PlaySfx_AtPosWithTimer(Vec3f* pos, u16 sfxId, f32 timerShiftedLerp) { + sSfxTimer--; + if (sSfxTimer == 0) { + AudioSfx_PlaySfx(sfxId, pos, 4, &sSfxAdjustedFreq, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + + if (timerShiftedLerp > 2.0f) { + timerShiftedLerp = 2.0f; + } + + // Linear interpolation between "sSfxTimerLerpRange1" and "sSfxTimerLerpRange2" from lerp factor + // (timerShiftedLerp - 1.0f) + sSfxTimer = (s8)((sSfxTimerLerpRange1 - sSfxTimerLerpRange2) * (1.0f - timerShiftedLerp)) + sSfxTimerLerpRange1; + } +} + +void Audio_SetSfxTimerLerpInterval(s8 timerLerpRange1, s8 timerLerpRange2) { + sSfxTimer = 1; + sSfxTimerLerpRange2 = timerLerpRange2; + sSfxTimerLerpRange1 = timerLerpRange1; +} + +void Audio_PlaySfx_AtPosWithReverb(Vec3f* pos, u16 sfxId, s8 reverbAdd) { + sSfxCustomReverb = reverbAdd; + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &sSfxCustomReverb); +} + +void Audio_PlaySfx_AtPosWithVolume(Vec3f* pos, u16 sfxId, f32 volume) { + gSfxVolume = volume; + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxVolume, &gSfxDefaultReverb); +} + +void Audio_SetSfxVolumeTransition(f32* volume, f32 volumeTarget, u16 duration) { + sSfxVolumeCur = volume; + sSfxVolumeTarget = volumeTarget; + sSfxVolumeDuration = duration; + sSfxVolumeRate = (*sSfxVolumeCur - sSfxVolumeTarget) / sSfxVolumeDuration; +} + +// Part of audio update (runs every frame) +void Audio_UpdateSfxVolumeTransition(void) { + if (sSfxVolumeDuration != 0) { + sSfxVolumeDuration--; + if (sSfxVolumeDuration == 0) { + *sSfxVolumeCur = sSfxVolumeTarget; + } else { + *sSfxVolumeCur -= sSfxVolumeRate; + } + } +} + +void Audio_PlaySfx_FishingReel(f32 timerShiftedLerp) { + Audio_PlaySfx_AtPosWithTimer(&gSfxDefaultPos, NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG, timerShiftedLerp); + Audio_PlaySfx_AtPosWithFreq(&gSfxDefaultPos, 0, (0.15f * timerShiftedLerp) + 1.4f); +} /** * Used for EnRiverSound */ -void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale) { +void Audio_PlaySfx_River(Vec3f* pos, f32 freqScale) { if (!AudioSfx_IsPlaying(NA_SE_EV_RIVER_STREAM - SFX_FLAG)) { sRiverFreqScaleLerp.value = freqScale; } else if (freqScale != sRiverFreqScaleLerp.value) { @@ -4266,7 +4520,7 @@ void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale) { * Unused remnant of OoT's EnRiverSound * Used for Zora's River Waterfall */ -void Audio_PlaySfxForWaterfall(Vec3f* pos, f32 freqScale) { +void Audio_PlaySfx_Waterfall(Vec3f* pos, f32 freqScale) { if (!AudioSfx_IsPlaying(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG)) { sWaterfallFreqScaleLerp.value = freqScale; } else if (freqScale != sWaterfallFreqScaleLerp.value) { @@ -4292,10 +4546,14 @@ void Audio_StepFreqLerp(FreqLerp* lerp) { } } -f32 sBigBellsVolume[8] = { +f32 sBigBellsVolume[] = { 1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, }; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0124.s") + +void Audio_PlaySfx_BigBells(Vec3f* pos, u8 volumeIndex) { + AudioSfx_PlaySfx(NA_SE_EV_SIGNAL_BIGBELL, pos, 4, &gSfxDefaultFreqAndVolScale, &sBigBellsVolume[volumeIndex & 7], + &gSfxDefaultReverb); +} void Audio_SetBgmVolumeOff(void) { AudioSeq_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_FANFARE, 0, 10); @@ -4420,7 +4678,7 @@ void Audio_UpdateRiverSoundVolumes(void) { sRiverSoundMainBgmRestore = true; } sRiverSoundMainBgmLower = false; - } else if ((sRiverSoundMainBgmRestore == true) && !sAudioIsWindowOpen) { + } else if ((sRiverSoundMainBgmRestore == true) && (sAudioPauseMenuOpenOrClose == SFX_PAUSE_MENU_CLOSE)) { // restores the volume every frame AudioSeq_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_MAIN, 0x7F, 10); sRiverSoundMainBgmCurrentVol = 0x7F; @@ -4436,11 +4694,24 @@ void Audio_UpdateRiverSoundVolumes(void) { } } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0554.s") +// Unused remnant of OoT +void Audio_PlaySfx_IncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones) { + AudioSfx_PlaySfx(sfxId, pos, 4, &gPitchFrequencies[semitones[sAudioIncreasingTranspose] + 39], + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + if (sAudioIncreasingTranspose < 15) { + sAudioIncreasingTranspose++; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A05E4.s") +// Unused remnant of OoT +void Audio_ResetIncreasingTranspose(void) { + sAudioIncreasingTranspose = 0; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A05F0.s") +// Unused remnant of OoT +void Audio_PlaySfx_Transposed(Vec3f* pos, u16 sfxId, s8 semitone) { + AudioSfx_PlaySfx(sfxId, pos, 4, &gPitchFrequencies[semitone + 39], &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); +} void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData) { u8 channelIndex = 0; @@ -4464,9 +4735,32 @@ void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData) { } } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0810.s") +/** + * Plays sfx and sets ioData to io port 6 if the sfx is active + */ +void Audio_PlaySfx_AtPosWithChannelIO(Vec3f* pos, u16 sfxId, u8 ioData) { + AudioSfx_SetChannelIO(pos, sfxId, ioData); + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0868.s") +/** + * Plays sfx and sets ioData to io port 6 + */ +void Audio_PlaySfx_AtPosWithAllChannelsIO(Vec3f* pos, u16 sfxId, u8 ioData) { + u8 channelIndex = 0; + u8 i; + u8 bankId = SFX_BANK_SHIFT(sfxId); + + for (i = 0; i < bankId; i++) { + channelIndex += gChannelsPerBank[gSfxChannelLayout][i]; + } + + for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) { + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, channelIndex++, 6, ioData); + } + + AudioSfx_PlaySfx(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); +} /** * Unused remnant of OoT's EnRiverSound (func_800F4E30) @@ -5030,7 +5324,16 @@ void Audio_UpdateEnemyBgmVolume(f32 dist) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3AC0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3AEC.s") +void Audio_PlaySfx_PauseMenuOpenOrClose(u8 pauseMenuOpenOrClose) { + sAudioPauseMenuOpenOrClose = pauseMenuOpenOrClose; + if (pauseMenuOpenOrClose != SFX_PAUSE_MENU_CLOSE) { + Audio_PlaySfx(NA_SE_SY_WIN_OPEN); + AUDIOCMD_GLOBAL_MUTE(AUDIOCMD_ALL_SEQPLAYERS); + } else { + Audio_PlaySfx(NA_SE_SY_WIN_CLOSE); + AUDIOCMD_GLOBAL_UNMUTE(AUDIOCMD_ALL_SEQPLAYERS, false); + } +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3B48.s") @@ -5040,7 +5343,19 @@ void Audio_UpdateEnemyBgmVolume(f32 dist) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3CF4.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3D54.s") +/** + * Possibly a test for surround sound + * Unused + */ +void Audio_PlaySfx_SurroundSoundTest(void) { + s32 val = 0; + + if (sSoundMode == SOUNDMODE_SURROUND_EXTERNAL) { + val = 2; + } + + Audio_PlaySfx_AtPosWithAllChannelsIO(&gSfxDefaultPos, NA_SE_SY_SOUT_DEMO, val); +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3D98.s") @@ -5052,11 +5367,21 @@ void Audio_SetCutsceneFlag(s8 flag) { sAudioCutsceneFlag = flag; } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3F6C.s") +void Audio_PlaySfx_IfNotInCutsceneImpl(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* volume, s8* reverbAdd) { + if (!sAudioCutsceneFlag) { + AudioSfx_PlaySfx(sfxId, pos, token, freqScale, volume, reverbAdd); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3FB4.s") +void Audio_PlaySfx_IfNotInCutscene(u16 sfxId) { + Audio_PlaySfx_IfNotInCutsceneImpl(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A3FFC.s") +// Unused +void Audio_MuteSfxAndAmbienceSeqExceptOcarinaAndSystem(u8 muteOnlySfxAndAmbienceSeq) { + sMuteOnlySfxAndAmbienceSeq = muteOnlySfxAndAmbienceSeq; +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_SetSpec.s") @@ -5066,7 +5391,13 @@ void Audio_SetCutsceneFlag(s8 flag) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A41F8.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A429C.s") +/** + * The flag 0xFF makes the sequence process SkipTicks and SkipForwardSequence + * Unused + */ +void Audio_StartSfxPlayer(void) { + AudioSeq_StartSequence(SEQ_PLAYER_SFX, NA_BGM_GENERAL_SFX, 0xFF, 5); +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A42C8.s") @@ -5074,9 +5405,34 @@ void Audio_SetCutsceneFlag(s8 flag) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4348.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_SetSfxVolumeExceptSystemAndOcarinaBanks.s") +void Audio_SetSfxVolumeExceptSystemAndOcarinaBanks(u8 volume) { + u8 channelIndex; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4428.s") + if (!sAllPlayersMutedExceptOcaAndSys) { + for (channelIndex = 0; channelIndex < SEQ_NUM_CHANNELS; channelIndex++) { + switch (channelIndex) { + case SFX_CHANNEL_SYSTEM0: + case SFX_CHANNEL_SYSTEM1: + case SFX_CHANNEL_OCARINA: + break; + + default: + SEQCMD_SET_CHANNEL_VOLUME(SEQ_PLAYER_SFX, channelIndex, 10, volume); + break; + } + } + } +} + +void Audio_SetSfxReverbIndexExceptOcarinaBank(u8 reverbIndex) { + u8 channelIndex; + + for (channelIndex = 0; channelIndex < SEQ_NUM_CHANNELS; channelIndex++) { + if (channelIndex != SFX_CHANNEL_OCARINA) { + AUDIOCMD_CHANNEL_SET_REVERB_INDEX(SEQ_PLAYER_SFX, channelIndex, reverbIndex); + } + } +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_PreNMI.s") @@ -5089,10 +5445,25 @@ void Audio_ResetData(void); #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A46F8.s") -f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4748.s") +// used for z_obj_sound and z_en_gk +void Audio_PlaySfx_AtFixedPos(Vec3f* pos, u16 sfxId) { + static Vec3f sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; + s32 i; + f32* dstPos = (f32*)&sSfxOriginalPos; + f32* srcPos = (f32*)pos; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A479C.s") + // Vec3f copy + for (i = 0; i < 3; i++) { + dstPos[i] = srcPos[i]; + } + + Audio_PlaySfx_AtPos(sSfxOriginalPos, sfxId); +} + +void Audio_PlaySfx_AtPosWithVolumeTransition(Vec3f* pos, u16 sfxId, u16 duration) { + Audio_PlaySfx_AtPosWithVolume(pos, sfxId, 0.0f); + Audio_SetSfxVolumeTransition(&gSfxVolume, 1.0f, duration); +} void Audio_SetAmbienceChannelIO(u8 channelIndexRange, u8 ioPort, u8 ioData) { u8 firstChannelIndex; diff --git a/src/audio/sfx.c b/src/audio/sfx.c index 537a9f394a..f667479999 100644 --- a/src/audio/sfx.c +++ b/src/audio/sfx.c @@ -198,7 +198,7 @@ void AudioSfx_RemoveMatchingRequests(u8 aspect, SfxBankEntry* entry) { } if (remove) { - req->sfxId = 0; + req->sfxId = NA_SE_NONE; } } } @@ -214,7 +214,7 @@ void AudioSfx_ProcessRequest(void) { u8 evictImportance; u8 evictIndex = 0x80; - if (req->sfxId == 0) { + if (req->sfxId == NA_SE_NONE) { return; } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e7bc92a261..ac014e5cad 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -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)) { diff --git a/src/code/z_camera.c b/src/code/z_camera.c index acb4af20af..3703eda0f0 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -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: diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index f3f4043ddc..39b57cbd03 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -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); } /** diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 00ee877e93..aafb26cb67 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -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) { diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 886c3c9423..69fe16fdc1 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -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); diff --git a/src/code/z_eventmgr.c b/src/code/z_eventmgr.c index 1219573960..fce034e657 100644 --- a/src/code/z_eventmgr.c +++ b/src/code/z_eventmgr.c @@ -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 diff --git a/src/code/z_kaleido_setup.c b/src/code/z_kaleido_setup.c index 130fa88db8..91c0b4a7cc 100644 --- a/src/code/z_kaleido_setup.c +++ b/src/code/z_kaleido_setup.c @@ -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); } } } diff --git a/src/code/z_lib.c b/src/code/z_lib.c index f3e67e5f3b..553c5d1338 100644 --- a/src/code/z_lib.c +++ b/src/code/z_lib.c @@ -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) { diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index 7226a6719d..5d1299bbf9 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -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 { diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 912926cbbd..c087fe059b 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -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; diff --git a/src/code/z_message.c b/src/code/z_message.c index 03fadc9c92..cf88c60df8 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -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; } } diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index ae535dc9b5..fe5ade1d28 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -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; diff --git a/src/code/z_play.c b/src/code/z_play.c index d86fd90d6d..c19b3c277d 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -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); diff --git a/src/code/z_play_hireso.c b/src/code/z_play_hireso.c index 24dcaca552..76fb711929 100644 --- a/src/code/z_play_hireso.c +++ b/src/code/z_play_hireso.c @@ -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++; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 2e2d2222d9..4654158f94 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -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; diff --git a/src/code/z_sound_source.c b/src/code/z_sound_source.c index 4962f70723..3a5a31c593 100644 --- a/src/code/z_sound_source.c +++ b/src/code/z_sound_source.c @@ -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) { 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 c7bff97f26..ba91165c83 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -135,7 +135,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { return; } - func_800B8F98(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG); ArmsHook_CheckForCancel(this); if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) && @@ -151,7 +151,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { } } this->timer = 0; - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_CRE); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_CRE); return; } @@ -260,10 +260,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor); } func_808C1154(this); - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_OBJ); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_OBJ); } else { CollisionCheck_SpawnShieldParticlesMetal(play, &this->actor.world.pos); - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT); } } else if (CHECK_BTN_ANY(CONTROLLER1(&play->state)->press.button, BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)) { diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index efa7f04c47..09b34792b3 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -100,7 +100,7 @@ void FireArrow_ChargeAndWait(ArrowFire* this, PlayState* play) { this->actor.world.pos = arrow->actor.world.pos; this->actor.shape.rot = arrow->actor.shape.rot; - func_800B9010(&this->actor, NA_SE_PL_ARROW_CHARGE_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_ARROW_CHARGE_FIRE - SFX_FLAG); // if arrow has no parent, player has fired the arrow if (arrow->actor.parent == NULL) { diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 83c37fa6c2..acfe454b8a 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -76,7 +76,7 @@ void ArrowIce_Charge(ArrowIce* this, PlayState* play) { this->actor.world.pos = arrow->actor.world.pos; this->actor.shape.rot = arrow->actor.shape.rot; - func_800B9010(&this->actor, NA_SE_PL_ARROW_CHARGE_ICE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_ARROW_CHARGE_ICE - SFX_FLAG); // if arrow has no parent, player has fired the arrow if (arrow->actor.parent == NULL) { diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index b650533da0..d0b9ce3baa 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -75,7 +75,7 @@ void ArrowLight_Charge(ArrowLight* this, PlayState* play) { this->actor.world.pos = arrow->actor.world.pos; this->actor.shape.rot = arrow->actor.shape.rot; - func_800B9010(&this->actor, NA_SE_PL_ARROW_CHARGE_LIGHT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_ARROW_CHARGE_LIGHT - SFX_FLAG); if (arrow->actor.parent == NULL) { this->firedPos = this->actor.world.pos; this->radius = 10; diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index efe92eebc9..ea2fe2c905 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -291,7 +291,7 @@ void func_808B78A4(BgBreakwall* this, PlayState* play) { void func_808B78DC(BgBreakwall* this, PlayState* play) { Actor_SetScale(&this->dyna.actor, 3.5f); - func_800B9010(&this->dyna.actor, NA_SE_EV_TORNADE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_TORNADE - SFX_FLAG); } void func_808B7914(BgBreakwall* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c b/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c index 2a1a7dce8c..687dc3c88f 100644 --- a/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c +++ b/src/overlays/actors/ovl_Bg_Crace_Movebg/z_bg_crace_movebg.c @@ -171,7 +171,7 @@ void BgCraceMovebg_OpeningDoor_SetupOpen(BgCraceMovebg* this, PlayState* play) { * Silde open, then do nothing. */ void BgCraceMovebg_OpeningDoor_Open(BgCraceMovebg* this, PlayState* play) { - func_800B9010(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG); Math_SmoothStepToF(&this->doorHeight, this->targetDoorHeight, 2.0f, this->openSpeed, 0.01f); this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + this->doorHeight; if (this->doorHeight == this->targetDoorHeight) { @@ -330,12 +330,12 @@ void BgCraceMovebg_ClosingDoor_Close(BgCraceMovebg* this, PlayState* play) { !Flags_GetSwitch(play, BG_CRACE_MOVEBG_GET_SWITCH_FLAG(&this->dyna.actor) + 1)) { play->haltAllActors = true; func_80169FDC(&play->state); - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); } BgCraceMovebg_ClosingDoor_SetupDoNothing(this, play); } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_STONEDOOR_CLOSE_S - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_STONEDOOR_CLOSE_S - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c b/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c index d8c39a098c..6883497420 100644 --- a/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c +++ b/src/overlays/actors/ovl_Bg_Ctower_Gear/z_bg_ctower_gear.c @@ -153,7 +153,7 @@ void BgCtowerGear_Update(Actor* thisx, PlayState* play) { this->dyna.actor.shape.rot.x -= 0x1F4; } else if (type == BGCTOWERGEAR_CENTER_COG) { this->dyna.actor.shape.rot.y += 0x1F4; - func_800B9010(&this->dyna.actor, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG); } else if (type == BGCTOWERGEAR_WATER_WHEEL) { this->dyna.actor.shape.rot.z -= 0x1F4; BgCtowerGear_Splash(this, play); diff --git a/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c b/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c index 571523fcb2..d30f153084 100644 --- a/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c +++ b/src/overlays/actors/ovl_Bg_Ctower_Rot/z_bg_ctower_rot.c @@ -89,7 +89,7 @@ void BgCtowerRot_CorridorRotate(BgCtowerRot* this, PlayState* play) { this->dyna.actor.shape.rot.z = rotZ * 16.384f; if (play->csCtx.curFrame == 132) { - play_sound(NA_SE_SY_SPIRAL_DASH); + Audio_PlaySfx(NA_SE_SY_SPIRAL_DASH); } } @@ -104,7 +104,7 @@ void BgCtowerRot_DoorClose(BgCtowerRot* this, PlayState* play) { } this->actionFunc = BgCtowerRot_DoorDoNothing; } else if (this->dyna.actor.params == BGCTOWERROT_STONE_DOOR_MAIN) { - func_800B9010(&this->dyna.actor, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG); } this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + (Math_SinS(this->dyna.actor.world.rot.y) * this->timer); diff --git a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c index 79ed631883..47f0dec927 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c @@ -476,7 +476,7 @@ void func_80B82DE0(BgDblueBalance* this, PlayState* play) { phi_f2 = 1.0f; } - func_8019FAD8(&this->dyna.actor.projectedPos, NA_SE_EV_SEESAW_INCLINE - SFX_FLAG, phi_f2 + 1.0f); + Audio_PlaySfx_AtPosWithFreq(&this->dyna.actor.projectedPos, NA_SE_EV_SEESAW_INCLINE - SFX_FLAG, phi_f2 + 1.0f); actor->shape.rot.z += this->unk_178; if (this->dyna.actor.shape.rot.z > 0x1C71) { @@ -691,7 +691,8 @@ void func_80B83758(Actor* thisx, PlayState* play) { temp_f0 = this->unk_178 * 0.002f; temp_f0 = CLAMP(temp_f0, 0.0f, 1.0f); } - func_8019FB0C(&this->dyna.actor.projectedPos, NA_SE_EV_SMALL_WATER_WHEEL - SFX_FLAG, temp_f0, 0x20); + Audio_PlaySfx_AtPosWithFreqAndChannelIO(&this->dyna.actor.projectedPos, NA_SE_EV_SMALL_WATER_WHEEL - SFX_FLAG, + temp_f0, 0x20); } if (this->dyna.actor.flags & ACTOR_FLAG_40) { diff --git a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c index 6d13f4ac3e..6562c47380 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c @@ -432,11 +432,11 @@ void func_80A2A444(BgDblueMovebg* this, PlayState* play) { } if (!(this->unk_174 & 1) && (this->unk_172 & 1)) { - func_801000CC(NA_SE_EV_PIPE_STREAM_START); + Lib_PlaySfx_2(NA_SE_EV_PIPE_STREAM_START); } func_80A2A670(this, play); } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_COCK_SWITCH_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_COCK_SWITCH_ROLL - SFX_FLAG); } } @@ -533,14 +533,14 @@ void func_80A2A7F8(BgDblueMovebg* this, PlayState* play) { } if (!(this->unk_174 & 1) && (this->unk_172 & 1)) { - func_801000CC(NA_SE_EV_PIPE_STREAM_START); + Lib_PlaySfx_2(NA_SE_EV_PIPE_STREAM_START); } this->unk_174 = this->unk_172; this->unk_1D0 = 17; this->actionFunc = func_80A2AAB8; } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_COCK_SWITCH_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_COCK_SWITCH_ROLL - SFX_FLAG); } } @@ -739,9 +739,9 @@ void func_80A2B274(Actor* thisx, PlayState* play) { temp_v1 = D_80A2B96C[func_80A29A80(play, this->unk_1C0, this->unk_1BC)]; if (temp_v1 != 0) { if (temp_v1 > 0) { - func_8019FC20(&this->dyna.actor.projectedPos, NA_SE_EV_DUMMY_WATER_WHEEL_RR - SFX_FLAG); + Audio_PlaySfx_WaterWheel(&this->dyna.actor.projectedPos, NA_SE_EV_DUMMY_WATER_WHEEL_RR - SFX_FLAG); } else { - func_8019FC20(&this->dyna.actor.projectedPos, NA_SE_EV_DUMMY_WATER_WHEEL_LR - SFX_FLAG); + Audio_PlaySfx_WaterWheel(&this->dyna.actor.projectedPos, NA_SE_EV_DUMMY_WATER_WHEEL_LR - SFX_FLAG); } } } @@ -856,9 +856,11 @@ void BgDblueMovebg_Draw(Actor* thisx, PlayState* play2) { if ((this->unk_160 == 9) || (this->unk_160 == 8)) { if (this->unk_1CC >= 0) { - func_8019FB0C(&this->unk_1A8, NA_SE_EV_BIG_WATER_WHEEL_RR - SFX_FLAG, this->unk_1D4, 32); + Audio_PlaySfx_AtPosWithFreqAndChannelIO(&this->unk_1A8, NA_SE_EV_BIG_WATER_WHEEL_RR - SFX_FLAG, + this->unk_1D4, 32); } else { - func_8019FB0C(&this->unk_1A8, NA_SE_EV_BIG_WATER_WHEEL_LR - SFX_FLAG, this->unk_1D4, 32); + Audio_PlaySfx_AtPosWithFreqAndChannelIO(&this->unk_1A8, NA_SE_EV_BIG_WATER_WHEEL_LR - SFX_FLAG, + this->unk_1D4, 32); } } } diff --git a/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c b/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c index 10ad49d9b0..44acf9343f 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Waterfall/z_bg_dblue_waterfall.c @@ -531,7 +531,7 @@ void func_80B84BCC(BgDblueWaterfall* this, PlayState* play) { } } - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } else { if (this->unk_1A3) { CutsceneManager_Stop(this->csId); @@ -570,7 +570,7 @@ void func_80B84F20(BgDblueWaterfall* this, PlayState* play) { this->unk_19F = 0; } - func_800B9010(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); } else { if (this->unk_1A3) { CutsceneManager_Stop(this->csId); diff --git a/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c b/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c index 97ccc907a5..6a4c44b657 100644 --- a/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c +++ b/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c @@ -292,17 +292,17 @@ void func_80BC4228(BgF40Block* this, PlayState* play) { switch (this->unk_168) { case 0: case 3: - func_800B9010(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_MOVE_X - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_MOVE_X - SFX_FLAG); break; case 1: case 4: - func_800B9010(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_MOVE_Y - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_MOVE_Y - SFX_FLAG); break; case 2: case 5: - func_800B9010(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_MOVE_Z - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_MOVE_Z - SFX_FLAG); break; } } diff --git a/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c b/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c index e15c87f422..86edcbee63 100644 --- a/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c +++ b/src/overlays/actors/ovl_Bg_Fire_Wall/z_bg_fire_wall.c @@ -182,7 +182,7 @@ void BgFireWall_Update(Actor* thisx, PlayState* play2) { } } if (this->actionFunc == func_809AC6C0) { - func_800B9010(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG); if ((this->unk_14C == 0) || ((this->unk_14C != 0) && (this->actor.xzDistToPlayer < 240.0f))) { func_809AC7F8(this, play); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c b/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c index 7b63081c07..ecfe2c910f 100644 --- a/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c +++ b/src/overlays/actors/ovl_Bg_Fu_Kaiten/z_bg_fu_kaiten.c @@ -56,7 +56,7 @@ void BgFuKaiten_UpdateRotation(BgFuKaiten* this) { this->dyna.actor.shape.rot.y += this->rotationSpeed; if (this->rotationSpeed > 0) { f0 = this->rotationSpeed * 0.002f; - func_8019FAD8(&this->dyna.actor.projectedPos, NA_SE_EV_WOOD_GEAR - SFX_FLAG, f0); + Audio_PlaySfx_AtPosWithFreq(&this->dyna.actor.projectedPos, NA_SE_EV_WOOD_GEAR - SFX_FLAG, f0); } } diff --git a/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c b/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c index 9da3cc5f68..3da89164d3 100644 --- a/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c +++ b/src/overlays/actors/ovl_Bg_Fu_Mizu/z_bg_fu_mizu.c @@ -75,9 +75,9 @@ void BgFuMizu_Update(Actor* thisx, PlayState* play) { } if (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, heightTarget, 0.05f, 1.0f, 0.5f) > 1.0f) { if (this->unk_160 == 1) { - func_800B9010(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN_FIX - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN_FIX - SFX_FLAG); } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN_FIX - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN_FIX - SFX_FLAG); } } } 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 fd46e16e5e..27023756b5 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 @@ -74,7 +74,7 @@ void func_80B40160(BgGoronOyu* this, PlayState* play) { func_80B40080(this); } - Audio_PlaySfxAtPos(&D_80B40780, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Audio_PlaySfx_AtPos(&D_80B40780, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } void func_80B401F8(BgGoronOyu* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c b/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c index dfc176eff0..f9ed1d0c9e 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c +++ b/src/overlays/actors/ovl_Bg_Haka_Curtain/z_bg_haka_curtain.c @@ -110,7 +110,7 @@ void func_80B6DD9C(BgHakaCurtain* this, PlayState* play) { func_80B6DE80(this); return; } - func_800B9010(&this->dyna.actor, NA_SE_EV_CURTAIN_DOWN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_CURTAIN_DOWN - SFX_FLAG); } void func_80B6DE80(BgHakaCurtain* this) { diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c b/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c index 10f045617e..b4c653b992 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Elvpole/z_bg_hakugin_elvpole.c @@ -99,7 +99,7 @@ void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) { this->unk_15C++; this->dyna.actor.world.pos.x = (Math_SinS(this->unk_15C * 0x2000) * var_fv1) + this->dyna.actor.home.pos.x; this->dyna.actor.world.pos.z = (Math_CosS(this->unk_15C * 0x2000) * var_fv1) + this->dyna.actor.home.pos.z; - func_800B9010(&this->dyna.actor, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); } else { this->unk_15C = 0; } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c index f85015ea94..2a79bfd088 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c @@ -492,7 +492,7 @@ void func_80A9BD24(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct* } else if (unkStruct->unk_0000[i].unk_34 == 3) { if (Math3D_XZLengthSquared(unkStruct->unk_0000[i].unk_14.x, unkStruct->unk_0000[i].unk_14.z) > 278784.03f) { func_80A9B554(this, play, unkStruct, &unkStruct->unk_0000[i]); - func_8019F128(NA_SE_EV_GLASSBROKEN_IMPACT); + Audio_PlaySfx_2(NA_SE_EV_GLASSBROKEN_IMPACT); unkStruct->unk_0000[i].unk_34 = 4; unkStruct->unk_0000[i].unk_30 = 30; } @@ -528,7 +528,7 @@ void func_80A9C058(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct* Quake_SetDuration(quakeIndex, 12); if (this->unk_179 <= 0) { - func_8019F128(NA_SE_EV_STONEDOOR_STOP); + Audio_PlaySfx_2(NA_SE_EV_STONEDOOR_STOP); this->unk_179 = 40; } break; @@ -799,10 +799,10 @@ void func_80A9CD14(BgHakuginPost* this, PlayState* play) { this->unk_16C += temp_f12; if (this->unk_168 <= this->unk_16C) { BgHakuginPost_RequestQuakeAndRumble(this, play); - func_8019F128(NA_SE_EV_STONEDOOR_STOP); + Audio_PlaySfx_2(NA_SE_EV_STONEDOOR_STOP); func_80A9CE00(this); } else { - func_800B8FE8(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG); } } @@ -840,7 +840,7 @@ void func_80A9CE1C(BgHakuginPost* this, PlayState* play) { D_80A9E028.unk_0000[i].unk_28 = ((s16)(player->actor.shape.rot.y - temp) / 3) + temp; D_80A9E028.unk_0000[i].unk_34 = 2; Player_PlaySfx(player, NA_SE_IT_HAMMER_HIT); - func_8019F128(NA_SE_EV_SLIDE_DOOR_OPEN); + Audio_PlaySfx_2(NA_SE_EV_SLIDE_DOOR_OPEN); Flags_SetSwitch(play, D_80A9E028.unk_0000[i].unk_2E); this->unk_178 = 20; func_80A9D2C4(this, func_80A9CE00, D_80A9E028.unk_0000[i].unk_14.y + 50.0f, D_80A9E028.unk_0000[i].csId, @@ -877,10 +877,10 @@ void func_80A9D0B4(BgHakuginPost* this, PlayState* play) { func_80A9B160(&D_80A9E028, play); this->unk_16C = this->unk_164; BgHakuginPost_RequestQuakeAndRumble(this, play); - func_8019F128(NA_SE_EV_STONEDOOR_STOP); + Audio_PlaySfx_2(NA_SE_EV_STONEDOOR_STOP); func_80A9CC84(this); } else { - func_800B8FE8(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c index 2d8fc2683c..583384c7db 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c @@ -109,7 +109,7 @@ void func_80B15790(BgHakuginSwitch* this, u16 sfxId) { void func_80B157C4(BgHakuginSwitch* this, u16 arg1) { if (this->unk_1B2 <= 0) { - func_800B9010(&this->dyna.actor, arg1); + Actor_PlaySfx_Flagged(&this->dyna.actor, arg1); } } @@ -254,7 +254,7 @@ void func_80B15B74(BgHakuginSwitch* this, PlayState* play) { if (this->unk_1B0 > 0) { this->unk_1B0--; if (sp38->unk_14 & 8) { - func_800B9038(&this->dyna.actor, this->unk_1B0); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->unk_1B0); if (this->unk_1B0 == 0) { sp24 = true; sp20 = sp28; diff --git a/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c b/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c index 93d6053208..27375d4dde 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Block/z_bg_ikana_block.c @@ -306,7 +306,7 @@ void func_80B7F290(BgIkanaBlock* this, PlayState* play) { func_80B7F360(this); } } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c index ad2d9fbddd..23e707d7b1 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c @@ -652,7 +652,7 @@ void func_80B814B8(BgIkanaRotaryroom* this, PlayState* play) { func_80169EFC(&play->state); Player_PlaySfx(player, NA_SE_VO_LI_TAKEN_AWAY + player->ageProperties->voiceSfxIdOffset); play->haltAllActors = true; - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); this->actionFunc = NULL; } } else { @@ -813,7 +813,7 @@ void func_80B81A80(Actor* thisx, PlayState* play) { s32 i; BgIkanaRotaryroomStruct1* ptr; - func_800B9010(thisx, NA_SE_EV_EARTHQUAKE - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_EARTHQUAKE - SFX_FLAG); this->unk_584--; if (this->unk_584 <= 0) { @@ -850,7 +850,7 @@ void func_80B81BA0(Actor* thisx, PlayState* play) { s32 sp30 = 0; s32 i; - func_800B9010(&this->dyna.actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); if (this->unk_584 > 0) { this->unk_584--; @@ -921,7 +921,7 @@ void func_80B81DC8(Actor* thisx, PlayState* play) { BgIkanaRotaryroom* this = THIS; if (this->unk_584 > 10) { - func_800B9010(&this->dyna.actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); } this->unk_584--; diff --git a/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c b/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c index 6ce5f7d817..4e4b9b9bc8 100644 --- a/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c +++ b/src/overlays/actors/ovl_Bg_Iknin_Susceil/z_bg_iknin_susceil.c @@ -163,7 +163,7 @@ void func_80C0ABA8(BgIkninSusceil* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND); func_80C0AC74(this); } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG); } } @@ -205,7 +205,7 @@ void func_80C0AD64(BgIkninSusceil* this, PlayState* play) { CutsceneManager_Stop(this->dyna.actor.csId); func_80C0AB14(this); } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c b/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c index 84bdc41694..71fbb8d2f3 100644 --- a/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c +++ b/src/overlays/actors/ovl_Bg_Iknv_Doukutu/z_bg_iknv_doukutu.c @@ -131,7 +131,7 @@ void func_80BD7250(BgIknvDoukutu* this, PlayState* play) { this->dyna.actor.world.pos.y = temp_fv0; this->actionFunc = func_80BD73D0; } - func_8019F128(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Audio_PlaySfx_2(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } void func_80BD72BC(BgIknvDoukutu* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c b/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c index de6be9266e..540c393c64 100644 --- a/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c +++ b/src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c @@ -127,13 +127,13 @@ s32 func_80BD7CEC(BgIknvObj* this) { void BgIknvObj_UpdateWaterwheel(BgIknvObj* this, PlayState* play) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04)) { this->dyna.actor.shape.rot.z -= 0x64; - func_800B9098(&this->dyna.actor); - func_800B9010(&this->dyna.actor, NA_SE_EV_WOOD_WATER_WHEEL - SFX_FLAG); + Actor_PlaySeq_FlaggedMusicBoxHouse(&this->dyna.actor); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WOOD_WATER_WHEEL - SFX_FLAG); } if ((play->csCtx.state != CS_STATE_IDLE) && (gSaveContext.sceneLayer == 1) && (play->csCtx.scriptIndex == 4) && (play->csCtx.curFrame == 1495)) { - func_8019F128(NA_SE_EV_DOOR_UNLOCK); + Audio_PlaySfx_2(NA_SE_EV_DOOR_UNLOCK); } } @@ -146,7 +146,7 @@ s32 func_80BD7E0C(BgIknvObj* this, s16 targetRotation, PlayState* play) { if ((play->gameplayFrames % 2) != 0) { this->dyna.actor.shape.yOffset = 5.0f; } - func_800B9010(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG); return false; } Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP); diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 2796aed7e8..05d4a27bf0 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -284,14 +284,14 @@ void func_809543D4(BgIngate* this, PlayState* play) { this->unk160 &= ~0x4; this->actionFunc = func_809541B8; Environment_StartTime(); - func_8019F208(); + Audio_PlaySfx_MessageDecide(); } else { if (this->timePath != NULL) { this->timePath = &play->setupPathList[this->timePath->additionalPathIndex]; } func_80953F14(this, play); CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40); - func_8019F230(); + Audio_PlaySfx_MessageCancel(); } Message_CloseTextbox(play); break; @@ -299,13 +299,13 @@ void func_809543D4(BgIngate* this, PlayState* play) { if (play->msgCtx.choiceIndex == 0) { func_80953EA4(this, play); CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40); - func_8019F208(); + Audio_PlaySfx_MessageDecide(); } else { func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END); this->unk160 &= ~0x4; this->actionFunc = func_809541B8; Environment_StartTime(); - func_8019F230(); + Audio_PlaySfx_MessageCancel(); } Message_CloseTextbox(play); break; diff --git a/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c b/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c index 66ac026341..37ac6c2ac0 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Fence/z_bg_kin2_fence.c @@ -189,11 +189,11 @@ void BgKin2Fence_HandleMaskCode(BgKin2Fence* this, PlayState* play) { if (hitMask >= 0) { nextMask = (s8)gSaveContext.save.saveInfo.spiderHouseMaskOrder[this->masksHit]; if (hitMask == nextMask) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); this->masksHit += 1; BgKin2Fence_SpawnEyeSparkles(this, play, nextMask); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->masksHit = 0; } } diff --git a/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c b/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c index 7da9237bcd..87a9469642 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Picture/z_bg_kin2_picture.c @@ -105,7 +105,7 @@ void BgKin2Picture_SpawnSkulltula(BgKin2Picture* this, PlayState* play2) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y + 23.0f, this->dyna.actor.home.pos.z, 0, this->dyna.actor.home.rot.y, 0, skulltulaSpawnParams)) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } } } diff --git a/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c b/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c index f36944db60..980b0fa01f 100644 --- a/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c +++ b/src/overlays/actors/ovl_Bg_Kin2_Shelf/z_bg_kin2_shelf.c @@ -307,7 +307,7 @@ void func_80B70230(BgKin2Shelf* this, PlayState* play) { this->dyna.actor.world.pos.z = ((Math_CosS(sp36) * phi_f20) * D_80B70750[sp40]) + this->dyna.actor.home.pos.z; if (this->unk_166 != 0) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } func_80B700A8(this); } else { @@ -353,7 +353,7 @@ void func_80B704B4(BgKin2Shelf* this, PlayState* play) { this->dyna.actor.world.pos.z = ((Math_CosS(sp36) * temp_f20) * D_80B70758[sp40]) + this->dyna.actor.home.pos.z; if (this->unk_167 != 0) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } func_80B700A8(this); } else { diff --git a/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c b/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c index 2e924efd36..11db327fab 100644 --- a/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c +++ b/src/overlays/actors/ovl_Bg_Numa_Hana/z_bg_numa_hana.c @@ -252,7 +252,7 @@ void BgNumaHana_UnfoldInnerPetals(BgNumaHana* this, PlayState* play) { this->transitionTimer++; } } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_MOVE - SFX_FLAG); } BgNumaHana_UpdateSettleRotation(&this->settleZRotation, &this->settleAngle, &this->settleScale, 20.0f); @@ -284,7 +284,7 @@ void BgNumaHana_UnfoldOuterPetals(BgNumaHana* this, PlayState* play) { this->transitionTimer++; } } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWERPETAL_MOVE - SFX_FLAG); } BgNumaHana_UpdateSettleRotation(&this->settleZRotation, &this->settleAngle, &this->settleScale, 7.0f); @@ -332,7 +332,7 @@ void BgNumaHana_RaiseFlower(BgNumaHana* this, PlayState* play) { } BgNumaHana_UpdatePetalPosRots(this); - func_800B9010(&this->dyna.actor, NA_SE_EV_FLOWER_ROLLING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWER_ROLLING - SFX_FLAG); } void BgNumaHana_SetupOpenedIdle(BgNumaHana* this) { @@ -346,7 +346,7 @@ void BgNumaHana_OpenedIdle(BgNumaHana* this, PlayState* play) { this->dyna.actor.shape.rot.y += this->flowerRotationalVelocity; this->petalZRotation = this->innerPetalZRotation + this->settleZRotation; BgNumaHana_UpdatePetalPosRots(this); - func_800B9010(&this->dyna.actor, NA_SE_EV_FLOWER_ROLLING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FLOWER_ROLLING - SFX_FLAG); } void BgNumaHana_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c b/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c index 9349b81883..796f66d3fc 100644 --- a/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c +++ b/src/overlays/actors/ovl_Bg_Spout_Fire/z_bg_spout_fire.c @@ -179,7 +179,7 @@ void BgSpoutFire_Update(Actor* thisx, PlayState* play) { func_80A60E08(this, play); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - func_800B9010(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index 132f8f13f7..16e0681562 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -49,7 +49,7 @@ void func_80919F30(BgUmajump* this, PlayState* play) { void BgUmajump_StopCutscene(BgUmajump* this, PlayState* play) { if ((play->csCtx.curFrame >= 6) && !this->hasSoundPlayed) { this->hasSoundPlayed = true; - play_sound(NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx(NA_SE_EV_KID_HORSE_NEIGH); } if (play->csCtx.state == CS_STATE_IDLE) { 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 5b19594fb2..bf40d44802 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -938,7 +938,7 @@ void func_809DAB78(Boss02* this, PlayState* play) { this->unk_0152 = 0; sTwinmoldStatic->unk_1D20 = 102; sTwinmoldStatic->subCamAtVel = 0.0f; - play_sound(NA_SE_EN_INBOSS_DEAD_PRE2_OLD); + Audio_PlaySfx(NA_SE_EN_INBOSS_DEAD_PRE2_OLD); } else if (!(this->unk_0146[1] & 0xF) && (Rand_ZeroOne() < 0.5f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD); } @@ -955,7 +955,7 @@ void func_809DAB78(Boss02* this, PlayState* play) { } Boss02_SpawnEffectFlash(play->specialEffects, &this->unk_147C[this->unk_1678]); - play_sound(NA_SE_EV_EXPLOSION); + Audio_PlaySfx(NA_SE_EV_EXPLOSION); this->unk_1678--; if (this->unk_1678 <= 0) { @@ -1005,7 +1005,7 @@ void func_809DAB78(Boss02* this, PlayState* play) { sTwinmoldStatic->unk_1D1C = 0; sTwinmoldStatic->unk_0146[0] = 15; sTwinmoldStatic->unk_0150 = 0; - play_sound(NA_SE_EV_LIGHTNING); + Audio_PlaySfx(NA_SE_EV_LIGHTNING); for (i = 0; i < 30; i++) { Boss02_SpawnEffectFragment(play->specialEffects, &this->unk_0170); @@ -1077,7 +1077,7 @@ void func_809DBFB4(Boss02* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD); this->unk_015C = 1; } else { - Audio_PlaySfxAtPos(&this->unk_167C, NA_SE_EN_INBOSS_DAMAGE_OLD); + Audio_PlaySfx_AtPos(&this->unk_167C, NA_SE_EN_INBOSS_DAMAGE_OLD); this->unk_015C = 10; } @@ -1671,7 +1671,7 @@ void func_809DD934(Boss02* this, PlayState* play) { label1: if (this->unk_1D14 >= 50) { if (this->unk_1D14 == (u32)(BREG(43) + 60)) { - play_sound(NA_SE_PL_TRANSFORM_GIANT); + Audio_PlaySfx(NA_SE_PL_TRANSFORM_GIANT); } Math_ApproachF(&this->unk_1D64, 200.0f, 0.1f, this->subCamAtVel * 640.0f); Math_ApproachF(&this->unk_1D6C, 273.0f, 0.1f, this->subCamAtVel * 150.0f); @@ -1722,7 +1722,7 @@ void func_809DD934(Boss02* this, PlayState* play) { label2: if (this->unk_1D14 != 0) { if (this->unk_1D14 == (u32)(BREG(44) + 10)) { - play_sound(NA_SE_PL_TRANSFORM_NORAML); + Audio_PlaySfx(NA_SE_PL_TRANSFORM_NORAML); } Math_ApproachF(&this->unk_1D64, 60.0f, 0.1f, this->subCamAtVel * 640.0f); Math_ApproachF(&this->unk_1D6C, 23.0f, 0.1f, this->subCamAtVel * 150.0f); @@ -1986,7 +1986,7 @@ void func_809DD934(Boss02* this, PlayState* play) { this->unk_1D7A = 0; func_809DA1D0(play, 255, 255, 255, 0); this->unk_1D78 = 2; - play_sound(NA_SE_SY_TRANSFORM_MASK_FLASH); + Audio_PlaySfx(NA_SE_SY_TRANSFORM_MASK_FLASH); case 2: this->unk_1D7A += 40; @@ -2079,7 +2079,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) { sp58 = (Math_SinS(this->unk_0150) * (BREG(19) + 5)) * 0.1f; Matrix_RotateZF(Math_SinS(this->unk_1D1C * 0x3000) * ((KREG(28) * 0.001f) + 0.017f), MTXMODE_NEW); Matrix_MultVecY(1.0f, &this->subCamUp); - func_8019F128(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG); + Audio_PlaySfx_2(NA_SE_EV_EARTHQUAKE_LAST - SFX_FLAG); } if (this->unk_1D1C == 20) { diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index d44c961e99..af79315db4 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -121,7 +121,7 @@ GyorgEffect sGyorgEffects[GYORG_EFFECT_COUNT]; Boss03* sGyorgBossInstance; void Boss03_PlayUnderwaterSfx(Vec3f* projectedPos, u16 sfxId) { - func_8019F420(projectedPos, sfxId); + Audio_PlaySfx_Underwater(projectedPos, sfxId); } /* Start of SpawnEffect section */ @@ -1051,7 +1051,7 @@ void Boss03_Charge(Boss03* this, PlayState* play) { // Attack platform if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { - play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION); + Audio_PlaySfx(NA_SE_IT_BIG_BOMB_EXPLOSION); Actor_RequestQuakeAndRumble(&this->actor, play, 20, 15); Actor_Spawn(&play->actorCtx, play, ACTOR_EN_WATER_EFFECT, 0.0f, this->waterHeight, 0.0f, 0, 0, 0x96, ENWATEREFFECT_TYPE_GYORG_SHOCKWAVE); @@ -1772,7 +1772,7 @@ void Boss03_Stunned(Boss03* this, PlayState* play) { this->actor.gravity = -2.0f; Actor_MoveWithGravity(&this->actor); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) { - play_sound(NA_SE_IT_WALL_HIT_HARD); + Audio_PlaySfx(NA_SE_IT_WALL_HIT_HARD); Actor_RequestQuakeAndRumble(&this->actor, play, 10, 10); } } else { @@ -2114,9 +2114,9 @@ void Boss03_Update(Actor* thisx, PlayState* play2) { this->prevPlayerPos = player->actor.world.pos; if (this->waterHeight < this->actor.world.pos.y) { - func_8019F540(0); + Audio_SetSfxUnderwaterReverb(false); } else { - func_8019F540(1); + Audio_SetSfxUnderwaterReverb(true); } if (this->unk_280 != 0) { 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 4e22822a48..43a910e19b 100644 --- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c +++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c @@ -324,7 +324,7 @@ void func_809EC568(Boss04* this, PlayState* play) { Math_ApproachF(&this->subCamAt.y, this->actor.world.pos.y, 0.5f, 1000.0f); Math_ApproachF(&this->subCamAt.z, this->actor.world.pos.z, 0.5f, 1000.0f); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) { - play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION); + Audio_PlaySfx(NA_SE_IT_BIG_BOMB_EXPLOSION); this->unk_6F4 = 15; this->unk_708 = 13; this->unk_704 = 0; @@ -480,7 +480,7 @@ void func_809ECF58(Boss04* this, PlayState* play) { this->actor.speed = 0.0f; if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) { - play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION); + Audio_PlaySfx(NA_SE_IT_BIG_BOMB_EXPLOSION); Actor_RequestQuakeAndRumble(&this->actor, play, 15, 10); this->unk_6F4 = 15; sp3C.x = this->actor.focus.pos.x; diff --git a/src/overlays/actors/ovl_Boss_06/z_boss_06.c b/src/overlays/actors/ovl_Boss_06/z_boss_06.c index aa2929f287..04c432dfdc 100644 --- a/src/overlays/actors/ovl_Boss_06/z_boss_06.c +++ b/src/overlays/actors/ovl_Boss_06/z_boss_06.c @@ -163,7 +163,7 @@ void func_809F23CC(Boss06* this) { if ((this->unk_1C9 == 0) && (D_809F4970->unk_68A == 0)) { if (this->actor.colChkInfo.damageEffect == 2) { func_809F24A8(this); - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); this->unk_1B0 = -(this->actor.world.pos.x - this->collider.info.bumper.hitPos.x); this->unk_1BC = this->unk_1B0 * 0.35f; @@ -229,7 +229,7 @@ void func_809F24C8(Boss06* this, PlayState* play) { } if (this->unk_1CA >= 30) { - play_sound(NA_SE_EV_S_STONE_FLASH); + Audio_PlaySfx(NA_SE_EV_S_STONE_FLASH); } if (this->unk_1CA >= 60) { @@ -376,7 +376,7 @@ void func_809F2C44(Boss06* this, PlayState* play) { } if ((this->unk_1E4 > 0.1f) && ENBOSS06_GET_PARAMS(&this->actor) == 0) { - play_sound(NA_SE_EV_CURTAIN_DOWN - SFX_FLAG); + Audio_PlaySfx(NA_SE_EV_CURTAIN_DOWN - SFX_FLAG); } } @@ -453,7 +453,7 @@ void Boss06_Update(Actor* thisx, PlayState* play) { } if ((this->unk_1C8 != 0) && (this->unk_1C8 != 0)) { - play_sound(NA_SE_EV_FIRE_PLATE - SFX_FLAG); + Audio_PlaySfx(NA_SE_EV_FIRE_PLATE - SFX_FLAG); this->unk_1CC += 0.6f; this->unk_1D0 += 0.1f; this->unk_1D4 += 0.0200000014156f; diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index cba240947a..ca472ccc30 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -210,7 +210,7 @@ void func_808CDBDC(DemoEffect* this, PlayState* play) { this->actor.scale.x = scale; this->actor.scale.z = scale; func_808CDAD0(alphaScale); - func_800B8FE8(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); } else { func_808CDAD0(1.0f); Actor_Kill(&this->actor); @@ -218,7 +218,7 @@ void func_808CDBDC(DemoEffect* this, PlayState* play) { } void func_808CDCEC(DemoEffect* this, PlayState* play) { - func_800B8FE8(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); if (SkelCurve_Update(play, &this->skelCurve)) { SkelCurve_SetAnim(&this->skelCurve, &object_efc_tw_CurveAnim_000050, 1.0f, 60.0f, 59.0f, 0.0f); diff --git a/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c b/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c index ec33a8a94e..11fafb5f18 100644 --- a/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c +++ b/src/overlays/actors/ovl_Demo_Moonend/z_demo_moonend.c @@ -89,7 +89,7 @@ void func_80C17B60(DemoMoonend* this, PlayState* play) { } } if (this->cueId == 2) { - func_800B9010(&this->actor, NA_SE_EV_RAINBOW - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_RAINBOW - SFX_FLAG); } } else { this->actor.draw = NULL; @@ -127,7 +127,7 @@ void func_80C17C48(DemoMoonend* this, PlayState* play) { } } if (this->actor.home.rot.z != 0) { - func_800B9010(&this->actor, NA_SE_EV_EARTHQUAKE_LAST2 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_EARTHQUAKE_LAST2 - SFX_FLAG); } } else { this->actor.draw = NULL; diff --git a/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c b/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c index 2d0aa27cd5..2341b3a642 100644 --- a/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c +++ b/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c @@ -224,7 +224,7 @@ void func_80C16A74(DemoSyoten* this, PlayState* play) { func_80183DE0(&this->unk_144); if (Cutscene_IsCueInChannel(play, this->cueType)) { if ((play->csCtx.curFrame >= 160) && (play->csCtx.curFrame < 322)) { - func_800B9010(&this->actor, NA_SE_EV_IKANA_SOUL_LV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_IKANA_SOUL_LV - SFX_FLAG); } else if (play->csCtx.curFrame == 322) { Actor_PlaySfx(&this->actor, NA_SE_EV_IKANA_SOUL_TRANSFORM); } @@ -392,7 +392,7 @@ void func_80C16EAC(DemoSyoten* this, PlayState* play) { if (this->unk_3D8 > 1.0f) { this->unk_3D8 = 1.0f; } - func_800B9010(&this->actor, NA_SE_EV_IKANA_PURIFICATION - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_IKANA_PURIFICATION - SFX_FLAG); } } else { this->actor.draw = NULL; diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 2db2823675..ae9016ad70 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -127,7 +127,7 @@ void DemoTreLgt_Animate(DemoTreLgt* this, PlayState* play) { if (curFrame > 30.0f) { if (!(this->status & 1)) { this->status |= 1; - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_FLASH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_FLASH); } } if (SkelCurve_Update(play, &this->skelCurve)) { diff --git a/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c b/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c index 33c6eed8ff..96941b8cc9 100644 --- a/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c +++ b/src/overlays/actors/ovl_Dm_Char01/z_dm_char01.c @@ -168,7 +168,7 @@ void func_80AA8698(DmChar01* this, PlayState* play) { (player2->actor.world.pos.x < 40.0f) && (player2->actor.world.pos.z > 1000.0f) && (player2->actor.world.pos.z < 1078.0f)) { if (!D_80AAAAB4) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); D_80AAAAB4 = true; } } else { diff --git a/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c b/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c index 9f5d189674..b5a19670dc 100644 --- a/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c +++ b/src/overlays/actors/ovl_Dm_Char08/z_dm_char08.c @@ -258,7 +258,7 @@ void DmChar08_WaitForSong(DmChar08* this, PlayState* play) { ((player2->actor.world.pos.x > -5780.0f) && (player2->actor.world.pos.x < -5385.0f) && (player2->actor.world.pos.z > 1120.0f) && (player2->actor.world.pos.z < 2100.0f))) { if (!sSuccessSoundAlreadyPlayed) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); sSuccessSoundAlreadyPlayed = true; } } else { diff --git a/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c b/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c index e0d2fc2a3e..0f6334db36 100644 --- a/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c +++ b/src/overlays/actors/ovl_Dm_Opstage/z_dm_opstage.c @@ -98,7 +98,7 @@ void DmOpstage_Update(Actor* thisx, PlayState* play) { if ((play->sceneId == SCENE_SPOT00) && (gSaveContext.sceneLayer == 0) && (play->csCtx.curFrame == 480)) { // This actor is responsible for playing the fairy sound during the exposition in the intro, // during the transition to Lost Woods, before Ocarina gets stolen. - func_8019F128(NA_SE_EV_NAVY_FLY_REBIRTH); + Audio_PlaySfx_2(NA_SE_EV_NAVY_FLY_REBIRTH); } } 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 1787bcf6ff..b9bf702b2b 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -428,7 +428,7 @@ void DmStk_PlaySfxForIntroCutsceneFirstPart(DmStk* this, PlayState* play) { */ void DmStk_PlaySfxForTitleCutscene(DmStk* this, PlayState* play) { if (play->csCtx.curFrame == 535) { - func_8019F128(NA_SE_EV_CLOCK_TOWER_BELL); + Audio_PlaySfx_2(NA_SE_EV_CLOCK_TOWER_BELL); } } @@ -492,12 +492,12 @@ void DmStk_PlaySfxForObtainingMajorasMaskCutscene(DmStk* this, PlayState* play) void DmStk_PlaySfxForCurseCutsceneFirstPart(DmStk* this, PlayState* play) { switch (play->csCtx.curFrame) { case 415: - func_801A479C(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 100); + Audio_PlaySfx_AtPosWithVolumeTransition(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 100); break; case 785: - func_8019F128(NA_SE_SY_STALKIDS_PSYCHO); - func_8019FE74(&gSfxVolume, 0.0f, 150); + Audio_PlaySfx_2(NA_SE_SY_STALKIDS_PSYCHO); + Audio_SetSfxVolumeTransition(&gSfxVolume, 0.0f, 150); break; case 560: @@ -520,7 +520,7 @@ void DmStk_PlaySfxForCurseCutsceneSecondPart(DmStk* this, PlayState* play) { switch (play->csCtx.curFrame) { case 10: - func_801A479C(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 50); + Audio_PlaySfx_AtPosWithVolumeTransition(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 50); break; case 71: @@ -532,7 +532,7 @@ void DmStk_PlaySfxForCurseCutsceneSecondPart(DmStk* this, PlayState* play) { break; case 650: - func_8019FE74(&gSfxVolume, 0.0f, 80); + Audio_SetSfxVolumeTransition(&gSfxVolume, 0.0f, 80); break; case 265: @@ -573,7 +573,7 @@ void DmStk_PlaySfxForClockTowerIntroCutsceneVersion1(DmStk* this, PlayState* pla switch (play->csCtx.curFrame) { case 140: - func_801A479C(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 80); + Audio_PlaySfx_AtPosWithVolumeTransition(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 80); break; case 258: @@ -762,7 +762,7 @@ void DmStk_PlaySfxForClockTowerIntroCutsceneVersion2(DmStk* this, PlayState* pla switch (play->csCtx.curFrame) { case 40: - func_801A479C(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 80); + Audio_PlaySfx_AtPosWithVolumeTransition(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 80); break; case 234: @@ -805,7 +805,7 @@ void DmStk_PlaySfxForCutsceneAfterPlayingOathToOrder(DmStk* this, PlayState* pla switch (play->csCtx.curFrame) { case 64: - Audio_PlaySfxAtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL06_SURPRISED); + Audio_PlaySfx_AtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL06_SURPRISED); break; case 327: @@ -825,11 +825,11 @@ void DmStk_PlaySfxForCutsceneAfterPlayingOathToOrder(DmStk* this, PlayState* pla case 486: Actor_PlaySfx(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF); - Audio_PlaySfxAtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL08_CRY_BIG); + Audio_PlaySfx_AtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL08_CRY_BIG); break; case 496: - Audio_PlaySfxAtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL09_SCREAM); + Audio_PlaySfx_AtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL09_SCREAM); break; case 590: @@ -841,7 +841,7 @@ void DmStk_PlaySfxForCutsceneAfterPlayingOathToOrder(DmStk* this, PlayState* pla break; case 594: - Audio_PlaySfxAtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL24_SCREAM2); + Audio_PlaySfx_AtPos(&this->oathToOrderCutsceneVoicePos, NA_SE_EN_STAL24_SCREAM2); break; default: @@ -865,7 +865,7 @@ void DmStk_PlaySfxForCutsceneAfterPlayingOathToOrder(DmStk* this, PlayState* pla } if (play->csCtx.curFrame >= 290) { - func_8019F128(NA_SE_EV_KYOJIN_VOICE_SUCCESS - SFX_FLAG); + Audio_PlaySfx_2(NA_SE_EV_KYOJIN_VOICE_SUCCESS - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index c889de1583..586704c3b8 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -119,7 +119,7 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play) { if (grottoIsOpen) { DOORANA_SET_TYPE(&this->actor, DOORANA_TYPE_VISIBLE); DoorAna_SetupAction(this, DoorAna_WaitOpen); - play_sound(NA_SE_SY_CORRECT_CHIME); + Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME); } Actor_SetClosestSecretDistance(&this->actor, play); diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 7e202b0afe..b6f8198c1c 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -429,7 +429,7 @@ s32 func_808A1340(DoorShutter* this, PlayState* play) { s32 pad; if (this->unk_163 == 7) { - func_800B9010(&this->slidingDoor.dyna.actor, NA_SE_EV_IKANA_DOOR_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->slidingDoor.dyna.actor, NA_SE_EV_IKANA_DOOR_OPEN - SFX_FLAG); } Lib_Vec3f_TranslateAndRotateY(&this->slidingDoor.dyna.actor.home.pos, this->slidingDoor.dyna.actor.shape.rot.y, @@ -589,7 +589,7 @@ void func_808A1884(DoorShutter* this, PlayState* play) { s32 func_808A1A70(DoorShutter* this) { if (this->unk_163 == 7) { if (this->unk_163 == 7) { - func_800B9010(&this->slidingDoor.dyna.actor, NA_SE_EV_IKANA_DOOR_CLOSE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->slidingDoor.dyna.actor, NA_SE_EV_IKANA_DOOR_CLOSE - SFX_FLAG); } Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 5.0f, 0.5f); diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index de20e6f636..798edb09d6 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -360,14 +360,14 @@ void func_808B93A0(DoorWarp1* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9); player->unk_3A0.x = this->dyna.actor.world.pos.x; player->unk_3A0.z = this->dyna.actor.world.pos.z; this->unk_1CA = 1; DoorWarp1_SetupAction(this, func_808B9524); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END); DoorWarp1_SetupAction(this, func_808B94A4); } diff --git a/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c b/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c index 3a57149a72..c8127a98f3 100644 --- a/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c +++ b/src/overlays/actors/ovl_Eff_Zoraband/z_eff_zoraband.c @@ -55,7 +55,7 @@ void EffZoraband_MikauFadeOut(EffZoraband* this, PlayState* play) { } } if ((this->actor.home.rot.z != 0) && (this->actor.draw != NULL)) { - func_800B9010(&this->actor, NA_SE_EV_UFO_LIGHT_BEAM - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_UFO_LIGHT_BEAM - SFX_FLAG); } if (this->stateFlags & 2) { if (this->alpha < 240) { diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index 6e56cc6098..a5900670d5 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -411,22 +411,22 @@ void func_80BED3BC(EnAkindonuts* this, PlayState* play) { switch (func_80BED208(this)) { case 0: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15EC; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15ED; break; case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15EE; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C &= ~0x1; this->unk_32C |= 0x40; play->msgCtx.msgMode = 0x43; @@ -494,22 +494,22 @@ void func_80BED680(EnAkindonuts* this, PlayState* play) { switch (func_80BED208(this)) { case 0: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15EC; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15ED; break; case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15EE; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -589,22 +589,22 @@ void func_80BED8A4(EnAkindonuts* this, PlayState* play) { switch (func_80BED27C(this)) { case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1601; break; case 0: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1602; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1603; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -672,22 +672,22 @@ void func_80BEDB88(EnAkindonuts* this, PlayState* play) { switch (func_80BED27C(this)) { case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1601; break; case 0: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1602; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1603; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -767,17 +767,17 @@ void func_80BEDDAC(EnAkindonuts* this, PlayState* play) { switch (func_80BED2FC(this)) { case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1613; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15ED; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -845,17 +845,17 @@ void func_80BEE070(EnAkindonuts* this, PlayState* play) { switch (func_80BED2FC(this)) { case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1613; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15ED; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -928,17 +928,17 @@ void func_80BEE274(EnAkindonuts* this, PlayState* play) { switch (func_80BED35C(this)) { case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1613; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15ED; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -1006,17 +1006,17 @@ void func_80BEE530(EnAkindonuts* this, PlayState* play) { switch (func_80BED35C(this)) { case 2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1613; break; case 1: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x15ED; break; case 3: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_32C |= 0x40; this->unk_32C &= ~0x1; play->msgCtx.msgMode = 0x43; @@ -1277,7 +1277,7 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->unk_32C |= 0x10; this->unk_2DC(this, play); break; @@ -1642,7 +1642,7 @@ void EnAkindonuts_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->unk_32C & 0x80) { - func_800B9010(&this->actor, NA_SE_EN_AKINDO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_AKINDO_FLY - SFX_FLAG); } func_80BECC7C(this, play); } diff --git a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c index dcd3802560..f289a49f93 100644 --- a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c +++ b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c @@ -496,11 +496,11 @@ void EnAob01_BeforeRace_RespondToPlayAgainQuestion(EnAob01* this, PlayState* pla switch (play->msgCtx.choiceIndex) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < 10) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->textId = 0x3524; // You can't play if you can't pay! Message_StartTextbox(play, this->textId, &this->actor); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->stateFlags |= ENAOB01_FLAG_PLAYER_TOLD_TO_PICK_A_DOG; this->stateFlags |= ENAOB01_FLAG_CONVERSATION_OVER; this->textId = 0x3522; // Bring me the fastest dog! @@ -510,7 +510,7 @@ void EnAob01_BeforeRace_RespondToPlayAgainQuestion(EnAob01* this, PlayState* pla break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->textId = 0x3535; // Really? Message_StartTextbox(play, this->textId, &this->actor); break; @@ -655,13 +655,13 @@ void EnAob01_BeforeRace_Talk(EnAob01* this, PlayState* play) { this->stateFlags &= ~ENAOB01_FLAG_LAUGH; switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->stateFlags |= ENAOB01_FLAG_PLAYER_CONFIRMED_CHOICE; EnAob01_BeforeRace_HandleConversation(this, play); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnAob01_BeforeRace_HandleConversation(this, play); break; } diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 75f95cfe65..eb9662f89f 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -155,7 +155,7 @@ void func_8088A594(EnArrow* this, PlayState* play) { if (this->actor.parent != NULL) { if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) { if (Math_SmoothStepToF(&this->bubble.unk_144, 16.0f, 0.07f, 1.8f, 0.0f) > 0.5f) { - func_800B9010(&this->actor, NA_SE_PL_DEKUNUTS_BUBLE_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_DEKUNUTS_BUBLE_BREATH - SFX_FLAG); return; } @@ -449,7 +449,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { func_8088A514(this); } - func_800B9010(&this->actor, NA_SE_IT_DEKUNUTS_BUBLE_SHOT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_IT_DEKUNUTS_BUBLE_SHOT_LEVEL - SFX_FLAG); } else if (this->unk_260 < 7) { this->actor.gravity = -0.4f; } diff --git a/src/overlays/actors/ovl_En_Az/z_en_az.c b/src/overlays/actors/ovl_En_Az/z_en_az.c index f4a9005f6a..a5fdfe0a10 100644 --- a/src/overlays/actors/ovl_En_Az/z_en_az.c +++ b/src/overlays/actors/ovl_En_Az/z_en_az.c @@ -590,7 +590,7 @@ void func_80A95CEC(EnAz* this, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; this->actor.draw = EnAz_Draw; Actor_MoveWithGravity(&this->actor); - func_800B9010(&this->actor, NA_SE_EV_HONEYCOMB_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_HONEYCOMB_FALL - SFX_FLAG); } else { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) { Actor_PlaySfx(&this->actor, NA_SE_EN_GERUDOFT_DOWN); @@ -628,7 +628,7 @@ void func_80A95E88(EnAz* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_BEAVER_SWIM_HAND); } } else { - func_800B9010(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG); } } if (!(this->unk_374 & 0x2000)) { @@ -655,7 +655,7 @@ void func_80A95FE8(EnAz* this, PlayState* play) { CutsceneManager_Queue(this->csIdList[0]); } if (Actor_WorldDistXYZToPoint(&this->actor, &this->actor.home.pos) > 20.0f) { - func_800B9010(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG); func_800BE33C(&this->actor.world.pos, &this->actor.home.pos, &this->actor.world.rot, false); Math_SmoothStepToS(&this->actor.shape.rot.x, this->actor.world.rot.x, 3, 0xE38, 0x38E); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 3, 0xE38, 0x38E); @@ -726,12 +726,12 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { break; case 0x10D2: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->actor.textId = 0x10D6; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_WAVE_ARMS, &this->animIndex); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10D3; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW, &this->animIndex); @@ -760,7 +760,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { break; case 0x10D8: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); switch (this->unk_2FA) { case 2: this->unk_2FA = 1; @@ -777,7 +777,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { } ret = 0; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10D9; } break; @@ -796,12 +796,12 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { break; case 0x10DB: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgMode = 0x44; this->unk_2FA = 1; ret = 0; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10DC; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW, &this->animIndex); @@ -850,10 +850,10 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { break; case 0x10E5: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->actor.textId = 0x10E8; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10E6; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_TO_LEFT, &this->animIndex); @@ -895,7 +895,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { case 0x10EB: if (play->msgCtx.choiceIndex == 0) { play->msgCtx.msgMode = 0x44; - func_8019F208(); + Audio_PlaySfx_MessageDecide(); switch (this->unk_2FA) { case 4: this->unk_2FA = 3; @@ -911,7 +911,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { } ret = 0; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10EC; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_LAUGH_LEFT, &this->animIndex); @@ -992,7 +992,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { break; case 0x10F8: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (CHECK_WEEKEVENTREG(WEEKEVENTREG_25_01)) { this->actor.textId = 0x1107; } else { @@ -1001,7 +1001,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_WAVE_ARMS, &this->animIndex); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10F9; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_BOW, &this->animIndex); @@ -1044,7 +1044,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { break; case 0x10FE: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (CHECK_WEEKEVENTREG(WEEKEVENTREG_25_01)) { this->actor.textId = 0x1108; } else { @@ -1053,7 +1053,7 @@ s32 func_80A9617C(EnAz* this, PlayState* play) { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK, &this->animIndex); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x10FF; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_TALK_TO_LEFT, &this->animIndex); @@ -1425,13 +1425,13 @@ void func_80A97AB4(EnAz* this, PlayState* play) { break; case 0x10D8: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgMode = 0x44; func_800FD750(NA_BGM_TIMED_MINI_GAME); func_80A94AB8(this, play, 1); func_80A979DC(this, play); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); if (CHECK_WEEKEVENTREG(WEEKEVENTREG_24_04)) { CLEAR_WEEKEVENTREG(WEEKEVENTREG_24_04); } @@ -1578,7 +1578,7 @@ void func_80A97F9C(EnAz* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_BEAVER_SWIM_HAND); } } else { - func_800B9010(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_BEAVER_SWIM_MOTOR - SFX_FLAG); } } SkelAnime_Update(&this->skelAnime); diff --git a/src/overlays/actors/ovl_En_Bat/z_en_bat.c b/src/overlays/actors/ovl_En_Bat/z_en_bat.c index acb47b7432..e082c2b0ea 100644 --- a/src/overlays/actors/ovl_En_Bat/z_en_bat.c +++ b/src/overlays/actors/ovl_En_Bat/z_en_bat.c @@ -514,7 +514,7 @@ void EnBat_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.225f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.45f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.45f, 0.45f / 40.0f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 63fb132922..d33a122f35 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -615,7 +615,7 @@ void EnBb_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.2f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.4f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.4f, 0.01f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c index d52f12ccff..8298703bc1 100644 --- a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c +++ b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c @@ -226,7 +226,7 @@ void EnBbfall_PlaySfx(EnBbfall* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_BUBLE_MOUTH); } - func_800B9010(&this->actor, NA_SE_EN_BUBLEFALL_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_BUBLEFALL_FIRE - SFX_FLAG); } /** @@ -648,7 +648,7 @@ void EnBbfall_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.2f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.4f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.4f, 0.01f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index 1b849799a2..7be6316c77 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -552,7 +552,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.6f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 1.2f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 1.2f, 0.030000001f)) { - func_800B9010(&this->picto.actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->picto.actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index 3daaf1f853..e74c4c24e2 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -492,7 +492,7 @@ void func_80A286C0(EnBigpamet* this) { void func_80A28708(EnBigpamet* this, PlayState* play) { this->unk_29E--; this->actor.shape.rot.y += 0x3B00; - func_800B9010(&this->actor, NA_SE_EN_B_PAMET_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_B_PAMET_ROLL - SFX_FLAG); if (this->unk_29E == 0) { func_80A28760(this); } @@ -523,7 +523,7 @@ void func_80A287E8(EnBigpamet* this, PlayState* play) { s16 quakeIndex; this->actor.shape.rot.y += 0x3B00; - func_800B9010(&this->actor, NA_SE_EN_B_PAMET_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_B_PAMET_ROLL - SFX_FLAG); this->unk_29E++; this->unk_29E = CLAMP_MAX(this->unk_29E, 20); if (this->collider.base.atFlags & AT_HIT) { diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index 056ca97d55..12bc8cf6c8 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -556,7 +556,7 @@ void EnBigpo_IdleFlying(EnBigpo* this, PlayState* play) { Math_StepToF(&this->savedHeight, player->actor.world.pos.y + 100.0f, 1.5f); this->actor.world.pos.y = (Math_SinF(this->hoverHeightCycleTimer * (M_PI / 20)) * 10.0f) + this->savedHeight; Math_StepToF(&this->actor.speed, 3.0f, 0.2f); - func_800B9010(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) > 300.0f) { this->unk208 = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos); } @@ -720,7 +720,7 @@ void EnBigpo_BurnAwayDeath(EnBigpo* this, PlayState* play) { } if (this->idleTimer < 18) { - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // burning sfx + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // burning sfx } if (this->idleTimer == 18) { Actor_PlaySfx(&this->actor, NA_SE_EN_WIZ_DISAPPEAR); 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 695ac91533..946f1a03ab 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -895,14 +895,14 @@ void EnBigslime_SetTargetVtxFromPreFrozen(EnBigslime* this) { * Plays the standard Gekko sound effects without reverb */ void EnBigslime_GekkoSfxOutsideBigslime(EnBigslime* this, u16 sfxId) { - Audio_PlaySfxAtPos(&this->gekkoProjectedPos, sfxId); + Audio_PlaySfx_AtPos(&this->gekkoProjectedPos, sfxId); } /** * Adds reverb to Gekko sound effects when enclosed by bigslime */ void EnBigslime_GekkoSfxInsideBigslime(EnBigslime* this, u16 sfxId) { - func_8019F420(&this->gekkoProjectedPos, sfxId); + Audio_PlaySfx_Underwater(&this->gekkoProjectedPos, sfxId); } void EnBigslime_GekkoFreeze(EnBigslime* this) { @@ -1633,7 +1633,7 @@ void EnBigslime_AttackPlayerInBigslime(EnBigslime* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, sGekkoAttackAnimations[((s32)Rand_ZeroFloat(3.0f) % 3)]); } - func_800B9010(&this->actor, NA_SE_EN_B_SLIME_PUNCH_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_B_SLIME_PUNCH_MOVE - SFX_FLAG); } /** @@ -1897,7 +1897,7 @@ void EnBigslime_Freeze(EnBigslime* this, PlayState* play) { sBigslimeTargetVtx[vtxIceUpdate - 4].n.a = sBigslimeTargetVtx[vtxIceUpdate].n.a; } - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) { if (this->freezeTimer == 0) { EnBigslime_BreakIntoMinislime(this, play); @@ -1980,7 +1980,7 @@ void EnBigslime_Melt(EnBigslime* this, PlayState* play) { EffectSsIceSmoke_Spawn(play, &iceSmokePos, &iceSmokeVelocity, &gZeroVec3f, 600); } - func_800B9010(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); for (i = 159; i >= 0; i--) { sBigslimeTargetVtx[i + 2].n.a = sBigslimeTargetVtx[i].n.a; } @@ -2764,7 +2764,7 @@ void EnBigslime_UpdateEffects(EnBigslime* this) { this->gekkoDrawDmgEffScale = 0.375f * (this->gekkoDrawDmgEffAlpha + 1.0f); this->gekkoDrawDmgEffScale = CLAMP_MAX(this->gekkoDrawDmgEffScale, 0.75f); } else if (!Math_StepToF(&this->gekkoDrawDmgEffFrozenSteamScale, 0.75f, 0.01875f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } @@ -2779,7 +2779,7 @@ void EnBigslime_UpdateBigslime(Actor* thisx, PlayState* play) { play->envCtx.lightSettingOverride = 0xFF; } - func_8019F540(1); + Audio_SetSfxUnderwaterReverb(true); this->dynamicVtxState ^= 1; EnBigslime_DynamicVtxCopyState(this); this->isAnimUpdate = SkelAnime_Update(&this->skelAnime); @@ -2824,7 +2824,7 @@ void EnBigslime_UpdateGekko(Actor* thisx, PlayState* play) { play->envCtx.lightSettingOverride = 0xFF; } - func_8019F540(0); + Audio_SetSfxUnderwaterReverb(false); this->isAnimUpdate = SkelAnime_Update(&this->skelAnime); if (this->actionFunc != EnBigslime_PlayCutscene) { EnBigslime_ApplyDamageEffectGekko(this, play); diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c index 745e3b3e70..86bb604316 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c @@ -207,12 +207,12 @@ void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) { this->actor.params = SHIKASHI_TYPE_FINISHED_CONVERSATION; switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_CloseTextbox(play); func_809CD634(this, play); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); switch (gSaveContext.save.playerForm) { case PLAYER_FORM_DEKU: Message_ContinueTextbox(play, 0x5F0); diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index b388421b7f..e6c6b05380 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -493,10 +493,10 @@ void EnBom_Update(Actor* thisx, PlayState* play) { EffectSsGSpk_SpawnFuse(play, thisx, &effPos, &effVelocity, &effAccel); } if (this->isPowderKeg) { - func_801A0810(&thisx->projectedPos, NA_SE_IT_BIG_BOMB_IGNIT - SFX_FLAG, - (this->flashSpeedScale == 7) ? 0 - : (this->flashSpeedScale == 3) ? 1 - : 2); + Audio_PlaySfx_AtPosWithChannelIO(&thisx->projectedPos, NA_SE_IT_BIG_BOMB_IGNIT - SFX_FLAG, + (this->flashSpeedScale == 7) ? 0 + : (this->flashSpeedScale == 3) ? 1 + : 2); } else { Actor_PlaySfx(thisx, NA_SE_IT_BOMB_IGNIT - SFX_FLAG); } diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index ee00081db8..6ef27baca8 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -181,7 +181,7 @@ void EnBomChu_WaitForRelease(EnBomChu* this, PlayState* play) { this->actor.shape.rot.y = player->actor.shape.rot.y; this->actor.flags |= ACTOR_FLAG_1; - func_800B8EF4(play, &this->actor); + Actor_PlaySfx_SurfaceBomb(play, &this->actor); this->isMoving = true; this->actor.speed = 8.0f; @@ -313,7 +313,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { } if (this->isMoving) { - func_800B8F98(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); } if (this->actor.speed != 0.0f) { diff --git a/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c b/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c index a600df6d26..a1c0810ce5 100644 --- a/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c +++ b/src/overlays/actors/ovl_En_Bombers/z_en_bombers.c @@ -347,11 +347,11 @@ void func_80C03FAC(EnBombers* this, PlayState* play) { sp2A = 1; } else if (this->actor.textId == 0x740) { if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->actor.textId = 0x742; sp2A = 1; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x741; sp2A = 1; } @@ -367,11 +367,11 @@ void func_80C03FAC(EnBombers* this, PlayState* play) { sp2A = 1; } else if (this->actor.textId == 0x74C) { if (play->msgCtx.choiceIndex == 1) { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = 0x737; sp2A = 1; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->actor.textId = 0x74D; func_80C03824(this, 14, 1.0f); sp2A = 1; diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index cc9ac1e2c5..51025b530e 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -239,7 +239,7 @@ void func_808AEE3C(EnBombf* this, PlayState* play) { Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 1.5f, 0.0f); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) { - func_800B8EF4(play, &this->actor); + Actor_PlaySfx_SurfaceBomb(play, &this->actor); if (this->actor.velocity.y < -6.0f) { this->actor.velocity.y *= -0.3f; this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND; 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 ea5feeacdb..548091daa0 100644 --- a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c +++ b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c @@ -598,7 +598,7 @@ void func_80BFF52C(EnBomjima* this, PlayState* play) { if (play->msgCtx.choiceIndex == 0) { Player* player = GET_PLAYER(play); - func_8019F208(); + Audio_PlaySfx_MessageDecide(); func_80BFE65C(this); this->unk_28E = 0; this->unk_29A = 0; @@ -609,14 +609,14 @@ void func_80BFF52C(EnBomjima* this, PlayState* play) { this->actor.textId = D_80C00A70[this->unk_2C8]; } Message_ContinueTextbox(play, this->actor.textId); - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); func_80BFE494(this, 15, 1.0f); this->action = EN_BOMJIMA_ACTION_5; this->actionFunc = func_80BFF6CC; } else { Player* player = GET_PLAYER(play); - func_8019F230(); + Audio_PlaySfx_MessageCancel(); func_80BFE65C(this); this->unk_2C8 = 10; if (player->transformation == PLAYER_FORM_DEKU) { diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index f9b5b3d41c..8c6f588500 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -213,7 +213,7 @@ void func_808A2918(EnBoom* this, PlayState* play) { Actor_SetSpeeds(&this->actor, 12.0f); Actor_MoveWithGravity(&this->actor); func_808A24DC(this, play); - func_800B9010(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG); if ((this->collider.base.atFlags & AT_HIT) && (((this->collider.base.at->id == ACTOR_EN_ITEM00) && (this->collider.base.at->params != ITEM00_HEART_CONTAINER) && diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 044f54334b..40a63050ba 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -364,7 +364,7 @@ void EnBox_Fall(EnBox* this, PlayState* play) { this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight; EnBox_SetupAction(this, EnBox_WaitOpen); } - Audio_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TRE_BOX_BOUND); + Audio_PlaySfx_AtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TRE_BOX_BOUND); EnBox_SpawnDust(this, play); } yDiff = this->dyna.actor.world.pos.y - this->dyna.actor.floorHeight; @@ -419,7 +419,7 @@ void func_80868AFC(EnBox* this, PlayState* play) { EnBox_SetupAction(this, func_80868B74); this->unk_1A0 = 0; func_80867FBC(&this->unk_1F4, play, (this->movementFlags & ENBOX_MOVE_0x80) != 0); - Audio_PlaySfxAtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR); + Audio_PlaySfx_AtPos(&this->dyna.actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR); } } @@ -556,8 +556,8 @@ void EnBox_Open(EnBox* this, PlayState* play) { gSaveContext.save.playerForm == PLAYER_FORM_DEKU ? 15.0f : 90.0f)) { sfxId = NA_SE_EV_TBOX_OPEN; } - if (sfxId != 0) { - Audio_PlaySfxAtPos(&this->dyna.actor.projectedPos, sfxId); + if (sfxId != NA_SE_NONE) { + Audio_PlaySfx_AtPos(&this->dyna.actor.projectedPos, sfxId); } if (this->skelAnime.jointTable[3].z > 0) { this->unk_1A8 = (0x7D00 - this->skelAnime.jointTable[3].z) * 0.00006f; @@ -583,7 +583,7 @@ void EnBox_SpawnIceSmoke(EnBox* this, PlayState* play) { this->iceSmokeTimer++; //! @bug sfxId should be NA_SE_EN_MIMICK_BREATH, but uses OoT's sfxId value - func_800B9010(&this->dyna.actor, NA_SE_EN_LAST3_COIL_ATTACK_OLD - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EN_LAST3_COIL_ATTACK_OLD - SFX_FLAG); if (Rand_ZeroOne() < 0.3f) { randomf = 2.0f * Rand_ZeroOne() - 1.0f; pos = this->dyna.actor.world.pos; diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index 8e3e907bb8..e23fba0d85 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -570,7 +570,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) { this->subCamAt.z = mainCam->at.z; Message_StartTextbox(play, 0xF, NULL); this->cameraState = 2; - func_8019FDC8(&gSfxDefaultPos, NA_SE_VO_NA_LISTEN, 0x20); + Audio_PlaySfx_AtPosWithReverb(&gSfxDefaultPos, NA_SE_VO_NA_LISTEN, 0x20); case 2: if (player->actor.world.pos.z > 0.0f) { player->actor.world.pos.z = 290.0f; diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index bad5f5e0ff..23d4f10180 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -542,7 +542,7 @@ void EnCrow_Update(Actor* thisx, PlayState* play) { this->drawDmgEffFrozenSteamScale = this->drawDmgEffFrozenSteamScale; } } else if (!Math_StepToF(&this->drawDmgEffScale, 0.5f, 0.5f * 0.025f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Dai/z_en_dai.c b/src/overlays/actors/ovl_En_Dai/z_en_dai.c index 25013327a9..434cb07cf9 100644 --- a/src/overlays/actors/ovl_En_Dai/z_en_dai.c +++ b/src/overlays/actors/ovl_En_Dai/z_en_dai.c @@ -422,7 +422,7 @@ void func_80B3EEDC(EnDai* this, PlayState* play) { func_80B3E96C(this, play); this->unk_A6C = 0; } else if (this->unk_A6C == 0) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); this->unk_A6C = 1; } } diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 422b35e874..3df11604eb 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -1214,7 +1214,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.375f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.75f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.75f, 0.75f / 40)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } 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 cef97a8b0a..73d03a7e9a 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -660,7 +660,7 @@ void EnDekunuts_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.55f); } else if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) && !Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, (33.0f / 1600.0f))) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c index e24e2691b8..9d368d68b6 100644 --- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c +++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c @@ -559,7 +559,7 @@ void func_8089B580(EnDinofos* this, PlayState* play) { Math_Vec3f_StepTo(&subCam->eye, &this->unk_2BC, 10.0f); Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &subCam->eye); if (this->skelAnime.curFrame <= 55.0f) { - func_800B9010(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG); } } @@ -1086,7 +1086,7 @@ void func_8089CBEC(EnDinofos* this, PlayState* play) { sp7C.x = 0.9f * temp_f20; sp7C.y = Rand_CenteredFloat(0.6f) + 1.4f; sp7C.z = 0.9f * temp_f22; - func_800B9010(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG); EffectSsDFire_Spawn(play, &this->limbPos[10], &sp88, &sp7C, 30, 22, 255 - (temp_s0 * 20), 20, 3, 8); for (end = 6, i = 3; i > 0; i--) { @@ -1398,7 +1398,7 @@ void EnDinofos_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * (11.0f / 40.0f); this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.55f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, 0.01375f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c index 216ca0031f..041eb54b05 100644 --- a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c +++ b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c @@ -425,11 +425,11 @@ void func_80A52018(Actor* thisx, PlayState* play) { void func_80A52074(EnDnk* this, PlayState* play) { switch (play->csCtx.curFrame) { case 80: - func_8019F128(NA_SE_EN_DEKNUTS_DANCE1); + Audio_PlaySfx_2(NA_SE_EN_DEKNUTS_DANCE1); break; case 123: - func_8019F128(NA_SE_EN_DEKNUTS_DANCE2); + Audio_PlaySfx_2(NA_SE_EN_DEKNUTS_DANCE2); break; case 438: @@ -442,7 +442,7 @@ void func_80A52074(EnDnk* this, PlayState* play) { } if ((play->csCtx.curFrame >= 198) && (play->csCtx.curFrame < 438)) { - func_8019F128(NA_SE_EN_DEKNUTS_DANCE - SFX_FLAG); + Audio_PlaySfx_2(NA_SE_EN_DEKNUTS_DANCE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index e80bbe0191..56a2b93790 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -861,7 +861,7 @@ void func_80A730A0(EnDno* this, PlayState* play) { this->unk_3AE += 1000; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; func_80A715DC(this, play); - func_800B9010(&this->actor, NA_SE_EV_BUTLER_FRY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_BUTLER_FRY - SFX_FLAG); if (this->actorPath.flags & ACTOR_PATHING_REACHED_END_PERMANENT) { Math_Vec3f_Copy(&this->actor.world.pos, &this->actorPath.curPoint); this->actor.speed = 0.0f; diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index d662e7e552..a9552c73eb 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -402,7 +402,7 @@ void func_8092D1B8(EnDns* this, PlayState* play) { player->stateFlags1 |= PLAYER_STATE1_20; this->unk_2C6 |= 0x100; SubS_UpdateFlags(&this->unk_2C6, 4, 7); - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); SET_EVENTINF(EVENTINF_15); this->unk_2F4 = func_8092CCEC; func_8092C63C(this, EN_DNS_ANIM_WALK_1); diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 6149a73607..b3bd310b65 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -645,7 +645,7 @@ void func_8087784C(EnDodongo* this, PlayState* play) { } if (func_8087721C(this)) { - func_800B9010(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG); frame = this->skelAnime.curFrame - 29.0f; end = frame >> 1; if (end > 3) { @@ -671,7 +671,7 @@ void func_8087784C(EnDodongo* this, PlayState* play) { EffectSsDFire_Spawn(play, &this->limbPos[0], &D_80879354, &D_80879348, this->unk_334 * 100.0f, this->unk_334 * 35.0f, 0xFF - (frame * 10), 5, 0, 8); } else if ((this->skelAnime.curFrame >= 2.0f) && (this->skelAnime.curFrame <= 20.0f)) { - func_800B9010(&this->actor, NA_SE_EN_DODO_J_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_DODO_J_BREATH - SFX_FLAG); } if (SkelAnime_Update(&this->skelAnime)) { @@ -1053,7 +1053,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.375f; this->drawDmgEffScale = (this->drawDmgEffScale > 0.75f) ? 0.75f : this->drawDmgEffScale; } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.75f, 0.01875f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 3dc6e4a72d..11719bd43d 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -1132,7 +1132,7 @@ void func_8088F214(EnElf* this, PlayState* play) { } } else if (this->unk_264 & 8) { sp34 = 1; - func_800B9010(&this->actor, NA_SE_EV_BELL_ANGER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_BELL_ANGER - SFX_FLAG); } else { arrowPointedActor = play->actorCtx.targetContext.arrowPointedActor; if (player->stateFlags1 & PLAYER_STATE1_400) { @@ -1367,11 +1367,11 @@ void func_8088FE64(Actor* thisx, PlayState* play2) { if (play->msgCtx.currentTextId == 0x202) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); break; case 1: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); break; } } @@ -1472,7 +1472,7 @@ void func_8089010C(Actor* thisx, PlayState* play) { } if (Actor_ProcessTalkRequest(thisx, &play->state)) { - func_8019FDC8(&gSfxDefaultPos, NA_SE_VO_NA_LISTEN, 0x20); + Audio_PlaySfx_AtPosWithReverb(&gSfxDefaultPos, NA_SE_VO_NA_LISTEN, 0x20); thisx->focus.pos = thisx->world.pos; if (thisx->textId == QuestHint_GetTatlTextId(play)) { diff --git a/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c b/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c index cacef3f4d9..f756614717 100644 --- a/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c +++ b/src/overlays/actors/ovl_En_Elfgrp/z_en_elfgrp.c @@ -353,7 +353,7 @@ void func_80A3A0AC(EnElfgrp* this, PlayState* play) { void func_80A3A0F4(EnElfgrp* this, PlayState* play) { if (this->unk_144 == 10) { - play_sound(NA_SE_SY_WHITE_OUT_T); + Audio_PlaySfx(NA_SE_SY_WHITE_OUT_T); if (ENELFGRP_GET(&this->actor) < ENELFGRP_4) { Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_EFFECT, this->actor.world.pos.x, this->actor.world.pos.y + 30.0f, this->actor.world.pos.z, 0, 0, 0, @@ -365,7 +365,7 @@ void func_80A3A0F4(EnElfgrp* this, PlayState* play) { } if ((this->unk_144 > 10) && (this->unk_14A & 1)) { - func_800B9010(&this->actor, NA_SE_EV_FAIRY_GROUP_FRY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FAIRY_GROUP_FRY - SFX_FLAG); } if (this->unk_144 == 0) { @@ -381,14 +381,14 @@ void func_80A3A210(EnElfgrp* this, PlayState* play) { } if (this->unk_14A & 1) { - func_800B9010(&this->actor, NA_SE_EV_FAIRY_GROUP_FRY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FAIRY_GROUP_FRY - SFX_FLAG); } } void func_80A3A274(EnElfgrp* this, PlayState* play) { if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_100)) { if (this->unk_14A & 1) { - func_800B9010(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); } switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_100)]->id) { diff --git a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c index 5c3e33550d..3145e10aaf 100644 --- a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c +++ b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c @@ -404,7 +404,7 @@ void EnElforg_FairyCollected(EnElforg* this, PlayState* play) { return; } - func_800B9010(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); } void EnElforg_SetupFairyCollected(EnElforg* this, PlayState* play) { @@ -435,7 +435,7 @@ void EnElforg_ClockTownFairyCollected(EnElforg* this, PlayState* play) { return; } - func_800B9010(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_CHIBI_FAIRY_HEAL - SFX_FLAG); if (CutsceneManager_GetCurrentCsId() != CS_ID_GLOBAL_TALK) { if (CutsceneManager_IsNext(CS_ID_GLOBAL_TALK)) { CutsceneManager_Start(CS_ID_GLOBAL_TALK, &this->actor); @@ -504,7 +504,7 @@ void EnElforg_FreeFloating(EnElforg* this, PlayState* play) { func_80ACCBB8(this, play); if (Player_GetMask(play) == PLAYER_MASK_GREAT_FAIRY) { if (!(this->strayFairyFlags & STRAY_FAIRY_FLAG_GREAT_FAIRYS_MASK_EQUIPPED)) { - play_sound(NA_SE_SY_FAIRY_MASK_SUCCESS); + Audio_PlaySfx(NA_SE_SY_FAIRY_MASK_SUCCESS); } this->strayFairyFlags |= STRAY_FAIRY_FLAG_GREAT_FAIRYS_MASK_EQUIPPED; diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index 03989b01fd..6007931494 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -425,7 +425,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat break; } if (play->csCtx.curFrame >= 1145) { - func_800B9010(&this->actor, NA_SE_EV_FALL_POWER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FALL_POWER - SFX_FLAG); } break; @@ -444,7 +444,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat break; } if (play->csCtx.curFrame >= 650) { - func_800B9010(&this->actor, NA_SE_EV_FALL_POWER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FALL_POWER - SFX_FLAG); } break; } @@ -453,7 +453,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat void EnFall_ClockTowerOrTitleScreenMoon_PerformCutsceneActions(EnFall* this, PlayState* play) { if ((play->csCtx.state != CS_STATE_IDLE) && (play->sceneId == SCENE_OKUJOU)) { - func_800B9010(&this->actor, NA_SE_EV_MOON_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_MOON_FALL - SFX_FLAG); } } @@ -528,7 +528,7 @@ void EnFall_MoonsTear_Fall(EnFall* this, PlayState* play) { this->actor.draw = NULL; this->actionFunc = EnFall_MoonsTear_DoNothing; } else { - func_800B9010(&this->actor, NA_SE_EV_MOONSTONE_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_MOONSTONE_FALL - SFX_FLAG); } } } @@ -627,7 +627,7 @@ void EnFall_Fireball_Update(Actor* thisx, PlayState* play) { } if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_450) && (this->fireballAlpha > 0)) { - func_8019F128(NA_SE_EV_MOON_FALL_LAST - SFX_FLAG); + Audio_PlaySfx_2(NA_SE_EV_MOON_FALL_LAST - SFX_FLAG); } Actor_SetScale(&this->actor, this->scale * 1.74f); } diff --git a/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c b/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c index bdf742ec35..7ff59c5726 100644 --- a/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c +++ b/src/overlays/actors/ovl_En_Fall2/z_en_fall2.c @@ -133,7 +133,7 @@ void func_80C1B9D4(EnFall2* this, PlayState* play) { } func_80C1B8F0(this); if (this->alphaLevel > 0.0f) { - func_800B9010(&this->actor, NA_SE_EV_MOON_LIGHT_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_MOON_LIGHT_PILLAR - SFX_FLAG); } } else { this->actor.draw = NULL; diff --git a/src/overlays/actors/ovl_En_Famos/z_en_famos.c b/src/overlays/actors/ovl_En_Famos/z_en_famos.c index efccfb9d96..eb73aecfb6 100644 --- a/src/overlays/actors/ovl_En_Famos/z_en_famos.c +++ b/src/overlays/actors/ovl_En_Famos/z_en_famos.c @@ -290,9 +290,9 @@ void EnFamos_UpdateBobbingHeight(EnFamos* this) { this->actor.world.pos.y = (Math_SinS(this->hoverTimer * 0x888) * 10.0f) + this->baseHeight; if (ABS_ALT(this->flipRot) > 0x4000) { // is famos upside down - func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); } else { - func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FAMOS_FLOAT - SFX_FLAG); } } @@ -463,9 +463,9 @@ void EnFamos_SetupAlert(EnFamos* this) { void EnFamos_Alert(EnFamos* this, PlayState* play) { if (ABS_ALT(this->flipRot) > 0x4000) { - func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); } else { - func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FAMOS_FLOAT - SFX_FLAG); } this->stateTimer--; @@ -520,7 +520,7 @@ void EnFamos_SetupAttackAim(EnFamos* this) { } void EnFamos_AttackAim(EnFamos* this, PlayState* play) { - func_800B9010(&this->actor, NA_SE_EN_LAST1_FALL_OLD - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_LAST1_FALL_OLD - SFX_FLAG); if (SkelAnime_Update(&this->skelAnime)) { EnFamos_SetupAttack(this); } @@ -574,7 +574,7 @@ void EnFamos_Attack(EnFamos* this, PlayState* play) { EnFamos_SetupAttackRebound(this); } } else { - func_800B9010(&this->actor, NA_SE_EN_LAST1_FALL_OLD - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_LAST1_FALL_OLD - SFX_FLAG); } } @@ -612,9 +612,9 @@ void EnFamos_AttackRebound(EnFamos* this, PlayState* play) { Math_StepToF(&this->actor.speed, 5.0f, 0.3f); if (this->actor.speed > 1.0f) { if (ABS_ALT(this->flipRot) > 0x4000) { - func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); } else { - func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FAMOS_FLOAT - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index 131b714d1e..43d05c8aa3 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -729,7 +729,7 @@ void EnFirefly_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.275f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.55f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, 0.55f / 40.0f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } 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 20edbcbc22..a9eb004a9f 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -2181,7 +2181,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { D_8091726C = 0.5f; D_80917268 = Rand_ZeroFloat(1.9f); sFishMouthOffset.y = 500.0f; - Audio_PlaySfxAtPos(&D_8090D614, NA_SE_IT_SWORD_SWING_HARD); + Audio_PlaySfx_AtPos(&D_8090D614, NA_SE_IT_SWORD_SWING_HARD); } } break; @@ -2201,7 +2201,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { D_80917238.x *= 0.9f; D_80917238.z *= 0.9f; if (D_8090CD0C == 0) { - play_sound(NA_SE_IT_FISHING_REEL_HIGH - SFX_FLAG); + Audio_PlaySfx(NA_SE_IT_FISHING_REEL_HIGH - SFX_FLAG); } } @@ -2258,8 +2258,8 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { D_809101D0 = 0.0; } else { Math_ApproachF(&D_809101C4, 0.0f, 1.0f, 0.05f); - Audio_PlaySfxAtPos(&D_8090D614, - NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT + Audio_PlaySfx_AtPos(&D_8090D614, + NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT } } else { f32 sp7C = WATER_SURFACE_Y(play); @@ -2278,7 +2278,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { if ((sLurePos.y <= sp7C) && (sp7C < spE0) && (sp7C == WATER_SURFACE_Y(play))) { D_80917264 = 10; - Audio_PlaySfxAtPos(&D_8090D614, NA_SE_EV_BOMB_DROP_WATER); + Audio_PlaySfx_AtPos(&D_8090D614, NA_SE_EV_BOMB_DROP_WATER); D_80917248.y = 0.0f; D_80917238.y *= 0.2f; @@ -2304,8 +2304,8 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { } } else { Math_ApproachZeroF(&D_809101C4, 1.0f, 0.05f); - Audio_PlaySfxAtPos(&D_8090D614, - NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT + Audio_PlaySfx_AtPos(&D_8090D614, + NA_SE_EN_WIZ_UNARI - SFX_FLAG); // changed from NA_SE_EN_FANTOM_FLOAT in OoT } } @@ -2409,7 +2409,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { D_8091725C = 0.5f; D_809101C0 += (fabsf(sp70) * 7.5f); - func_8019FAD8(&D_8090D614, NA_SE_EV_LURE_MOVE_W, (sp70 * 1.999f * 0.25f) + 0.75f); + Audio_PlaySfx_AtPosWithFreq(&D_8090D614, NA_SE_EV_LURE_MOVE_W, (sp70 * 1.999f * 0.25f) + 0.75f); if (D_80917206 == 2) { D_80917278.y = 5.0f * sp70; @@ -2445,7 +2445,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { sLureRot.x = 0.0f; if (CHECK_BTN_ALL(input->press.button, BTN_B)) { D_809101C0 += 6.0f; - Audio_PlaySfxAtPos(&D_8090D614, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_SAND); + Audio_PlaySfx_AtPos(&D_8090D614, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_SAND); } } else { if (D_809101C0 > 150.0f) { @@ -2531,11 +2531,11 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { if (CHECK_BTN_ALL(input->cur.button, BTN_A)) { if (CHECK_BTN_ALL(input->cur.button, BTN_R)) { D_809101C0 += 1.5f; - play_sound(NA_SE_IT_FISHING_REEL_HIGH - SFX_FLAG); + Audio_PlaySfx(NA_SE_IT_FISHING_REEL_HIGH - SFX_FLAG); Math_ApproachF(&D_809101D0, 1000.0f, 1.0f, 2.0f); } else { D_809101C0 += D_8091726C; - play_sound(NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG); + Audio_PlaySfx(NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG); Math_ApproachF(&D_809101D0, 1000.0f, 1.0f, 0.2f); } @@ -2592,7 +2592,7 @@ void EnFishing_UpdateLure(EnFishing* this, PlayState* play) { } else { D_809101C0 += D_8091726C; } - play_sound(NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG); + Audio_PlaySfx(NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG); } if ((D_809171FE & 0x1F) == 0) { @@ -3480,7 +3480,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } else if (sp124 < 10.0f) { if (sLurePos.y > (WATER_SURFACE_Y(play) - 10.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EV_JUMP_OUT_WATER); - play_sound(NA_SE_PL_CATCH_BOOMERANG); + Audio_PlaySfx(NA_SE_PL_CATCH_BOOMERANG); } func_809033F0(this, play, false); @@ -3556,7 +3556,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { Rumble_Override(0.0f, temp2, 120, 5); D_809171F4 = 40; D_80911E28 = 10; - play_sound(NA_SE_IT_FISHING_HIT); + Audio_PlaySfx(NA_SE_IT_FISHING_HIT); } } @@ -5149,7 +5149,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSinkingLureLocation = 0; D_8090CD4C = 20; Rumble_Override(0.0f, 150, 10, 10); - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 20); } @@ -5223,9 +5223,9 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { } if ((D_809171DC == 0) || (D_809171DC == 3)) { - play_sound(NA_SE_SY_CAMERA_ZOOM_DOWN); + Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_DOWN); } else { - play_sound(NA_SE_SY_CAMERA_ZOOM_UP); + Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP); } } } @@ -5526,7 +5526,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { Math_ApproachF(&D_8090CCDC.z, target, 1.0f, 5.0f); if (D_8090CCDC.z < 1500.0f) { - func_8019FAD8(&D_8090CCDC, NA_SE_EV_RAIN - SFX_FLAG, D_8090CCE8); + Audio_PlaySfx_AtPosWithFreq(&D_8090CCDC, NA_SE_EV_RAIN - SFX_FLAG, D_8090CCE8); } if (D_8090CCD4 != 0) { @@ -5570,7 +5570,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sStreamSoundPos, &sStreamSoundProjectedPos, &sProjectedW); - Audio_PlaySfxAtPos(&sStreamSoundProjectedPos, NA_SE_EV_WATER_WALL - SFX_FLAG); + Audio_PlaySfx_AtPos(&sStreamSoundProjectedPos, NA_SE_EV_WATER_WALL - SFX_FLAG); if (gSaveContext.options.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 3cf6385e00..6aaeb679b5 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -454,7 +454,7 @@ void func_808D14DC(EnFloormas* this, PlayState* play) { sp28.x = Math_SinS(this->actor.shape.rot.y - 0x6000) * 7.0f; sp28.z = Math_CosS(this->actor.shape.rot.y - 0x6000) * 7.0f; func_800B1210(play, &sp34, &sp28, &gZeroVec3f, 0x1C2, 0x64); - func_800B9010(&this->actor, NA_SE_EN_FLOORMASTER_SLIDING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLOORMASTER_SLIDING - SFX_FLAG); } void func_808D161C(EnFloormas* this) { @@ -886,7 +886,7 @@ void func_808D2764(EnFloormas* this, PlayState* play) { } } - func_800B9010(&this->actor, NA_SE_EN_FLOORMASTER_RESTORE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLOORMASTER_RESTORE - SFX_FLAG); } void func_808D2A20(EnFloormas* this) { @@ -1141,7 +1141,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.275f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.55f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, 0.01375f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c index 89bf08d7b7..02630ed6d8 100644 --- a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c +++ b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c @@ -295,14 +295,14 @@ void EnFsn_CursorLeftRight(EnFsn* this) { this->cursorIndex = cursorScan; break; } else if (cursorScan == 0) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); this->drawCursor = 0; this->actionFunc = EnFsn_LookToShopkeeperFromShelf; break; } } } else { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); this->drawCursor = 0; this->actionFunc = EnFsn_LookToShopkeeperFromShelf; if (this->itemIds[cursorScan] != -1) { @@ -456,7 +456,7 @@ void EnFsn_UpdateCursorPos(EnFsn* this, PlayState* play) { s32 EnFsn_FacingShopkeeperDialogResult(EnFsn* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (CURRENT_DAY != 3) { this->actor.textId = 0x29FB; } else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_33_04)) { @@ -470,7 +470,7 @@ s32 EnFsn_FacingShopkeeperDialogResult(EnFsn* this, PlayState* play) { return true; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1; Message_StartTextbox(play, this->actor.textId, &this->actor); Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN); @@ -490,13 +490,13 @@ s32 EnFsn_HasPlayerSelectedItem(EnFsn* this, PlayState* play, Input* input) { if (!this->items[this->cursorIndex]->isOutOfStock) { this->prevActionFunc = this->actionFunc; Message_ContinueTextbox(play, this->items[this->cursorIndex]->choiceTextId); - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); this->stickLeftPrompt.isEnabled = false; this->stickRightPrompt.isEnabled = false; this->drawCursor = 0; this->actionFunc = EnFsn_SelectItem; } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } return true; } @@ -916,7 +916,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) { if (!EnFsn_TestEndInteraction(this, play, CONTROLLER1(&play->state)) && Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->isSelling = true; this->stickLeftPrompt.isEnabled = false; this->stickRightPrompt.isEnabled = true; @@ -926,7 +926,7 @@ void EnFsn_AskBuyOrSell(EnFsn* this, PlayState* play) { break; case 1: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->isSelling = false; this->actor.textId = 0x29CE; EnFsn_HandleLookToShopkeeperBuyingCutscene(this); @@ -990,7 +990,7 @@ void EnFsn_MakeOffer(EnFsn* this, PlayState* play) { if (talkState == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; if (this->cutsceneState == ENFSN_CUTSCENESTATE_PLAYING) { @@ -1025,7 +1025,7 @@ void EnFsn_MakeOffer(EnFsn* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); player->exchangeItemId = PLAYER_IA_NONE; this->actionFunc = EnFsn_SetupDeterminePrice; break; @@ -1151,7 +1151,7 @@ void EnFsn_BrowseShelf(EnFsn* this, PlayState* play) { if (!EnFsn_HasPlayerSelectedItem(this, play, CONTROLLER1(&play->state))) { EnFsn_CursorLeftRight(this); if (this->cursorIndex != prevCursorIdx) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId); } } @@ -1188,7 +1188,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) { switch (item->canBuyFunc(play, item)) { case CANBUY_RESULT_SUCCESS_2: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); SET_WEEKEVENTREG(WEEKEVENTREG_33_04); // fallthrough case CANBUY_RESULT_SUCCESS_1: @@ -1196,7 +1196,7 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) { CutsceneManager_Stop(this->csId); this->cutsceneState = ENFSN_CUTSCENESTATE_STOPPED; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item = this->items[this->cursorIndex]; item->buyFanfareFunc(play, item); Actor_OfferGetItem(&this->actor, play, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f); @@ -1218,13 +1218,13 @@ void EnFsn_HandleCanPlayerBuyItem(EnFsn* this, PlayState* play) { break; case CANBUY_RESULT_NEED_RUPEES: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_ContinueTextbox(play, 0x29F0); this->actionFunc = EnFsn_PlayerCannotBuy; break; case CANBUY_RESULT_CANNOT_GET_NOW: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_ContinueTextbox(play, 0x29DD); this->actionFunc = EnFsn_PlayerCannotBuy; break; @@ -1263,7 +1263,7 @@ void EnFsn_SelectItem(EnFsn* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actionFunc = this->prevActionFunc; Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId); break; @@ -1301,14 +1301,14 @@ void EnFsn_AskCanBuyMore(EnFsn* this, PlayState* play) { if (Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->actor.textId = 0xFF; Message_StartTextbox(play, this->actor.textId, &this->actor); this->actionFunc = EnFsn_DeterminePrice; break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1; Message_StartTextbox(play, this->actor.textId, &this->actor); Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN); @@ -1351,7 +1351,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, PlayState* play) { if (Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->isSelling = false; this->actor.textId = 0x29CE; Message_StartTextbox(play, this->actor.textId, &this->actor); @@ -1359,7 +1359,7 @@ void EnFsn_AskCanBuyAterRunningOutOfItems(EnFsn* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actor.textId = (CURRENT_DAY == 3) ? 0x29DF : 0x29D1; Message_StartTextbox(play, this->actor.textId, &this->actor); Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_CURIOSITY_SHOP_MAN); @@ -1398,7 +1398,7 @@ void EnFsn_FaceShopkeeperSelling(EnFsn* this, PlayState* play) { this->actionFunc = EnFsn_LookToShelf; func_8011552C(play, DO_ACTION_DECIDE); this->stickRightPrompt.isEnabled = false; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index bfc157fcb3..34e2c9dc04 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -432,16 +432,16 @@ void func_80962588(EnFu* this, PlayState* play) { if (play->msgCtx.choiceIndex == 0) { if (gSaveContext.save.saveInfo.playerData.rupees >= 10) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-10); func_80963DE4(this, play); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x2873, &this->actor); this->unk_552 = 0x2873; } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x2872, &this->actor); this->unk_552 = 0x2872; } @@ -644,7 +644,7 @@ void func_80962A10(EnFu* this, PlayState* play) { return; } - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); player->stateFlags1 &= ~PLAYER_STATE1_20; Interface_StartTimer(TIMER_ID_MINIGAME_2, 60); if (this->unk_546 == 1) { @@ -680,7 +680,7 @@ void func_80962BCC(EnFu* this, PlayState* play) { return; } - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); player->stateFlags1 &= ~PLAYER_STATE1_20; player->stateFlags3 |= PLAYER_STATE3_400000; Interface_StartTimer(TIMER_ID_MINIGAME_2, 60); @@ -711,7 +711,7 @@ void func_80962D60(EnFu* this, PlayState* play) { return; } - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); player->stateFlags1 &= ~PLAYER_STATE1_20; player->stateFlags3 |= PLAYER_STATE3_400000; Interface_StartTimer(TIMER_ID_MINIGAME_2, 60); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 00b54400df..0a78bdab89 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -607,7 +607,7 @@ void func_809334B8(EnFz* this, PlayState* play) { if (this->unk_BCA > 10) { sp3F = 0; sp3C = 150; - func_800B9010(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); if ((this->unk_BCA - 10) < 16) { sp3C = (this->unk_BCA * 10) - 100; } @@ -723,7 +723,7 @@ void func_809338E0(EnFz* this, PlayState* play) { sp3F = 0; sp3C = 150; - func_800B9010(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); if ((this->unk_BC6 & 0x3F) >= 0x30) { sp3C = 630 - ((this->unk_BC6 & 0x3F) * 10); diff --git a/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c b/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c index add0814bdd..481c155b4c 100644 --- a/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c +++ b/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c @@ -208,7 +208,7 @@ void EnGakufu_GiveReward(EnGakufu* this, PlayState* play) { s32 hour; s32 i; - play_sound(NA_SE_SY_CORRECT_CHIME); + Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME); hour = TIME_TO_HOURS_F(gSaveContext.save.time); for (i = 0; i < 3; i++) { diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c index 11fa876d4d..11ba7a8b0a 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c @@ -408,19 +408,19 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < this->unk_288) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_26E = 0x14D7; this->unk_26C |= 2; Message_StartTextbox(play, this->unk_26E, &this->actor); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_26E = 0x14D8; Message_StartTextbox(play, this->unk_26E, &this->actor); } break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->unk_26E = 0x14D6; this->unk_26C |= 2; Message_StartTextbox(play, this->unk_26E, &this->actor); @@ -429,7 +429,7 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) { } else if (this->unk_26E == 0x14DA) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-this->unk_288); play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; @@ -438,7 +438,7 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->unk_26E = 0x14DB; this->unk_26C |= 2; Message_StartTextbox(play, this->unk_26E, &this->actor); @@ -576,12 +576,12 @@ void func_80B10634(EnGb2* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < this->unk_288) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_26E = 0x14D7; this->unk_26C |= 2; Message_StartTextbox(play, this->unk_26E, &this->actor); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-this->unk_288); play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; @@ -591,7 +591,7 @@ void func_80B10634(EnGb2* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->unk_26E = 0x14E3; this->unk_26C |= 2; Message_StartTextbox(play, this->unk_26E, &this->actor); diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index facc4def29..8af068753a 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -494,7 +494,7 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) { if ((GERUDO_PURPLE_GET_EXIT(&this->picto.actor) != GERUDO_PURPLE_EXIT_NONE) && !Play_InCsMode(play)) { this->picto.actor.speed = 0.0f; func_800B7298(play, &this->picto.actor, 0x1A); - func_801000A4(NA_SE_SY_FOUND); + Lib_PlaySfx(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x1194, &this->picto.actor); this->actionFunc = EnGe2_SetupCharge; Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f, @@ -679,7 +679,7 @@ void EnGe2_GuardStationary(EnGe2* this, PlayState* play) { 0x4000, 720.0f, this->verticalDetectRange)) { if ((GERUDO_PURPLE_GET_EXIT(&this->picto.actor) != GERUDO_PURPLE_EXIT_NONE) && !Play_InCsMode(play)) { func_800B7298(play, &this->picto.actor, 0x1A); - func_801000A4(NA_SE_SY_FOUND); + Lib_PlaySfx(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x1194, &this->picto.actor); this->timer = 50; EnGe2_SetupCapturePlayer(this); diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c index 6621ecc935..bf5fddfef2 100644 --- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c +++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c @@ -700,7 +700,7 @@ void func_80BB2B1C(EnGeg* this, PlayState* play) { this->unk_4E0--; } AudioSfx_LowerSfxSettingsReverb(&this->actor.projectedPos, true); - func_8019F4AC(&this->actor.projectedPos, NA_SE_EN_GOLON_SIRLOIN_EAT - SFX_FLAG); + Audio_PlaySfx_WithSfxSettingsReverb(&this->actor.projectedPos, NA_SE_EN_GOLON_SIRLOIN_EAT - SFX_FLAG); } void func_80BB2E00(EnGeg* this, PlayState* play) { @@ -753,7 +753,7 @@ void func_80BB2F7C(EnGeg* this, PlayState* play) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { if (this->unk_230 & 0x80) { - func_800B9010(&this->actor, NA_SE_EN_GOLON_SIRLOIN_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_GOLON_SIRLOIN_ROLL - SFX_FLAG); } else { this->unk_230 |= 0x80; Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_ATTACK); @@ -845,7 +845,7 @@ void func_80BB3318(EnGeg* this, PlayState* play) { Actor_MoveWithGravity(&this->actor); } - func_800B9010(&this->actor, NA_SE_EN_GOLON_SIRLOIN_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_GOLON_SIRLOIN_ROLL - SFX_FLAG); } void func_80BB347C(EnGeg* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Gg/z_en_gg.c b/src/overlays/actors/ovl_En_Gg/z_en_gg.c index e9e37ddb46..ac09c3714d 100644 --- a/src/overlays/actors/ovl_En_Gg/z_en_gg.c +++ b/src/overlays/actors/ovl_En_Gg/z_en_gg.c @@ -393,7 +393,7 @@ void func_80B359DC(EnGg* this, PlayState* play) { if (this->unk_306 == 0) { if (player->stateFlags2 & PLAYER_STATE2_8000000) { this->unk_306 = 1; - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } } else if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) { this->unk_306 = 0; diff --git a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c index 3540b1a246..eb0e5bfd47 100644 --- a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c +++ b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c @@ -442,7 +442,7 @@ void EnGg2_Update(Actor* thisx, PlayState* play) { Actor_TrackPlayer(play, &this->actor, &this->unk_1E0, &this->unk_1E6, this->actor.focus.pos); if ((this->unk_2EE == 5) || (this->unk_2EE == 7)) { - func_800B9010(&this->actor, NA_SE_EN_SHARP_FLOAT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHARP_FLOAT - SFX_FLAG); if ((play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) && ((play->state.frames % 4) == 0)) { func_80B3B4B0(this, play); } diff --git a/src/overlays/actors/ovl_En_Giant/z_en_giant.c b/src/overlays/actors/ovl_En_Giant/z_en_giant.c index 29f7059a50..8d244c09c3 100644 --- a/src/overlays/actors/ovl_En_Giant/z_en_giant.c +++ b/src/overlays/actors/ovl_En_Giant/z_en_giant.c @@ -415,11 +415,11 @@ void EnGiant_PlaySound(EnGiant* this) { if ((this->sfxId != 0xFFFF) && (((this->animIndex == GIANT_ANIM_BIG_CALL_START) && (this->skelAnime.curFrame >= 18.0f)) || (this->animIndex == GIANT_ANIM_BIG_CALL_LOOP))) { - func_800B9010(&this->actor, this->sfxId); + Actor_PlaySfx_Flagged(&this->actor, this->sfxId); } if (((this->animIndex == GIANT_ANIM_SMALL_CALL_START) && (this->skelAnime.curFrame >= 18.0f)) || (this->animIndex == GIANT_ANIM_SMALL_CALL_LOOP)) { - func_800B9010(&this->actor, NA_SE_EV_KYOJIN_SIGN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_KYOJIN_SIGN - SFX_FLAG); } } } @@ -446,7 +446,7 @@ void EnGiant_PerformClockTowerSuccessActions(EnGiant* this, PlayState* play) { EnGiant_PlaySound(this); if (this->cueId == GIANT_CUE_ID_STRUGGLING) { - func_800B9010(&this->actor, NA_SE_IT_KYOJIN_BEARING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_IT_KYOJIN_BEARING - SFX_FLAG); } EnGiant_PlayAndUpdateAnimation(this); } diff --git a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c index b40c2287a7..8f343a2703 100644 --- a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c +++ b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c @@ -320,22 +320,22 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { case 0x44E: // "...So, what'll it be? if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) { if ((gSaveContext.save.saveInfo.bankRupees & 0xFFFF) >= 5000) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x45F, &this->actor); this->curTextId = 0x45F; // bank full, cannot accept more } else { if (gSaveContext.save.saveInfo.playerData.rupees > 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x44F, &this->actor); this->curTextId = 0x44F; // "All right! so..." } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x458, &this->actor); this->curTextId = 0x458; // you haven't even gotten a single rup } } } else { // GINKOMAN_CHOICE_NO - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x451, &this->actor); this->curTextId = 0x451; // dont say that, come on, trust me! } @@ -343,12 +343,12 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { case 0x452: // Really? are you really depositing rupees? if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) { if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.bankRupeesSelected) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x459, &this->actor); this->curTextId = 0x459; // HEY you dont have that much } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (play->msgCtx.bankRupeesSelected >= 100) { Message_StartTextbox(play, 0x455, &this->actor); this->curTextId = 0x455; // You're really going to be give me that much? Rich little guy! @@ -372,7 +372,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { (gSaveContext.save.saveInfo.bankRupees & 0xFFFF0000); } } else { // GINKOMAN_CHOICE_NO - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); if ((gSaveContext.save.saveInfo.bankRupees & 0xFFFF) == 0) { Message_StartTextbox(play, 0x456, &this->actor); @@ -385,11 +385,11 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { break; case 0x468: // Deposit OR withdrawl OR cancel screen if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_CANCEL) { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x470, &this->actor); this->curTextId = 0x470; // "Is that so? Come back and deposit some after saving up a bunch!" } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->choiceDepositWithdrawl = play->msgCtx.choiceIndex; if (!this->isStampChecked) { this->isStampChecked = true; @@ -405,18 +405,18 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) { if ((s32)((gSaveContext.save.saveInfo.bankRupees & 0xFFFF)) < ((s32)(play->msgCtx.bankRupeesSelected + this->serviceFee))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); Message_StartTextbox(play, 0x476, &this->actor); this->curTextId = 0x476; // you dont have enough deposited to withdrawl } else if (CUR_CAPACITY(UPG_WALLET) < (play->msgCtx.bankRupeesSelected + gSaveContext.save.saveInfo.playerData.rupees)) { // check if wallet is big enough - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x475, &this->actor); this->curTextId = 0x475; // You can't hold that many in your wallet } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (play->msgCtx.bankRupeesSelected >= 100) { Message_StartTextbox(play, 0x474, &this->actor); this->curTextId = 0x474; // Aw, you're taking out all that? @@ -436,7 +436,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { Rupees_ChangeBy(play->msgCtx.bankRupeesSelected); } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x47C, &this->actor); this->curTextId = 0x47C; // "Is that so? Think it over, little guy! So what are you gonna do?" } diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 8697f5d745..8fc4c98527 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -250,7 +250,7 @@ s32 func_80B50854(EnGk* this, PlayState* play) { if (!(this->unk_1E4 & 0x40)) { if (player->stateFlags2 & PLAYER_STATE2_8000000) { this->unk_1E4 |= 0x40; - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } } else if (!(player->stateFlags2 & PLAYER_STATE2_8000000)) { this->unk_1E4 &= ~0x40; @@ -690,7 +690,7 @@ void func_80B51970(EnGk* this, PlayState* play) { } if (this->unk_1E4 & 2) { - func_801A4748(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); + Audio_PlaySfx_AtFixedPos(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); if (this->unk_2E4 != 10) { if (this->unk_2E4 != 9) { this->unk_2E4 = 9; @@ -742,13 +742,13 @@ void func_80B51B40(EnGk* this, PlayState* play) { } else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_31C = 0xE8E; Message_StartTextbox(play, this->unk_31C, &this->actor); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->unk_31C = 0xE8A; Message_StartTextbox(play, this->unk_31C, &this->actor); break; @@ -756,7 +756,7 @@ void func_80B51B40(EnGk* this, PlayState* play) { } if (this->unk_1E4 & 2) { - func_801A4748(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); + Audio_PlaySfx_AtFixedPos(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); if (this->unk_2E4 != 10) { if (this->unk_2E4 != 9) { this->unk_2E4 = 9; @@ -833,7 +833,7 @@ void func_80B51EA4(EnGk* this, PlayState* play) { void func_80B51FD0(EnGk* this, PlayState* play) { if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_CALMED_GORON_ELDERS_SON)) { if (this->unk_1E4 & 2) { - func_801A4748(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); + Audio_PlaySfx_AtFixedPos(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); } else { this->unk_1E4 |= 2; } @@ -863,7 +863,7 @@ void func_80B5202C(EnGk* this, PlayState* play) { if (this->unk_1E4 & 2) { if ((play->msgCtx.ocarinaMode != 1) && (play->msgCtx.ocarinaMode != 3) && (play->csCtx.state == CS_STATE_IDLE)) { - func_801A4748(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); + Audio_PlaySfx_AtFixedPos(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG); } } else { this->unk_1E4 |= 2; diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 6f6f2cad9b..cc0f6d500a 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -788,13 +788,13 @@ s32 func_809995A4(EnGs* this, PlayState* play) { if ((this->unk_1D4 % 20) == 7) { func_80999584(&this->unk_1FA, &flashColours[0]); this->unk_1F4 = this->unk_1FA; - play_sound(NA_SE_SY_WARNING_COUNT_E); + Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_E); this->unk_200 = 0.0f; } } else if ((this->unk_1D4 % 20) == 7) { func_80999584(&this->unk_1FA, &flashColours[1]); this->unk_1F4 = this->unk_1FA; - play_sound(NA_SE_SY_WARNING_COUNT_N); + Audio_PlaySfx(NA_SE_SY_WARNING_COUNT_N); this->unk_200 = 0.0f; } } @@ -826,7 +826,7 @@ s32 func_809995A4(EnGs* this, PlayState* play) { func_800B0EB0(play, &sp6C, &sp60, &dustAccel, &dustPrim, &dustEnv, Rand_ZeroFloat(50.0f) + 200.0f, 40, 15); } - func_800B9010(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); if (this->unk_1D4++ >= 40) { this->unk_19A |= 0x10; @@ -859,7 +859,7 @@ s32 func_809995A4(EnGs* this, PlayState* play) { this->unk_216 = 0; this->actionFunc = func_80999A8C; } else { - func_800B9010(&this->actor, NA_SE_EV_STONE_LAUNCH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_STONE_LAUNCH - SFX_FLAG); } Actor_MoveWithGravity(&this->actor); diff --git a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c index 091525ce02..841e6f539a 100644 --- a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c +++ b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c @@ -327,7 +327,7 @@ void func_80B23934(EnHanabi* this, PlayState* play) { if ((gSaveContext.save.entrance == ENTRANCE(TERMINA_FIELD, 1)) && (gSaveContext.sceneLayer == 7)) { if (play->csCtx.curFrame > 1650) { func_80B236C8(this, play); - func_800B8FE8(&this->actor, NA_SE_EV_FIREWORKS_LAUNCH - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_FIREWORKS_LAUNCH - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.c b/src/overlays/actors/ovl_En_Hg/z_en_hg.c index 180bf8cab8..98ac6348b5 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.c +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.c @@ -245,7 +245,7 @@ void EnHg_PlayRedeadSfx(EnHg* this, PlayState* play) { if (this->actor.colChkInfo.health == 1) { if ((this->actionFunc == EnHg_ChasePlayer) || (this->actionFunc == EnHg_ReactToHit) || (this->actionFunc == EnHg_ChasePlayerWait)) { - func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); } } } @@ -315,7 +315,7 @@ void EnHg_HandleCsAction(EnHg* this, PlayState* play) { this->csIdList[2] = 0; this->animIndex = HG_ANIM_PANIC; if ((this->csIdIndex == HG_CS_GET_MASK) || (this->csIdIndex == HG_CS_SONG_OF_HEALING)) { - func_8019F128(NA_SE_EN_HALF_REDEAD_TRANS); + Audio_PlaySfx_2(NA_SE_EN_HALF_REDEAD_TRANS); } Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, HG_ANIM_PANIC); break; @@ -347,17 +347,17 @@ void EnHg_HandleCsAction(EnHg* this, PlayState* play) { switch (this->animIndex) { case HG_ANIM_LEAN_FORWARD: case HG_ANIM_REACH_FORWARD: - func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); break; case HG_ANIM_CURL_UP: case HG_ANIM_CROUCHED_PANIC: - func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_SCREAME - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_HALF_REDEAD_SCREAME - SFX_FLAG); break; case HG_ANIM_PANIC: if ((this->csIdIndex == HG_CS_FIRST_ENCOUNTER) || (this->csIdIndex == HG_CS_SUBSEQUENT_ENCOUNTER)) { - func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_SCREAME - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_HALF_REDEAD_SCREAME - SFX_FLAG); } break; } @@ -382,7 +382,7 @@ void EnHg_WaitForPlayerAction(EnHg* this, PlayState* play) { if (player->stateFlags2 & PLAYER_STATE2_8000000) { if (!sHasSoundPlayed) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } sHasSoundPlayed = true; } else { diff --git a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c index 8ad694a114..d0e965936a 100644 --- a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c +++ b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c @@ -149,7 +149,7 @@ void func_80BDB2B8(EnHiddenNuts* this, PlayState* play) { if (player->stateFlags2 & PLAYER_STATE2_8000000) { if (this->unk_20A == 0) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); this->unk_20A = 1; } } else { diff --git a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c index 1a0105788e..9ce9e8eac5 100644 --- a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c +++ b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c @@ -521,12 +521,12 @@ void func_80C20A74(EnHintSkb* this, PlayState* play) { void func_80C20B88(EnHintSkb* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->unk_3E8 |= 0x10; Message_StartTextbox(play, 0x1150, &this->actor); this->unk_3E6 = 0x1150; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x1152, &this->actor); this->unk_3E6 = 0x1152; } diff --git a/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c b/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c index c76d921064..95cc793ac5 100644 --- a/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c +++ b/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.c @@ -72,7 +72,7 @@ void EnHitTag_WaitForHit(EnHitTag* this, PlayState* play) { s32 i; if (this->collider.base.acFlags & AC_HIT) { - play_sound(NA_SE_SY_GET_RUPY); + Audio_PlaySfx(NA_SE_SY_GET_RUPY); Actor_Kill(&this->actor); dropLocation.x = this->actor.world.pos.x; dropLocation.y = this->actor.world.pos.y; diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index ed3fe65b95..d715e4c7da 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -161,7 +161,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) { } if (this == sInstancePlayingSound) { - func_800B9010(&this->actor, NA_SE_EV_INVISIBLE_MONKEY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_INVISIBLE_MONKEY - SFX_FLAG); } } if ((play->transitionTrigger != TRANS_TRIGGER_OFF) || (play->transitionMode != TRANS_MODE_OFF)) { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 787a40da7f..340d57cf1b 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -478,9 +478,9 @@ void EnHorse_PlayWalkingSound(EnHorse* this) { } if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_WALK); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_WALK); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_WALK); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_WALK); } this->soundTimer++; @@ -492,17 +492,17 @@ void EnHorse_PlayWalkingSound(EnHorse* this) { void func_8087C178(EnHorse* this) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } void func_8087C1C0(EnHorse* this) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } @@ -561,16 +561,16 @@ void EnHorse_IdleAnimSounds(EnHorse* this, PlayState* play) { !(this->stateFlags & ENHORSE_SANDDUST_SOUND)) { this->stateFlags |= ENHORSE_SANDDUST_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } } else if ((this->animIndex == 3) && (this->curFrame > 25.0f) && !(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } } } @@ -1114,9 +1114,9 @@ void EnHorse_StartMountedIdle(EnHorse* this) { if (!(this->stateFlags & ENHORSE_SANDDUST_SOUND)) { this->stateFlags |= ENHORSE_SANDDUST_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } } } @@ -1166,9 +1166,9 @@ void EnHorse_MountedIdleWhinny(EnHorse* this) { Animation_GetLastFrame(sAnimationHeaders[this->type][1]), ANIMMODE_ONCE, -3.0f); if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); } } } @@ -1451,9 +1451,9 @@ void EnHorse_StartRearing(EnHorse* this) { if (Rand_ZeroOne() > 0.5f) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } Rumble_Request(0.0f, 180, 20, 100); @@ -1465,9 +1465,9 @@ void EnHorse_StartRearing(EnHorse* this) { this->stateFlags &= ~ENHORSE_LAND2_SOUND; if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } @@ -1485,9 +1485,9 @@ void EnHorse_MountedRearing(EnHorse* this, PlayState* play) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } Rumble_Request(0.0f, 180, 20, 100); } @@ -1525,9 +1525,9 @@ void EnHorse_StartBraking(EnHorse* this, PlayState* play) { if (Rand_ZeroOne() > 0.5f) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } Rumble_Request(0.0f, 180, 20, 100); @@ -1537,9 +1537,9 @@ void EnHorse_StartBraking(EnHorse* this, PlayState* play) { } if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_SLIP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_SLIP); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_SLIP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_SLIP); } Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.5f, 0.0f, @@ -1562,9 +1562,9 @@ void EnHorse_Stopping(EnHorse* this, PlayState* play) { ((gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 0)) || (Cutscene_GetSceneLayer(play) == 0))) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } Rumble_Request(0.0f, 180, 20, 100); @@ -1695,9 +1695,9 @@ void EnHorse_StartLowJump(EnHorse* this, PlayState* play) { this->riderPos.y -= ((y * 0.01f) * this->unk_528) * 0.01f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } Rumble_Request(0.0f, 170, 10, 10); } @@ -1754,9 +1754,9 @@ void EnHorse_LowJump(EnHorse* this, PlayState* play) { ((curFrame > 17.0f) && (this->actor.world.pos.y < ((this->actor.floorHeight - this->actor.velocity.y) + 80.0f)))) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; @@ -1793,9 +1793,9 @@ void EnHorse_StartHighJump(EnHorse* this, PlayState* play) { this->stateFlags |= ENHORSE_CALC_RIDER_POS; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } Rumble_Request(0.0f, 170, 10, 10); } @@ -1851,9 +1851,9 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) { ((curFrame > 23.0f) && (this->actor.world.pos.y < ((this->actor.floorHeight - this->actor.velocity.y) + 80.0f)))) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; @@ -1879,7 +1879,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play) { gHorsePlayedEponasSong = false; if (EnHorse_Spawn(this, play)) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); } this->stateFlags &= ~ENHORSE_INACTIVE; } @@ -1915,17 +1915,17 @@ void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 sta if (this->animIndex == ENHORSE_ANIM_WHINNY) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); } } } else if (this->animIndex == ENHORSE_ANIM_REARING) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } this->stateFlags &= ~ENHORSE_LAND2_SOUND; @@ -1960,18 +1960,18 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) { if (!func_8087C38C(play, this, &this->actor.world.pos)) { if (EnHorse_Spawn(this, play)) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH); } this->followTimer = 0; EnHorse_SetFollowAnimation(this, play); } } else { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH); } this->followTimer = 0; EnHorse_StartMovingAnimation(this, 6, -3.0f, 0.0f); @@ -2081,9 +2081,9 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { if ((this->curFrame > 25.0f) && !(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } } } else { @@ -2113,9 +2113,9 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { EnHorse_StartIdleRidable(this); if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } } @@ -2144,7 +2144,7 @@ void EnHorse_InitIngoHorse(EnHorse* this) { this->actor.speed = 0.0f; EnHorse_UpdateIngoHorseAnim(this); if (this->stateFlags & ENHORSE_DRAW) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_IT_INGO_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_IT_INGO_HORSE_NEIGH); } } @@ -2193,16 +2193,16 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) { } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speed * 0.25f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speed * 0.2f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } else { animSpeed = 1.0f; @@ -2271,9 +2271,9 @@ void func_80881290(EnHorse* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->jumpStartY = this->actor.world.pos.y; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } Rumble_Request(0.0f, 170, 10, 10); } @@ -2311,9 +2311,9 @@ void func_80881398(EnHorse* this, PlayState* play) { if (animeUpdated || ((curFrame > 17.0f) && (this->actor.world.pos.y < ((this->actor.floorHeight - this->actor.velocity.y) + 80.0f)))) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; @@ -2344,7 +2344,7 @@ void func_80881634(EnHorse* this) { this->actor.speed = 0.0f; func_8088168C(this); if (this->stateFlags & ENHORSE_DRAW) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_IT_INGO_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_IT_INGO_HORSE_NEIGH); } } @@ -2383,16 +2383,16 @@ void func_8088168C(EnHorse* this) { } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speed * 0.25f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speed * 0.2f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } else { animSpeed = 1.0f; @@ -2526,9 +2526,9 @@ void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play) { this->stateFlags |= ENHORSE_ANIM_HIGH_JUMP; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP); } Rumble_Request(0.0f, 170, 10, 10); } @@ -2576,9 +2576,9 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { (this->actor.world.pos.y < ((this->actor.floorHeight - this->actor.velocity.y) + 80.0f)))) { this->cutsceneFlags |= 1; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND); } Rumble_Request(0.0f, 255, 10, 80); this->stateFlags &= ~ENHORSE_JUMPING; @@ -2605,9 +2605,9 @@ void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { this->stateFlags &= ~ENHORSE_LAND2_SOUND; if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, @@ -2620,9 +2620,9 @@ void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } } } @@ -2698,9 +2698,9 @@ void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* cu if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, @@ -2713,9 +2713,9 @@ void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } } } @@ -2870,17 +2870,17 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speed * 0.25f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } Rumble_Request(0.0f, 60, 8, 255); } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speed * 0.2f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } Rumble_Request(0.0f, 120, 8, 255); } else { @@ -2963,9 +2963,9 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { if (gHorsePlayedEponasSong || (this->type == HORSE_TYPE_HNI)) { EnHorse_StartIdleRidable(this); if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH); } } @@ -3070,9 +3070,9 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { this->animIndex = ENHORSE_ANIM_WHINNY; if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); } } } @@ -3144,7 +3144,7 @@ void func_80883E10(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { this->cueId = 3; Animation_Change(&this->skin.skelAnime, &object_horse_link_child_Anim_00A8DC, 1.0f, 0.0f, Animation_GetLastFrame(&object_horse_link_child_Anim_00A8DC), ANIMMODE_ONCE, -3.0f); - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } void func_80883EA0(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { @@ -3163,7 +3163,7 @@ void func_80883F18(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { void func_80883F98(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { if (Animation_OnFrame(&this->skin.skelAnime, Animation_GetLastFrame(&object_horse_link_child_Anim_00AD08) - 1.0f)) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); } SkelAnime_Update(&this->skin.skelAnime); } @@ -3209,7 +3209,7 @@ void func_80884314(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { this->cueId = 7; Animation_Change(&this->skin.skelAnime, &object_horse_link_child_Anim_00D178, 1.0f, 0.0f, Animation_GetLastFrame(&object_horse_link_child_Anim_00D178), ANIMMODE_ONCE, 0.0f); - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } void func_808843B4(EnHorse* this, PlayState* play, CsCmdActorCue* cue) { @@ -3409,7 +3409,7 @@ void func_80884E0C(EnHorse* this, PlayState* play) { Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], sPlaybackSpeeds[this->animIndex] * playSpeed * 2.5f, 0.0f, Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } this->unk_57C = this->actor.world.pos; @@ -3742,9 +3742,9 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { if (this->actor.speed > 4.0f) { this->actor.speed -= 1.0f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } } } @@ -3759,9 +3759,9 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { if (this->actor.speed > 2.0f) { this->actor.speed -= 1.0f; if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } } } else { @@ -4011,9 +4011,9 @@ void func_80886C00(EnHorse* this, PlayState* play) { } } else if ((this->stateFlags & ENHORSE_DRAW) && (Rand_ZeroOne() < 0.1f)) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } } @@ -4027,7 +4027,7 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) { this->numBoosts++; if (!EN_HORSE_CHECK_4(this)) { - play_sound(NA_SE_SY_CARROT_RECOVER); + Audio_PlaySfx(NA_SE_SY_CARROT_RECOVER); } if (this->numBoosts < 6) { @@ -4042,7 +4042,7 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) { this->numBoosts = 6; if (!EN_HORSE_CHECK_4(this)) { - play_sound(NA_SE_SY_CARROT_RECOVER); + Audio_PlaySfx(NA_SE_SY_CARROT_RECOVER); } } } @@ -4050,9 +4050,9 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) { if (this->boostTimer == 8) { if ((Rand_ZeroOne() < 0.25f) && (this->stateFlags & ENHORSE_DRAW)) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } } @@ -4253,9 +4253,9 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { if ((this->colliderJntSph.base.acFlags & AC_HIT) && (this->stateFlags & ENHORSE_DRAW)) { if (this->type == HORSE_TYPE_2) { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); } else { - Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index c7a2edaaa7..7aae1c7427 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -250,7 +250,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) { if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(180)) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_HORSE_GOAL | SEQ_FLAG_ASYNC); - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); this->unk_164 |= 0x40000; gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_4); @@ -283,7 +283,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) { (horseGameCheck->dyna.actor.id == ACTOR_EN_HORSE_GAME_CHECK) && (horseGameCheck->unk_15C == ENHORSEGAMECHECK_FF_7) && !(this->unk_164 & 0x40000)) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_HORSE_GOAL | SEQ_FLAG_ASYNC); - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); this->unk_164 |= 0x40000; gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_3); @@ -316,7 +316,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) { (horseGameCheck->dyna.actor.id == ACTOR_EN_HORSE_GAME_CHECK) && (horseGameCheck->unk_15C == ENHORSEGAMECHECK_FF_7) && !(this->unk_164 & 0x02000000)) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_HORSE_GOAL | SEQ_FLAG_ASYNC); - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); this->unk_164 |= 0x02000000; gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_3); @@ -345,7 +345,7 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) { (horseGameCheck->dyna.actor.id == ACTOR_EN_HORSE_GAME_CHECK) && (horseGameCheck->unk_15C == ENHORSEGAMECHECK_FF_7) && !(this->unk_164 & 0x800)) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_HORSE_GOAL | SEQ_FLAG_ASYNC); - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); this->unk_164 |= 0x800; gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; SET_WEEKEVENTREG_HORSE_RACE_STATE(WEEKEVENTREG_HORSE_RACE_STATE_2); diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 5079e1a57c..13812397b8 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -93,7 +93,7 @@ s8 D_808DFF54[] = { 0, 1, 2, 1 }; void func_808DE5C0(EnHorseLinkChild* this) { if ((D_808DFF10[this->unk_1E8] < this->skin.skelAnime.curFrame) && ((this->unk_1E8 != 0) || !(D_808DFF10[1] < this->skin.skelAnime.curFrame))) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_WALK); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_WALK); this->unk_1E8++; if (this->unk_1E8 >= 2) { this->unk_1E8 = 0; @@ -106,12 +106,12 @@ void func_808DE660(EnHorseLinkChild* this) { func_808DE5C0(this); } else if (this->skin.skelAnime.curFrame == 0.0f) { if ((this->unk_148 == 3) || (this->unk_148 == 4)) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else if (this->unk_148 == 1) { if (Rand_ZeroOne() > 0.5f) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_GROAN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_GROAN); } else { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); } } } @@ -428,7 +428,7 @@ void func_808DF620(EnHorseLinkChild* this, PlayState* play) { if (gHorsePlayedEponasSong) { gHorsePlayedEponasSong = false; - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH); func_808DF788(this); return; } diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 02e5004f2a..c6aa79f55c 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -921,7 +921,7 @@ void EnIk_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = this->drawDmgEffScale; } } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.65f, 0.01625f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } EnIk_UpdateArmor(this, play); 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 ca764b1347..89d9b093f2 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -306,11 +306,11 @@ void func_808F374C(EnIn* this, PlayState* play) { if (this->skelAnime.animation == &object_in_Anim_016484 || this->skelAnime.animation == &object_in_Anim_0170DC) { if (Animation_OnFrame(&this->skelAnime, 8.0f)) { - func_8019F88C(&this->actor.projectedPos, NA_SE_VO_IN_LASH_0, 2); + Audio_PlaySfx_Randomized(&this->actor.projectedPos, NA_SE_VO_IN_LASH_0, 2); if (Rand_ZeroOne() < 0.3f) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_INGO_HORSE_NEIGH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_IT_INGO_HORSE_NEIGH); } - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_IT_LASH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_IT_LASH); } } if (this->skelAnime.animation == &object_in_Anim_0198A8 && Animation_OnFrame(&this->skelAnime, 20.0f)) { @@ -597,7 +597,7 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx) Actor* thisx = &this->actor; if (msgCtx->choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) { Rupees_ChangeBy(-play->msgCtx.unk1206C); if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_57_01)) { @@ -608,11 +608,11 @@ s32 func_808F4150(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx) Actor_ContinueText(play, thisx, 0x3475); } } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Actor_ContinueText(play, thisx, 0x3473); } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ContinueText(play, thisx, 0x3472); } return 0; @@ -623,7 +623,7 @@ s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, s32 fee = (play->msgCtx.unk1206C != 0xFFFF) ? play->msgCtx.unk1206C : 10; if (msgCtx->choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (gSaveContext.save.saveInfo.playerData.rupees >= fee) { Rupees_ChangeBy(-fee); if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_57_01)) { @@ -640,7 +640,7 @@ s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, } } } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); if (arg4 != 0) { Actor_ContinueText(play, &this->actor, 0x3473); } else { @@ -648,7 +648,7 @@ s32 func_808F4270(PlayState* play, EnIn* this, s32 arg2, MessageContext* msgCtx, } } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ContinueText(play, &this->actor, 0x3472); } return 0; @@ -792,7 +792,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { case 0x3466: if (msgCtx->choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) { if (Inventory_HasEmptyBottle()) { this->actionFunc = func_808F3C40; @@ -804,12 +804,12 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { ret = false; } } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Actor_ContinueText(play, &this->actor, 0x3468); ret = false; } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ContinueText(play, &this->actor, 0x3467); ret = false; } @@ -887,7 +887,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { func_808F4150(play, this, arg2, msgCtx); ret = false; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); CLEAR_WEEKEVENTREG(WEEKEVENTREG_56_08); func_808F4108(this, play, 0x3479); ret = false; @@ -1094,7 +1094,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { case 0x3490: if (msgCtx->choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) { if (Inventory_HasEmptyBottle()) { this->actionFunc = func_808F3C40; @@ -1106,12 +1106,12 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { ret = false; } } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Actor_ContinueText(play, &this->actor, 0x3468); ret = false; } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ContinueText(play, &this->actor, 0x3491); ret = false; } @@ -1246,7 +1246,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { func_808F4270(play, this, arg2, msgCtx, 1); ret = false; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ContinueText(play, &this->actor, 0x349C); ret = false; } diff --git a/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c b/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c index d2aceba294..ef64e39548 100644 --- a/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c +++ b/src/overlays/actors/ovl_En_Invisible_Ruppe/z_en_invisible_ruppe.c @@ -62,17 +62,17 @@ void func_80C2590C(EnInvisibleRuppe* this, PlayState* play) { if (this->collider.base.ocFlags1 & OC1_HIT) { switch (INVISIBLERUPPE_GET_3(&this->actor)) { case 0: - play_sound(NA_SE_SY_GET_RUPY); + Audio_PlaySfx(NA_SE_SY_GET_RUPY); Item_DropCollectible(play, &this->actor.world.pos, 0x8000 | ITEM00_RUPEE_GREEN); break; case 1: - play_sound(NA_SE_SY_GET_RUPY); + Audio_PlaySfx(NA_SE_SY_GET_RUPY); Item_DropCollectible(play, &this->actor.world.pos, 0x8000 | ITEM00_RUPEE_BLUE); break; case 2: - play_sound(NA_SE_SY_GET_RUPY); + Audio_PlaySfx(NA_SE_SY_GET_RUPY); Item_DropCollectible(play, &this->actor.world.pos, 0x8000 | ITEM00_RUPEE_RED); break; } diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index 449acf2123..abb1f1438c 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -693,9 +693,9 @@ void EnJg_LullabyIntroCutsceneAction(EnJg* this, PlayState* play) { if (this->cutsceneAnimIndex == EN_JG_ANIM_TAKING_OUT_DRUM) { if (Animation_OnFrame(&this->skelAnime, 23.0f)) { - Audio_PlaySfxAtPos(&sSfxPos, NA_SE_EV_WOOD_BOUND_S); + Audio_PlaySfx_AtPos(&sSfxPos, NA_SE_EV_WOOD_BOUND_S); } else if (Animation_OnFrame(&this->skelAnime, 38.0f)) { - Audio_PlaySfxAtPos(&sSfxPos, NA_SE_EV_OBJECT_SLIDE); + Audio_PlaySfx_AtPos(&sSfxPos, NA_SE_EV_OBJECT_SLIDE); } } } else { @@ -928,7 +928,7 @@ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play if ((this->freezeTimer <= 0) && (currentFrame == lastFrame)) { this->animIndex = EN_JG_ANIM_FROZEN_START; SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); - Audio_PlaySfxAtPos(&sSfxPos, NA_SE_EV_FREEZE_S); + Audio_PlaySfx_AtPos(&sSfxPos, NA_SE_EV_FREEZE_S); this->actionFunc = EnJg_Freeze; } } diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 350f4ae822..5687242371 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -576,11 +576,11 @@ void func_80969898(EnJs* this, PlayState* play) { if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x2215)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x2217); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x2216); break; } @@ -726,14 +726,14 @@ void func_80969DA4(EnJs* this, PlayState* play) { ((play->msgCtx.currentTextId == 0x2219) || (play->msgCtx.currentTextId == 0x221E))) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (!func_809695FC(this, play)) { func_809694E8(this, play); break; } break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, play->msgCtx.currentTextId + 1); break; } @@ -886,11 +886,11 @@ void func_8096A38C(EnJs* this, PlayState* play) { if (Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); break; } 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 70570ed961..93bf9a81b5 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -512,7 +512,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { this->talkState = TEXT_STATE_5; if (play->msgCtx.choiceIndex == 1) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (this->picto.actor.textId == 0x1656) { this->picto.actor.textId = 0x1658; } else if (this->picto.actor.textId == 0x165C) { @@ -524,7 +524,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { } EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_HOPPING_REGULAR); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); if (this->picto.actor.textId == 0x1656) { // would you like to learn a song? yes/no this->picto.actor.textId = 0x1657; } else if (this->picto.actor.textId == 0x165C) { // would you like to learn a song? yes/no @@ -771,10 +771,10 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) { } else { this->talkState = TEXT_STATE_5; if (play->msgCtx.choiceIndex == 1) { - func_8019F208(); // play 0x4808 sfx (decide) and calls AudioSfx_StopById + Audio_PlaySfx_MessageDecide(); this->picto.actor.textId = 0x164A; } else { - func_8019F230(); // play 0x480A sfx (cancel) and calls AudioSfx_StopById + Audio_PlaySfx_MessageCancel(); this->picto.actor.textId = 0x1661; } } 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 820dd1f4e6..66209ae768 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c @@ -302,7 +302,7 @@ void func_80AD75A8(EnKame* this, PlayState* play) { } if (this->unk_2A6 > 0x1200) { - func_800B9010(&this->actor, NA_SE_EN_PAMET_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PAMET_ROLL - SFX_FLAG); } } @@ -746,7 +746,7 @@ void EnKame_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = this->drawDmgEffScale; } } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.6f, 0.015000001f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index b0efd61e8c..07892f9f08 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -833,7 +833,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { if ((play->msgCtx.ocarinaMode == 4) && (play->msgCtx.lastPlayedSong == OCARINA_SONG_HEALING)) { this->actionState = ENKANBAN_REPAIR; this->bounceX = 1; - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } break; diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index 34b3d64050..b9d226e012 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -595,7 +595,7 @@ void EnKarebaba_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = this->drawDmgEffScale; } } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.75f, 0.75f / 40)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c index fbb8346e5f..c0063896ad 100644 --- a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c +++ b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c @@ -220,16 +220,16 @@ void func_80B26758(EnKendoJs* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_NONE) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x272C, &this->actor); this->unk_288 = 0x272C; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); } else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x2718, &this->actor); this->unk_288 = 0x2718; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-play->msgCtx.unk1206C); Message_StartTextbox(play, 0x2719, &this->actor); this->unk_288 = 0x2719; @@ -238,16 +238,16 @@ void func_80B26758(EnKendoJs* this, PlayState* play) { case 1: if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_NONE) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x272C, &this->actor); this->unk_288 = 0x272C; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); } else if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk12070) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x2718, &this->actor); this->unk_288 = 0x2718; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-play->msgCtx.unk12070); Message_StartTextbox(play, 0x273A, &this->actor); this->unk_288 = 0x273A; @@ -255,7 +255,7 @@ void func_80B26758(EnKendoJs* this, PlayState* play) { break; case 2: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x2717, &this->actor); this->unk_288 = 0x2717; } @@ -612,7 +612,7 @@ void func_80B274BC(EnKendoJs* this, PlayState* play) { return; } - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); func_80B279F0(this, play, ((u8)Rand_Next() % 3) + 1); func_80B279F0(this, play, ((u8)Rand_Next() % 3) + 4); this->unk_290 = 0; diff --git a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c index e80807b088..38a870a149 100644 --- a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c +++ b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c @@ -623,17 +623,17 @@ void func_80B41E18(EnKgy* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); func_80B40E74(this, play, 0xC3F); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); func_80B40E74(this, play, 0xC42); Rupees_ChangeBy(-play->msgCtx.unk1206C); } break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); func_80B40EBC(this, play, textId); break; } @@ -642,12 +642,12 @@ void func_80B41E18(EnKgy* this, PlayState* play) { case 0xC3E: switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); func_80B40E74(this, play, func_80B41460()); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); func_80B40E74(this, play, 0xC3C); break; } diff --git a/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c b/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c index 77c7e1dc9f..1800a30429 100644 --- a/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c +++ b/src/overlays/actors/ovl_En_Kujiya/z_en_kujiya.c @@ -112,17 +112,17 @@ void EnKujiya_HandlePlayerChoice(EnKujiya* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { // Buy if (gSaveContext.save.saveInfo.playerData.rupees < 10) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x2B62, &this->actor); this->textId = 0x2B62; // Not enough Rupees } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-10); Message_StartTextbox(play, 0x2B5F, &this->actor); this->textId = 0x2B5F; // Enter number } } else { // Don't buy - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x2B5E, &this->actor); this->textId = 0x2B5E; // Too bad } @@ -314,7 +314,7 @@ void EnKujiya_TurnToOpen(EnKujiya* this, PlayState* play) { this->timer++; } } else { - func_800B9010(&this->actor, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG); } } @@ -342,7 +342,7 @@ void EnKujiya_TurnToClosed(EnKujiya* this, PlayState* play) { this->timer++; } } else { - func_800B9010(&this->actor, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c b/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c index fd7795f7c9..b89b085c50 100644 --- a/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c +++ b/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c @@ -459,18 +459,18 @@ void func_80AEA7A4(EnLiftNuts* this, PlayState* play) { case 0x27E2: if (play->msgCtx.choiceIndex == 0) { // Yes if (gSaveContext.save.saveInfo.playerData.rupees >= 10) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x27E5, &this->actor); this->textId = 0x27E5; Rupees_ChangeBy(-10); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); Message_StartTextbox(play, 0x27E4, &this->actor); this->textId = 0x27E4; } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); Message_StartTextbox(play, 0x27E3, &this->actor); this->textId = 0x27E3; @@ -811,7 +811,7 @@ void func_80AEB294(EnLiftNuts* this, PlayState* play) { } void func_80AEB3E0(EnLiftNuts* this, PlayState* play) { - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); this->unk_354 = 0; gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; this->actionFunc = func_80AEB428; diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c index 908bbf3744..2eafabd8fe 100644 --- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c +++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c @@ -358,7 +358,7 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) { if (!(player->stateFlags3 & PLAYER_STATE3_100) && !Play_InCsMode(play)) { Math_Vec3f_Copy(&this->headRotTarget, &gZeroVec3f); this->state = PALACE_GUARD_RUNNING_TO_PLAYER; - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); func_800B7298(play, &this->actor, PLAYER_CSMODE_26); D_80A6862C = 1; this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_10); diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 463c5b327c..1b9c1cc998 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -336,11 +336,11 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) { } if (player->unk_B08 > 0.85f) { - func_8019F900(&player->actor.projectedPos, 2); + Audio_PlaySfx_SwordCharge(&player->actor.projectedPos, 2); } else if (player->unk_B08 > 0.15f) { - func_8019F900(&player->actor.projectedPos, 1); + Audio_PlaySfx_SwordCharge(&player->actor.projectedPos, 1); } else if (player->unk_B08 > 0.1f) { - func_8019F900(&player->actor.projectedPos, 0); + Audio_PlaySfx_SwordCharge(&player->actor.projectedPos, 0); } if (Play_InCsMode(play)) { diff --git a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c index 29a09cd907..9adf841f7b 100644 --- a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c +++ b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c @@ -361,11 +361,11 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { switch (this->textId) { case 0x3339: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x333A, &this->actor); this->textId = 0x333A; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x333B, &this->actor); this->textId = 0x333B; } @@ -373,12 +373,12 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { case 0x3341: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); SET_WEEKEVENTREG(WEEKEVENTREG_PROMISED_TO_HELP_WITH_THEM); Message_StartTextbox(play, 0x3343, &this->actor); this->textId = 0x3343; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 0, 1); Message_StartTextbox(play, 0x3342, &this->actor); this->textId = 0x3342; @@ -389,12 +389,12 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { case 0x3346: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); SET_WEEKEVENTREG(WEEKEVENTREG_PROMISED_TO_HELP_WITH_THEM); Message_StartTextbox(play, 0x3343, &this->actor); this->textId = 0x3343; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 0, 1); Message_StartTextbox(play, 0x3342, &this->actor); this->textId = 0x3342; @@ -403,11 +403,11 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { case 0x3347: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x3349, &this->actor); this->textId = 0x3349; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x3348, &this->actor); this->textId = 0x3348; Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI); @@ -418,7 +418,7 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { if (play->msgCtx.choiceIndex == 0) { // Yes s32 aux; - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x334E, &this->actor); this->textId = 0x334E; if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) { @@ -426,7 +426,7 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { } Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI); } else { // No. - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 0, 0); Message_StartTextbox(play, 0x334C, &this->actor); this->textId = 0x334C; @@ -435,11 +435,11 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { case 0x3354: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x3349, &this->actor); this->textId = 0x3349; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 1, 0); Message_StartTextbox(play, 0x3355, &this->actor); this->textId = 0x3355; @@ -450,18 +450,18 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { case 0x3356: // "Try again?" if (play->msgCtx.choiceIndex == 0) { // Yes - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_CloseTextbox(play); EnMa4_SetupBeginHorsebackGame(this); } else { // No if (this->type == MA4_TYPE_ALIENS_DEFEATED) { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 3, 3); Message_StartTextbox(play, 0x3357, &this->actor); this->textId = 0x3357; Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_ROMANI); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 4, 2); Message_StartTextbox(play, 0x335B, &this->actor); this->textId = 0x335B; @@ -472,11 +472,11 @@ void EnMa4_HandlePlayerChoice(EnMa4* this, PlayState* play) { case 0x3359: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x3349, &this->actor); this->textId = 0x3349; } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnMa4_SetFaceExpression(this, 4, 2); Message_StartTextbox(play, 0x335A, &this->actor); this->textId = 0x335A; diff --git a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c index 5dd7130192..5e63c7990d 100644 --- a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c +++ b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c @@ -449,13 +449,13 @@ void EnMaYto_DefaultDialogueHandler(EnMaYto* this, PlayState* play) { void EnMaYto_DefaultHandlePlayerChoice(EnMaYto* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { // Yes - func_8019F208(); + Audio_PlaySfx_MessageDecide(); EnMaYto_SetFaceExpression(this, 0, 3); // "Milk Road is fixed!" Message_StartTextbox(play, 0x3392, &this->actor); this->textId = 0x3392; } else { // No - func_8019F230(); + Audio_PlaySfx_MessageCancel(); // "Don't lie!" Message_StartTextbox(play, 0x3391, &this->actor); this->textId = 0x3391; @@ -577,13 +577,13 @@ void EnMaYto_DinnerDialogueHandler(EnMaYto* this, PlayState* play) { void EnMaYto_DinnerHandlePlayerChoice(EnMaYto* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { // Yes - func_8019F208(); + Audio_PlaySfx_MessageDecide(); EnMaYto_SetFaceExpression(this, 0, 3); // "Milk Road is fixed!" Message_StartTextbox(play, 0x3399, &this->actor); this->textId = 0x3399; } else { // No - func_8019F230(); + Audio_PlaySfx_MessageCancel(); // "Don't lie!" Message_StartTextbox(play, 0x3398, &this->actor); this->textId = 0x3398; diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 0cce91c73e..215c2146c5 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -240,7 +240,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) { CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_B)) { if (!CutsceneFlags_Get(play, 4)) { - play_sound(NA_SE_SY_PIECE_OF_HEART); + Audio_PlaySfx(NA_SE_SY_PIECE_OF_HEART); this->state = MAG_STATE_CALLED; this->unk11F00 = 0; this->unk11F02 = 30; @@ -387,7 +387,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) { if (gOpeningEntranceIndex >= 2) { gOpeningEntranceIndex = 0; } - play_sound(NA_SE_SY_PIECE_OF_HEART); + Audio_PlaySfx(NA_SE_SY_PIECE_OF_HEART); gSaveContext.gameMode = GAMEMODE_FILE_SELECT; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_FADE_BLACK; @@ -430,7 +430,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) { if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_START) || CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) || CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_B)) { - play_sound(NA_SE_SY_PIECE_OF_HEART); + Audio_PlaySfx(NA_SE_SY_PIECE_OF_HEART); this->state = MAG_STATE_CALLED; } } 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 94590f5b6d..339fe91e41 100644 --- a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c +++ b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c @@ -489,12 +489,12 @@ void EnMinifrog_YellowFrogDialog(EnMinifrog* this, PlayState* play) { if (Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: // Yes - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->actionFunc = EnMinifrog_BeginChoirCutscene; play->msgCtx.msgLength = 0; break; case 1: // No - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0xD7E); break; } diff --git a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c index 68d08b2235..5a99149e91 100644 --- a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c +++ b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c @@ -313,7 +313,7 @@ void EnMinislime_IceArrowDamage(EnMinislime* this, PlayState* play) { if (this->frozenTimer == 80) { this->frozenAlpha += 10; - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); if (this->frozenAlpha >= 200) { this->frozenAlpha = 200; this->frozenTimer--; @@ -371,7 +371,7 @@ void EnMinislime_FireArrowDamage(EnMinislime* this, PlayState* play) { this->frozenAlpha = 10 * this->meltTimer; } - func_800B9010(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); if (this->meltTimer == 0) { EnMinislime_SetupIdle(this); } @@ -605,7 +605,7 @@ void EnMinislime_DefeatMelt(EnMinislime* this, PlayState* play) { EnMinislime_AddIceSmokeEffect(this, play); } - func_800B9010(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); if (Math_StepToF(&this->actor.scale.y, 0.001f, 0.00075f)) { if ((this->actor.shape.shadowAlpha - 4) <= 0) { this->actor.shape.shadowAlpha = 0; diff --git a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c index 16e0acbe18..0e347acb47 100644 --- a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c +++ b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c @@ -275,7 +275,7 @@ void func_80A4E2E8(EnMkk* this, PlayState* play) { } this->actor.shape.rot.y = (s32)(Math_SinF(this->unk_14E * ((2 * M_PI) / 15)) * (614.4f * this->actor.speed)) + this->unk_150; - func_800B9010(&this->actor, NA_SE_EN_KUROSUKE_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_KUROSUKE_MOVE - SFX_FLAG); if (sp20) { this->unk_14B &= ~2; func_80A4E190(this); diff --git a/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c b/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c index ab387771c9..1edfbe2ed6 100644 --- a/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c +++ b/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c @@ -149,23 +149,23 @@ void func_80A6F3B4(EnMm3* this, PlayState* play) { if (play->msgCtx.choiceIndex == 0) { if (this->unk_2B2 & 0x20) { if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x2790, &this->actor); this->unk_2B4 = 0x2790; Rupees_ChangeBy(-play->msgCtx.unk1206C); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x279C, &this->actor); this->unk_2B4 = 0x279C; Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN); } } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x2790, &this->actor); this->unk_2B4 = 0x2790; } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x278F, &this->actor); this->unk_2B4 = 0x278F; Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN); @@ -175,18 +175,18 @@ void func_80A6F3B4(EnMm3* this, PlayState* play) { case 0x279A: if (play->msgCtx.choiceIndex == 0) { if (gSaveContext.save.saveInfo.playerData.rupees >= play->msgCtx.unk1206C) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x2790, &this->actor); this->unk_2B4 = 0x2790; Rupees_ChangeBy(-play->msgCtx.unk1206C); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x279C, &this->actor); this->unk_2B4 = 0x279C; Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN); } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_StartTextbox(play, 0x279B, &this->actor); this->unk_2B4 = 0x279B; Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_POSTMAN); @@ -305,7 +305,7 @@ void func_80A6F5E4(EnMm3* this, PlayState* play) { if (gSaveContext.timerCurTimes[TIMER_ID_POSTMAN] == SECONDS_TO_TIMER(10)) { Audio_PlayFanfare(NA_BGM_GET_ITEM | 0x900); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } } } @@ -348,7 +348,7 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) { Interface_StartPostmanTimer(0, POSTMAN_MINIGAME_BUNNY_HOOD_OFF); } Message_CloseTextbox(play); - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); func_80A6FBA0(this); } else { CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT); @@ -406,15 +406,15 @@ void func_80A6FBFC(EnMm3* this, PlayState* play) { this->unk_2AC = 7; gSaveContext.timerStates[TIMER_ID_POSTMAN] = TIMER_STATE_OFF; this->actor.flags &= ~ACTOR_FLAG_10000; - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); func_80A6F9C8(this); } else { func_800B8614(&this->actor, play, this->actor.xzDistToPlayer + 10.0f); func_80123E90(play, &this->actor); if (Player_GetMask(play) == PLAYER_MASK_BUNNY) { - play_sound(NA_SE_SY_STOPWATCH_TIMER_INF - SFX_FLAG); + Audio_PlaySfx(NA_SE_SY_STOPWATCH_TIMER_INF - SFX_FLAG); } else { - play_sound(NA_SE_SY_STOPWATCH_TIMER_3 - SFX_FLAG); + Audio_PlaySfx(NA_SE_SY_STOPWATCH_TIMER_3 - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 732fc9b3b1..c8c6975a7d 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -119,13 +119,13 @@ void EnMs_Talk(EnMs* this, PlayState* play) { case 0: // yes Message_CloseTextbox(play); if (gSaveContext.save.saveInfo.playerData.rupees < 10) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_ContinueTextbox(play, 0x935); // "[...] You don't have enough Rupees." } else if (AMMO(ITEM_MAGIC_BEANS) >= 20) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); Message_ContinueTextbox(play, 0x937); // "[...] You can't carry anymore." } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Actor_OfferGetItem(&this->actor, play, GI_MAGIC_BEANS, 90.0f, 10.0f); Rupees_ChangeBy(-10); this->actionFunc = EnMs_Sell; @@ -134,7 +134,7 @@ void EnMs_Talk(EnMs* this, PlayState* play) { case 1: // no default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x934); // "[...] Well, if your mood changes [...]" break; } diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c index db05f0d618..49d10a5182 100644 --- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c +++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c @@ -361,14 +361,14 @@ void EnMttag_Race(EnMttag* this, PlayState* play) { if (EnMttag_IsInFinishLine(playerPos)) { gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_GORON_GOAL | SEQ_FLAG_ASYNC); this->timer = 55; SET_EVENTINF(EVENTINF_11); this->actionFunc = EnMttag_RaceFinish; } else if (EnMttag_IsAnyRaceGoronOverFinishLine(this)) { gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6; - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_GORON_GOAL | SEQ_FLAG_ASYNC); this->timer = 55; SET_EVENTINF(EVENTINF_12); @@ -456,7 +456,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex != 0) { // Exit the race - func_8019F230(); + Audio_PlaySfx_MessageCancel(); gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF; EnMttag_ExitRace(play, TRANS_TYPE_FADE_BLACK, TRANS_TYPE_FADE_BLACK); CLEAR_EVENTINF(EVENTINF_13); @@ -466,7 +466,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) { } // Keep racing - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_CloseTextbox(play); func_800B7298(play, &this->actor, PLAYER_CSMODE_END); CLEAR_EVENTINF(EVENTINF_13); diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index ab77eb2a3b..2a6a7ea1b0 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -242,7 +242,7 @@ void EnNwc_CheckFound(EnNwc* this, PlayState* play) { } EnNwc_ChangeState(this, NWC_STATE_FOLLOWING); - func_801A0868(&gSfxDefaultPos, NA_SE_SY_CHICK_JOIN_CHIME, currentChickCount); + Audio_PlaySfx_AtPosWithAllChannelsIO(&gSfxDefaultPos, NA_SE_SY_CHICK_JOIN_CHIME, currentChickCount); } } diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 01cbb5dda7..7344e07d02 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -137,7 +137,7 @@ void func_8093E68C(EnOkarinaTag* this, PlayState* play) { } } play->msgCtx.ocarinaMode = 4; - play_sound(NA_SE_SY_CORRECT_CHIME); + Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME); this->actionFunc = func_8093E518; } } diff --git a/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c b/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c index cd20f489c5..58b9dc88f1 100644 --- a/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c +++ b/src/overlays/actors/ovl_En_Onpuman/z_en_onpuman.c @@ -90,7 +90,7 @@ void func_80B11F78(EnOnpuman* this, PlayState* play) { CutsceneManager_Stop(this->actor.csId); } } else if (play->msgCtx.ocarinaMode == 3) { - play_sound(NA_SE_SY_CORRECT_CHIME); + Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME); play->msgCtx.ocarinaMode = 4; if (this->actor.csId != CS_ID_NONE) { CutsceneManager_Stop(this->actor.csId); diff --git a/src/overlays/actors/ovl_En_Osk/z_en_osk.c b/src/overlays/actors/ovl_En_Osk/z_en_osk.c index 9867cb9638..426a93e16d 100644 --- a/src/overlays/actors/ovl_En_Osk/z_en_osk.c +++ b/src/overlays/actors/ovl_En_Osk/z_en_osk.c @@ -221,7 +221,7 @@ void func_80BF61EC(EnOsk* this, PlayState* play) { this->actor.scale.x -= 0.85f * 0.001f; Actor_SetScale(&this->actor, this->actor.scale.x); func_80BF5EBC(this, play); - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); } else { this->actor.draw = NULL; } @@ -298,7 +298,7 @@ void func_80BF6478(EnOsk* this) { case 10: case 11: - func_800B9010(&this->actor, NA_SE_EN_YASE_LAUGH_K - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_YASE_LAUGH_K - SFX_FLAG); break; } } @@ -350,7 +350,7 @@ void func_80BF656C(EnOsk* this, PlayState* play) { this->actor.scale.x -= 0.65f * 0.001f; Actor_SetScale(&this->actor, this->actor.scale.x); func_80BF5EBC(this, play); - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); } else { this->actor.draw = NULL; } @@ -482,7 +482,7 @@ void func_80BF6A20(EnOsk* this, PlayState* play) { this->actor.scale.x -= 0.65f * 0.001f; Actor_SetScale(&this->actor, this->actor.scale.x); func_80BF5EBC(this, play); - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); } else { this->actor.draw = NULL; } diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 24c16ad20b..80310d332b 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -360,7 +360,7 @@ void EnOssan_StartShopping(PlayState* play, EnOssan* this) { } void EnOssan_SetupLookToShopkeeperFromShelf(PlayState* play, EnOssan* this) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); this->drawCursor = 0; EnOssan_SetupAction(this, EnOssan_LookToShopkeeperFromShelf); } @@ -605,7 +605,7 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if ((this->actor.params == ENOSSAN_PART_TIME_WORKER) && (player->transformation == PLAYER_FORM_ZORA)) { this->animIndex = ANI_ANIM_APOLOGY_LOOP; SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, 9); @@ -618,7 +618,7 @@ s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, PlayState* play) { return true; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnOssan_EndInteraction(play, this); return true; @@ -652,7 +652,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) { EnOssan_SetupAction(this, EnOssan_LookToLeftShelf); func_8011552C(play, DO_ACTION_DECIDE); this->stickLeftPrompt.isEnabled = false; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } else if (this->stickAccumX > 0) { cursorIndex = EnOssan_SetCursorIndexFromNeutral(this, 0); @@ -661,7 +661,7 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) { EnOssan_SetupAction(this, EnOssan_LookToRightShelf); func_8011552C(play, DO_ACTION_DECIDE); this->stickRightPrompt.isEnabled = false; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } else { @@ -839,11 +839,11 @@ s32 EnOssan_HasPlayerSelectedItem(PlayState* play, EnOssan* this, Input* input) Message_ContinueTextbox(play, this->items[this->cursorIndex]->choiceTextId); this->stickLeftPrompt.isEnabled = false; this->stickRightPrompt.isEnabled = false; - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); this->drawCursor = 0; EnOssan_SetupAction(this, EnOssan_SelectItem); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } return true; } @@ -901,7 +901,7 @@ void EnOssan_BrowseLeftShelf(EnOssan* this, PlayState* play) { EnOssan_CursorUpDown(this); if (this->cursorIndex != prevCursorIndex) { Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId); - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -959,7 +959,7 @@ void EnOssan_BrowseRightShelf(EnOssan* this, PlayState* play) { EnOssan_CursorUpDown(this); if (this->cursorIndex != prevCursorIndex) { Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId); - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -1021,7 +1021,7 @@ void EnOssan_HandleCanBuyItem(PlayState* play, EnOssan* this) { CutsceneManager_Stop(this->csId); this->cutsceneState = ENOSSAN_CUTSCENESTATE_STOPPED; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item->buyFanfareFunc(play, item); EnOssan_SetupBuyItemWithFanfare(play, this); this->drawCursor = 0; @@ -1030,7 +1030,7 @@ void EnOssan_HandleCanBuyItem(PlayState* play, EnOssan* this) { break; case CANBUY_RESULT_SUCCESS_2: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item->buyFunc(play, item); EnOssan_SetupBuy(play, this, sBuySuccessTextIds[this->actor.params]); this->drawCursor = 0; @@ -1040,27 +1040,27 @@ void EnOssan_HandleCanBuyItem(PlayState* play, EnOssan* this) { case CANBUY_RESULT_NO_ROOM: case CANBUY_RESULT_NO_ROOM_2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnOssan_SetupCannotBuy(play, this, sNoRoomTextIds[this->actor.params]); break; case CANBUY_RESULT_NEED_EMPTY_BOTTLE: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnOssan_SetupCannotBuy(play, this, sNeedEmptyBottleTextIds[this->actor.params]); break; case CANBUY_RESULT_NEED_RUPEES: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnOssan_SetupCannotBuy(play, this, sNeedRupeesTextIds[this->actor.params]); break; case CANBUY_RESULT_CANNOT_GET_NOW_2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnOssan_SetupCannotBuy(play, this, sCannotGetNowTextIds[this->actor.params]); break; case CANBUY_RESULT_CANNOT_GET_NOW: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnOssan_SetupCannotBuy(play, this, sNoRoomTextIds[this->actor.params]); break; @@ -1081,7 +1081,7 @@ void EnOssan_SelectItem(EnOssan* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actionFunc = this->prevActionFunc; Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId); break; @@ -1152,7 +1152,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) { if (!EnOssan_TestEndInteraction(this, play, CONTROLLER1(&play->state))) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); player->actor.shape.rot.y = BINANG_ROT180(player->actor.shape.rot.y); player->stateFlags2 |= PLAYER_STATE2_20000000; Message_StartTextbox(play, this->textId, &this->actor); @@ -1162,7 +1162,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) { case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnOssan_EndInteraction(play, this); break; } diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index c23fb31485..2fef8b0eb0 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -621,7 +621,7 @@ void func_8095BA84(EnOwl* this, PlayState* play) { case 0xBEC: switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); if (CHECK_WEEKEVENTREG(WEEKEVENTREG_09_40)) { Message_ContinueTextbox(play, 0xBF4); } else { @@ -631,7 +631,7 @@ void func_8095BA84(EnOwl* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0xBEF); break; @@ -643,12 +643,12 @@ void func_8095BA84(EnOwl* this, PlayState* play) { case 0xBF2: switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0xBF4); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0xBF3); break; 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 4c75fac657..d1949b8486 100644 --- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c +++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c @@ -1372,7 +1372,7 @@ void EnPametfrog_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = unk2C4; this->drawDmgEffScale = unk2C4 > 0.75f ? 0.75f : this->drawDmgEffScale; } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.75f, (3.0f / 160.0f))) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } 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 645b7edf5c..c21972c7dc 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -390,7 +390,7 @@ void func_80897910(EnPeehat* this, PlayState* play) { Math_ScaledStepToS(&this->unk_2B2, 4000, 500); this->unk_2B4 += this->unk_2B2; Math_StepToF(&this->unk_2C4, 0.075f, 0.005f); - func_800B9010(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); } void func_80897A34(EnPeehat* this) { @@ -426,7 +426,7 @@ void func_80897A94(EnPeehat* this, PlayState* play) { Math_ScaledStepToS(&this->unk_2B2, 4000, 500); this->unk_2B4 += this->unk_2B2; Math_StepToF(&this->unk_2C4, 0.075f, 0.005f); - func_800B9010(&this->actor, NA_SE_EN_PIHAT_SM_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_SM_FLY - SFX_FLAG); if (this->colliderTris.base.atFlags & AT_BOUNCED) { this->colliderTris.base.atFlags &= ~(AT_BOUNCED | AT_ON); @@ -531,7 +531,7 @@ void func_80897F44(EnPeehat* this, PlayState* play) { Math_ScaledStepToS(&this->unk_2B2, 4000, 500); this->unk_2B4 += this->unk_2B2; Math_StepToF(&this->unk_2C4, 0.075f, 0.005f); - func_800B9010(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); } void func_80898124(EnPeehat* this) { @@ -569,7 +569,7 @@ void func_80898144(EnPeehat* this, PlayState* play) { if (!gSaveContext.save.isNight && (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 1200.0f)) { func_80897864(this); } - func_800B9010(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); } void func_808982E0(EnPeehat* this) { @@ -593,7 +593,7 @@ void func_80898338(EnPeehat* this, PlayState* play) { func_80897864(this); } } - func_800B9010(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); } void func_80898414(EnPeehat* this) { @@ -827,7 +827,7 @@ void EnPeehat_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 1.1f); } } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 1.1f, 0.0275f)) { - func_800B9010(thisx, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 357b08bdd6..11ab66ad83 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -280,9 +280,9 @@ void EnPoSisters_MatchPlayerY(EnPoSisters* this, PlayState* play) { if ((this->color.a == 255) && (this->actionFunc != EnPoSisters_SpinAttack) && (this->actionFunc != EnPoSisters_SpinUp)) { if (this->actionFunc == EnPoSisters_Flee) { - func_800B9010(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } else { - func_800B9010(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 4669b1916a..30d625351b 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -235,7 +235,7 @@ void func_80B2CAA4(EnPoh* this, PlayState* play) { } if (this->unk_197 == 255) { - func_800B9010(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } @@ -270,7 +270,7 @@ void func_80B2CBBC(EnPoh* this, PlayState* play) { } if (this->unk_197 == 255) { - func_800B9010(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } @@ -309,7 +309,7 @@ void func_80B2CD64(EnPoh* this, PlayState* play) { } if (this->unk_197 == 255) { - func_800B9010(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } @@ -435,7 +435,7 @@ void func_80B2D300(EnPoh* this, PlayState* play) { } if (this->unk_18E < 18) { - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); } if (this->unk_18E == 18) { @@ -561,7 +561,7 @@ void func_80B2DB44(EnPoh* this, PlayState* play) { this->actor.world.rot.y = this->actor.shape.rot.y; func_80B2CB60(this); } - func_800B9010(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } void func_80B2DC50(EnPoh* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c index 6b0dcd60a4..a1df0f8adb 100644 --- a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c +++ b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c @@ -374,7 +374,7 @@ void EnRacedog_RaceStart(EnRacedog* this, PlayState* play) { if (DECR(this->raceStartTimer) == 0) { this->raceStartTimer = Rand_S16Offset(50, 50); if (this->extraTimeBeforeRaceStart == 0) { - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); } EnRacedog_ChangeAnim(&this->skelAnime, sAnimationInfo, RACEDOG_ANIM_RUN); @@ -580,7 +580,7 @@ void EnRacedog_CheckForFinish(EnRacedog* this) { sNumberOfDogsFinished++; if (sNumberOfDogsFinished == 1) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, NA_BGM_HORSE_GOAL | SEQ_FLAG_ASYNC); - play_sound(NA_SE_SY_START_SHOT); + Audio_PlaySfx(NA_SE_SY_START_SHOT); } this->raceStatus = RACEDOG_RACE_STATUS_FINISHED; 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 a280e9bfad..bb8f9b9cf0 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 @@ -754,11 +754,11 @@ void func_80B71F3C(EnRailSkb* this, PlayState* play) { void func_80B72100(EnRailSkb* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x13F1, &this->actor); this->unk_400 = 0x13F1; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_StartTextbox(play, 0x13F3, &this->actor); this->unk_400 = 0x13F3; } diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c index 9a0e1864e0..099d92166f 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c @@ -1225,9 +1225,9 @@ s32 EnRailgibud_PerformCutsceneActions(EnRailgibud* this, PlayState* play) { case 3: case 4: if (this->actionFunc == EnRailgibud_SinkIntoGround) { - func_800B9010(&this->actor, NA_SE_EN_REDEAD_WEAKENED_L2 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_REDEAD_WEAKENED_L2 - SFX_FLAG); } else { - func_800B9010(&this->actor, NA_SE_EN_REDEAD_WEAKENED_L1 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_REDEAD_WEAKENED_L1 - SFX_FLAG); } break; diff --git a/src/overlays/actors/ovl_En_Rat/z_en_rat.c b/src/overlays/actors/ovl_En_Rat/z_en_rat.c index e08cb5574b..d61da6f4d0 100644 --- a/src/overlays/actors/ovl_En_Rat/z_en_rat.c +++ b/src/overlays/actors/ovl_En_Rat/z_en_rat.c @@ -709,7 +709,7 @@ void EnRat_ChasePlayer(EnRat* this, PlayState* play) { this->animLoopCounter = 5; } - func_800B9010(&this->actor, NA_SE_EN_BOMCHU_RUN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_BOMCHU_RUN - SFX_FLAG); EnRat_UpdateSparkOffsets(this); } diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index 6ea51586a9..cfb8f82ea1 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -88,6 +88,6 @@ void EnRiverSound_Draw(Actor* thisx, PlayState* play) { if (params < RS_RIVER_DEFAULT_LOW_FREQ) { Actor_PlaySfx(&this->actor, gAudioEnvironmentalSfx[params]); } else { - Audio_PlaySfxForRiver(&this->actor.projectedPos, freqScale[this->soundFreqIndex]); + Audio_PlaySfx_River(&this->actor.projectedPos, freqScale[this->soundFreqIndex]); } } 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 cb16e5f39d..71efe8cf9a 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -868,7 +868,7 @@ void EnRr_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.425f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.85f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.85f, 0.02125f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } 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 dfff2735c7..62db8ff6fc 100644 --- a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c +++ b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c @@ -611,7 +611,7 @@ void EnRuppecrow_FallToDespawn(EnRuppecrow* this, PlayState* play) { this->unk_2CC = (this->unk_2C8 + 1.0f) * 0.25f; this->unk_2CC = CLAMP_MAX(this->unk_2CC, 0.5f); } else if (!Math_StepToF(&this->iceSfxTimer, 0.5f, 0.0125f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } this->actor.colorFilterTimer = 40; diff --git a/src/overlays/actors/ovl_En_Rz/z_en_rz.c b/src/overlays/actors/ovl_En_Rz/z_en_rz.c index e980d1cb58..52b2ac2965 100644 --- a/src/overlays/actors/ovl_En_Rz/z_en_rz.c +++ b/src/overlays/actors/ovl_En_Rz/z_en_rz.c @@ -362,7 +362,7 @@ s32 func_80BFBE70(EnRz* this, PlayState* play) { u16 cueId; if ((EN_RZ_GET_SISTER(&this->actor) == EN_RZ_JUDO) && (this->animIndex == EN_RZ_ANIM_APPLAUDING)) { - func_800B9010(&this->actor, NA_SE_EV_CLAPPING_2P - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_CLAPPING_2P - SFX_FLAG); } if (Cutscene_IsCueInChannel(play, this->cueType)) { diff --git a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c index cd3e1f65f9..96b4edea07 100644 --- a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c +++ b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c @@ -697,23 +697,23 @@ u16 EnSGoro_BombshopGoron_NextTextId(EnSGoro* this, PlayState* play) { if (this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_YESBUY) { if (AMMO(ITEM_POWDER_KEG) != 0) { this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return 0x673; } this->powderKegPrice = play->msgCtx.unk1206C; if (gSaveContext.save.saveInfo.playerData.rupees < this->powderKegPrice) { this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED; - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return 0x674; } if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; - func_8019F208(); + Audio_PlaySfx_MessageDecide(); return 0x676; } this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; - func_8019F208(); + Audio_PlaySfx_MessageDecide(); return 0x675; } if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { @@ -1236,7 +1236,7 @@ void EnSGoro_ShopGoron_Talk(EnSGoro* this, PlayState* play) { this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_YESBUY; break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->bombbuyFlags &= ~EN_S_GORO_BOMBBUYFLAG_YESBUY; break; } diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c index cf634321eb..fcce6b288c 100644 --- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c +++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c @@ -335,12 +335,12 @@ void func_80BCB6D0(EnScopenuts* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: if (gSaveContext.save.saveInfo.playerData.rupees < this->unk_358) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_33C = 0x1636; this->unk_328 |= 1; Message_StartTextbox(play, this->unk_33C, &this->actor); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; Rupees_ChangeBy(-this->unk_358); @@ -348,7 +348,7 @@ void func_80BCB6D0(EnScopenuts* this, PlayState* play) { } break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); if (this->unk_358 == 150) { this->unk_33C = 0x1633; } else { @@ -757,7 +757,7 @@ void EnScopenuts_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->unk_328 & 8) { - func_800B9010(&this->actor, NA_SE_EN_AKINDO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_AKINDO_FLY - SFX_FLAG); } func_80BCAE78(this, play); } diff --git a/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c b/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c index 1e1f19d70d..b6717aac04 100644 --- a/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c +++ b/src/overlays/actors/ovl_En_Sekihi/z_en_sekihi.c @@ -119,15 +119,15 @@ void func_80A44F40(EnSekihi* this, PlayState* play) { if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1019)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x101A); break; case 1: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x101B); break; case 2: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_CloseTextbox(play); this->actionFunc = func_80A450B0; break; diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c index 73edc4267d..7210e453bd 100644 --- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c +++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c @@ -1051,7 +1051,7 @@ void EnSellnuts_Update(Actor* thisx, PlayState* play) { Actor_MoveWithGravity(&this->actor); this->actionFunc(this, play); if (this->unk_338 & 8) { - func_800B9010(&this->actor, NA_SE_EN_AKINDO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_AKINDO_FLY - SFX_FLAG); } func_80ADADD0(this, play); } diff --git a/src/overlays/actors/ovl_En_Slime/z_en_slime.c b/src/overlays/actors/ovl_En_Slime/z_en_slime.c index 6675f6b45a..5cb8f6ddcb 100644 --- a/src/overlays/actors/ovl_En_Slime/z_en_slime.c +++ b/src/overlays/actors/ovl_En_Slime/z_en_slime.c @@ -1154,7 +1154,7 @@ void EnSlime_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.2f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.4f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.4f, 0.01f)) { - func_800B9010(thisx, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c index e22a5a73b8..e86c8f7ad9 100644 --- a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c +++ b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c @@ -356,9 +356,9 @@ void EnSnowman_MoveSnowPile(EnSnowman* this, PlayState* play) { SkelAnime_Update(&this->snowPileSkelAnime); if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_LARGE) { - func_800B9010(&this->actor, NA_SE_EN_YMAJIN_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_YMAJIN_MOVE - SFX_FLAG); } else { - func_800B9010(&this->actor, NA_SE_EN_YMAJIN_MINI_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_YMAJIN_MINI_MOVE - SFX_FLAG); } if (this->work.timer > 0) { diff --git a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c index 3cd33653b4..b7aa74f902 100644 --- a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c +++ b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c @@ -526,7 +526,7 @@ void EnSob1_TalkToShopkeeper(PlayState* play, EnSob1* this) { } void EnSob1_SetupLookToShopkeeperFromShelf(PlayState* play, EnSob1* this) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); this->drawCursor = 0; EnSob1_SetupAction(this, EnSob1_LookToShopkeeperFromShelf); } @@ -649,12 +649,12 @@ void EnSob1_Hello(EnSob1* this, PlayState* play) { s32 EnSob1_FacingShopkeeperDialogResult(EnSob1* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); EnSob1_TalkToShopkeeper(play, this); return true; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); if (this->shopType == BOMB_SHOP) { EnSob1_BombShopkeeper_EndInteraction(this, play); } else { @@ -697,7 +697,7 @@ void EnSob1_FaceShopkeeper(EnSob1* this, PlayState* play) { EnSob1_SetupAction(this, EnSob1_LookToShelf); func_8011552C(play, DO_ACTION_DECIDE); this->stickRightPrompt.isEnabled = false; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -912,13 +912,13 @@ s32 EnSob1_HasPlayerSelectedItem(PlayState* play, EnSob1* this, Input* input) { if (!item->isOutOfStock) { this->prevActionFunc = this->actionFunc; Message_ContinueTextbox(play, this->items[this->cursorIndex]->choiceTextId); - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); this->stickLeftPrompt.isEnabled = false; this->stickRightPrompt.isEnabled = false; this->drawCursor = 0; EnSob1_SetupAction(this, EnSob1_SelectItem); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } return true; } @@ -946,7 +946,7 @@ void EnSob1_BrowseShelf(EnSob1* this, PlayState* play) { cursorIndex = this->cursorIndex; if (cursorIndex != prevCursorIndex) { Message_ContinueTextbox(play, this->items[cursorIndex]->actor.textId); - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -985,7 +985,7 @@ void EnSob1_HandleCanBuyItem(PlayState* play, EnSob1* this) { CutsceneManager_Stop(this->csId); this->cutsceneState = ENSOB1_CUTSCENESTATE_STOPPED; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item2 = this->items[this->cursorIndex]; item2->buyFanfareFunc(play, item2); EnSob1_SetupBuyItemWithFanfare(play, this); @@ -995,7 +995,7 @@ void EnSob1_HandleCanBuyItem(PlayState* play, EnSob1* this) { break; case CANBUY_RESULT_SUCCESS_2: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item->buyFunc(play, item); if ((this->shopType == GORON_SHOP) && (item->actor.params == SI_POTION_RED_5)) { EnSob1_SetupCanBuy(play, this, 0xBD7); @@ -1012,42 +1012,42 @@ void EnSob1_HandleCanBuyItem(PlayState* play, EnSob1* this) { break; case CANBUY_RESULT_NO_ROOM: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, sNoRoomTextIds[this->shopType]); break; case CANBUY_RESULT_NEED_EMPTY_BOTTLE: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, sNeedEmptyBottleTextIds[this->shopType]); break; case CANBUY_RESULT_NEED_RUPEES: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, sNeedRupeesTextIds[this->shopType]); break; case CANBUY_RESULT_CANNOT_GET_NOW: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, sCannotGetNowTextIds[this->shopType]); break; case CANBUY_RESULT_CANNOT_GET_NOW_2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, sCannotGetNow2TextIds[this->shopType]); break; case CANBUY_RESULT_NO_ROOM_2: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, sNoRoom2TextIds[this->shopType]); break; case CANBUY_RESULT_ALREADY_HAVE: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, 0x658); break; case CANBUY_RESULT_HAVE_BETTER: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnSob1_SetupCannotBuy(play, this, 0x659); break; @@ -1068,7 +1068,7 @@ void EnSob1_SelectItem(EnSob1* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actionFunc = this->prevActionFunc; Message_ContinueTextbox(play, this->items[this->cursorIndex]->actor.textId); break; diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 3bc1f55fdb..a5cb80095f 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -127,7 +127,7 @@ void EnStream_Update(Actor* thisx, PlayState* play) { EnStream* this = THIS; this->actionFunc(this, play); - func_800B8FE8(&this->actor, NA_SE_EV_WHIRLPOOL - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_WHIRLPOOL - SFX_FLAG); } void EnStream_Draw(Actor* thisx, PlayState* play) { 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 12d8d22a8a..2dc3ca94ef 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -483,7 +483,7 @@ void func_80BAAFDC(EnSuttari* this, PlayState* play) { SOLDERSRCHBALL_INVISIBLE); } if (this->playerDetected == true) { - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); this->playerDetected = false; this->actor.speed = 0.0f; if (this->unk1F4[0] != 0) { @@ -516,7 +516,7 @@ void func_80BAB1A0(EnSuttari* this, PlayState* play) { SOLDERSRCHBALL_INVISIBLE); } if (this->playerDetected == true) { - play_sound(NA_SE_SY_FOUND); + Audio_PlaySfx(NA_SE_SY_FOUND); this->playerDetected = false; this->actor.speed = 0.0f; if (this->unk1F4[0] != 0) { @@ -1417,13 +1417,13 @@ void func_80BADA9C(EnSuttari* this, PlayState* play) { } else if ((talkstate == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->flags1 |= 0x800; func_80BAAB78(this, play); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); func_80BAAB78(this, play); break; 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 2f32734a42..383f1c165e 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -1034,7 +1034,7 @@ void func_808DAEB4(EnSw* this, PlayState* play) { sp5C.z += this->unk_368.z * 10.0f; if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_SI, sp5C.x, sp5C.y, sp5C.z, 0, 0, 0, this->actor.params) != NULL) { - play_sound(NA_SE_SY_KINSTA_MARK_APPEAR); + Audio_PlaySfx(NA_SE_SY_KINSTA_MARK_APPEAR); } Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c index af419ba236..7972bed61e 100644 --- a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c +++ b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c @@ -259,7 +259,7 @@ static Vec3f sAccel = { 0.0f, 0.0f, 0.0f }; void EnSyatekiCrow_UpdateDamage(EnSyatekiCrow* this, PlayState* play) { if (this->actionFunc == EnSyatekiCrow_Fly) { if (this->collider.base.acFlags & AC_HIT) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); this->deathTimer = 0; this->collider.base.acFlags &= ~AC_HIT; EffectSsExtra_Spawn(play, &this->actor.world.pos, &sVelocity, &sAccel, 5, 1); diff --git a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c index ee9c635363..ae04a34015 100644 --- a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c +++ b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c @@ -430,7 +430,7 @@ void EnSyatekiDekunuts_Update(Actor* thisx, PlayState* play) { if (EN_SYATEKI_DEKUNUTS_GET_TYPE(&this->actor) == EN_SYATEKI_DEKUNUTS_TYPE_BONUS) { Audio_PlayFanfare(NA_BGM_GET_ITEM | 0x900); } else { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } this->collider.base.acFlags &= ~AC_HIT; diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 150aa6da70..3e9ac9a40f 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -318,13 +318,13 @@ void EnSyatekiMan_Swamp_HandleChoice(EnSyatekiMan* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { if (CUR_UPG_VALUE(UPG_QUIVER) == 0) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); // You don't have a bow! Message_StartTextbox(play, 0xA30, &this->actor); this->prevTextId = 0xA30; } else if (gSaveContext.save.saveInfo.playerData.rupees < 20) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); // You don't have enough rupees! Message_StartTextbox(play, 0xA31, &this->actor); @@ -335,7 +335,7 @@ void EnSyatekiMan_Swamp_HandleChoice(EnSyatekiMan* this, PlayState* play) { this->shootingGameState = SG_GAME_STATE_NOT_PLAYING; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-20); SET_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT); CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED); @@ -346,7 +346,7 @@ void EnSyatekiMan_Swamp_HandleChoice(EnSyatekiMan* this, PlayState* play) { this->actionFunc = EnSyatekiMan_Swamp_MovePlayerAndExplainRules; } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); switch (CURRENT_DAY) { case 1: @@ -613,7 +613,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { if (CUR_UPG_VALUE(UPG_QUIVER) == 0) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); if (CURRENT_DAY != 3) { // You don't have a bow? Then you can't play. Message_StartTextbox(play, 0x3F9, &this->actor); @@ -624,7 +624,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) { this->prevTextId = 0x3FA; } } else if (gSaveContext.save.saveInfo.playerData.rupees < 20) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); if (CURRENT_DAY != 3) { // You don't have a enough rupees! Message_StartTextbox(play, 0x3FB, &this->actor); @@ -642,7 +642,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) { this->shootingGameState = SG_GAME_STATE_NOT_PLAYING; } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Rupees_ChangeBy(-20); this->shootingGameState = SG_GAME_STATE_EXPLAINING_RULES; if (!(this->talkFlags & TALK_FLAG_TOWN_HAS_EXPLAINED_THE_RULES)) { @@ -660,7 +660,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) { CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED); } } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); if (CURRENT_DAY != 3) { // Well, be that way! Message_StartTextbox(play, 0x3F7, &this->actor); diff --git a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c index 347d78088e..8a96967678 100644 --- a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c +++ b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c @@ -452,7 +452,7 @@ void EnSyatekiWf_Update(Actor* thisx, PlayState* play2) { Audio_PlayFanfare(NA_BGM_GET_ITEM | 0x900); EnSyatekiWf_SetupDead(this, play); } else { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); EffectSsExtra_Spawn(play, &this->actor.world.pos, &sVelocity, &sAccel, 3, 0); } } diff --git a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c index 84d0b7dd11..c064864172 100644 --- a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c +++ b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c @@ -879,7 +879,7 @@ void EnTalkGibud_Disappear(EnTalkGibud* this, PlayState* play) { velocity.z += Rand_Centered() * 1.5f; func_800B3030(play, &pos, &velocity, &accel, 100, 0, 1); } - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); player->stateFlags1 |= PLAYER_STATE1_20000000; this->disappearanceTimer--; } else { diff --git a/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c b/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c index c716760619..2999899b90 100644 --- a/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c +++ b/src/overlays/actors/ovl_En_Tanron1/z_en_tanron1.c @@ -354,9 +354,9 @@ void func_80BB5318(EnTanron1* this, PlayState* play) { if (spB4 != NULL) { SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, spB4, &this->unk_3360, &spB0); if (spB8 >= (s16)(KREG(39) + 20)) { - Audio_PlaySfxAtPos(&this->unk_3360, NA_SE_EN_MB_MOTH_DEAD); + Audio_PlaySfx_AtPos(&this->unk_3360, NA_SE_EN_MB_MOTH_DEAD); } else if (spBA >= 20) { - Audio_PlaySfxAtPos(&this->unk_3360, NA_SE_EN_MB_MOTH_FLY - SFX_FLAG); + Audio_PlaySfx_AtPos(&this->unk_3360, NA_SE_EN_MB_MOTH_FLY - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c index a56b01c3b1..290bb27750 100644 --- a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c +++ b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c @@ -465,7 +465,7 @@ void func_80BE5818(Actor* thisx, PlayState* play2) { Item_Give(play, ITEM_MAGIC_LARGE); } Actor_Kill(&this->actor); - play_sound(NA_SE_SY_GET_ITEM); + Audio_PlaySfx(NA_SE_SY_GET_ITEM); } else { this->unk_1A1 = 20; func_800B8D50(play, NULL, 5.0f, this->actor.world.rot.y, 0.0f, 8); diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c index 2000e0e53a..82ee7c7fab 100644 --- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c +++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c @@ -412,9 +412,9 @@ s32 func_80A3EC30(EnTest3* this, PlayState* play) { s32 func_80A3EC44(EnTest3* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex != 0) { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); } if (play->msgCtx.choiceIndex != 0) { return 1; diff --git a/src/overlays/actors/ovl_En_Test4/z_en_test4.c b/src/overlays/actors/ovl_En_Test4/z_en_test4.c index 233ecc9ec0..3c1a5958dd 100644 --- a/src/overlays/actors/ovl_En_Test4/z_en_test4.c +++ b/src/overlays/actors/ovl_En_Test4/z_en_test4.c @@ -73,9 +73,9 @@ void func_80A41D70(EnTest4* this, PlayState* play) { this->transitionCsTimer = 0; SET_EVENTINF(EVENTINF_17); } else if (this->csIdIndex == 0) { - play_sound(NA_SE_EV_CHICKEN_CRY_M); + Audio_PlaySfx(NA_SE_EV_CHICKEN_CRY_M); } else { - func_8019F128(NA_SE_EV_DOG_CRY_EVENING); + Audio_PlaySfx_2(NA_SE_EV_DOG_CRY_EVENING); } } else { this->actionFunc = func_80A42AB8; @@ -110,9 +110,9 @@ void func_80A41FA4(EnTest4* this, PlayState* play) { this->transitionCsTimer = 0; SET_EVENTINF(EVENTINF_17); } else if (this->csIdIndex == 0) { - play_sound(NA_SE_EV_CHICKEN_CRY_M); + Audio_PlaySfx(NA_SE_EV_CHICKEN_CRY_M); } else { - func_8019F128(NA_SE_EV_DOG_CRY_EVENING); + Audio_PlaySfx_2(NA_SE_EV_DOG_CRY_EVENING); } } else { this->actionFunc = func_80A42AB8; @@ -431,7 +431,7 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { this->unk_146 = gSaveContext.save.time += CLOCK_TIME_MINUTE; } } else if ((new_var * bellDiff) <= 0) { - func_801A0124(&this->actor.projectedPos, (this->actor.params >> 5) & 0xF); + Audio_PlaySfx_BigBells(&this->actor.projectedPos, (this->actor.params >> 5) & 0xF); this->lastBellTime = gSaveContext.save.time; if (CURRENT_DAY == 3) { @@ -484,9 +484,9 @@ void func_80A42F20(EnTest4* this, PlayState* play) { this->transitionCsTimer++; if (this->transitionCsTimer == 10) { if (this->csIdIndex == 0) { - play_sound(NA_SE_EV_CHICKEN_CRY_M); + Audio_PlaySfx(NA_SE_EV_CHICKEN_CRY_M); } else { - func_8019F128(NA_SE_EV_DOG_CRY_EVENING); + Audio_PlaySfx_2(NA_SE_EV_DOG_CRY_EVENING); } } if (this->transitionCsTimer == 60) { diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c index 185e11dbdc..462e1e7849 100644 --- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c +++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c @@ -439,9 +439,9 @@ void EnTest6_SetupInvertedSoTCutscene(EnTest6* this, PlayState* play) { this->screenFillAlpha = 0; if (SOTCS_GET_OCARINA_MODE(&this->actor) == OCARINA_MODE_APPLY_INV_SOT_SLOW) { - play_sound(NA_SE_SY_TIME_CONTROL_SLOW); + Audio_PlaySfx(NA_SE_SY_TIME_CONTROL_SLOW); } else if (SOTCS_GET_OCARINA_MODE(&this->actor) == OCARINA_MODE_APPLY_INV_SOT_FAST) { - play_sound(NA_SE_SY_TIME_CONTROL_NORMAL); + Audio_PlaySfx(NA_SE_SY_TIME_CONTROL_NORMAL); } } @@ -773,7 +773,7 @@ void EnTest6_DoubleSoTCutscene(EnTest6* this, PlayState* play) { play->unk_18844 = false; } - func_800B8F98(&player->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&player->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); switch (this->timer) { case 119: diff --git a/src/overlays/actors/ovl_En_Test7/z_en_test7.c b/src/overlays/actors/ovl_En_Test7/z_en_test7.c index fefe92672a..df0e829d4b 100644 --- a/src/overlays/actors/ovl_En_Test7/z_en_test7.c +++ b/src/overlays/actors/ovl_En_Test7/z_en_test7.c @@ -461,7 +461,7 @@ void func_80AF1A2C(EnTest7* this, PlayState* play) { func_80AF082C(this, func_80AF1CA0); this->unk_144 |= 0x20; - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_OPEN); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_OPEN); Play_EnableMotionBlur(120); } } @@ -505,13 +505,13 @@ void func_80AF1CA0(EnTest7* this, PlayState* play) { if ((this->unk_18CC.frameCtrl.unk_10 > 20.0f) && !(this->unk_144 & 0x40)) { this->unk_144 |= 0x40; - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_CLOSE); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_CLOSE); } if (this->unk_18CC.frameCtrl.unk_10 > 42.0f) { if (!(this->unk_144 & 0x80)) { this->unk_144 |= 0x80; - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_ROLL); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_ROLL); } if (Rand_ZeroOne() < 0.3f) { @@ -615,7 +615,7 @@ void func_80AF21E8(EnTest7* this, PlayState* play) { Color_RGB8 ambientColor = { 220, 220, 255 }; if (R_PLAY_FILL_SCREEN_ON) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_VANISH); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_PL_WARP_WING_VANISH); R_PLAY_FILL_SCREEN_ON = false; R_PLAY_FILL_SCREEN_R = 0; R_PLAY_FILL_SCREEN_G = 0; @@ -849,7 +849,7 @@ void func_80AF2C48(EnTest7* this, PlayState* play) { subCam->at.y = this->actor.world.pos.y + 40.0f; subCam->at.z = this->actor.world.pos.z; - func_800B9010(&this->actor, NA_SE_PL_WARP_WING_ROLL_2 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_WARP_WING_ROLL_2 - SFX_FLAG); if (this->unk_1E54 >= 40) { this->unk_144 &= ~4; func_80AF082C(this, func_80AF2F98); @@ -895,7 +895,7 @@ void func_80AF2F98(EnTest7* this, PlayState* play) { Player* player2 = GET_PLAYER(play); Vec3f sp2C; - func_800B9010(&this->actor, NA_SE_PL_WARP_WING_ROLL_2 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_WARP_WING_ROLL_2 - SFX_FLAG); sp2C = this->actor.world.pos; 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 87589ae8c0..6b708a036e 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -1037,7 +1037,7 @@ void EnThiefbird_Update(Actor* thisx, PlayState* play2) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.25f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.5f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.5f, 0.0125f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } 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 1ae0e073b4..08c64f591f 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -1097,7 +1097,7 @@ void EnTite_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.25f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.5f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.5f, 0.0125f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 469e07e6de..71e3446834 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -846,10 +846,10 @@ void func_80AEDF5C(EnTk* this, PlayState* play) { case 0x1407: if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x1409); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x1408); } break; @@ -872,11 +872,11 @@ void func_80AEDF5C(EnTk* this, PlayState* play) { case 0x140D: this->unk_2CA |= 2; if (play->msgCtx.choiceIndex == 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgMode = 0x44; func_80AEE2A8(this, play); } else { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x140E); } break; @@ -1323,7 +1323,7 @@ void EnTk_Update(Actor* thisx, PlayState* play) { if (!(this->unk_2CA & 0x200)) { if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { - func_800B9010(&this->actor, NA_SE_EV_HONEYCOMB_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_HONEYCOMB_FALL - SFX_FLAG); } else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) { Actor_PlaySfx(&this->actor, NA_SE_EV_HUMAN_BOUND); } diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c index 2177742dcf..bfc3ae55bb 100644 --- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c +++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c @@ -423,9 +423,9 @@ s32 func_80BA4128(EnToto* this, PlayState* play) { s32 func_80BA415C(EnToto* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex != 0) { - func_8019F230(); + Audio_PlaySfx_MessageCancel(); } else { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); } return ((play->msgCtx.choiceIndex != 0) ? 0 : this->text->unk1) + 1; } diff --git a/src/overlays/actors/ovl_En_Trt/z_en_trt.c b/src/overlays/actors/ovl_En_Trt/z_en_trt.c index ee9c5aaaec..e4df6cf201 100644 --- a/src/overlays/actors/ovl_En_Trt/z_en_trt.c +++ b/src/overlays/actors/ovl_En_Trt/z_en_trt.c @@ -326,7 +326,7 @@ void EnTrt_Hello(EnTrt* this, PlayState* play) { } } if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { - play_sound(NA_SE_SY_MESSAGE_PASS); + Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS); if (!EnTrt_TestEndInteraction(this, play, CONTROLLER1(&play->state))) { EnTrt_StartShopping(play, this); } @@ -508,12 +508,12 @@ void EnTrt_EndConversation(EnTrt* this, PlayState* play) { s32 EnTrt_FacingShopkeeperDialogResult(EnTrt* this, PlayState* play) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); EnTrt_SetupTalkToShopkeeper(play, this); return true; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnTrt_EndInteraction(play, this); return true; @@ -552,7 +552,7 @@ void EnTrt_FaceShopkeeper(EnTrt* this, PlayState* play) { this->actionFunc = EnTrt_LookToShelf; func_8011552C(play, DO_ACTION_DECIDE); this->stickRightPrompt.isEnabled = false; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -616,13 +616,13 @@ s32 EnTrt_HasPlayerSelectedItem(PlayState* play, EnTrt* this, Input* input) { if ((item->actor.params != SI_POTION_BLUE) || (this->flags & ENTRT_GIVEN_MUSHROOM)) { this->prevActionFunc = this->actionFunc; Message_ContinueTextbox(play, EnTrt_GetItemChoiceTextId(this)); - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); this->stickLeftPrompt.isEnabled = false; this->stickRightPrompt.isEnabled = false; this->drawCursor = 0; this->actionFunc = EnTrt_SelectItem; } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } return true; } @@ -649,7 +649,7 @@ void EnTrt_BrowseShelf(EnTrt* this, PlayState* play) { EnTrt_CursorLeftRight(play, this); if (this->cursorIndex != prevCursorIdx) { Message_ContinueTextbox(play, EnTrt_GetItemTextId(this)); - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -688,7 +688,7 @@ void EnTrt_HandleCanBuyItem(PlayState* play, EnTrt* this) { CutsceneManager_Stop(this->csId); this->cutsceneState = ENTRT_CUTSCENESTATE_STOPPED; } - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item2 = this->items[this->cursorIndex]; item2->buyFanfareFunc(play, item2); EnTrt_SetupBuyItemWithFanfare(play, this); @@ -698,7 +698,7 @@ void EnTrt_HandleCanBuyItem(PlayState* play, EnTrt* this) { break; case CANBUY_RESULT_SUCCESS_2: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); item->buyFunc(play, item); EnTrt_SetupCanBuy(play, this, 0x848); this->drawCursor = 0; @@ -707,22 +707,22 @@ void EnTrt_HandleCanBuyItem(PlayState* play, EnTrt* this) { break; case CANBUY_RESULT_NO_ROOM: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnTrt_SetupCannotBuy(play, this, 0x641); break; case CANBUY_RESULT_NEED_EMPTY_BOTTLE: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnTrt_SetupCannotBuy(play, this, 0x846); break; case CANBUY_RESULT_NEED_RUPEES: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnTrt_SetupCannotBuy(play, this, 0x847); break; case CANBUY_RESULT_CANNOT_GET_NOW: - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnTrt_SetupCannotBuy(play, this, 0x643); break; @@ -745,7 +745,7 @@ void EnTrt_SelectItem(EnTrt* this, PlayState* play) { break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); this->actionFunc = this->prevActionFunc; Message_ContinueTextbox(play, EnTrt_GetItemTextId(this)); break; @@ -756,7 +756,7 @@ void EnTrt_SelectItem(EnTrt* this, PlayState* play) { } } else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { if (!Inventory_HasEmptyBottle()) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); EnTrt_SetupCannotBuy(play, this, 0x846); } else { if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING) { @@ -826,7 +826,7 @@ void EnTrt_IdleSleeping(EnTrt* this, PlayState* play) { this->blinkFunc = EnTrt_OpenThenCloseEyes; } if (DECR(this->sleepSoundTimer) == 0) { - func_800B9010(&this->actor, NA_SE_EN_KOTAKE_SLEEP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_KOTAKE_SLEEP - SFX_FLAG); } } @@ -1146,7 +1146,7 @@ void EnTrt_ContinueShopping(EnTrt* this, PlayState* play) { if (!EnTrt_TestEndInteraction(this, play, CONTROLLER1(&play->state))) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); player->actor.shape.rot.y = BINANG_ROT180(player->actor.shape.rot.y); player->stateFlags2 |= PLAYER_STATE2_20000000; Message_StartTextbox(play, this->textId, &this->actor); @@ -1156,7 +1156,7 @@ void EnTrt_ContinueShopping(EnTrt* this, PlayState* play) { case 1: default: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); EnTrt_EndInteraction(play, this); break; } @@ -1458,7 +1458,7 @@ void EnTrt_SetupTalkToShopkeeper(PlayState* play, EnTrt* this) { } void EnTrt_SetupLookToShopkeeperFromShelf(PlayState* play, EnTrt* this) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); this->drawCursor = 0; this->actionFunc = EnTrt_LookToShopkeeperFromShelf; } diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index 29560fdced..5570e4130c 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -200,7 +200,7 @@ void func_80AD3664(EnTrt2* this, PlayState* play) { CutsceneManager_Queue(this->csId); return; } - func_800B9010(&this->actor, NA_SE_EN_KOTAKE_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_KOTAKE_FLY - SFX_FLAG); } void func_80AD36EC(EnTrt2* this, PlayState* play) { @@ -227,7 +227,7 @@ void func_80AD36EC(EnTrt2* this, PlayState* play) { } } Actor_MoveWithGravity(&this->actor); - func_800B9010(&this->actor, NA_SE_EN_KOTAKE_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_KOTAKE_FLY - SFX_FLAG); if ((this->actor.shape.rot.y >= 0x2800) && (this->actor.shape.rot.y < 0x3800)) { Actor_PlaySfx(&this->actor, NA_SE_EN_KOTAKE_ROLL); } @@ -281,7 +281,7 @@ void func_80AD38B8(EnTrt2* this, PlayState* play) { } Actor_MoveWithoutGravity(&this->actor); - func_800B9010(&this->actor, NA_SE_EN_KOTAKE_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_KOTAKE_FLY - SFX_FLAG); } void func_80AD3A24(EnTrt2* this, PlayState* play) { @@ -505,7 +505,7 @@ void func_80AD434C(EnTrt2* this, PlayState* play) { func_800B3030(play, &sp68, &sp5C, &sp5C, 100, 0, 3); } - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); } } else if (this->actor.world.pos.y < 5.0f) { func_80AD4A78(this, play); diff --git a/src/overlays/actors/ovl_En_Twig/z_en_twig.c b/src/overlays/actors/ovl_En_Twig/z_en_twig.c index a863596101..aefc6385be 100644 --- a/src/overlays/actors/ovl_En_Twig/z_en_twig.c +++ b/src/overlays/actors/ovl_En_Twig/z_en_twig.c @@ -202,7 +202,7 @@ void func_80AC0D2C(EnTwig* this, PlayState* play) { EffectSsKirakira_SpawnDispersed(play, &sp6C, &sKiraVel, &sKiraAccel, &sColorWhite, &sColorYellow, 1000, (s32)(Rand_ZeroOne() * 10.0f) + 20); } - play_sound(NA_SE_SY_GET_ITEM); + Audio_PlaySfx(NA_SE_SY_GET_ITEM); play->interfaceCtx.minigamePoints--; sRingNotCollected[RACERING_GET_PARAM_FE0(&this->dyna.actor)] = true; if (sCurrentRing == RACERING_GET_PARAM_FE0(&this->dyna.actor)) { diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index 2f68391b12..dc2e89a6e9 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -212,7 +212,7 @@ void func_808CC490(EnVm* this, PlayState* play) { Math_ApproachS(&this->unk_216, 0, 0xA, 0x5DC); this->unk_218 -= 0x1F4; - func_800B9010(&this->actor, NA_SE_EN_BIMOS_ROLL_HEAD - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_BIMOS_ROLL_HEAD - SFX_FLAG); if (this->actor.xzDistToPlayer <= this->unk_21C) { if ((this->actor.playerHeightRel <= 80.0f) && (this->actor.playerHeightRel >= -160.0f)) { @@ -446,7 +446,7 @@ void EnVm_Update(Actor* thisx, PlayState* play) { } if (this->unk_224 > 0.0f) { - func_800B9010(&this->actor, NA_SE_EN_BIMOS_LAZER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_BIMOS_LAZER - SFX_FLAG); } this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index c8ef2638ef..398da4925a 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -498,7 +498,7 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) { Math_StepToF(&this->actor.world.pos.z, player->actor.world.pos.z, 3.0f); if (this->timer == 30) { - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); func_80169FDC(&play->state); } } @@ -651,7 +651,7 @@ void EnWallmas_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = (this->drawDmgEffAlpha + 1.0f) * 0.275f; this->drawDmgEffScale = CLAMP_MAX(this->drawDmgEffScale, 0.55f); } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.55f, 0.01375f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c index dd1fa60e1e..e4cb566abf 100644 --- a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c +++ b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c @@ -243,7 +243,7 @@ void EnWarpTag_GrottoReturn(EnWarptag* this, PlayState* play) { play->nextEntrance = play->setupExitList[WARPTAG_GET_EXIT_INDEX(&this->dyna.actor)]; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; - func_8019F128(NA_SE_OC_SECRET_HOLE_OUT); + Audio_PlaySfx_2(NA_SE_OC_SECRET_HOLE_OUT); func_801A4058(5); gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.ambienceId = AMBIENCE_ID_DISABLED; 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 26301730f2..d42cb32b3e 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -1205,7 +1205,7 @@ void func_80992E0C(EnWf* this, PlayState* play) { func_800B3030(play, &sp60, &D_809942F0, &D_809942F0, 100, 0, 2); } - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); } } @@ -1534,7 +1534,7 @@ void EnWf_Update(Actor* thisx, PlayState* play) { this->drawDmgEffScale = this->drawDmgEffScale; } } else if (!Math_StepToF(&this->drawDmgEffFrozenSteamScale, 0.75f, 0.01875f)) { - func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_En_Yb/z_en_yb.c b/src/overlays/actors/ovl_En_Yb/z_en_yb.c index 94d64903a7..f61a7a2011 100644 --- a/src/overlays/actors/ovl_En_Yb/z_en_yb.c +++ b/src/overlays/actors/ovl_En_Yb/z_en_yb.c @@ -234,7 +234,7 @@ void EnYb_ChangeCutscene(EnYb* this, s16 csIdIndex) { * Sets a flag that enables the Kamaro dancing proximity music at night. */ void EnYb_EnableProximityMusic(EnYb* this) { - func_800B9084(&this->actor); + Actor_PlaySeq_FlaggedKamaroDance(&this->actor); } void EnYb_Disappear(EnYb* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Zob/z_en_zob.c b/src/overlays/actors/ovl_En_Zob/z_en_zob.c index cdf6b17661..30d1594357 100644 --- a/src/overlays/actors/ovl_En_Zob/z_en_zob.c +++ b/src/overlays/actors/ovl_En_Zob/z_en_zob.c @@ -371,14 +371,14 @@ void func_80BA00BC(EnZob* this, PlayState* play) { if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1212)) { switch (play->msgCtx.choiceIndex) { case 1: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x1209); this->unk_304 = 1; func_80B9F7E4(this, 2, ANIMMODE_ONCE); break; case 0: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x1213); break; } @@ -456,13 +456,13 @@ void func_80BA0374(EnZob* this, PlayState* play) { if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1205)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x1207); func_80B9F7E4(this, 2, ANIMMODE_ONCE); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x1206); break; } diff --git a/src/overlays/actors/ovl_En_Zod/z_en_zod.c b/src/overlays/actors/ovl_En_Zod/z_en_zod.c index d032b65798..9ac11523cc 100644 --- a/src/overlays/actors/ovl_En_Zod/z_en_zod.c +++ b/src/overlays/actors/ovl_En_Zod/z_en_zod.c @@ -315,12 +315,12 @@ void func_80BAF7CC(EnZod* this, PlayState* play) { if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x121F)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x1220); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x1223); break; } diff --git a/src/overlays/actors/ovl_En_Zog/z_en_zog.c b/src/overlays/actors/ovl_En_Zog/z_en_zog.c index 96de52b88b..0517159d4a 100644 --- a/src/overlays/actors/ovl_En_Zog/z_en_zog.c +++ b/src/overlays/actors/ovl_En_Zog/z_en_zog.c @@ -667,14 +667,14 @@ void func_80B946FC(EnZog* this, PlayState* play) { if (Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgLength = 0; this->actionFunc = func_80B946B4; func_80B93BA8(this, 1); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x1014); break; } diff --git a/src/overlays/actors/ovl_En_Zot/z_en_zot.c b/src/overlays/actors/ovl_En_Zot/z_en_zot.c index 98adea93a5..5ffccb77b6 100644 --- a/src/overlays/actors/ovl_En_Zot/z_en_zot.c +++ b/src/overlays/actors/ovl_En_Zot/z_en_zot.c @@ -988,12 +988,12 @@ void func_80B98728(EnZot* this, PlayState* play) { if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x1293)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); Message_ContinueTextbox(play, 0x1294); break; case 1: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_ContinueTextbox(play, 0x1298); break; } diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index 61b172ea73..412687b7f5 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -383,7 +383,7 @@ void MirRay_Update(Actor* thisx, PlayState* play) { MirRay_MakeShieldLight(this, play); if (this->reflectIntensity > 0.0f) { - func_800B8F98(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c b/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c index ae8c81f26c..520684fb78 100644 --- a/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c +++ b/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c @@ -139,7 +139,7 @@ void MirRay3_Update(Actor* thisx, PlayState* play) { } if (this->unk_214 > 0.1f) { - func_800B8F98(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); } Math_ApproachZeroF(&this->unk_214, 1.0f, 0.1f); diff --git a/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c b/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c index f41b8057c4..cec65a32c5 100644 --- a/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c +++ b/src/overlays/actors/ovl_Obj_Armos/z_obj_armos.c @@ -298,7 +298,7 @@ void func_809A562C(ObjArmos* this, PlayState* play) { func_809A57D8(this); } } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 003b949323..7d1f748f33 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -597,7 +597,7 @@ void func_809381C4(ObjBean* this, PlayState* play) { func_80938284(this); } else if (this->unk_1E4 == 4) { CutsceneManager_Stop(this->dyna.actor.csId); - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_1E4 = 0; func_80937FB0(this); } else { @@ -619,7 +619,7 @@ void func_80938298(ObjBean* this, PlayState* play) { func_8093833C(this); } else if (this->unk_1E4 == 4) { CutsceneManager_Stop(this->dyna.actor.csId); - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); this->unk_1E4 = 0; func_80937FB0(this); } @@ -670,7 +670,7 @@ void func_80938444(ObjBean* this, PlayState* play) { } else { this->unk_1B2 = 1; } - func_800B9010(&this->dyna.actor, NA_SE_PL_PLANT_GROW_UP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_PLANT_GROW_UP - SFX_FLAG); } void func_809384E8(ObjBean* this) { @@ -785,7 +785,7 @@ void func_809388A8(ObjBean* this, PlayState* play) { func_809372A8(this); func_8093892C(this); } else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { - func_800B9010(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); } func_80936F24(this); } @@ -889,7 +889,7 @@ void func_80938C1C(Actor* thisx, PlayState* play) { if (this->unk_1DF > 0) { this->unk_1DF--; if (this->unk_1DF == 0) { - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } } diff --git a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c index 6c81e8de66..cf2ef3ded7 100644 --- a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c +++ b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c @@ -140,7 +140,7 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) { Math_StepToF(&this->dyna.actor.speed, speedTarget, 0.05f); Actor_MoveWithGravity(&this->dyna.actor); if (this->dyna.actor.speed != 0.0f) { - func_800B9010(&this->dyna.actor, NA_SE_EV_PIRATE_SHIP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_PIRATE_SHIP - SFX_FLAG); } } ObjBoat_SetRotations(this); @@ -188,7 +188,7 @@ void ObjBoat_UpdateCutscene(Actor* thisx, PlayState* play2) { if (cue->id != 3) { ObjBoat_SetRotations(this); if (cue->id == 2) { - func_800B9010(&this->dyna.actor, NA_SE_EV_PIRATE_SHIP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_PIRATE_SHIP - SFX_FLAG); } } else { // Tumble in the air diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index c8eed614b2..a2ecc448e2 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -345,7 +345,7 @@ void func_80939EF4(ObjBombiwa* this, PlayState* play) { Flags_SetSwitch(play, OBJBOMBIWA_GET_7F(&this->actor)); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 80, NA_SE_EV_WALL_BROKEN); if (OBJBOMBIWA_GET_8000(&this->actor)) { - play_sound(NA_SE_SY_CORRECT_CHIME); + Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME); } if (params == OBJBOMBIWA_100_0) { diff --git a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c index d1f19032fa..1f20f21362 100644 --- a/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c +++ b/src/overlays/actors/ovl_Obj_Chan/z_obj_chan.c @@ -282,7 +282,7 @@ void ObjChan_ChandelierAction(ObjChan* this, PlayState* play) { Math_StepToF(&this->flameSize, 1.0f, 0.05f); this->rotation += this->rotationSpeed; Math_StepToS(&this->rotationSpeed, OBJCHAN_ROTATION_SPEED, 5); - func_800B9010(&this->actor, NA_SE_EV_CHANDELIER_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_CHANDELIER_ROLL - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 1f3f7f902b..946791a8b0 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -309,7 +309,7 @@ void func_8098D99C(ObjComb* this, PlayState* play) { temp_v0->speed = 2.0f; } this->unk_1B6 = 1; - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); } } } @@ -469,7 +469,7 @@ void func_8098DEA0(ObjComb* this, PlayState* play) { if (this->unk_1B0 > 0x258) { this->unk_1B0 = 0x258; } - func_800B9010(&this->actor, NA_SE_EV_HONEYCOMB_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_HONEYCOMB_FALL - SFX_FLAG); } Actor_MoveWithGravity(&this->actor); diff --git a/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c b/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c index e672780dec..771833c58c 100644 --- a/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c +++ b/src/overlays/actors/ovl_Obj_Fireshield/z_obj_fireshield.c @@ -362,7 +362,7 @@ void ObjFireshield_Update(Actor* thisx, PlayState* play) { this->collider.dim.yShift = thisx->home.pos.y - thisx->world.pos.y; } - func_800B9010(thisx, NA_SE_EV_BURNING - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_BURNING - SFX_FLAG); if (player->transformation == PLAYER_FORM_GORON) { this->collider.info.toucher.damage = 0; 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 85e628359e..b7fc601e34 100644 --- a/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c +++ b/src/overlays/actors/ovl_Obj_Ghaka/z_obj_ghaka.c @@ -107,19 +107,19 @@ void func_80B3C4E0(ObjGhaka* this, PlayState* play) { if (Message_ShouldAdvance(play)) { switch (play->msgCtx.choiceIndex) { case 0: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->dyna.actor.textId = 0xCF5; Message_StartTextbox(play, this->dyna.actor.textId, &this->dyna.actor); break; case 1: - func_8019F208(); + Audio_PlaySfx_MessageDecide(); this->dyna.actor.textId = 0xCF7; Message_StartTextbox(play, this->dyna.actor.textId, &this->dyna.actor); break; case 2: - func_8019F230(); + Audio_PlaySfx_MessageCancel(); play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; func_80B3C260(this); @@ -141,9 +141,9 @@ void func_80B3C624(ObjGhaka* this, PlayState* play) { func_80B3C2C4(this, play); SET_WEEKEVENTREG(WEEKEVENTREG_20_20); func_80B3C260(this); - Audio_PlaySfxAtPos(&D_80B3C960, NA_SE_EV_BLOCK_BOUND); + Audio_PlaySfx_AtPos(&D_80B3C960, NA_SE_EV_BLOCK_BOUND); } else { - Audio_PlaySfxAtPos(&D_80B3C960, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Audio_PlaySfx_AtPos(&D_80B3C960, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c b/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c index ffc3558e65..5c63e05611 100644 --- a/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c +++ b/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.c @@ -81,7 +81,7 @@ void ObjHsStump_SetupAppear(ObjHsStump* this, PlayState* play) { this->framesAppeared = 0; this->rotAngle = 0; this->rotFactor = 3640.0f; - func_8019F128(NA_SE_EN_NPC_APPEAR); + Audio_PlaySfx_2(NA_SE_EN_NPC_APPEAR); this->actionFunc = ObjHsStump_Appear; } diff --git a/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c b/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c index 7559c4db76..64dbaa034d 100644 --- a/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c +++ b/src/overlays/actors/ovl_Obj_Hunsui/z_obj_hunsui.c @@ -634,7 +634,7 @@ void ObjHunsui_Draw(Actor* thisx, PlayState* play) { if (this->unk_172 & 0x10) { f32 temp_f8 = (this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) / 800.0f; - func_8019FAD8(&this->dyna.actor.projectedPos, NA_SE_EV_WATER_PILLAR - SFX_FLAG, 1.0f + temp_f8); + Audio_PlaySfx_AtPosWithFreq(&this->dyna.actor.projectedPos, NA_SE_EV_WATER_PILLAR - SFX_FLAG, 1.0f + temp_f8); } if (!(this->unk_172 & 2)) { @@ -650,7 +650,7 @@ void func_80B9DA60(Actor* thisx, PlayState* play) { if (this->unk_172 & 0x10) { temp = 1.0f + ((this->unk_178 - 240.0f) / 270.0f); - func_8019FAD8(&this->dyna.actor.projectedPos, NA_SE_EV_WATER_PILLAR - SFX_FLAG, 1.0f + temp); + Audio_PlaySfx_AtPosWithFreq(&this->dyna.actor.projectedPos, NA_SE_EV_WATER_PILLAR - SFX_FLAG, 1.0f + temp); } if ((this->dyna.actor.flags & ACTOR_FLAG_40) && !(this->unk_172 & 2)) { diff --git a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c index 0ae8abe186..edeb9e2696 100644 --- a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c +++ b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c @@ -1181,7 +1181,7 @@ void func_80A25E50(ObjIceblock* this, PlayState* play) { func_80A2541C(this, play); func_80A25CF4(this); } else { - func_800B9010(&this->dyna.actor, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); } } @@ -1267,7 +1267,7 @@ void func_80A26144(ObjIceblock* this, PlayState* play) { func_80A23B88(this); func_80A25FA0(this); } else { - func_800B9010(&this->dyna.actor, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); } func_80A24DD0(this, play); diff --git a/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c b/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c index 608dde82a6..e69995ed24 100644 --- a/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c +++ b/src/overlays/actors/ovl_Obj_Jgame_Light/z_obj_jgame_light.c @@ -123,7 +123,7 @@ void func_80C15474(ObjJgameLight* this, PlayState* play) { } } if (this->flameScaleProportion > 0.1f) { - func_800B9010(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); } temp_a1 = (s32)(Rand_ZeroOne() * 127.0f) + 128; Lights_PointSetColorAndRadius(&this->lightInfo, temp_a1, temp_a1 * 0.7f, 0, this->lightRadius); @@ -138,7 +138,7 @@ void ObjJgameLight_UpdateCollision(ObjJgameLight* this, PlayState* play) { void func_80C15718(ObjJgameLight* this, PlayState* play) { if ((this->actor.colChkInfo.health & OBJLUPYGAMELIFT_IGNITE_FIRE) && !(this->prevHealth & OBJLUPYGAMELIFT_IGNITE_FIRE)) { - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_FLAME_IGNITION); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_FLAME_IGNITION); this->prevHealth = this->actor.colChkInfo.health; } if (this->actor.colChkInfo.health & OBJLUPYGAMELIFT_DISPLAY_CORRECT) { diff --git a/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c b/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c index ee8536caaa..1ca298f795 100644 --- a/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c +++ b/src/overlays/actors/ovl_Obj_Kzsaku/z_obj_kzsaku.c @@ -86,7 +86,7 @@ void ObjKzsaku_Rise(ObjKzsaku* this, PlayState* play) { } } if (this->raisedAmount < 450.0f) { - func_800B9010(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); this->raisedAmount += 15.0f; } else { func_80C08C84(this); diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 408668ecb4..39cb3abd23 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -319,7 +319,7 @@ void ObjLightSwitch_Fade(ObjLightswitch* this, PlayState* play) { return; } - func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // "burn into ashes" + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // "burn into ashes" } void ObjLightswitch_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c index fb219bfeeb..81bbb8ebbe 100644 --- a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c +++ b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c @@ -183,7 +183,7 @@ void func_80BA27C4(ObjNozoki* this, PlayState* play) { func_80BA2790(this); if (D_80BA36B0 == 0) { this->unk_15E = 25; - play_sound(NA_SE_SY_SECOM_WARNING); + Audio_PlaySfx(NA_SE_SY_SECOM_WARNING); } else { this->unk_15E = CutsceneManager_GetLength(this->csId); if (this->unk_15E < 0) { @@ -362,7 +362,7 @@ void func_80BA2C94(ObjNozoki* this, PlayState* play) { play->roomCtx.unk7A[0] = this->dyna.actor.velocity.x; - func_8019FAD8(&gSfxDefaultPos, NA_SE_EV_SECOM_CONVEYOR - SFX_FLAG, this->dyna.actor.speed); + Audio_PlaySfx_AtPosWithFreq(&gSfxDefaultPos, NA_SE_EV_SECOM_CONVEYOR - SFX_FLAG, this->dyna.actor.speed); } void func_80BA3044(ObjNozoki* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c b/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c index 168168f413..2a2d3a611c 100644 --- a/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c +++ b/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c @@ -112,7 +112,7 @@ void func_80AC96D0(ObjOcarinalift* this, PlayState* play) { s32 sp34; Vec3s* temp_v1_2; - func_800B9010(thisx, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); Math_Vec3s_ToVec3f(&sp48, this->unk170 + this->unk168 + this->unk16C); Math_Vec3f_Diff(&sp48, &thisx->world.pos, &thisx->velocity); magnitude = Math3D_Vec3fMagnitude(&thisx->velocity); diff --git a/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c b/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c index 8a124b0ab6..3bedc3ea48 100644 --- a/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c +++ b/src/overlays/actors/ovl_Obj_Pzlblock/z_obj_pzlblock.c @@ -307,7 +307,7 @@ void func_809A3BC0(ObjPzlblock* this, PlayState* play) { func_809A3D1C(this); } } else { - func_800B9010(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c b/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c index 1a63e89cb0..234337d9d1 100644 --- a/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c +++ b/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c @@ -126,7 +126,7 @@ void ObjRaillift_Move(ObjRaillift* this, PlayState* play) { } if (OBJRAILLIFT_GET_TYPE(thisx) == DEKU_FLOWER_PLATFORM) { - func_800B9010(thisx, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index 3871508bae..158d8f8740 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -67,7 +67,7 @@ void func_80973D3C(ObjRoomtimer* this, PlayState* play) { CutsceneManager_Queue(this->actor.csId); this->actionFunc = func_80973DE0; } else if ((this->actor.params != 0x1FF) && (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] == TIMER_STATE_OFF)) { - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); func_80169EFC(&play->state); Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c b/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c index 28ce8cda84..09dd824417 100644 --- a/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c +++ b/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c @@ -567,7 +567,7 @@ void func_80A224A4(ObjSkateblock* this, PlayState* play) { func_80A21D1C(this); sp28 = true; } else { - func_800B9010(&this->dyna.actor, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); } func_80A21CD8(this); diff --git a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c index ec05294d11..c19c537ce7 100644 --- a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c +++ b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c @@ -594,7 +594,7 @@ void func_80B3A500(ObjSnowball2* this, PlayState* play) { func_80B38E88(this, play); } - func_800B9010(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG); } else { func_80B38E20(this); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); 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 1b1ca74a04..bb92d34651 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -211,7 +211,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { if (interaction <= OBJ_SYOKUDAI_INTERACTION_STICK) { if (player->unk_B28 == 0) { player->unk_B28 = 0xD2; - Audio_PlaySfxAtPos(&thisx->projectedPos, NA_SE_EV_FLAME_IGNITION); + Audio_PlaySfx_AtPos(&thisx->projectedPos, NA_SE_EV_FLAME_IGNITION); } else if (player->unk_B28 < 0xC8) { player->unk_B28 = 0xC8; } @@ -280,7 +280,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { } lightIntensity = Rand_ZeroOne() * 127; lightIntensity += 128; - func_800B9010(thisx, NA_SE_EV_TORCH - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_EV_TORCH - SFX_FLAG); } Lights_PointSetColorAndRadius(&this->lightInfo, lightIntensity, lightIntensity * 0.7f, 0, lightRadius); this->flameTexScroll++; diff --git a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c index 61fa2376f2..170eb35ceb 100644 --- a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c +++ b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c @@ -575,7 +575,7 @@ void ObjTokeidai_TowerOpening_RaiseTower(ObjTokeidai* this, PlayState* play) { this->yTranslation += 25; if ((type == OBJ_TOKEIDAI_TYPE_TOWER_CLOCK_CLOCK_TOWN) || (type == OBJ_TOKEIDAI_TYPE_TOWER_CLOCK_TERMINA_FIELD)) { - func_800B9010(&this->actor, NA_SE_EV_CLOCK_TOWER_UP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_CLOCK_TOWER_UP - SFX_FLAG); } } else { type = OBJ_TOKEIDAI_TYPE(&this->actor); diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c index a6085ef513..c571b87ea4 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c @@ -469,9 +469,9 @@ s32 func_80B78764(ObjUm* this, PlayState* play, EnHorse* bandit1, EnHorse* bandi if (this->potsLife[potIndex] != 1) { this->wasPotHit[potIndex] = true; if (this->potsLife[potIndex] == 2) { - Audio_PlaySfxAtPos(&this->potPos[potIndex], NA_SE_EV_MILK_POT_BROKEN); + Audio_PlaySfx_AtPos(&this->potPos[potIndex], NA_SE_EV_MILK_POT_BROKEN); } else { - Audio_PlaySfxAtPos(&this->potPos[potIndex], NA_SE_EV_MILK_POT_DAMAGE); + Audio_PlaySfx_AtPos(&this->potPos[potIndex], NA_SE_EV_MILK_POT_DAMAGE); } this->potsLife[potIndex]--; @@ -517,7 +517,7 @@ s32 func_80B78A54(ObjUm* this, PlayState* play, s32 arg2, EnHorse* arg3, EnHorse Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &arg3->actor.world.pos) - this->dyna.actor.shape.rot.y; this->banditsCollisions[arg2].base.acFlags &= ~AC_HIT; - Audio_PlaySfxAtPos(&arg3->actor.projectedPos, NA_SE_EN_CUTBODY); + Audio_PlaySfx_AtPos(&arg3->actor.projectedPos, NA_SE_EN_CUTBODY); arg3->unk_54C = 0xF; if (Math_SinS(sp36) > 0.0f) { @@ -541,7 +541,7 @@ s32 func_80B78A54(ObjUm* this, PlayState* play, s32 arg2, EnHorse* arg3, EnHorse arg3->rider->actor.colorFilterTimer = 20; Actor_SetColorFilter(&arg3->rider->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40); } - Audio_PlaySfxAtPos(&arg3->actor.projectedPos, NA_SE_EN_CUTBODY); + Audio_PlaySfx_AtPos(&arg3->actor.projectedPos, NA_SE_EN_CUTBODY); } } @@ -830,7 +830,7 @@ s32 func_80B795A0(PlayState* play, ObjUm* this, s32 arg2) { SET_WEEKEVENTREG(WEEKEVENTREG_31_40); if (play->msgCtx.choiceIndex == 0) { player = GET_PLAYER(play); - func_8019F208(); + Audio_PlaySfx_MessageDecide(); SET_WEEKEVENTREG(WEEKEVENTREG_31_80); play->nextEntrance = ENTRANCE(ROMANI_RANCH, 11); if (player->stateFlags1 & PLAYER_STATE1_800000) { @@ -842,7 +842,7 @@ s32 func_80B795A0(PlayState* play, ObjUm* this, s32 arg2) { phi_v1 = true; } else { Actor_ContinueText(play, &this->dyna.actor, 0x33B5); - func_8019F230(); + Audio_PlaySfx_MessageCancel(); Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_CREMIA); phi_v1 = false; } @@ -864,10 +864,10 @@ s32 func_80B795A0(PlayState* play, ObjUm* this, s32 arg2) { case 0x33BD: if (play->msgCtx.choiceIndex == 0) { Actor_ContinueText(play, &this->dyna.actor, 0x33BE); - func_8019F230(); + Audio_PlaySfx_MessageCancel(); } else { Actor_ContinueText(play, &this->dyna.actor, 0x33BF); - func_8019F208(); + Audio_PlaySfx_MessageDecide(); } phi_v1 = false; break; diff --git a/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c b/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c index cc47113a5b..5a67aa663e 100644 --- a/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c +++ b/src/overlays/actors/ovl_Obj_Warpstone/z_obj_warpstone.c @@ -140,7 +140,7 @@ void ObjWarpstone_Update(Actor* thisx, PlayState* play) { this->isTalking = false; } else if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex != 0) { - func_8019F208(); + Audio_PlaySfx_MessageDecide(); play->msgCtx.msgMode = 0x4D; play->msgCtx.unk120D6 = 0; play->msgCtx.unk120D4 = 0; diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c index 54ebe8cc76..6f361294e5 100644 --- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c +++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c @@ -87,7 +87,7 @@ void func_808A7BA0(ObjWturn* this, PlayState* play) { if (Math_ScaledStepToS(&this->actor.shape.rot.z, -0x8000, 0x0200)) { func_808A7C04(this, play); } - func_800B8FE8(&this->actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); Play_SetCameraRoll(play, this->subCamId, this->actor.shape.rot.z); } diff --git a/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c b/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c index 96de17fb0a..791afcd6a8 100644 --- a/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c +++ b/src/overlays/actors/ovl_Obj_Y2lift/z_obj_y2lift.c @@ -83,7 +83,7 @@ void ObjY2lift_Update(Actor* thisx, PlayState* play) { } } else { this->unk15E = false; - func_800B9010(&this->dyna.actor, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); } if (DECR(this->unk15F) != 0) { this->dyna.actor.shape.yOffset = (2.0f * (this->unk15F & 1)) * this->unk15F; diff --git a/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c b/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c index cea1a4e71e..f2085694ad 100644 --- a/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c +++ b/src/overlays/actors/ovl_Obj_Y2shutter/z_obj_y2shutter.c @@ -159,7 +159,7 @@ void ObjY2shutter_Update(Actor* thisx, PlayState* play) { } else { this->isStationary = false; if (shutterType != SHUTTER_BARRED) { - func_800B9010(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 69f56ef2dc..89c9477e0a 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -111,7 +111,7 @@ void ShotSun_TriggerFairy(ShotSun* this, PlayState* play) { this->timer = 50; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, 0, 0, 0x11); - Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR); + Audio_PlaySfx_AtPos(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR); } else { CutsceneManager_Queue(this->actor.csId); } @@ -149,7 +149,7 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) { if (1) {} if (this->collider.base.acFlags & AC_HIT) { - play_sound(NA_SE_SY_CORRECT_CHIME); + Audio_PlaySfx(NA_SE_SY_CORRECT_CHIME); if (INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE) { Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, ITEM_ETC_ARROW_FIRE); diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index c0e0e4a1cf..1b73e8c7f0 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1744,7 +1744,7 @@ void Player_AnimSfx_PlayVoice(Player* this, u16 sfxId) { u16 sfxOffset; if (this->currentMask == PLAYER_MASK_GIANT) { - func_8019F830(&this->actor.projectedPos, sfxId); + Audio_PlaySfx_GiantsMask(&this->actor.projectedPos, sfxId); } else if (this->actor.id == ACTOR_PLAYER) { if (this->currentMask == PLAYER_MASK_SCENTS) { sfxOffset = SFX_VOICE_BANK_SIZE * 7; @@ -1802,7 +1802,7 @@ void Player_AnimSfx_PlayFloorWalk(Player* this, f32 freqVolumeLerp) { } // Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume - func_8019F638(&this->actor.projectedPos, sfxId, freqVolumeLerp); + Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume(&this->actor.projectedPos, sfxId, freqVolumeLerp); } // ANIMSFX_TYPE_FLOOR_JUMP @@ -1846,8 +1846,8 @@ void Player_PlayAnimSfx(Player* this, AnimSfxEntry* entry) { Player_AnimSfx_PlayFloorWalk(this, 0.0f); } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_9)) { // Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume - func_8019F638(&this->actor.projectedPos, this->ageProperties->surfaceSfxIdOffset + NA_SE_PL_WALK_LADDER, - 0.0f); + Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume( + &this->actor.projectedPos, this->ageProperties->surfaceSfxIdOffset + NA_SE_PL_WALK_LADDER, 0.0f); } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_SURFACE)) { Player_PlaySfx(this, entry->sfxId + this->ageProperties->surfaceSfxIdOffset); } @@ -3764,7 +3764,7 @@ u8 sMagicArrowCosts[] = { s32 func_808306F8(Player* this, PlayState* play) { if ((this->heldItemAction >= PLAYER_IA_BOW_FIRE) && (this->heldItemAction <= PLAYER_IA_BOW_LIGHT) && (gSaveContext.magicState != MAGIC_STATE_IDLE)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } else { func_8082F43C(play, this, func_80848BF4); @@ -4248,9 +4248,9 @@ void func_808318C0(PlayState* play) { play->actorCtx.lensActive = true; } - play_sound(play->actorCtx.lensActive ? NA_SE_SY_GLASSMODE_ON : NA_SE_SY_GLASSMODE_OFF); + Audio_PlaySfx(play->actorCtx.lensActive ? NA_SE_SY_GLASSMODE_ON : NA_SE_SY_GLASSMODE_OFF); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } } @@ -4297,12 +4297,12 @@ void func_80831990(PlayState* play, Player* this, ItemId item) { (!(this->stateFlags1 & PLAYER_STATE1_8000000) && BgCheck_EntityCheckCeiling(&play->colCtx, &sp54, &this->actor.world.pos, sPlayerAgeProperties[playerForm].unk_00, &sp5C, &sp58, &this->actor))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } if ((itemAction == PLAYER_IA_MAGIC_BEANS) && (AMMO(ITEM_MAGIC_BEANS) == 0)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } else { this->itemAction = itemAction; this->unk_AA5 = PLAYER_UNKAA5_5; @@ -4314,19 +4314,19 @@ void func_80831990(PlayState* play, Player* this, ItemId item) { ((explosiveType = Player_ExplosiveFromIA(this, itemAction)) > PLAYER_EXPLOSIVE_NONE) && ((AMMO(sPlayerExplosiveInfo[explosiveType].itemId) == 0) || (play->actorCtx.actorLists[ACTORCAT_EXPLOSIVES].length >= 3)))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } else if (itemAction == PLAYER_IA_LENS) { func_808318C0(play); } else if (itemAction == PLAYER_IA_PICTO_BOX) { if (!func_80831814(this, play, PLAYER_UNKAA5_2)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } } else if ((itemAction == PLAYER_IA_NUT) && ((this->transformation != PLAYER_FORM_DEKU) || (this->heldItemButton != 0))) { if (AMMO(ITEM_NUT) != 0) { func_8083A658(play, this); } else { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } } else if ((this->transformation == PLAYER_FORM_HUMAN) && (itemAction >= PLAYER_IA_MASK_MIN) && (itemAction < PLAYER_IA_MASK_GIANT)) { @@ -5416,7 +5416,7 @@ s32 func_80834600(Player* this, PlayState* play) { Player_AnimSfx_PlayVoice(this, NA_SE_VO_LI_TAKEN_AWAY); play->haltAllActors = true; - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); } else if ((this->unk_B75 != 0) && ((this->unk_B75 >= 3) || (this->invincibilityTimer == 0))) { u8 sp6C[] = { 0, 2, 1, 1 }; @@ -5685,7 +5685,7 @@ s32 func_80835428(PlayState* play, Player* this) { func_80834104(play, this); Player_AnimationPlayLoop(play, this, &gPlayerAnim_link_normal_landing_wait); Player_AnimSfx_PlayVoice(this, NA_SE_VO_LI_FALL_S); - func_8019F128(NA_SE_OC_SECRET_WARP_IN); + Audio_PlaySfx_2(NA_SE_OC_SECRET_WARP_IN); return true; } return false; @@ -5786,13 +5786,13 @@ s32 func_8083562C(PlayState* play, Player* this, CollisionPoly* poly, s32 bgId) func_808354A4(play, var_a3 - 1, SurfaceType_GetFloorEffect(&play->colCtx, poly, bgId) == FLOOR_EFFECT_2); if ((this->stateFlags1 & PLAYER_STATE1_8000000) && (this->floorProperty == FLOOR_PROPERTY_5)) { - func_8019F128(NA_SE_OC_TUNAMI); + Audio_PlaySfx_2(NA_SE_OC_TUNAMI); func_801A4058(5); gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.ambienceId = AMBIENCE_ID_DISABLED; } else if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->floorProperty == FLOOR_PROPERTY_12)) { - func_8019F128(NA_SE_OC_SECRET_WARP_IN); + Audio_PlaySfx_2(NA_SE_OC_SECRET_WARP_IN); } if (this->stateFlags1 & PLAYER_STATE1_800000) { @@ -5808,7 +5808,7 @@ s32 func_8083562C(PlayState* play, Player* this, CollisionPoly* poly, s32 bgId) ((floorType = SurfaceType_GetFloorType(&play->colCtx, poly, bgId)) != FLOOR_TYPE_10) && ((sp34 < 100) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))) { if (floorType == FLOOR_TYPE_11) { - func_8019F128(NA_SE_OC_SECRET_HOLE_OUT); + Audio_PlaySfx_2(NA_SE_OC_SECRET_HOLE_OUT); func_801A4058(5); gSaveContext.seqId = (u8)NA_BGM_DISABLED; gSaveContext.ambienceId = AMBIENCE_ID_DISABLED; @@ -5852,7 +5852,7 @@ s32 func_8083562C(PlayState* play, Player* this, CollisionPoly* poly, s32 bgId) } play->transitionType = TRANS_TYPE_FADE_BLACK_FAST; - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); } else { if (this->stateFlags3 & PLAYER_STATE3_1000000) { func_808355D8(play, this, &gPlayerAnim_pn_kakkufinish); @@ -7263,12 +7263,12 @@ s32 func_80838A90(Player* this, PlayState* play) { } } this->stateFlags1 |= PLAYER_STATE1_100000; - play_sound(NA_SE_SY_CAMERA_ZOOM_UP); + Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP); Player_StopHorizontalMovement(this); return true; } this->unk_AA5 = PLAYER_UNKAA5_0; - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return false; } this->stateFlags1 |= (PLAYER_STATE1_20000000 | PLAYER_STATE1_10000000); @@ -7376,7 +7376,7 @@ s32 func_80839518(Player* this, PlayState* play) { } else if ((this->tatlTextId == 0) && !func_80123420(this) && CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_CUP) && !func_80831814(this, play, PLAYER_UNKAA5_1)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } return false; } @@ -7864,8 +7864,8 @@ void func_8083A98C(Actor* thisx, PlayState* play2) { f32 focusDeltaX = (s16)(thisx->focus.rot.x - prevFocusX); f32 focusDeltaY = (s16)(thisx->focus.rot.y - prevFocusY); - func_8019FAD8(&gSfxDefaultPos, NA_SE_PL_TELESCOPE_MOVEMENT - SFX_FLAG, - sqrtf(SQ(focusDeltaX) + SQ(focusDeltaY)) / 300.0f); + Audio_PlaySfx_AtPosWithFreq(&gSfxDefaultPos, NA_SE_PL_TELESCOPE_MOVEMENT - SFX_FLAG, + sqrtf(SQ(focusDeltaX) + SQ(focusDeltaY)) / 300.0f); } } @@ -8238,7 +8238,7 @@ void func_8083BB4C(PlayState* play, Player* this) { play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_FADE_BLACK_FAST; this->stateFlags1 |= PLAYER_STATE1_200; - play_sound(NA_SE_SY_DEKUNUTS_JUMP_FAILED); + Audio_PlaySfx(NA_SE_SY_DEKUNUTS_JUMP_FAILED); } else if ((this->unk_3CF == 0) && ((play->sceneId == SCENE_30GYOSON) || (play->sceneId == SCENE_31MISAKI) || (play->sceneId == SCENE_TORIDE))) { @@ -8329,7 +8329,7 @@ void func_8083BF54(PlayState* play, Player* this) { this->unk_AB8 = CLAMP(this->unk_AB8, 0.0f, var_fa1); if ((this->linearVelocity == 0.0f) && (fabsf(this->unk_AB8 - temp_fv1_2) > 2.0f)) { - func_800B8F98(&this->actor, sfxId); + Actor_PlaySfx_FlaggedCentered1(&this->actor, sfxId); } this->actor.gravity -= this->unk_AB8 * 0.004f; @@ -8691,7 +8691,7 @@ void func_8083D168(PlayState* play, Player* this, GetItemEntry* giEntry) { } Item_Give(play, giEntry->itemId); - play_sound((this->getItemId < GI_NONE) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM); + Audio_PlaySfx((this->getItemId < GI_NONE) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM); } s32 func_8083D23C(Player* this, PlayState* play) { @@ -11243,7 +11243,7 @@ void func_808445C4(PlayState* play, Player* this) { pos.y = (Rand_CenteredFloat(5.0f) + bodyPartsPos->y) - this->actor.world.pos.y; pos.z = (Rand_CenteredFloat(5.0f) + bodyPartsPos->z) - this->actor.world.pos.z; EffectSsFhgFlash_SpawnShock(play, &this->actor, &pos, scale, 1); - func_800B8F98(&this->actor, NA_SE_PL_SPARK - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_SPARK - SFX_FLAG); } } @@ -11406,8 +11406,8 @@ void func_80844784(PlayState* play, Player* this) { Math_ScaledStepToS(&this->actor.world.rot.y, var_a3, temp_ft2); } if ((this->linearVelocity == 0.0f) && (this->actor.speed != 0.0f)) { - func_8019F780(&this->actor.projectedPos, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), - this->actor.speed); + Audio_PlaySfx_AtPosWithSyncedFreqAndVolume( + &this->actor.projectedPos, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), this->actor.speed); } } else { this->actor.speed = this->linearVelocity; @@ -11438,7 +11438,7 @@ void func_80844784(PlayState* play, Player* this) { if (Player_SetAction(play, this, func_80856918, 1)) { this->stateFlags3 |= PLAYER_STATE3_2000 | PLAYER_STATE3_1000000; func_8082E1F0(this, NA_SE_IT_DEKUNUTS_FLOWER_OPEN); - func_8019FD90(4, 2); + Audio_SetSfxTimerLerpInterval(4, 2); } this->unk_AE8 = 0x270F; @@ -11474,8 +11474,9 @@ void func_80844784(PlayState* play, Player* this) { func_8083FBC4(play, this); } - func_8019F780(&this->actor.projectedPos, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), - fabsf(D_80862B3C)); + Audio_PlaySfx_AtPosWithSyncedFreqAndVolume(&this->actor.projectedPos, + Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), + fabsf(D_80862B3C)); } this->actor.velocity.x += sp48; @@ -11533,7 +11534,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->unk_D6A++; if (this->unk_D6A == 0) { this->unk_D6A = 1; - play_sound(NA_SE_OC_REVENGE); + Audio_PlaySfx(NA_SE_OC_REVENGE); } } @@ -12763,7 +12764,7 @@ s32 func_808482E0(PlayState* play, Player* this) { Audio_PlayFanfare(NA_BGM_GET_NEW_MASK); } else if (((this->getItemId >= GI_RUPEE_GREEN) && (this->getItemId <= GI_RUPEE_10)) || (this->getItemId == GI_RECOVERY_HEART)) { - play_sound(NA_SE_SY_GET_BOXITEM); + Audio_PlaySfx(NA_SE_SY_GET_BOXITEM); } else { s32 seqId; @@ -13273,7 +13274,7 @@ void func_808497A0(Player* this, PlayState* play) { R_PLAY_FILL_SCREEN_ON = 20; R_PLAY_FILL_SCREEN_ALPHA = 0; R_PLAY_FILL_SCREEN_R = R_PLAY_FILL_SCREEN_G = R_PLAY_FILL_SCREEN_B = R_PLAY_FILL_SCREEN_ALPHA; - play_sound(NA_SE_SY_DEKUNUTS_JUMP_FAILED); + Audio_PlaySfx(NA_SE_SY_DEKUNUTS_JUMP_FAILED); } else if (R_PLAY_FILL_SCREEN_ON > 0) { R_PLAY_FILL_SCREEN_ALPHA += R_PLAY_FILL_SCREEN_ON; if (R_PLAY_FILL_SCREEN_ALPHA > 255) { @@ -14372,9 +14373,9 @@ void func_8084C6EC(Player* this, PlayState* play) { func_8083CB58(this, sp3C, this->actor.shape.rot.y); if (func_8083FBC4(play, this)) { - func_800B8F98(&this->actor, (this->floorSfxOffset == NA_SE_PL_WALK_SNOW - SFX_FLAG) - ? NA_SE_PL_ROLL_SNOW_DUST - SFX_FLAG - : NA_SE_PL_ROLL_DUST - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, (this->floorSfxOffset == NA_SE_PL_WALK_SNOW - SFX_FLAG) + ? NA_SE_PL_ROLL_SNOW_DUST - SFX_FLAG + : NA_SE_PL_ROLL_DUST - SFX_FLAG); } Player_PlayAnimSfx(this, D_8085D61C); @@ -15051,7 +15052,7 @@ void func_8084E724(Player* this, PlayState* play) { BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_CUP | BTN_R | BTN_B | BTN_A))) || func_808391D8(this, play)))) { func_80839ED0(this, play); - play_sound(NA_SE_SY_CAMERA_ZOOM_UP); + Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP); } else if ((DECR(this->unk_AE8) == 0) || (this->unk_AA5 != PLAYER_UNKAA5_3)) { if (func_801240DC(this)) { this->unk_AA6 |= 0x43; @@ -15985,7 +15986,7 @@ void func_80850D68(Player* this, PlayState* play) { this->unk_B86[0] = 1; } else { sp44 = 9.0f; - func_800B8F98(&this->actor, NA_SE_PL_ZORA_SWIM_LV - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_ZORA_SWIM_LV - SFX_FLAG); } // Y @@ -17032,8 +17033,8 @@ void func_80853D68(Player* this, PlayState* play) { this->stateFlags2 |= (PLAYER_STATE2_20 | PLAYER_STATE2_40); PlayerAnimation_Update(play, &this->skelAnime); func_8083FBC4(play, this); - func_8019F780(&this->actor.projectedPos, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), - this->actor.speed); + Audio_PlaySfx_AtPosWithSyncedFreqAndVolume( + &this->actor.projectedPos, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), this->actor.speed); if (func_80838A90(this, play)) { return; @@ -17150,7 +17151,7 @@ void func_8085421C(Player* this, PlayState* play) { } play->transitionType = TRANS_TYPE_FADE_BLACK_FAST; - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); } else { play->transitionType = TRANS_TYPE_FADE_BLACK; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK; @@ -17273,7 +17274,8 @@ void func_80854800(Player* this, PlayState* play) { } this->shockTimer = 40; - func_800B8F98(&this->actor, this->ageProperties->voiceSfxIdOffset + (NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG)); + Actor_PlaySfx_FlaggedCentered1(&this->actor, + this->ageProperties->voiceSfxIdOffset + (NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG)); } void func_808548B8(Player* this, PlayState* play) { @@ -17627,7 +17629,7 @@ void func_808553F4(Player* this, PlayState* play) { Math_StepToF(&this->unk_B10[4], 1.0f, sp4C->unk_1 / 100.0f); } else if (this->unk_AE7 < sp4C->unk_3) { if (this->unk_AE7 == sp4C->unk_2) { - func_801000CC(NA_SE_EV_LIGHTNING_HARD); + Lib_PlaySfx_2(NA_SE_EV_LIGHTNING_HARD); } Math_StepToF(&this->unk_B10[4], 2.0f, 0.5f); @@ -18078,7 +18080,7 @@ void func_80856918(Player* this, PlayState* play) { this->stateFlags3 &= ~PLAYER_STATE3_200; this->stateFlags3 |= PLAYER_STATE3_1000000; func_8082E1F0(this, NA_SE_IT_DEKUNUTS_FLOWER_OPEN); - func_8019FD90(4, 2); + Audio_SetSfxTimerLerpInterval(4, 2); } } } @@ -18170,10 +18172,10 @@ void func_80856918(Player* this, PlayState* play) { func_808566C0(play, this, PLAYER_BODYPART_RIGHT_HAND, 0.0f, 1.0f, 0.0f, 32); } - func_8019FCB8(&this->actor.projectedPos, 0x1851, 2.0f * (this->unk_B86[1] * (1.0f / 6000.0f))); + Audio_PlaySfx_AtPosWithTimer(&this->actor.projectedPos, 0x1851, 2.0f * (this->unk_B86[1] * (1.0f / 6000.0f))); if ((this->boomerangActor == NULL) && CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_B)) { if (AMMO(ITEM_NUT) == 0) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); } else { this->boomerangActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ARROW, this->bodyPartsPos[PLAYER_BODYPART_WAIST].x, @@ -18272,7 +18274,7 @@ void func_808573A4(Player* this, PlayState* play) { func_800AE930(&play->colCtx, Effect_GetByIndex(this->meleeWeaponEffectIndex[2]), &this->actor.world.pos, 2.0f, this->currentYaw, this->actor.floorPoly, this->actor.floorBgId); - func_800B8F98(&this->actor, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG)); + Actor_PlaySfx_FlaggedCentered1(&this->actor, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG)); } } @@ -18300,7 +18302,7 @@ void func_808576BC(PlayState* play, Player* this) { } if (var_v0 > 0x1770) { - func_800B8F98(&this->actor, NA_SE_PL_GORON_SLIP - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_GORON_SLIP - SFX_FLAG); } if (func_8083F8A8(play, this, 12.0f, -1 - (var_v0 >> 0xC), (var_v0 >> 0xA) + 1.0f, (var_v0 >> 7) + 160, 20, true)) { @@ -18571,7 +18573,7 @@ void func_80857BE8(Player* this, PlayState* play) { if ((gSaveContext.magicState == MAGIC_STATE_IDLE) && (gSaveContext.save.saveInfo.playerData.magic >= 2) && (this->unk_AE8 >= 0x36B0)) { this->unk_AE7++; - func_800B8F98(&this->actor, NA_SE_PL_GORON_BALL_CHARGE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_GORON_BALL_CHARGE - SFX_FLAG); } else { this->unk_AE7 = 4; } @@ -18656,7 +18658,7 @@ void func_80857BE8(Player* this, PlayState* play) { if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (temp_ft3_2 != 0) && (((temp_v0_10 + temp_ft3_2) * temp_v0_10) <= 0)) { spE0 = Player_GetFloorSfx(this, NA_SE_PL_GORON_ROLL); - func_8019F780(&this->actor.projectedPos, spE0, sp54); + Audio_PlaySfx_AtPosWithSyncedFreqAndVolume(&this->actor.projectedPos, spE0, sp54); } } } @@ -18738,7 +18740,7 @@ void func_80857BE8(Player* this, PlayState* play) { if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (((this->unk_AE8 + spD8) * spD8) <= 0)) { spE0 = Player_GetFloorSfx(this, (this->unk_B86[1] != 0) ? NA_SE_PL_GORON_CHG_ROLL : NA_SE_PL_GORON_ROLL); - func_8019F780(&this->actor.projectedPos, spE0, this->unk_B08); + Audio_PlaySfx_AtPosWithSyncedFreqAndVolume(&this->actor.projectedPos, spE0, this->unk_B08); } } @@ -19132,7 +19134,7 @@ void func_8085978C(PlayState* play, Player* this, UNK_TYPE arg2) { R_PLAY_FILL_SCREEN_G = 255; R_PLAY_FILL_SCREEN_B = 255; R_PLAY_FILL_SCREEN_ALPHA = 0; - play_sound(NA_SE_SY_WHITE_OUT_T); + Audio_PlaySfx(NA_SE_SY_WHITE_OUT_T); } } @@ -19689,7 +19691,7 @@ void func_8085A364(PlayState* play, Player* this, void* arg2) { if (this->skelAnime.animation == &gPlayerAnim_cl_nigeru) { Player_PlayAnimSfx(this, D_8085DA48); } else if (this->skelAnime.animation == &gPlayerAnim_alink_rakkatyu) { - func_800B8F98(&this->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); } else { func_80858FE8(this); } @@ -19791,7 +19793,7 @@ void func_8085A8C4(PlayState* play, Player* this, UNK_TYPE arg2) { R_PLAY_FILL_SCREEN_G = 255; R_PLAY_FILL_SCREEN_B = 255; R_PLAY_FILL_SCREEN_ALPHA = 0; - play_sound(NA_SE_SY_WHITE_OUT_T); + Audio_PlaySfx(NA_SE_SY_WHITE_OUT_T); } } diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c b/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c index 03bc1e81d5..b12a9cb763 100644 --- a/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c +++ b/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c @@ -74,7 +74,7 @@ void TransitionWipe3_Start(void* thisx) { } else { this->scrollY = 500; if (this->texIndex == 2) { - func_8019F128(NA_SE_OC_SECRET_WARP_OUT); + Audio_PlaySfx_2(NA_SE_OC_SECRET_WARP_OUT); } } guPerspective(&this->projection, &this->normal, 60.0f, 4.0f / 3.0f, 10.0f, 12800.0f, 1.0f); @@ -102,7 +102,7 @@ void TransitionWipe3_Update(void* thisx, s32 updateRate) { if (this->dir != TRANS_WIPE3_DIR_IN) { if ((this->scrollY == 0) && (this->texIndex == 2)) { - func_8019F128(NA_SE_OC_SECRET_WARP_IN); + Audio_PlaySfx_2(NA_SE_OC_SECRET_WARP_IN); } this->scrollY += (this->wipeSpeed * 3) / updateRate; if (this->scrollY >= 500) { diff --git a/src/overlays/gamestates/ovl_daytelop/z_daytelop.c b/src/overlays/gamestates/ovl_daytelop/z_daytelop.c index 134c6457b8..cd44664c9f 100644 --- a/src/overlays/gamestates/ovl_daytelop/z_daytelop.c +++ b/src/overlays/gamestates/ovl_daytelop/z_daytelop.c @@ -244,5 +244,5 @@ void DayTelop_Init(GameState* thisx) { DayTelop_Noop(this); DayTelop_LoadGraphics(this); - play_sound(NA_SE_OC_TELOP_IMPACT); + Audio_PlaySfx(NA_SE_OC_TELOP_IMPACT); } diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c index 0cc43ad501..f869c88a4f 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c @@ -242,7 +242,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { if (this->buttonIndex <= FS_BTN_MAIN_FILE_3) { if (!gSaveContext.flashSaveAvailable) { if (!NO_FLASH_SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->configMode = CM_ROTATE_TO_NAME_ENTRY; this->kbdButton = FS_KBD_BTN_NONE; this->charPage = FS_CHAR_PAGE_HIRA; @@ -258,7 +258,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { this->nameEntryBoxAlpha = 0; Lib_MemCpy(&this->fileNames[this->buttonIndex], &sEmptyName, ARRAY_COUNT(sEmptyName)); } else { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->actionTimer = 4; this->selectMode = SM_FADE_MAIN_TO_SELECT; this->selectedFileIndex = this->buttonIndex; @@ -266,7 +266,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { this->nextTitleLabel = FS_TITLE_OPEN_FILE; } } else if (!SLOT_OCCUPIED(this, this->buttonIndex)) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->configMode = CM_ROTATE_TO_NAME_ENTRY; this->kbdButton = FS_KBD_BTN_NONE; this->charPage = FS_CHAR_PAGE_HIRA; @@ -282,7 +282,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { this->nameEntryBoxAlpha = 0; Lib_MemCpy(&this->fileNames[this->buttonIndex], &sEmptyName, ARRAY_COUNT(sEmptyName)); } else { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->actionTimer = 4; this->selectMode = SM_FADE_MAIN_TO_SELECT; this->selectedFileIndex = this->buttonIndex; @@ -290,7 +290,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { this->nextTitleLabel = FS_TITLE_OPEN_FILE; } } else if (this->warningLabel == FS_WARNING_NONE) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->prevConfigMode = this->configMode; if (this->buttonIndex == FS_BTN_MAIN_COPY) { @@ -310,7 +310,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { } this->actionTimer = 4; } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { gSaveContext.gameMode = GAMEMODE_TITLE_SCREEN; @@ -318,7 +318,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) { SET_NEXT_GAMESTATE(&this->state, TitleSetup_Init, sizeof(TitleSetupState)); } else { if (ABS_ALT(this->stickAdjY) > 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); if (this->stickAdjY > 30) { this->buttonIndex--; if (this->buttonIndex == FS_BTN_MAIN_FILE_3) { @@ -2048,18 +2048,18 @@ void FileSelect_ConfirmFile(GameState* thisx) { if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) { if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) { Rumble_Request(300.0f, 180, 20, 100); - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->selectMode = SM_FADE_OUT; func_801A4058(0xF); } else { // FS_BTN_CONFIRM_QUIT - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); this->selectMode++; // SM_FADE_OUT_FILE_INFO } } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); this->selectMode++; // SM_FADE_OUT_FILE_INFO } else if (ABS_ALT(this->stickAdjY) >= 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->confirmButtonIndex ^= 1; } } diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c index 7f8e5789c1..97181cefb1 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c @@ -77,7 +77,7 @@ void FileSelect_SelectCopySource(GameState* thisx) { this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->configMode = CM_COPY_RETURN_MAIN; this->warningLabel = FS_WARNING_NONE; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { if (!gSaveContext.flashSaveAvailable) { if (NO_FLASH_SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { @@ -85,22 +85,22 @@ void FileSelect_SelectCopySource(GameState* thisx) { this->selectedFileIndex = this->buttonIndex; this->configMode = CM_SETUP_COPY_DEST_1; this->nextTitleLabel = FS_TITLE_COPY_TO; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else if (SLOT_OCCUPIED(this, this->buttonIndex)) { this->actionTimer = 4; this->selectedFileIndex = this->buttonIndex; this->configMode = CM_SETUP_COPY_DEST_1; this->nextTitleLabel = FS_TITLE_COPY_TO; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else { if (ABS_ALT(this->stickAdjY) >= 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); if (this->stickAdjY >= 30) { this->buttonIndex--; // Instead of removing File 3 entirely, the index is manually adjusted to skip it @@ -211,7 +211,7 @@ void FileSelect_SelectCopyDest(GameState* thisx) { this->nextTitleLabel = FS_TITLE_COPY_FROM; this->actionTimer = 4; this->configMode = CM_EXIT_TO_COPY_SOURCE_1; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { if (!gSaveContext.flashSaveAvailable) { if (!NO_FLASH_SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { @@ -219,22 +219,22 @@ void FileSelect_SelectCopyDest(GameState* thisx) { this->nextTitleLabel = FS_TITLE_COPY_CONFIRM; this->actionTimer = 4; this->configMode = CM_SETUP_COPY_CONFIRM_1; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else if (!SLOT_OCCUPIED(this, this->buttonIndex)) { this->copyDestFileIndex = this->buttonIndex; this->nextTitleLabel = FS_TITLE_COPY_CONFIRM; this->actionTimer = 4; this->configMode = CM_SETUP_COPY_CONFIRM_1; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else { if (ABS_ALT(this->stickAdjY) >= 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); if (this->stickAdjY >= 30) { this->buttonIndex--; // Instead of removing File 3 entirely, the index is manually adjusted to skip it @@ -421,7 +421,7 @@ void FileSelect_CopyConfirm(GameState* thisx) { this->actionTimer = 4; this->nextTitleLabel = FS_TITLE_COPY_TO; this->configMode = CM_RETURN_TO_COPY_DEST; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { dayTime = gSaveContext.save.time; gSaveContext.save.time = dayTime; @@ -439,9 +439,9 @@ void FileSelect_CopyConfirm(GameState* thisx) { this->configMode = CM_COPY_WAIT_FOR_FLASH_SAVE; } Rumble_Request(300.0f, 180, 20, 100); - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else if (ABS_ALT(this->stickAdjY) >= 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->buttonIndex ^= 1; } } @@ -585,7 +585,7 @@ void FileSelect_CopyAnim3(GameState* thisx) { if (this->actionTimer == 38) { this->connectorAlpha[this->copyDestFileIndex] = 255; - play_sound(NA_SE_EV_DIAMOND_SWITCH); + Audio_PlaySfx(NA_SE_EV_DIAMOND_SWITCH); } this->actionTimer--; @@ -594,7 +594,7 @@ void FileSelect_CopyAnim3(GameState* thisx) { if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_B | BTN_START) || (this->actionTimer == 0)) { this->actionTimer = 4; this->nextTitleLabel = FS_TITLE_SELECT_FILE; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); this->configMode = CM_COPY_ANIM_4; } } @@ -794,7 +794,7 @@ void FileSelect_EraseSelect(GameState* thisx) { this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->configMode = CM_EXIT_ERASE_TO_MAIN; this->warningLabel = FS_WARNING_NONE; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { if (!gSaveContext.flashSaveAvailable) { @@ -803,22 +803,22 @@ void FileSelect_EraseSelect(GameState* thisx) { this->selectedFileIndex = this->buttonIndex; this->configMode = CM_SETUP_ERASE_CONFIRM_1; this->nextTitleLabel = FS_TITLE_ERASE_CONFIRM; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else if (SLOT_OCCUPIED(this, this->buttonIndex)) { this->actionTimer = 4; this->selectedFileIndex = this->buttonIndex; this->configMode = CM_SETUP_ERASE_CONFIRM_1; this->nextTitleLabel = FS_TITLE_ERASE_CONFIRM; - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } else { if (ABS_ALT(this->stickAdjY) >= 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); if (this->stickAdjY >= 30) { this->buttonIndex--; @@ -966,7 +966,7 @@ void FileSelect_EraseConfirm(GameState* thisx) { this->nextTitleLabel = FS_TITLE_ERASE_FILE; this->configMode = CM_EXIT_TO_ERASE_SELECT_1; this->actionTimer = 4; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { Sram_EraseSave(this, sramCtx, this->selectedFileIndex); if (!gSaveContext.flashSaveAvailable) { @@ -978,13 +978,13 @@ void FileSelect_EraseConfirm(GameState* thisx) { this->configMode = CM_ERASE_WAIT_FOR_FLASH_SAVE; } this->connectorAlpha[this->selectedFileIndex] = 0; - play_sound(NA_SE_EV_DIAMOND_SWITCH); + Audio_PlaySfx(NA_SE_EV_DIAMOND_SWITCH); this->actionTimer = 4; this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE; Rumble_Request(200.0f, 255, 20, 150); sEraseDelayTimer = 15; } else if (ABS_ALT(this->stickAdjY) >= 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->buttonIndex ^= 1; } } @@ -1104,7 +1104,7 @@ void FileSelect_EraseAnim1(GameState* thisx) { sEraseDelayTimer--; if (sEraseDelayTimer == 0) { - play_sound(NA_SE_OC_ABYSS); + Audio_PlaySfx(NA_SE_OC_ABYSS); } } } @@ -1141,7 +1141,7 @@ void FileSelect_EraseAnim2(GameState* thisx) { this->actionTimer = 4; this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->configMode++; // CM_ERASE_ANIM_3 - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } } diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c index 02236002a8..2011d10fd3 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c @@ -403,7 +403,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) { if (this->configMode == CM_NAME_ENTRY) { if (CHECK_BTN_ALL(input->press.button, BTN_START)) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); // place cursor on END button this->kbdY = 5; this->kbdX = 4; @@ -415,21 +415,21 @@ void FileSelect_DrawNameEntry(GameState* thisx) { } this->fileNames[this->buttonIndex][i] = 0x3E; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else { this->newFileNameCharCount--; if (this->newFileNameCharCount < 0) { this->newFileNameCharCount = 0; this->configMode = CM_NAME_ENTRY_TO_MAIN; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else { for (i = this->newFileNameCharCount; i < 7; i++) { this->fileNames[this->buttonIndex][i] = this->fileNames[this->buttonIndex][i + 1]; } this->fileNames[this->buttonIndex][i] = 0x3E; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } } } else { @@ -462,7 +462,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) { font->fontBuf + D_808141F0[this->charIndex] * FONT_CHAR_TEX_SIZE, 0); if (CHECK_BTN_ALL(input->press.button, BTN_A)) { - play_sound(NA_SE_SY_FSEL_DECIDE_S); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_S); this->fileNames[this->buttonIndex][this->newFileNameCharCount] = D_808141F0[this->charIndex]; this->newFileNameCharCount++; @@ -481,7 +481,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) { } this->fileNames[this->buttonIndex][i] = 0x3E; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } else { this->newFileNameCharCount--; @@ -494,7 +494,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) { } this->fileNames[this->buttonIndex][i] = 0x3E; - play_sound(NA_SE_SY_FSEL_CLOSE); + Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE); } } else if (this->kbdButton == FS_KBD_BTN_END) { validName = false; @@ -507,7 +507,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) { } if (validName) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); gSaveContext.fileNum = this->buttonIndex; time = ((void)0, gSaveContext.save.time); Sram_InitSave(this, sramCtx); @@ -526,21 +526,21 @@ void FileSelect_DrawNameEntry(GameState* thisx) { this->connectorAlpha[this->buttonIndex] = 255; Rumble_Request(300.0f, 180, 20, 100); } else { - play_sound(NA_SE_SY_FSEL_ERROR); + Audio_PlaySfx(NA_SE_SY_FSEL_ERROR); } } } } if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->newFileNameCharCount++; if (this->newFileNameCharCount > 7) { this->newFileNameCharCount = 7; } } else if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->newFileNameCharCount--; if (this->newFileNameCharCount < 0) { @@ -597,7 +597,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) { if (this->kbdY != 5) { if (this->stickAdjX < -30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->charIndex--; this->kbdX--; if (this->kbdX < 0) { @@ -605,7 +605,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) { this->charIndex = (this->kbdY * 13) + this->kbdX; } } else if (this->stickAdjX > 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->charIndex++; this->kbdX++; if (this->kbdX > 12) { @@ -615,13 +615,13 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) { } } else { if (this->stickAdjX < -30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->kbdX--; if (this->kbdX < 3) { this->kbdX = 4; } } else if (this->stickAdjX > 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->kbdX++; if (this->kbdX > 4) { this->kbdX = 3; @@ -630,7 +630,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) { } if (this->stickAdjY > 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->kbdY--; @@ -661,7 +661,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) { } } } else if (this->stickAdjY < -30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); this->kbdY++; if (this->kbdY > 5) { @@ -757,7 +757,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { Input* input = CONTROLLER1(&this->state); if (CHECK_BTN_ALL(input->press.button, BTN_B)) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); Sram_WriteSaveOptionsToBuffer(sramCtx); if (!gSaveContext.flashSaveAvailable) { @@ -772,7 +772,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { } if (this->stickAdjX < -30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); if (sSelectedSetting == FS_SETTING_AUDIO) { gSaveContext.options.audioSetting--; @@ -785,7 +785,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { gSaveContext.options.zTargetSetting ^= 1; } } else if (this->stickAdjX > 30) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); if (sSelectedSetting == FS_SETTING_AUDIO) { gSaveContext.options.audioSetting++; @@ -798,12 +798,12 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { } if ((this->stickAdjY < -30) || (this->stickAdjY > 30)) { - play_sound(NA_SE_SY_FSEL_CURSOR); + Audio_PlaySfx(NA_SE_SY_FSEL_CURSOR); sSelectedSetting ^= 1; return; } if (CHECK_BTN_ALL(input->press.button, BTN_A)) { - play_sound(NA_SE_SY_FSEL_DECIDE_L); + Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L); sSelectedSetting ^= 1; } } diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index 88d9ccdc4c..ca4bfde8dc 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -631,13 +631,13 @@ void MapSelect_UpdateMenu(MapSelectState* this) { this->timerUp = 20; this->lockUp = true; - play_sound(NA_SE_IT_SWORD_IMPACT); + Audio_PlaySfx(NA_SE_IT_SWORD_IMPACT); this->verticalInput = updateRate; } } if (CHECK_BTN_ALL(controller1->cur.button, BTN_DUP) && (this->timerUp == 0)) { - play_sound(NA_SE_IT_SWORD_IMPACT); + Audio_PlaySfx(NA_SE_IT_SWORD_IMPACT); this->verticalInput = updateRate * 3; } @@ -648,24 +648,24 @@ void MapSelect_UpdateMenu(MapSelectState* this) { if (this->timerDown == 0) { this->timerDown = 20; this->lockDown = true; - play_sound(NA_SE_IT_SWORD_IMPACT); + Audio_PlaySfx(NA_SE_IT_SWORD_IMPACT); this->verticalInput = -updateRate; } } if (CHECK_BTN_ALL(controller1->cur.button, BTN_DDOWN) && (this->timerDown == 0)) { - play_sound(NA_SE_IT_SWORD_IMPACT); + Audio_PlaySfx(NA_SE_IT_SWORD_IMPACT); this->verticalInput = -updateRate * 3; } if (CHECK_BTN_ALL(controller1->press.button, BTN_DLEFT) || CHECK_BTN_ALL(controller1->cur.button, BTN_DLEFT)) { - play_sound(NA_SE_IT_SWORD_IMPACT); + Audio_PlaySfx(NA_SE_IT_SWORD_IMPACT); this->verticalInput = updateRate; } if (CHECK_BTN_ALL(controller1->press.button, BTN_DRIGHT) || CHECK_BTN_ALL(controller1->cur.button, BTN_DRIGHT)) { - play_sound(NA_SE_IT_SWORD_IMPACT); + Audio_PlaySfx(NA_SE_IT_SWORD_IMPACT); this->verticalInput = -updateRate; } } diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c index 1b18adcd1d..41296b5f20 100644 --- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c +++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c @@ -690,7 +690,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) { // if the cursor point changed if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_QUEST]) { pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } // Update cursor item and slot @@ -851,7 +851,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) { if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_BOMBERS_NOTEBOOK) { play->pauseCtx.bombersNotebookOpen = true; pauseCtx->mainState = PAUSE_MAIN_STATE_BOMBERS_NOTEBOOK_OPEN; - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); } else { pauseCtx->itemDescriptionOn = true; if (pauseCtx->cursorYIndex[PAUSE_QUEST] < 2) { diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c index f46db573c3..a4bd52d32e 100644 --- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c +++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c @@ -604,19 +604,19 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) { if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_CLEFT)) { if (sPlayerFormItems[((void)0, gSaveContext.save.playerForm)] == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_LEFT)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_CDOWN)) { if (sPlayerFormItems[((void)0, gSaveContext.save.playerForm)] == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_CRIGHT)) { if (sPlayerFormItems[((void)0, gSaveContext.save.playerForm)] == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_RIGHT)) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } @@ -626,21 +626,21 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) { if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_CLEFT)) { if ((Player_GetCurMaskItemId(play) != ITEM_NONE) && (Player_GetCurMaskItemId(play) == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_LEFT))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } pauseCtx->equipTargetCBtn = PAUSE_EQUIP_C_LEFT; } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_CDOWN)) { if ((Player_GetCurMaskItemId(play) != ITEM_NONE) && (Player_GetCurMaskItemId(play) == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } pauseCtx->equipTargetCBtn = PAUSE_EQUIP_C_DOWN; } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_CRIGHT)) { if ((Player_GetCurMaskItemId(play) != ITEM_NONE) && (Player_GetCurMaskItemId(play) == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_RIGHT))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } pauseCtx->equipTargetCBtn = PAUSE_EQUIP_C_RIGHT; @@ -668,12 +668,12 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) { if (pauseCtx->equipTargetItem == ITEM_ARROW_LIGHT) { magicArrowIndex = 2; } - play_sound(NA_SE_SY_SET_FIRE_ARROW + magicArrowIndex); + Audio_PlaySfx(NA_SE_SY_SET_FIRE_ARROW + magicArrowIndex); pauseCtx->equipTargetItem = 0xB5 + magicArrowIndex; pauseCtx->equipAnimAlpha = sEquipState = 0; // EQUIP_STATE_MAGIC_ARROW_GROW_ORB sEquipAnimTimer = 6; } else { - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); } } else if ((pauseCtx->debugEditor == DEBUG_EDITOR_NONE) && (pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) && @@ -692,7 +692,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) { } if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_ITEM]) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_ITEM) && (pauseCtx->pageIndex == PAUSE_ITEM)) { pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW; @@ -731,7 +731,7 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) { pauseCtx->equipAnimScale = 320; pauseCtx->equipAnimShrinkRate = 40; sEquipState++; - play_sound(NA_SE_SY_SYNTH_MAGIC_ARROW); + Audio_PlaySfx(NA_SE_SY_SYNTH_MAGIC_ARROW); } return; } diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c index a4df2c8891..c88aff6f1f 100644 --- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c +++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c @@ -465,7 +465,7 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) { } if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_MAP]) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } @@ -917,7 +917,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) { // Used as cursor vtxIndex pauseCtx->cursorSlot[PAUSE_MAP] = 31 + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; } - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); sStickAdjTimer = 0; } } else if (pauseCtx->stickAdjX < -30) { @@ -942,7 +942,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) { // Used as cursor vtxIndex pauseCtx->cursorSlot[PAUSE_MAP] = 31 + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; } - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); sStickAdjTimer = 0; } } @@ -951,7 +951,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) { pauseCtx->cursorItem[PAUSE_MAP] = PAUSE_ITEM_NONE; } if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_WORLD_MAP]) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } else if (pauseCtx->state == PAUSE_STATE_OWLWARP_SELECT) { pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE; @@ -985,7 +985,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) { pauseCtx->cursorSlot[PAUSE_MAP] = 31 + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_WORLD_MAP]) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } } diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c index 228f0d16a4..949b3de591 100644 --- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c +++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c @@ -546,7 +546,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { ((sMaskPlayerFormItems[((void)0, gSaveContext.save.playerForm)] != ITEM_NONE) && (sMaskPlayerFormItems[((void)0, gSaveContext.save.playerForm)] == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_LEFT)))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } else if (CHECK_BTN_ALL(input->press.button, BTN_CDOWN)) { @@ -555,7 +555,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { ((sMaskPlayerFormItems[((void)0, gSaveContext.save.playerForm)] != ITEM_NONE) && (sMaskPlayerFormItems[((void)0, gSaveContext.save.playerForm)] == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_DOWN)))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } else if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) { @@ -564,7 +564,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { ((sMaskPlayerFormItems[((void)0, gSaveContext.save.playerForm)] != ITEM_NONE) && (sMaskPlayerFormItems[((void)0, gSaveContext.save.playerForm)] == BUTTON_ITEM_EQUIP(0, EQUIP_SLOT_C_RIGHT)))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } } @@ -573,7 +573,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { (Player_GetEnvironmentalHazard(play) <= PLAYER_ENV_HAZARD_UNDERWATER_FREE) && ((cursorSlot == (SLOT_MASK_DEKU - ITEM_NUM_SLOTS)) || (cursorSlot == (SLOT_MASK_GORON - ITEM_NUM_SLOTS)))) { - play_sound(NA_SE_SY_ERROR); + Audio_PlaySfx(NA_SE_SY_ERROR); return; } @@ -596,7 +596,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { sMaskEquipMagicArrowSlotHoldTimer = 0; sMaskEquipState = EQUIP_STATE_MOVE_TO_C_BTN; sMaskEquipAnimTimer = 10; - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); } else if ((pauseCtx->debugEditor == DEBUG_EDITOR_NONE) && (pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) && CHECK_BTN_ALL(input->press.button, BTN_A) && (msgCtx->msgLength == 0)) { @@ -614,7 +614,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) { } if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_MASK]) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); } } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_MASK) && (pauseCtx->pageIndex == PAUSE_MASK)) { pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW; @@ -653,7 +653,7 @@ void KaleidoScope_UpdateMaskEquip(PlayState* play) { pauseCtx->equipAnimScale = 320; pauseCtx->equipAnimShrinkRate = 40; sMaskEquipState++; - play_sound(NA_SE_SY_SYNTH_MAGIC_ARROW); + Audio_PlaySfx(NA_SE_SY_SYNTH_MAGIC_ARROW); } return; } diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_prompt.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_prompt.c index 9bf89cdd26..d2a11b7d28 100644 --- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_prompt.c +++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_prompt.c @@ -24,11 +24,11 @@ void KaleidoScope_UpdatePrompt(PlayState* play) { // Move the prompt if ((pauseCtx->promptChoice == PAUSE_PROMPT_YES) && (stickAdjX >= 30)) { // Move right to the no prompt - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); pauseCtx->promptChoice = PAUSE_PROMPT_NO; } else if ((pauseCtx->promptChoice != PAUSE_PROMPT_YES) && (stickAdjX <= -30)) { // Move left to the yes prompt - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); pauseCtx->promptChoice = PAUSE_PROMPT_YES; } diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c index 60d79536ef..2b8e80db32 100644 --- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c +++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c @@ -267,7 +267,7 @@ void KaleidoScope_MoveCursorToSpecialPos(PlayState* play, s16 cursorSpecialPos) pauseCtx->cursorSpecialPos = cursorSpecialPos; pauseCtx->pageSwitchInputTimer = 0; - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); gSaveContext.buttonStatus[EQUIP_SLOT_B] = BTN_ENABLED; gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] = BTN_DISABLED; @@ -285,7 +285,7 @@ void KaleidoScope_MoveCursorFromSpecialPos(PlayState* play) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); pauseCtx->cursorShrinkRate = 4.0f; @@ -321,11 +321,11 @@ void KaleidoScope_SwitchPage(PauseContext* pauseCtx, u8 direction) { if (direction == SWITCH_PAGE_LEFT) { pauseCtx->nextPageMode = (pauseCtx->pageIndex * 2) + 1; - play_sound(NA_SE_SY_WIN_SCROLL_LEFT); + Audio_PlaySfx(NA_SE_SY_WIN_SCROLL_LEFT); pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_RIGHT; } else { // SWITCH_PAGE_RIGHT pauseCtx->nextPageMode = pauseCtx->pageIndex * 2; - play_sound(NA_SE_SY_WIN_SCROLL_RIGHT); + Audio_PlaySfx(NA_SE_SY_WIN_SCROLL_RIGHT); pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_LEFT; } @@ -2944,7 +2944,7 @@ void KaleidoScope_Update(PlayState* play) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->state = PAUSE_STATE_UNPAUSE_SETUP; sPauseMenuVerticalOffset = -6240.0f; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); } break; @@ -2978,17 +2978,17 @@ void KaleidoScope_Update(PlayState* play) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->state = PAUSE_STATE_UNPAUSE_SETUP; sPauseMenuVerticalOffset = -6240.0f; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; } else if (pauseCtx->ocarinaStaff->state == pauseCtx->ocarinaSongIndex) { // The player successfully played the song - play_sound(NA_SE_SY_TRE_BOX_APPEAR); + Audio_PlaySfx(NA_SE_SY_TRE_BOX_APPEAR); sNextMainState = PAUSE_MAIN_STATE_IDLE; sDelayTimer = 30; pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_DONE; } else if (pauseCtx->ocarinaStaff->state == 0xFF) { // The player failed to play the song - play_sound(NA_SE_SY_OCARINA_ERROR); + Audio_PlaySfx(NA_SE_SY_OCARINA_ERROR); sNextMainState = PAUSE_MAIN_STATE_SONG_PROMPT_INIT; sDelayTimer = 20; pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_DONE; @@ -3014,7 +3014,7 @@ void KaleidoScope_Update(PlayState* play) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->state = PAUSE_STATE_UNPAUSE_SETUP; sPauseMenuVerticalOffset = -6240.0f; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; } break; @@ -3056,7 +3056,7 @@ void KaleidoScope_Update(PlayState* play) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_RETURN_TO_MENU; } else { - play_sound(NA_SE_SY_PIECE_OF_HEART); + Audio_PlaySfx(NA_SE_SY_PIECE_OF_HEART); Play_SaveCycleSceneFlags(&play->state); gSaveContext.save.saveInfo.playerData.savedSceneId = play->sceneId; func_8014546C(sramCtx); @@ -3075,7 +3075,7 @@ void KaleidoScope_Update(PlayState* play) { pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_3; sPauseMenuVerticalOffset = -6240.0f; D_8082B90C = pauseCtx->roll; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_RETURN_TO_MENU; @@ -3096,7 +3096,7 @@ void KaleidoScope_Update(PlayState* play) { pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_3; sPauseMenuVerticalOffset = -6240.0f; D_8082B90C = pauseCtx->roll; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); } break; @@ -3314,14 +3314,14 @@ void KaleidoScope_Update(PlayState* play) { if (CHECK_BTN_ALL(input->press.button, BTN_A)) { if (pauseCtx->promptChoice != PAUSE_PROMPT_YES) { pauseCtx->promptChoice = PAUSE_PROMPT_YES; - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); pauseCtx->state = PAUSE_STATE_OFF; Game_SetFramerateDivisor(&play->state, 3); R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_UNK4; Object_LoadAll(&play->objectCtx); BgCheck_InitCollisionHeaders(&play->colCtx, play); } else { - play_sound(NA_SE_SY_PIECE_OF_HEART); + Audio_PlaySfx(NA_SE_SY_PIECE_OF_HEART); pauseCtx->promptChoice = PAUSE_PROMPT_YES; Play_SaveCycleSceneFlags(&play->state); gSaveContext.save.saveInfo.playerData.savedSceneId = play->sceneId; @@ -3338,10 +3338,10 @@ void KaleidoScope_Update(PlayState* play) { sDelayTimer = 90; } } else if ((pauseCtx->promptChoice == PAUSE_PROMPT_YES) && (stickAdjX >= 30)) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); pauseCtx->promptChoice = PAUSE_PROMPT_NO; } else if ((pauseCtx->promptChoice != PAUSE_PROMPT_YES) && (stickAdjX <= -30)) { - play_sound(NA_SE_SY_CURSOR); + Audio_PlaySfx(NA_SE_SY_CURSOR); pauseCtx->promptChoice = PAUSE_PROMPT_YES; } break; @@ -3365,18 +3365,18 @@ void KaleidoScope_Update(PlayState* play) { (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START))) { pauseCtx->state = PAUSE_STATE_GAMEOVER_CONTINUE_PROMPT; gameOverCtx->state++; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); } break; case PAUSE_STATE_GAMEOVER_CONTINUE_PROMPT: if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) { if (pauseCtx->promptChoice == PAUSE_PROMPT_YES) { - play_sound(NA_SE_SY_PIECE_OF_HEART); + Audio_PlaySfx(NA_SE_SY_PIECE_OF_HEART); Play_SaveCycleSceneFlags(&play->state); if (gSaveContext.save.entrance == ENTRANCE(UNSET_0D, 0)) {} } else { // PAUSE_PROMPT_NO - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); } pauseCtx->state = PAUSE_STATE_GAMEOVER_10; } @@ -3484,11 +3484,11 @@ void KaleidoScope_Update(PlayState* play) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->state = PAUSE_STATE_OWLWARP_6; sPauseMenuVerticalOffset = -6240.0f; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); play->msgCtx.ocarinaMode = 4; gSaveContext.prevHudVisibility = HUD_VISIBILITY_ALL; } else if (CHECK_BTN_ALL(input->press.button, BTN_A)) { - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); Message_StartTextbox(play, 0x1B93, NULL); pauseCtx->state = PAUSE_STATE_OWLWARP_CONFIRM; } else { @@ -3504,26 +3504,26 @@ void KaleidoScope_Update(PlayState* play) { func_8011552C(play, DO_ACTION_NONE); pauseCtx->state = PAUSE_STATE_OWLWARP_6; sPauseMenuVerticalOffset = -6240.0f; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); play->msgCtx.ocarinaMode = sCursorPointsToOcarinaModes[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]]; - play_sound(NA_SE_SY_DECIDE); + Audio_PlaySfx(NA_SE_SY_DECIDE); } else { pauseCtx->state = PAUSE_STATE_OWLWARP_SELECT; func_8011552C(play, DO_ACTION_WARP); - play_sound(NA_SE_SY_MESSAGE_PASS); + Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS); } } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { msgCtx->msgLength = 0; msgCtx->msgMode = 0; pauseCtx->state = PAUSE_STATE_OWLWARP_SELECT; - play_sound(NA_SE_SY_MESSAGE_PASS); + Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS); } else if (CHECK_BTN_ALL(input->press.button, BTN_START)) { msgCtx->msgLength = 0; msgCtx->msgMode = 0; func_8011552C(play, DO_ACTION_NONE); pauseCtx->state = PAUSE_STATE_OWLWARP_6; sPauseMenuVerticalOffset = -6240.0f; - func_801A3AEC(0); + Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE); play->msgCtx.ocarinaMode = 4; gSaveContext.prevHudVisibility = HUD_VISIBILITY_ALL; } diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index ba8336dcd3..d5cd2151db 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -802,14 +802,14 @@ 0x800B8E1C:("func_800B8E1C",), 0x800B8E58:("Player_PlaySfx",), 0x800B8EC8:("Actor_PlaySfx",), - 0x800B8EF4:("func_800B8EF4",), - 0x800B8F98:("func_800B8F98",), - 0x800B8FC0:("func_800B8FC0",), - 0x800B8FE8:("func_800B8FE8",), - 0x800B9010:("func_800B9010",), - 0x800B9038:("func_800B9038",), - 0x800B9084:("func_800B9084",), - 0x800B9098:("func_800B9098",), + 0x800B8EF4:("Actor_PlaySfx_SurfaceBomb",), + 0x800B8F98:("Actor_PlaySfx_FlaggedCentered1",), + 0x800B8FC0:("Actor_PlaySfx_FlaggedCentered2",), + 0x800B8FE8:("Actor_PlaySfx_FlaggedCentered3",), + 0x800B9010:("Actor_PlaySfx_Flagged",), + 0x800B9038:("Actor_PlaySfx_FlaggedTimer",), + 0x800B9084:("Actor_PlaySeq_FlaggedKamaroDance",), + 0x800B9098:("Actor_PlaySeq_FlaggedMusicBoxHouse",), 0x800B90AC:("func_800B90AC",), 0x800B90F4:("Actor_DeactivateLens",), 0x800B9120:("Actor_InitHalfDaysBit",), @@ -818,7 +818,7 @@ 0x800B948C:("Actor_UpdateActor",), 0x800B9780:("Actor_UpdateAll",), 0x800B9A04:("Actor_Draw",), - 0x800B9D1C:("func_800B9D1C",), + 0x800B9D1C:("Actor_UpdateFlaggedAudio",), 0x800B9E3C:("Actor_ResetLensActors",), 0x800B9E4C:("Actor_AddToLensActors",), 0x800B9E84:("Actor_DrawLensOverlay",), @@ -1845,9 +1845,9 @@ 0x800FFEBC:("Math_SmoothStepToS",), 0x800FFFD8:("Math_ApproachS",), 0x8010007C:("Color_RGBA8_Copy",), - 0x801000A4:("func_801000A4",), - 0x801000CC:("func_801000CC",), - 0x801000F4:("Lib_PlaySfxAtPos",), + 0x801000A4:("Lib_PlaySfx",), + 0x801000CC:("Lib_PlaySfx_2",), + 0x801000F4:("Lib_PlaySfx_AtPos",), 0x8010011C:("Lib_Vec3f_TranslateAndRotateY",), 0x801001B8:("Lib_LerpRGB",), 0x80100448:("Math_Vec3f_StepTo",), @@ -3867,40 +3867,40 @@ 0x8019EB2C:("AudioSfx_SetProperties",), 0x8019F024:("AudioSfx_SetFreqAndStereoBits",), 0x8019F05C:("AudioSfx_ResetSfxChannelState",), - 0x8019F0C8:("play_sound",), - 0x8019F128:("func_8019F128",), - 0x8019F170:("func_8019F170",), - 0x8019F1C0:("Audio_PlaySfxAtPos",), - 0x8019F208:("func_8019F208",), - 0x8019F230:("func_8019F230",), + 0x8019F0C8:("Audio_PlaySfx",), + 0x8019F128:("Audio_PlaySfx_2",), + 0x8019F170:("Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb",), + 0x8019F1C0:("Audio_PlaySfx_AtPos",), + 0x8019F208:("Audio_PlaySfx_MessageDecide",), + 0x8019F230:("Audio_PlaySfx_MessageCancel",), 0x8019F258:("AudioSfx_AddSfxSetting",), 0x8019F300:("AudioSfx_ProcessSfxSettings",), - 0x8019F420:("func_8019F420",), - 0x8019F4AC:("func_8019F4AC",), - 0x8019F540:("func_8019F540",), + 0x8019F420:("Audio_PlaySfx_Underwater",), + 0x8019F4AC:("Audio_PlaySfx_WithSfxSettingsReverb",), + 0x8019F540:("Audio_SetSfxUnderwaterReverb",), 0x8019F570:("AudioSfx_LowerSfxSettingsReverb",), - 0x8019F5AC:("func_8019F5AC",), - 0x8019F638:("func_8019F638",), - 0x8019F780:("func_8019F780",), - 0x8019F7D8:("func_8019F7D8",), - 0x8019F830:("func_8019F830",), - 0x8019F88C:("func_8019F88C",), - 0x8019F900:("func_8019F900",), - 0x8019FA18:("func_8019FA18",), - 0x8019FAD8:("func_8019FAD8",), - 0x8019FB0C:("func_8019FB0C",), - 0x8019FC20:("func_8019FC20",), - 0x8019FCB8:("func_8019FCB8",), - 0x8019FD90:("func_8019FD90",), - 0x8019FDC8:("func_8019FDC8",), - 0x8019FE1C:("func_8019FE1C",), - 0x8019FE74:("func_8019FE74",), - 0x8019FEDC:("func_8019FEDC",), - 0x8019FF38:("func_8019FF38",), - 0x8019FF9C:("Audio_PlaySfxForRiver",), - 0x801A0048:("Audio_PlaySfxForWaterfall",), + 0x8019F5AC:("Audio_SetSyncedSfxFreqAndVolume",), + 0x8019F638:("Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume",), + 0x8019F780:("Audio_PlaySfx_AtPosWithSyncedFreqAndVolume",), + 0x8019F7D8:("Audio_PlaySfx_GiantsMaskUnused",), + 0x8019F830:("Audio_PlaySfx_GiantsMask",), + 0x8019F88C:("Audio_PlaySfx_Randomized",), + 0x8019F900:("Audio_PlaySfx_SwordCharge",), + 0x8019FA18:("Audio_PlaySfx_AtPosWithFreqAndVolume",), + 0x8019FAD8:("Audio_PlaySfx_AtPosWithFreq",), + 0x8019FB0C:("Audio_PlaySfx_AtPosWithFreqAndChannelIO",), + 0x8019FC20:("Audio_PlaySfx_WaterWheel",), + 0x8019FCB8:("Audio_PlaySfx_AtPosWithTimer",), + 0x8019FD90:("Audio_SetSfxTimerLerpInterval",), + 0x8019FDC8:("Audio_PlaySfx_AtPosWithReverb",), + 0x8019FE1C:("Audio_PlaySfx_AtPosWithVolume",), + 0x8019FE74:("Audio_SetSfxVolumeTransition",), + 0x8019FEDC:("Audio_UpdateSfxVolumeTransition",), + 0x8019FF38:("Audio_PlaySfx_FishingReel",), + 0x8019FF9C:("Audio_PlaySfx_River",), + 0x801A0048:("Audio_PlaySfx_Waterfall",), 0x801A00EC:("Audio_StepFreqLerp",), - 0x801A0124:("func_801A0124",), + 0x801A0124:("Audio_PlaySfx_BigBells",), 0x801A0184:("Audio_SetBgmVolumeOff",), 0x801A01C4:("Audio_SetBgmVolumeOn",), 0x801A0204:("func_801A0204",), @@ -3909,12 +3909,12 @@ 0x801A0318:("Audio_SetGanonsTowerBgmVolume",), 0x801A0450:("Audio_LowerMainBgmVolume",), 0x801A046C:("Audio_UpdateRiverSoundVolumes",), - 0x801A0554:("func_801A0554",), - 0x801A05E4:("func_801A05E4",), - 0x801A05F0:("func_801A05F0",), + 0x801A0554:("Audio_PlaySfx_IncreasinglyTransposed",), + 0x801A05E4:("Audio_ResetIncreasingTranspose",), + 0x801A05F0:("Audio_PlaySfx_Transposed",), 0x801A0654:("AudioSfx_SetChannelIO",), - 0x801A0810:("func_801A0810",), - 0x801A0868:("func_801A0868",), + 0x801A0810:("Audio_PlaySfx_AtPosWithChannelIO",), + 0x801A0868:("Audio_PlaySfx_AtPosWithAllChannelsIO",), 0x801A09D4:("func_801A09D4",), 0x801A0C70:("Audio_ClearSariaBgm",), 0x801A0C90:("Audio_ClearSariaBgmAtPos",), @@ -3969,35 +3969,35 @@ 0x801A39F8:("func_801A39F8",), 0x801A3A7C:("func_801A3A7C",), 0x801A3AC0:("func_801A3AC0",), - 0x801A3AEC:("func_801A3AEC",), + 0x801A3AEC:("Audio_PlaySfx_PauseMenuOpenOrClose",), 0x801A3B48:("func_801A3B48",), 0x801A3B90:("func_801A3B90",), 0x801A3CD8:("func_801A3CD8",), 0x801A3CF4:("func_801A3CF4",), - 0x801A3D54:("func_801A3D54",), + 0x801A3D54:("Audio_PlaySfx_SurroundSoundTest",), 0x801A3D98:("func_801A3D98",), 0x801A3E38:("func_801A3E38",), 0x801A3EC0:("func_801A3EC0",), 0x801A3F54:("Audio_SetCutsceneFlag",), - 0x801A3F6C:("func_801A3F6C",), - 0x801A3FB4:("func_801A3FB4",), - 0x801A3FFC:("func_801A3FFC",), + 0x801A3F6C:("Audio_PlaySfx_IfNotInCutsceneImpl",), + 0x801A3FB4:("Audio_PlaySfx_IfNotInCutscene",), + 0x801A3FFC:("Audio_MuteSfxAndAmbienceSeqExceptOcarinaAndSystem",), 0x801A400C:("Audio_SetSpec",), 0x801A4058:("func_801A4058",), 0x801A41C8:("func_801A41C8",), 0x801A41F8:("func_801A41F8",), - 0x801A429C:("func_801A429C",), + 0x801A429C:("Audio_StartSfxPlayer",), 0x801A42C8:("func_801A42C8",), 0x801A4324:("func_801A4324",), 0x801A4348:("func_801A4348",), 0x801A4380:("Audio_SetSfxVolumeExceptSystemAndOcarinaBanks",), - 0x801A4428:("func_801A4428",), + 0x801A4428:("Audio_SetSfxReverbIndexExceptOcarinaBank",), 0x801A44A4:("Audio_PreNMI",), 0x801A44C4:("Audio_ResetRequestedSceneSeqId",), 0x801A44D4:("Audio_ResetData",), 0x801A46F8:("func_801A46F8",), - 0x801A4748:("func_801A4748",), - 0x801A479C:("func_801A479C",), + 0x801A4748:("Audio_PlaySfx_AtFixedPos",), + 0x801A479C:("Audio_PlaySfx_AtPosWithVolumeTransition",), 0x801A47DC:("Audio_SetAmbienceChannelIO",), 0x801A48E0:("Audio_StartAmbience",), 0x801A4A28:("Audio_PlayAmbience",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 31c7a20191..08668478b5 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -2250,7 +2250,7 @@ 0x801D66A0:("sEnterGanonsTowerTimer","UNK_TYPE1","",0x1), 0x801D66A4:("sSfxVolumeDuration","UNK_TYPE2","",0x2), 0x801D66A8:("sSoundMode","UNK_TYPE1","",0x1), - 0x801D66AC:("sAudioIsWindowOpen","UNK_TYPE1","",0x1), + 0x801D66AC:("sAudioPauseMenuOpenOrClose","UNK_TYPE1","",0x1), 0x801D66B0:("sAudioCutsceneFlag","UNK_TYPE1","",0x1), 0x801D66B4:("sSpecReverb","UNK_TYPE1","",0x1), 0x801D66B8:("sAudioEnvReverb","UNK_TYPE1","",0x1), diff --git a/tools/namefixer.py b/tools/namefixer.py index 417210d8f3..d268b86748 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -186,7 +186,7 @@ wordReplace = { "func_801A0238": "Audio_SetMainBgmVolume", "func_801A2C20": "Audio_StopSubBgm", "func_801A2BB8": "Audio_PlaySubBgm", - "func_8019F1C0": "Audio_PlaySfxAtPos", + "func_8019F1C0": "Audio_PlaySfx_AtPos", "func_801A5BD0": "AudioSfx_MuteBanks", "func_801A72CC": "AudioSfx_StopByPos", "Audio_StopSfxByPos": "AudioSfx_StopByPos", @@ -218,6 +218,48 @@ wordReplace = { "func_801358D4": "AnimationContext_SetNextQueue", "func_801358F4": "AnimationContext_DisableQueue", "SkelAnime_LoadLinkAnimetion": "AnimationContext_SetLoadFrame", + "play_sound": "Audio_PlaySfx", + "func_8019F128": "Audio_PlaySfx_2", + "func_8019F170": "Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb", + "Audio_PlaySfxAtPos": "Audio_PlaySfx_AtPos", + "func_8019F208": "Audio_PlaySfx_MessageDecide", + "func_8019F230": "Audio_PlaySfx_MessageCancel", + "func_8019F420": "Audio_PlaySfx_Underwater", + "func_8019F4AC": "Audio_PlaySfx_WithSfxSettingsReverb", + "func_8019F638": "Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume", + "func_8019F780": "Audio_PlaySfx_AtPosWithSyncedFreqAndVolume", + "func_8019F830": "Audio_PlaySfx_GiantsMask", + "func_8019F88C": "Audio_PlaySfx_Randomized", + "func_8019F900": "Audio_PlaySfx_SwordCharge", + "func_8019FAD8": "Audio_PlaySfx_AtPosWithFreq", + "func_8019FB0C": "Audio_PlaySfx_AtPosWithFreqAndChannelIO", + "func_8019FC20": "Audio_PlaySfx_WaterWheel", + "func_8019FCB8": "Audio_PlaySfx_AtPosWithTimer", + "func_8019FDC8": "Audio_PlaySfx_AtPosWithReverb", + "func_8019FE1C": "Audio_PlaySfx_AtPosWithVolume", + "func_8019FF9C": "Audio_PlaySfx_River", + "func_801A0124": "Audio_PlaySfx_BigBells", + "func_801A0810": "Audio_PlaySfx_AtPosWithAllChannelsIO", + "func_801A0868": "Audio_PlaySfx_AtPosWithChannelIO", + "func_801A3AEC": "Audio_PlaySfx_PauseMenuOpenOrClose", + "func_801A3FB4": "Audio_PlaySfx_IfNotInCutscene", + "func_801A4748": "Audio_PlaySfx_AtFixedPos", + "func_801A479C": "Audio_PlaySfx_AtPosWithVolumeTransition", + "func_8019F540": "Audio_SetSfxUnderwaterReverb", + "func_8019FD90": "Audio_SetSfxTimerLerpInterval", + "func_8019FE74": "Audio_SetSfxVolumeTransition", + "func_801A4428": "Audio_SetSfxReverbIndexExceptOcarinaBank", + "func_800B8EF4": "Actor_PlaySfx_SurfaceBomb", + "func_800B8F98": "Actor_PlaySfx_FlaggedCentered1", + "func_800B8FC0": "Actor_PlaySfx_FlaggedCentered2", + "func_800B8FE8": "Actor_PlaySfx_FlaggedCentered3", + "func_800B9010": "Actor_PlaySfx_Flagged", + "func_800B9038": "Actor_PlaySfx_FlaggedTimer", + "func_800B9084": "Actor_PlaySeq_FlaggedKamaroDance", + "func_800B9098": "Actor_PlaySeq_FlaggedMusicBoxHouse", + "func_801000A4": "Lib_PlaySfx", + "func_801000CC": "Lib_PlaySfx_2", + "Lib_PlaySfxAtPos": "Lib_PlaySfx_AtPos", "SkelAnime_AnimationType1Loaded": "AnimationContext_CopyAll", "SkelAnime_AnimationType2Loaded": "AnimationContext_CopyInterp", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index 42d1e5f0bc..449be7b5d3 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -316,14 +316,14 @@ asm/non_matchings/code/z_actor/func_800B8DD4.s,func_800B8DD4,0x800B8DD4,0x12 asm/non_matchings/code/z_actor/func_800B8E1C.s,func_800B8E1C,0x800B8E1C,0xF asm/non_matchings/code/z_actor/Player_PlaySfx.s,Player_PlaySfx,0x800B8E58,0x1C asm/non_matchings/code/z_actor/Actor_PlaySfx.s,Actor_PlaySfx,0x800B8EC8,0xB -asm/non_matchings/code/z_actor/func_800B8EF4.s,func_800B8EF4,0x800B8EF4,0x29 -asm/non_matchings/code/z_actor/func_800B8F98.s,func_800B8F98,0x800B8F98,0xA -asm/non_matchings/code/z_actor/func_800B8FC0.s,func_800B8FC0,0x800B8FC0,0xA -asm/non_matchings/code/z_actor/func_800B8FE8.s,func_800B8FE8,0x800B8FE8,0xA -asm/non_matchings/code/z_actor/func_800B9010.s,func_800B9010,0x800B9010,0xA -asm/non_matchings/code/z_actor/func_800B9038.s,func_800B9038,0x800B9038,0x13 -asm/non_matchings/code/z_actor/func_800B9084.s,func_800B9084,0x800B9084,0x5 -asm/non_matchings/code/z_actor/func_800B9098.s,func_800B9098,0x800B9098,0x5 +asm/non_matchings/code/z_actor/Actor_PlaySfx_SurfaceBomb.s,Actor_PlaySfx_SurfaceBomb,0x800B8EF4,0x29 +asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered1.s,Actor_PlaySfx_FlaggedCentered1,0x800B8F98,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered2.s,Actor_PlaySfx_FlaggedCentered2,0x800B8FC0,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered3.s,Actor_PlaySfx_FlaggedCentered3,0x800B8FE8,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_Flagged.s,Actor_PlaySfx_Flagged,0x800B9010,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedTimer.s,Actor_PlaySfx_FlaggedTimer,0x800B9038,0x13 +asm/non_matchings/code/z_actor/Actor_PlaySeq_FlaggedKamaroDance.s,Actor_PlaySeq_FlaggedKamaroDance,0x800B9084,0x5 +asm/non_matchings/code/z_actor/Actor_PlaySeq_FlaggedMusicBoxHouse.s,Actor_PlaySeq_FlaggedMusicBoxHouse,0x800B9098,0x5 asm/non_matchings/code/z_actor/func_800B90AC.s,func_800B90AC,0x800B90AC,0x12 asm/non_matchings/code/z_actor/Actor_DeactivateLens.s,Actor_DeactivateLens,0x800B90F4,0xB asm/non_matchings/code/z_actor/Actor_InitHalfDaysBit.s,Actor_InitHalfDaysBit,0x800B9120,0x14 @@ -332,7 +332,7 @@ asm/non_matchings/code/z_actor/Actor_SpawnSetupActors.s,Actor_SpawnSetupActors,0 asm/non_matchings/code/z_actor/Actor_UpdateActor.s,Actor_UpdateActor,0x800B948C,0xBD asm/non_matchings/code/z_actor/Actor_UpdateAll.s,Actor_UpdateAll,0x800B9780,0xA1 asm/non_matchings/code/z_actor/Actor_Draw.s,Actor_Draw,0x800B9A04,0xC6 -asm/non_matchings/code/z_actor/func_800B9D1C.s,func_800B9D1C,0x800B9D1C,0x48 +asm/non_matchings/code/z_actor/Actor_UpdateFlaggedAudio.s,Actor_UpdateFlaggedAudio,0x800B9D1C,0x48 asm/non_matchings/code/z_actor/Actor_ResetLensActors.s,Actor_ResetLensActors,0x800B9E3C,0x4 asm/non_matchings/code/z_actor/Actor_AddToLensActors.s,Actor_AddToLensActors,0x800B9E4C,0xE asm/non_matchings/code/z_actor/Actor_DrawLensOverlay.s,Actor_DrawLensOverlay,0x800B9E84,0x1C @@ -1359,9 +1359,9 @@ asm/non_matchings/code/z_lib/Math_ApproachZeroF.s,Math_ApproachZeroF,0x800FFE68, asm/non_matchings/code/z_lib/Math_SmoothStepToS.s,Math_SmoothStepToS,0x800FFEBC,0x47 asm/non_matchings/code/z_lib/Math_ApproachS.s,Math_ApproachS,0x800FFFD8,0x29 asm/non_matchings/code/z_lib/Color_RGBA8_Copy.s,Color_RGBA8_Copy,0x8010007C,0xA -asm/non_matchings/code/z_lib/func_801000A4.s,func_801000A4,0x801000A4,0xA -asm/non_matchings/code/z_lib/func_801000CC.s,func_801000CC,0x801000CC,0xA -asm/non_matchings/code/z_lib/Lib_PlaySfxAtPos.s,Lib_PlaySfxAtPos,0x801000F4,0xA +asm/non_matchings/code/z_lib/Lib_PlaySfx.s,Lib_PlaySfx,0x801000A4,0xA +asm/non_matchings/code/z_lib/Lib_PlaySfx_2.s,Lib_PlaySfx_2,0x801000CC,0xA +asm/non_matchings/code/z_lib/Lib_PlaySfx_AtPos.s,Lib_PlaySfx_AtPos,0x801000F4,0xA asm/non_matchings/code/z_lib/Lib_Vec3f_TranslateAndRotateY.s,Lib_Vec3f_TranslateAndRotateY,0x8010011C,0x27 asm/non_matchings/code/z_lib/Lib_LerpRGB.s,Lib_LerpRGB,0x801001B8,0xA4 asm/non_matchings/code/z_lib/Math_Vec3f_StepTo.s,Math_Vec3f_StepTo,0x80100448,0x2D @@ -3384,40 +3384,40 @@ asm/non_matchings/code/code_8019AF00/AudioSfx_ComputeCombFilter.s,AudioSfx_Compu asm/non_matchings/code/code_8019AF00/AudioSfx_SetProperties.s,AudioSfx_SetProperties,0x8019EB2C,0x13E asm/non_matchings/code/code_8019AF00/AudioSfx_SetFreqAndStereoBits.s,AudioSfx_SetFreqAndStereoBits,0x8019F024,0xE asm/non_matchings/code/code_8019AF00/AudioSfx_ResetSfxChannelState.s,AudioSfx_ResetSfxChannelState,0x8019F05C,0x1B -asm/non_matchings/code/code_8019AF00/play_sound.s,play_sound,0x8019F0C8,0x18 -asm/non_matchings/code/code_8019AF00/func_8019F128.s,func_8019F128,0x8019F128,0x12 -asm/non_matchings/code/code_8019AF00/func_8019F170.s,func_8019F170,0x8019F170,0x14 -asm/non_matchings/code/code_8019AF00/Audio_PlaySfxAtPos.s,Audio_PlaySfxAtPos,0x8019F1C0,0x12 -asm/non_matchings/code/code_8019AF00/func_8019F208.s,func_8019F208,0x8019F208,0xA -asm/non_matchings/code/code_8019AF00/func_8019F230.s,func_8019F230,0x8019F230,0xA +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx.s,Audio_PlaySfx,0x8019F0C8,0x18 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_2.s,Audio_PlaySfx_2,0x8019F128,0x12 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb.s,Audio_PlaySfx_AtPosWithPresetLowFreqAndHighReverb,0x8019F170,0x14 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPos.s,Audio_PlaySfx_AtPos,0x8019F1C0,0x12 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_MessageDecide.s,Audio_PlaySfx_MessageDecide,0x8019F208,0xA +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_MessageCancel.s,Audio_PlaySfx_MessageCancel,0x8019F230,0xA asm/non_matchings/code/code_8019AF00/AudioSfx_AddSfxSetting.s,AudioSfx_AddSfxSetting,0x8019F258,0x2A asm/non_matchings/code/code_8019AF00/AudioSfx_ProcessSfxSettings.s,AudioSfx_ProcessSfxSettings,0x8019F300,0x48 -asm/non_matchings/code/code_8019AF00/func_8019F420.s,func_8019F420,0x8019F420,0x23 -asm/non_matchings/code/code_8019AF00/func_8019F4AC.s,func_8019F4AC,0x8019F4AC,0x25 -asm/non_matchings/code/code_8019AF00/func_8019F540.s,func_8019F540,0x8019F540,0xC +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_Underwater.s,Audio_PlaySfx_Underwater,0x8019F420,0x23 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_WithSfxSettingsReverb.s,Audio_PlaySfx_WithSfxSettingsReverb,0x8019F4AC,0x25 +asm/non_matchings/code/code_8019AF00/Audio_SetSfxUnderwaterReverb.s,Audio_SetSfxUnderwaterReverb,0x8019F540,0xC asm/non_matchings/code/code_8019AF00/AudioSfx_LowerSfxSettingsReverb.s,AudioSfx_LowerSfxSettingsReverb,0x8019F570,0xF -asm/non_matchings/code/code_8019AF00/func_8019F5AC.s,func_8019F5AC,0x8019F5AC,0x23 -asm/non_matchings/code/code_8019AF00/func_8019F638.s,func_8019F638,0x8019F638,0x52 -asm/non_matchings/code/code_8019AF00/func_8019F780.s,func_8019F780,0x8019F780,0x16 -asm/non_matchings/code/code_8019AF00/func_8019F7D8.s,func_8019F7D8,0x8019F7D8,0x16 -asm/non_matchings/code/code_8019AF00/func_8019F830.s,func_8019F830,0x8019F830,0x17 -asm/non_matchings/code/code_8019AF00/func_8019F88C.s,func_8019F88C,0x8019F88C,0x1D -asm/non_matchings/code/code_8019AF00/func_8019F900.s,func_8019F900,0x8019F900,0x46 -asm/non_matchings/code/code_8019AF00/func_8019FA18.s,func_8019FA18,0x8019FA18,0x30 -asm/non_matchings/code/code_8019AF00/func_8019FAD8.s,func_8019FAD8,0x8019FAD8,0xD -asm/non_matchings/code/code_8019AF00/func_8019FB0C.s,func_8019FB0C,0x8019FB0C,0x45 -asm/non_matchings/code/code_8019AF00/func_8019FC20.s,func_8019FC20,0x8019FC20,0x26 -asm/non_matchings/code/code_8019AF00/func_8019FCB8.s,func_8019FCB8,0x8019FCB8,0x36 -asm/non_matchings/code/code_8019AF00/func_8019FD90.s,func_8019FD90,0x8019FD90,0xE -asm/non_matchings/code/code_8019AF00/func_8019FDC8.s,func_8019FDC8,0x8019FDC8,0x15 -asm/non_matchings/code/code_8019AF00/func_8019FE1C.s,func_8019FE1C,0x8019FE1C,0x16 -asm/non_matchings/code/code_8019AF00/func_8019FE74.s,func_8019FE74,0x8019FE74,0x1A -asm/non_matchings/code/code_8019AF00/func_8019FEDC.s,func_8019FEDC,0x8019FEDC,0x17 -asm/non_matchings/code/code_8019AF00/func_8019FF38.s,func_8019FF38,0x8019FF38,0x19 -asm/non_matchings/code/code_8019AF00/Audio_PlaySfxForRiver.s,Audio_PlaySfxForRiver,0x8019FF9C,0x2B -asm/non_matchings/code/code_8019AF00/Audio_PlaySfxForWaterfall.s,Audio_PlaySfxForWaterfall,0x801A0048,0x29 +asm/non_matchings/code/code_8019AF00/Audio_SetSyncedSfxFreqAndVolume.s,Audio_SetSyncedSfxFreqAndVolume,0x8019F5AC,0x23 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume.s,Audio_PlaySfx_AtPosForMetalEffectsWithSyncedFreqAndVolume,0x8019F638,0x52 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithSyncedFreqAndVolume.s,Audio_PlaySfx_AtPosWithSyncedFreqAndVolume,0x8019F780,0x16 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_GiantsMaskUnused.s,Audio_PlaySfx_GiantsMaskUnused,0x8019F7D8,0x16 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_GiantsMask.s,Audio_PlaySfx_GiantsMask,0x8019F830,0x17 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_Randomized.s,Audio_PlaySfx_Randomized,0x8019F88C,0x1D +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_SwordCharge.s,Audio_PlaySfx_SwordCharge,0x8019F900,0x46 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithFreqAndVolume.s,Audio_PlaySfx_AtPosWithFreqAndVolume,0x8019FA18,0x30 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithFreq.s,Audio_PlaySfx_AtPosWithFreq,0x8019FAD8,0xD +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithFreqAndChannelIO.s,Audio_PlaySfx_AtPosWithFreqAndChannelIO,0x8019FB0C,0x45 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_WaterWheel.s,Audio_PlaySfx_WaterWheel,0x8019FC20,0x26 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithTimer.s,Audio_PlaySfx_AtPosWithTimer,0x8019FCB8,0x36 +asm/non_matchings/code/code_8019AF00/Audio_SetSfxTimerLerpInterval.s,Audio_SetSfxTimerLerpInterval,0x8019FD90,0xE +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithReverb.s,Audio_PlaySfx_AtPosWithReverb,0x8019FDC8,0x15 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithVolume.s,Audio_PlaySfx_AtPosWithVolume,0x8019FE1C,0x16 +asm/non_matchings/code/code_8019AF00/Audio_SetSfxVolumeTransition.s,Audio_SetSfxVolumeTransition,0x8019FE74,0x1A +asm/non_matchings/code/code_8019AF00/Audio_UpdateSfxVolumeTransition.s,Audio_UpdateSfxVolumeTransition,0x8019FEDC,0x17 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_FishingReel.s,Audio_PlaySfx_FishingReel,0x8019FF38,0x19 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_River.s,Audio_PlaySfx_River,0x8019FF9C,0x2B +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_Waterfall.s,Audio_PlaySfx_Waterfall,0x801A0048,0x29 asm/non_matchings/code/code_8019AF00/Audio_StepFreqLerp.s,Audio_StepFreqLerp,0x801A00EC,0xE -asm/non_matchings/code/code_8019AF00/func_801A0124.s,func_801A0124,0x801A0124,0x18 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_BigBells.s,Audio_PlaySfx_BigBells,0x801A0124,0x18 asm/non_matchings/code/code_8019AF00/Audio_SetBgmVolumeOff.s,Audio_SetBgmVolumeOff,0x801A0184,0x10 asm/non_matchings/code/code_8019AF00/Audio_SetBgmVolumeOn.s,Audio_SetBgmVolumeOn,0x801A01C4,0x10 asm/non_matchings/code/code_8019AF00/func_801A0204.s,func_801A0204,0x801A0204,0xD @@ -3426,12 +3426,12 @@ asm/non_matchings/code/code_8019AF00/Audio_SetGanonsTowerBgmVolumeLevel.s,Audio_ asm/non_matchings/code/code_8019AF00/Audio_SetGanonsTowerBgmVolume.s,Audio_SetGanonsTowerBgmVolume,0x801A0318,0x4E asm/non_matchings/code/code_8019AF00/Audio_LowerMainBgmVolume.s,Audio_LowerMainBgmVolume,0x801A0450,0x7 asm/non_matchings/code/code_8019AF00/Audio_UpdateRiverSoundVolumes.s,Audio_UpdateRiverSoundVolumes,0x801A046C,0x3A -asm/non_matchings/code/code_8019AF00/func_801A0554.s,func_801A0554,0x801A0554,0x24 -asm/non_matchings/code/code_8019AF00/func_801A05E4.s,func_801A05E4,0x801A05E4,0x3 -asm/non_matchings/code/code_8019AF00/func_801A05F0.s,func_801A05F0,0x801A05F0,0x19 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_IncreasinglyTransposed.s,Audio_PlaySfx_IncreasinglyTransposed,0x801A0554,0x24 +asm/non_matchings/code/code_8019AF00/Audio_ResetIncreasingTranspose.s,Audio_ResetIncreasingTranspose,0x801A05E4,0x3 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_Transposed.s,Audio_PlaySfx_Transposed,0x801A05F0,0x19 asm/non_matchings/code/code_8019AF00/AudioSfx_SetChannelIO.s,AudioSfx_SetChannelIO,0x801A0654,0x6F -asm/non_matchings/code/code_8019AF00/func_801A0810.s,func_801A0810,0x801A0810,0x16 -asm/non_matchings/code/code_8019AF00/func_801A0868.s,func_801A0868,0x801A0868,0x5B +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithChannelIO.s,Audio_PlaySfx_AtPosWithChannelIO,0x801A0810,0x16 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithAllChannelsIO.s,Audio_PlaySfx_AtPosWithAllChannelsIO,0x801A0868,0x5B asm/non_matchings/code/code_8019AF00/func_801A09D4.s,func_801A09D4,0x801A09D4,0xA7 asm/non_matchings/code/code_8019AF00/Audio_ClearSariaBgm.s,Audio_ClearSariaBgm,0x801A0C70,0x8 asm/non_matchings/code/code_8019AF00/Audio_ClearSariaBgmAtPos.s,Audio_ClearSariaBgmAtPos,0x801A0C90,0x8 @@ -3486,35 +3486,35 @@ asm/non_matchings/code/code_8019AF00/func_801A3950.s,func_801A3950,0x801A3950,0x asm/non_matchings/code/code_8019AF00/func_801A39F8.s,func_801A39F8,0x801A39F8,0x21 asm/non_matchings/code/code_8019AF00/func_801A3A7C.s,func_801A3A7C,0x801A3A7C,0x11 asm/non_matchings/code/code_8019AF00/func_801A3AC0.s,func_801A3AC0,0x801A3AC0,0xB -asm/non_matchings/code/code_8019AF00/func_801A3AEC.s,func_801A3AEC,0x801A3AEC,0x17 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_PauseMenuOpenOrClose.s,Audio_PlaySfx_PauseMenuOpenOrClose,0x801A3AEC,0x17 asm/non_matchings/code/code_8019AF00/func_801A3B48.s,func_801A3B48,0x801A3B48,0x12 asm/non_matchings/code/code_8019AF00/func_801A3B90.s,func_801A3B90,0x801A3B90,0x52 asm/non_matchings/code/code_8019AF00/func_801A3CD8.s,func_801A3CD8,0x801A3CD8,0x7 asm/non_matchings/code/code_8019AF00/func_801A3CF4.s,func_801A3CF4,0x801A3CF4,0x18 -asm/non_matchings/code/code_8019AF00/func_801A3D54.s,func_801A3D54,0x801A3D54,0x11 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_SurroundSoundTest.s,Audio_PlaySfx_SurroundSoundTest,0x801A3D54,0x11 asm/non_matchings/code/code_8019AF00/func_801A3D98.s,func_801A3D98,0x801A3D98,0x28 asm/non_matchings/code/code_8019AF00/func_801A3E38.s,func_801A3E38,0x801A3E38,0x22 asm/non_matchings/code/code_8019AF00/func_801A3EC0.s,func_801A3EC0,0x801A3EC0,0x25 asm/non_matchings/code/code_8019AF00/Audio_SetCutsceneFlag.s,Audio_SetCutsceneFlag,0x801A3F54,0x6 -asm/non_matchings/code/code_8019AF00/func_801A3F6C.s,func_801A3F6C,0x801A3F6C,0x12 -asm/non_matchings/code/code_8019AF00/func_801A3FB4.s,func_801A3FB4,0x801A3FB4,0x12 -asm/non_matchings/code/code_8019AF00/func_801A3FFC.s,func_801A3FFC,0x801A3FFC,0x4 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_IfNotInCutsceneImpl.s,Audio_PlaySfx_IfNotInCutsceneImpl,0x801A3F6C,0x12 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_IfNotInCutscene.s,Audio_PlaySfx_IfNotInCutscene,0x801A3FB4,0x12 +asm/non_matchings/code/code_8019AF00/Audio_MuteSfxAndAmbienceSeqExceptOcarinaAndSystem.s,Audio_MuteSfxAndAmbienceSeqExceptOcarinaAndSystem,0x801A3FFC,0x4 asm/non_matchings/code/code_8019AF00/Audio_SetSpec.s,Audio_SetSpec,0x801A400C,0x13 asm/non_matchings/code/code_8019AF00/func_801A4058.s,func_801A4058,0x801A4058,0x5C asm/non_matchings/code/code_8019AF00/func_801A41C8.s,func_801A41C8,0x801A41C8,0xC asm/non_matchings/code/code_8019AF00/func_801A41F8.s,func_801A41F8,0x801A41F8,0x29 -asm/non_matchings/code/code_8019AF00/func_801A429C.s,func_801A429C,0x801A429C,0xB +asm/non_matchings/code/code_8019AF00/Audio_StartSfxPlayer.s,Audio_StartSfxPlayer,0x801A429C,0xB asm/non_matchings/code/code_8019AF00/func_801A42C8.s,func_801A42C8,0x801A42C8,0x17 asm/non_matchings/code/code_8019AF00/func_801A4324.s,func_801A4324,0x801A4324,0x9 asm/non_matchings/code/code_8019AF00/func_801A4348.s,func_801A4348,0x801A4348,0xE asm/non_matchings/code/code_8019AF00/Audio_SetSfxVolumeExceptSystemAndOcarinaBanks.s,Audio_SetSfxVolumeExceptSystemAndOcarinaBanks,0x801A4380,0x2A -asm/non_matchings/code/code_8019AF00/func_801A4428.s,func_801A4428,0x801A4428,0x1F +asm/non_matchings/code/code_8019AF00/Audio_SetSfxReverbIndexExceptOcarinaBank.s,Audio_SetSfxReverbIndexExceptOcarinaBank,0x801A4428,0x1F asm/non_matchings/code/code_8019AF00/Audio_PreNMI.s,Audio_PreNMI,0x801A44A4,0x8 asm/non_matchings/code/code_8019AF00/Audio_ResetRequestedSceneSeqId.s,Audio_ResetRequestedSceneSeqId,0x801A44C4,0x4 asm/non_matchings/code/code_8019AF00/Audio_ResetData.s,Audio_ResetData,0x801A44D4,0x89 asm/non_matchings/code/code_8019AF00/func_801A46F8.s,func_801A46F8,0x801A46F8,0x14 -asm/non_matchings/code/code_8019AF00/func_801A4748.s,func_801A4748,0x801A4748,0x15 -asm/non_matchings/code/code_8019AF00/func_801A479C.s,func_801A479C,0x801A479C,0x10 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtFixedPos.s,Audio_PlaySfx_AtFixedPos,0x801A4748,0x15 +asm/non_matchings/code/code_8019AF00/Audio_PlaySfx_AtPosWithVolumeTransition.s,Audio_PlaySfx_AtPosWithVolumeTransition,0x801A479C,0x10 asm/non_matchings/code/code_8019AF00/Audio_SetAmbienceChannelIO.s,Audio_SetAmbienceChannelIO,0x801A47DC,0x41 asm/non_matchings/code/code_8019AF00/Audio_StartAmbience.s,Audio_StartAmbience,0x801A48E0,0x52 asm/non_matchings/code/code_8019AF00/Audio_PlayAmbience.s,Audio_PlayAmbience,0x801A4A28,0x56