Add `SFX_PLAY_CENTERED`

This commit is contained in:
Dragorn421 2025-06-14 07:12:20 +02:00
parent 8a823a7ad2
commit a97305c182
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
57 changed files with 332 additions and 695 deletions

View File

@ -157,6 +157,10 @@ typedef struct SfxParams {
#define SFX_DIST_SCALING 10.0f #define SFX_DIST_SCALING 10.0f
#endif #endif
#define SFX_PLAY_CENTERED(sfxId) \
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, \
&gSfxDefaultReverb);
void Audio_SetSfxBanksMute(u16 muteMask); void Audio_SetSfxBanksMute(u16 muteMask);
void Audio_QueueSeqCmdMute(u8 channelIndex); void Audio_QueueSeqCmdMute(u8 channelIndex);
void Audio_ClearBGMMute(u8 channelIndex); void Audio_ClearBGMMute(u8 channelIndex);

View File

@ -842,9 +842,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
break; break;
case 2: case 2:
case 3: case 3:
Audio_PlaySfxGeneral(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG, SFX_PLAY_CENTERED(((sAudioSndContWork[2] << 12) & 0xFFFF) + sAudioSndContWork[3] + SFX_FLAG);
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
break; break;
case 4: case 4:
Audio_SetSoundOutputMode(sAudioSndContWork[sAudioSndContSel]); Audio_SetSoundOutputMode(sAudioSndContWork[sAudioSndContSel]);
@ -1245,8 +1243,7 @@ void AudioDebug_ProcessInput_SfxParamChg(void) {
if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) { if (CHECK_BTN_ANY(sDebugPadPress, BTN_A)) {
sfx = (u16)(sAudioSfxParamChgWork[0] << 12) + sAudioSfxParamChgWork[1] + SFX_FLAG; sfx = (u16)(sAudioSfxParamChgWork[0] << 12) + sAudioSfxParamChgWork[1] + SFX_FLAG;
Audio_PlaySfxGeneral(sfx, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(sfx);
&gSfxDefaultReverb);
} }
if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) { if (CHECK_BTN_ANY(sDebugPadPress, BTN_B)) {

View File

@ -3704,12 +3704,10 @@ void Audio_UpdateMalonSinging(f32 dist, u16 seqId) {
void func_800F64E0(u8 arg0) { void func_800F64E0(u8 arg0) {
D_80130608 = arg0; D_80130608 = arg0;
if (arg0 != 0) { if (arg0 != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
AUDIOCMD_GLOBAL_MUTE(); AUDIOCMD_GLOBAL_MUTE();
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_WIN_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
AUDIOCMD_GLOBAL_UNMUTE(0); AUDIOCMD_GLOBAL_UNMUTE(0);
} }
} }
@ -3818,8 +3816,7 @@ void Audio_SetBaseFilter(u8 filter) {
if (filter == 0) { if (filter == 0) {
Audio_StopSfxById(NA_SE_PL_IN_BUBBLE); Audio_StopSfxById(NA_SE_PL_IN_BUBBLE);
} else if (sAudioBaseFilter == 0) { } else if (sAudioBaseFilter == 0) {
Audio_PlaySfxGeneral(NA_SE_PL_IN_BUBBLE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_PL_IN_BUBBLE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
sAudioBaseFilter = filter; sAudioBaseFilter = filter;

View File

@ -373,8 +373,7 @@ void func_800B44E0(DebugCam* debugCam, Camera* cam) {
if (debugCam->sub.nPoints < 6) { if (debugCam->sub.nPoints < 6) {
if (sDebugCamAnim.unk_0A != 0) { if (sDebugCamAnim.unk_0A != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDebugCamAnim.unk_0A = 0; sDebugCamAnim.unk_0A = 0;
} }
DebugCamera_ScreenTextColored(17, 23, DEBUG_CAM_TEXT_ORANGE, D_8012CEE0[0]); DebugCamera_ScreenTextColored(17, 23, DEBUG_CAM_TEXT_ORANGE, D_8012CEE0[0]);
@ -388,8 +387,7 @@ void func_800B44E0(DebugCam* debugCam, Camera* cam) {
!func_800BB2B4(&sDebugCamAnim.lookAtPos, &sDebugCamAnim.roll, &sDebugCamAnim.fov, debugCam->sub.lookAt, !func_800BB2B4(&sDebugCamAnim.lookAtPos, &sDebugCamAnim.roll, &sDebugCamAnim.fov, debugCam->sub.lookAt,
&sDebugCamAnim.keyframe, &sDebugCamAnim.curFrame) && &sDebugCamAnim.keyframe, &sDebugCamAnim.curFrame) &&
sDebugCamAnim.unk_0A == 1) { sDebugCamAnim.unk_0A == 1) {
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDebugCamAnim.unk_04++; sDebugCamAnim.unk_04++;
if (debugCam->sub.nFrames > 0 && debugCam->sub.nFrames < sDebugCamAnim.unk_04) { if (debugCam->sub.nFrames > 0 && debugCam->sub.nFrames < sDebugCamAnim.unk_04) {
@ -617,8 +615,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
debugCam->unk_40 = -1; debugCam->unk_40 = -1;
debugCam->sub.demoCtrlActionIdx = 0; debugCam->sub.demoCtrlActionIdx = 0;
sDebugCamAnim.unk_0A = 0; sDebugCamAnim.unk_0A = 0;
Audio_PlaySfxGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_LOCK_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (debugCam->unk_38 == -1) { } else if (debugCam->unk_38 == -1) {
debugCam->unk_38 = 1; debugCam->unk_38 = 1;
} else { } else {
@ -938,25 +935,21 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
debugCam->unk_1C.z = 0.0f; debugCam->unk_1C.z = 0.0f;
debugCam->unk_1C.y = 1.0f; debugCam->unk_1C.y = 1.0f;
} else if (debugCam->sub.unk_08 == 2) { } else if (debugCam->sub.unk_08 == 2) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.unk_08 = 0; debugCam->sub.unk_08 = 0;
func_800B41DC(debugCam, debugCam->sub.unkIdx, cam); func_800B41DC(debugCam, debugCam->sub.unkIdx, cam);
} else { } else {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R) && if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.nPoints = debugCam->sub.unkIdx + 1; debugCam->sub.nPoints = debugCam->sub.unkIdx + 1;
func_800B4088(debugCam, cam); func_800B4088(debugCam, cam);
} else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R)) { } else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R)) {
if (debugCam->sub.unkIdx == 0x80) { if (debugCam->sub.unkIdx == 0x80) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_PUTAWAY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
func_800B42C0(debugCam, cam); func_800B42C0(debugCam, cam);
if (debugCam->sub.unkIdx == (debugCam->sub.nPoints - 1)) { if (debugCam->sub.unkIdx == (debugCam->sub.nPoints - 1)) {
debugCam->sub.unkIdx++; debugCam->sub.unkIdx++;
@ -1009,8 +1002,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} else { } else {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CRIGHT) && if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CRIGHT) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
PRINTF("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n"); PRINTF("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
DebugCamera_PrintPoints("Lookat", debugCam->sub.nPoints, debugCam->sub.lookAt); DebugCamera_PrintPoints("Lookat", debugCam->sub.nPoints, debugCam->sub.lookAt);
DebugCamera_PrintPoints("Position", debugCam->sub.nPoints, debugCam->sub.position); DebugCamera_PrintPoints("Position", debugCam->sub.nPoints, debugCam->sub.position);
@ -1019,15 +1011,13 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
PRINTF("@@@static short Mode = %d;\n@@@\n", debugCam->sub.mode); PRINTF("@@@static short Mode = %d;\n@@@\n", debugCam->sub.mode);
PRINTF("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n"); PRINTF("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
} else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) { } else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.unk_08 = (debugCam->sub.unk_08 + 1) % 3; debugCam->sub.unk_08 = (debugCam->sub.unk_08 + 1) % 3;
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CUP) && if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CUP) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.unkIdx > 0) { if (debugCam->sub.unkIdx > 0) {
debugCam->sub.unkIdx--; debugCam->sub.unkIdx--;
} else { } else {
@ -1035,8 +1025,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
} else { } else {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CUP)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CUP)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.unkIdx > 0) { if (debugCam->sub.unkIdx > 0) {
debugCam->sub.unkIdx--; debugCam->sub.unkIdx--;
} else { } else {
@ -1057,8 +1046,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L) && if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CDOWN)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CDOWN)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.unkIdx < (debugCam->sub.nPoints - 1)) { if (debugCam->sub.unkIdx < (debugCam->sub.nPoints - 1)) {
debugCam->sub.unkIdx++; debugCam->sub.unkIdx++;
} else { } else {
@ -1066,8 +1054,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
} else { } else {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CDOWN)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CDOWN)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.unkIdx < (debugCam->sub.nPoints - 1)) { if (debugCam->sub.unkIdx < (debugCam->sub.nPoints - 1)) {
debugCam->sub.unkIdx++; debugCam->sub.unkIdx++;
} else { } else {
@ -1140,8 +1127,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
case 1: case 1:
debugCam->unk_3C = true; debugCam->unk_3C = true;
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.unk_0A == 0) { if (debugCam->sub.unk_0A == 0) {
debugCam->sub.unk_0A = 5; debugCam->sub.unk_0A = 5;
} else { } else {
@ -1149,8 +1135,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.unk_0A == 5) { if (debugCam->sub.unk_0A == 5) {
debugCam->sub.unk_0A = 0; debugCam->sub.unk_0A = 0;
} else { } else {
@ -1158,8 +1143,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
switch (debugCam->sub.unk_0A) { switch (debugCam->sub.unk_0A) {
case 1: case 1:
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) {
@ -1208,8 +1192,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_DLEFT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_DLEFT)) {
if ((D_8012D10C++ % 5) == 0) { if ((D_8012D10C++ % 5) == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
switch (debugCam->sub.unk_0A) { switch (debugCam->sub.unk_0A) {
@ -1246,8 +1229,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
switch (debugCam->sub.unk_0A) { switch (debugCam->sub.unk_0A) {
case 1: case 1:
@ -1296,8 +1278,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_DRIGHT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_DRIGHT)) {
if ((D_8012D10C++ % 5) == 0) { if ((D_8012D10C++ % 5) == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
switch (debugCam->sub.unk_0A) { switch (debugCam->sub.unk_0A) {
@ -1460,8 +1441,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
debugCam->fov = 60.0f; debugCam->fov = 60.0f;
debugCam->rollDegrees = debugCam->roll * 1.40625f; debugCam->rollDegrees = debugCam->roll * 1.40625f;
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->unk_78 = (debugCam->unk_78 + 1) % 3; debugCam->unk_78 = (debugCam->unk_78 + 1) % 3;
debugCam->unk_38 = -1; debugCam->unk_38 = -1;
} }
@ -1745,8 +1725,7 @@ void DebugCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorIndex) {
void DebugCamera_PrintAllCuts(Camera* cam) { void DebugCamera_PrintAllCuts(Camera* cam) {
s32 i; s32 i;
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
PRINTF("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n"); PRINTF("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) { for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) {
@ -1894,8 +1873,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if ((1 << sCurFileIdx) & sMempakFiles) { if ((1 << sCurFileIdx) & sMempakFiles) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT) || if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT) ||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlToggleSwitch ^= 1; debugCam->sub.demoCtrlToggleSwitch ^= 1;
} }
D_8012CEE0[41][9] = MEMPAK_INDEX_TO_LETTER(sCurFileIdx); D_8012CEE0[41][9] = MEMPAK_INDEX_TO_LETTER(sCurFileIdx);
@ -1913,12 +1891,10 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) {
if (debugCam->sub.demoCtrlToggleSwitch == 0) { if (debugCam->sub.demoCtrlToggleSwitch == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlMenu++; debugCam->sub.demoCtrlMenu++;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlMenu = 0; debugCam->sub.demoCtrlMenu = 0;
} }
} }
@ -1937,8 +1913,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
} }
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlMenu = 0; debugCam->sub.demoCtrlMenu = 0;
return 1; return 1;
} }
@ -1978,8 +1953,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A) || if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A) ||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (debugCam->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) { if (debugCam->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) {
debugCam->sub.demoCtrlActionIdx = ACTION_E; debugCam->sub.demoCtrlActionIdx = ACTION_E;
} }
@ -2004,8 +1978,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A) || if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A) ||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlMenu -= 9; debugCam->sub.demoCtrlMenu -= 9;
} }
block_2: block_2:
@ -2040,8 +2013,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
sp74[i * 2 + 1] = '\0'; sp74[i * 2 + 1] = '\0';
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx >= 4) { if (sCurFileIdx >= 4) {
sCurFileIdx = 0; sCurFileIdx = 0;
} else { } else {
@ -2058,8 +2030,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
} }
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx <= 0) { if (sCurFileIdx <= 0) {
sCurFileIdx = 4; sCurFileIdx = 4;
} else { } else {
@ -2103,25 +2074,21 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
DebugCamera_ScreenTextColored(20, 26, DEBUG_CAM_TEXT_WHITE, D_8012CF70); DebugCamera_ScreenTextColored(20, 26, DEBUG_CAM_TEXT_WHITE, D_8012CF70);
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx - 1) % 4u; debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx - 1) % 4u;
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx + 1) % 4u; debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx + 1) % 4u;
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlToggleSwitch = 0; debugCam->sub.demoCtrlToggleSwitch = 0;
debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(debugCam->sub.demoCtrlActionIdx, MENU_INFO); debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(debugCam->sub.demoCtrlActionIdx, MENU_INFO);
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlActionIdx = ACTION_E; debugCam->sub.demoCtrlActionIdx = ACTION_E;
return 1; return 1;
} }
@ -2133,8 +2100,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP) || CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP) ||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlActionIdx = ACTION_E; debugCam->sub.demoCtrlActionIdx = ACTION_E;
} }
return 2; return 2;
@ -2146,15 +2112,13 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
default: { default: {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO); debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx - 1) % 4u; debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx - 1) % 4u;
sCurFileIdx = 0; sCurFileIdx = 0;
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO); debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx + 1) % 4u; debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx + 1) % 4u;
sCurFileIdx = 0; sCurFileIdx = 0;
@ -2193,8 +2157,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (func_800B91B0(cam, debugCam) == 0) { if (func_800B91B0(cam, debugCam) == 0) {
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
Letterbox_SetSizeTarget(0); Letterbox_SetSizeTarget(0);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
sp5C = OLib_Vec3fDiffToVecGeo(&debugCam->eye, &debugCam->at); sp5C = OLib_Vec3fDiffToVecGeo(&debugCam->eye, &debugCam->at);
debugCam->unk_1C = debugCam->unk_1C =
@ -2212,8 +2175,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
sDebugCamAnim.unk_0A = 1; sDebugCamAnim.unk_0A = 1;
sDebugCamAnim.unk_0C = 0; sDebugCamAnim.unk_0C = 0;
D_8016110C = 0; D_8016110C = 0;
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_L)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_L)) {
@ -2229,15 +2191,13 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (sLastFileIdx != -1) { if (sLastFileIdx != -1) {
switch (sp74[sCurFileIdx]) { switch (sp74[sCurFileIdx]) {
case '?': case '?':
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sDebugCamCuts[idx1] = sDebugCamCuts[idx2]; sDebugCamCuts[idx1] = sDebugCamCuts[idx2];
sp74[sCurFileIdx] = '?'; // useless sp74[sCurFileIdx] = '?'; // useless
DebugCamera_ResetCut(idx2, false); DebugCamera_ResetCut(idx2, false);
break; break;
case '-': case '-':
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp64 = sDebugCamCuts[idx2]; sp64 = sDebugCamCuts[idx2];
if (sLastFileIdx < sCurFileIdx) { if (sLastFileIdx < sCurFileIdx) {
@ -2259,8 +2219,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
} }
break; break;
default: default:
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break; break;
} }
} }
@ -2269,8 +2228,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) {
if (sp74[sCurFileIdx] == '?') { if (sp74[sCurFileIdx] == '?') {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp74[sCurFileIdx] = DebugCamera_InitCut(idx1, &debugCam->sub); sp74[sCurFileIdx] = DebugCamera_InitCut(idx1, &debugCam->sub);
if (sp74[sCurFileIdx] == '?') { if (sp74[sCurFileIdx] == '?') {
DebugCamera_ScreenTextColored(15, 24, DEBUG_CAM_TEXT_GREEN, D_8012CF48); DebugCamera_ScreenTextColored(15, 24, DEBUG_CAM_TEXT_GREEN, D_8012CF48);
@ -2280,8 +2238,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') { if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sp74[sCurFileIdx] = '?'; sp74[sCurFileIdx] = '?';
DebugCamera_ResetCut(idx1, true); DebugCamera_ResetCut(idx1, true);
} }
@ -2289,8 +2246,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R)) {
if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') { if (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
for (i = 0; i < sDebugCamCuts[idx1].nPoints; i++) { for (i = 0; i < sDebugCamCuts[idx1].nPoints; i++) {
debugCam->sub.lookAt[i] = sDebugCamCuts[idx1].lookAt[i]; debugCam->sub.lookAt[i] = sDebugCamCuts[idx1].lookAt[i];
@ -2312,8 +2268,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sCurFileIdx == 0x1E) { if (sCurFileIdx == 0x1E) {
sCurFileIdx = 0; sCurFileIdx = 0;
} else { } else {
@ -2321,8 +2276,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
} }
} }
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT)) { if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1; sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
} }
@ -2336,8 +2290,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
DebugCamera_PrintAllCuts(cam); DebugCamera_PrintAllCuts(cam);
} else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L) && } else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) { CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) { for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) {
if (sDebugCamCuts[i].nPoints != 0) { if (sDebugCamCuts[i].nPoints != 0) {
PRINTF("\n@@@ /* CUT [%d]\t*/", i); PRINTF("\n@@@ /* CUT [%d]\t*/", i);
@ -2353,8 +2306,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
Letterbox_SetSizeTarget(32); Letterbox_SetSizeTarget(32);
D_8016110C = 0; D_8016110C = 0;
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
DebugCamera_ScreenTextColored(4, 7, DEBUG_CAM_TEXT_WHITE, D_8012CF50[0]); DebugCamera_ScreenTextColored(4, 7, DEBUG_CAM_TEXT_WHITE, D_8012CF50[0]);

View File

@ -5670,8 +5670,7 @@ void func_80036E50(u16 textId, s16 arg1) {
Flags_SetInfTable(INFTABLE_0C); Flags_SetInfTable(INFTABLE_0C);
return; return;
case 0x1033: case 0x1033:
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Flags_SetEventChkInf(EVENTCHKINF_04); Flags_SetEventChkInf(EVENTCHKINF_04);
Flags_SetInfTable(INFTABLE_0E); Flags_SetInfTable(INFTABLE_0E);
return; return;
@ -6136,8 +6135,7 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
case TEXT_STATE_CHOICE: case TEXT_STATE_CHOICE:
case TEXT_STATE_EVENT: case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) { if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_CLOSING; msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
ret = true; ret = true;
} }

View File

@ -1566,8 +1566,7 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
if (flags == ATELEM_SFX_NORMAL && collider->colMaterial != COL_MATERIAL_METAL) { if (flags == ATELEM_SFX_NORMAL && collider->colMaterial != COL_MATERIAL_METAL) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos); EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) { if (collider->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -1582,8 +1581,7 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
} else if (flags == ATELEM_SFX_HARD) { } else if (flags == ATELEM_SFX_HARD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos); EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) { if (collider->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -1591,8 +1589,7 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
} else if (flags == ATELEM_SFX_WOOD) { } else if (flags == ATELEM_SFX_WOOD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos); EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
if (collider->actor == NULL) { if (collider->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_REFLECTION_WOOD);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -1693,8 +1690,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement
} else if (sHitInfo[acCol->colMaterial].effect == HIT_WOOD) { } else if (sHitInfo[acCol->colMaterial].effect == HIT_WOOD) {
if (atCol->actor == NULL) { if (atCol->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos); CollisionCheck_SpawnShieldParticles(play, hitPos);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_REFLECTION_WOOD);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &atCol->actor->projectedPos); CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &atCol->actor->projectedPos);
} }
@ -1707,8 +1703,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement
} else { } else {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos); EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (acCol->actor == NULL) { if (acCol->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &acCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &acCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@ -3525,8 +3520,7 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
*/ */
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) { void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticles(play, v); CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_REFLECT_SW);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
/** /**

View File

@ -596,8 +596,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) || CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) ||
CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START)) &&
(gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { (gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
titleDemoSkipped = true; titleDemoSkipped = true;
} }
@ -1472,14 +1471,12 @@ void CutsceneCmd_Transition(PlayState* play, CutsceneContext* csCtx, CsCmdTransi
play->envCtx.screenFillColor[3] = 255.0f * lerp; play->envCtx.screenFillColor[3] = 255.0f * lerp;
if ((lerp == 0.0f) && (gSaveContext.save.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0)) { if ((lerp == 0.0f) && (gSaveContext.save.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0)) {
Audio_PlaySfxGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WHITE_OUT_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if ((lerp == 0.0f) && } else if ((lerp == 0.0f) &&
((gSaveContext.save.entranceIndex == ENTR_TEMPLE_OF_TIME_0) || ((gSaveContext.save.entranceIndex == ENTR_TEMPLE_OF_TIME_0) ||
(gSaveContext.save.entranceIndex == ENTR_HYRULE_CASTLE_0) || (gSaveContext.save.entranceIndex == ENTR_HYRULE_CASTLE_0) ||
(gSaveContext.save.entranceIndex == ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_0))) { (gSaveContext.save.entranceIndex == ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_0))) {
Audio_PlaySfxGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_WHITE_OUT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if ((lerp == 0.0f) && (play->sceneId == SCENE_INSIDE_GANONS_CASTLE)) { } else if ((lerp == 0.0f) && (play->sceneId == SCENE_INSIDE_GANONS_CASTLE)) {
Sfx_PlaySfxCentered2(NA_SE_EV_WHITE_OUT); Sfx_PlaySfxCentered2(NA_SE_EV_WHITE_OUT);
} }

View File

@ -965,8 +965,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
} }
if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) { if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (getItemId != GI_NONE) { } else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, play)) { if (Actor_HasParent(&this->actor, play)) {
Flags_SetCollectible(play, this->collectibleFlag); Flags_SetCollectible(play, this->collectibleFlag);
@ -974,8 +973,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
} }
return; return;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_ITEM);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
Flags_SetCollectible(play, this->collectibleFlag); Flags_SetCollectible(play, this->collectibleFlag);

View File

@ -68,8 +68,7 @@ void TransitionCircle_Start(void* thisx) {
} else { } else {
this->texY = (s32)(125.0f * (1 << 2)); this->texY = (s32)(125.0f * (1 << 2));
if (this->appearanceType == TCA_RIPPLE) { if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_OC_SECRET_WARP_OUT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
@ -93,8 +92,7 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
if (this->direction != TRANS_CIRCLE_DIR_IN) { if (this->direction != TRANS_CIRCLE_DIR_IN) {
if (this->texY == 0) { if (this->texY == 0) {
if (this->appearanceType == TCA_RIPPLE) { if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_OC_SECRET_WARP_IN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
this->texY += this->speed * 3 / updateRate; this->texY += this->speed * 3 / updateRate;

View File

@ -608,16 +608,14 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
* Play a sound effect at the center of the screen. * Play a sound effect at the center of the screen.
*/ */
void Sfx_PlaySfxCentered(u16 sfxId) { void Sfx_PlaySfxCentered(u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(sfxId);
&gSfxDefaultReverb);
} }
/** /**
* Play a sound effect at the center of the screen. Identical to `Sfx_PlaySfxCentered`. * Play a sound effect at the center of the screen. Identical to `Sfx_PlaySfxCentered`.
*/ */
void Sfx_PlaySfxCentered2(u16 sfxId) { void Sfx_PlaySfxCentered2(u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(sfxId);
&gSfxDefaultReverb);
} }
/** /**

View File

@ -455,13 +455,9 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) { if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
PRINTF("Game_play_demo_mode_check=%d\n", Play_InCsMode(play)); PRINTF("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
// clang-format off // clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4, if (!R_MINIMAP_DISABLED) { SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_UP);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_DOWN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
// clang-format on // clang-format on
R_MINIMAP_DISABLED ^= 1; R_MINIMAP_DISABLED ^= 1;
@ -541,13 +537,9 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) { if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
// clang-format off // clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4, if (!R_MINIMAP_DISABLED) { SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_UP);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_DOWN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
// clang-format on // clang-format on
R_MINIMAP_DISABLED ^= 1; R_MINIMAP_DISABLED ^= 1;

View File

@ -348,8 +348,7 @@ u8 Message_ShouldAdvance(PlayState* play) {
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) || if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
CHECK_BTN_ALL(input->press.button, BTN_CUP)) { CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_PASS);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
return CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) || return CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
CHECK_BTN_ALL(input->press.button, BTN_CUP); CHECK_BTN_ALL(input->press.button, BTN_CUP);
@ -373,8 +372,7 @@ void Message_CloseTextbox(PlayState* play) {
msgCtx->stateTimer = 2; msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CLOSING; msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultReverb);
} }
} }
@ -390,8 +388,7 @@ void Message_HandleChoiceSelection(PlayState* play, char numChoices) {
if (msgCtx->choiceIndex > 128) if (msgCtx->choiceIndex > 128)
msgCtx->choiceIndex = 0; msgCtx->choiceIndex = 0;
else else
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
// NOLINTEND // NOLINTEND
} else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) { } else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) {
sAnalogStickHeld = true; sAnalogStickHeld = true;
@ -400,8 +397,7 @@ void Message_HandleChoiceSelection(PlayState* play, char numChoices) {
if (msgCtx->choiceIndex > numChoices) if (msgCtx->choiceIndex > numChoices)
msgCtx->choiceIndex = numChoices; msgCtx->choiceIndex = numChoices;
else else
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
// NOLINTEND // NOLINTEND
} else if (ABS(input->rel.stick_y) < 30) { } else if (ABS(input->rel.stick_y) < 30) {
sAnalogStickHeld = false; sAnalogStickHeld = false;
@ -1013,8 +1009,7 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
// clang-format off // clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \ if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultReverb);
} }
// clang-format on // clang-format on
@ -1155,8 +1150,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_BOX_BREAK: case MESSAGE_WIDE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) { if (!sTextboxSkipped) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT; msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE); Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE);
} else { } else {
@ -1173,8 +1167,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_TEXTID: case MESSAGE_WIDE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE); Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE);
} }
@ -1221,8 +1214,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_SFX: case MESSAGE_WIDE_SFX:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && !sMessageHasSetSfx) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && !sMessageHasSetSfx) {
sMessageHasSetSfx = true; sMessageHasSetSfx = true;
Audio_PlaySfxGeneral(MSG_BUF_DECODED_WIDE[i + 1], &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(MSG_BUF_DECODED_WIDE[i + 1]);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
i++; i++;
break; break;
@ -1232,8 +1224,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_BACKGROUND: case MESSAGE_WIDE_BACKGROUND:
// clang-format off // clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \ if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
// clang-format on // clang-format on
gDPPipeSync(gfx++); gDPPipeSync(gfx++);
@ -1316,8 +1307,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) { if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE); Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == CS_STATE_IDLE) { if (play->csCtx.state == CS_STATE_IDLE) {
Interface_SetDoAction(play, DO_ACTION_RETURN); Interface_SetDoAction(play, DO_ACTION_RETURN);
@ -1347,8 +1337,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
return; return;
case MESSAGE_WIDE_PERSISTENT: case MESSAGE_WIDE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
} }
@ -1359,8 +1348,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE); Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
*gfxP = gfx; *gfxP = gfx;
return; return;
@ -1382,8 +1370,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
} }
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 && if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 &&
msgCtx->textDelayTimer == msgCtx->textDelay) { msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx); Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
charTexIdx += FONT_CHAR_TEX_SIZE; charTexIdx += FONT_CHAR_TEX_SIZE;
@ -1481,8 +1468,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BOX_BREAK: case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) { if (!sTextboxSkipped) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT; msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE); Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
} else { } else {
@ -1499,8 +1485,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_TEXTID: case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE); Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
} }
@ -1561,8 +1546,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
PRINTF(T("サウンド(SE)\n", "Sound (SE)\n")); PRINTF(T("サウンド(SE)\n", "Sound (SE)\n"));
sfxHi = MSG_BUF_DECODED[i + 1]; sfxHi = MSG_BUF_DECODED[i + 1];
sfxHi <<= 8; sfxHi <<= 8;
Audio_PlaySfxGeneral(sfxHi | MSG_BUF_DECODED[i + 2], &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(sfxHi | MSG_BUF_DECODED[i + 2]);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
i += 2; i += 2;
break; break;
@ -1572,8 +1556,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BACKGROUND: case MESSAGE_BACKGROUND:
// clang-format off // clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \ if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
// clang-format on // clang-format on
gDPPipeSync(gfx++); gDPPipeSync(gfx++);
@ -1656,8 +1639,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) { if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE); Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == 0) { if (play->csCtx.state == 0) {
Interface_SetDoAction(play, DO_ACTION_RETURN); Interface_SetDoAction(play, DO_ACTION_RETURN);
@ -1687,8 +1669,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
return; return;
case MESSAGE_PERSISTENT: case MESSAGE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
} }
@ -1699,16 +1680,14 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->msgMode = MSGMODE_TEXT_DONE; msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT; msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE); Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
*gfxP = gfx; *gfxP = gfx;
return; return;
default: default:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 && if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 &&
msgCtx->textDelayTimer == msgCtx->textDelay) { msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_NONE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
#if PLATFORM_IQUE #if PLATFORM_IQUE
@ -2861,8 +2840,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
PRINTF("ocarina_set 000000000000000000 = %d\n", ocarinaActionId); PRINTF("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
msgCtx->ocarinaAction = ocarinaActionId; msgCtx->ocarinaAction = ocarinaActionId;
if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) { if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK) { if (ocarinaActionId == OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK) {
Message_OpenText(play, 0x86F); // Ocarina Message_OpenText(play, 0x86F); // Ocarina
@ -3207,9 +3185,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS || if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW_SPAWN) { msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW_SPAWN) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING; msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
} else { } else {
PRINTF(T("Ocarina_Flog 正解模範演奏=%x\n", PRINTF(T("Ocarina_Flog 正解模範演奏=%x\n",
@ -3219,17 +3195,13 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED; msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA; msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
} }
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW_SPAWN) { } else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW_SPAWN) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW_SPAWN) { if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW_SPAWN) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL; msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else { } else {
@ -3240,9 +3212,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED; msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA; msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
} }
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) { } else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
@ -3253,25 +3223,19 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED; msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA; msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
} else { } else {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING; msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
} }
} else if (msgCtx->ocarinaStaff->state == 0xFF) { } else if (msgCtx->ocarinaStaff->state == 0xFF) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL; msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
@ -3649,11 +3613,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state); ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state);
PRINTF_RST(); PRINTF_RST();
msgCtx->stateTimer = 20; msgCtx->stateTimer = 20;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (msgCtx->ocarinaStaff->state == 0xFF) { } else if (msgCtx->ocarinaStaff->state == 0xFF) {
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL; msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL;
} }
@ -3705,8 +3667,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->ocarinaStaff->state); msgCtx->ocarinaStaff->state);
gSaveContext.save.info.scarecrowLongSongSet = true; gSaveContext.save.info.scarecrowLongSongSet = true;
} }
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
PRINTF("aaaaaaaaaaaaaa\n"); PRINTF("aaaaaaaaaaaaaa\n");
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF); AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
@ -3777,8 +3738,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer = 20; msgCtx->stateTimer = 20;
gSaveContext.save.info.scarecrowSpawnSongSet = true; gSaveContext.save.info.scarecrowSpawnSongSet = true;
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE; msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
PRINTF_COLOR_YELLOW(); PRINTF_COLOR_YELLOW();
PRINTF("\n====================================================================\n"); PRINTF("\n====================================================================\n");
MemCpy(gSaveContext.save.info.scarecrowSpawnSong, gScarecrowSpawnSongPtr, MemCpy(gSaveContext.save.info.scarecrowSpawnSong, gScarecrowSpawnSongPtr,
@ -3792,8 +3752,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
CHECK_BTN_ALL(input->press.button, BTN_B)) { CHECK_BTN_ALL(input->press.button, BTN_B)) {
PRINTF(T("すでに存在する曲吹いた!!! \n", "Played an existing song!!! \n")); PRINTF(T("すでに存在する曲吹いた!!! \n", "Played an existing song!!! \n"));
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF); AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Message_CloseTextbox(play); Message_CloseTextbox(play);
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_FAILED; msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_FAILED;
} }
@ -3818,8 +3777,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break; break;
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING: case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING:
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING: case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING:
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_METRONOME_LV - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff(); msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (((u32)msgCtx->ocarinaStaff->pos != 0) && if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) { (sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
@ -3830,11 +3788,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->stateTimer == 0) { if (msgCtx->stateTimer == 0) {
if (msgCtx->ocarinaStaff->state == 0) { if (msgCtx->ocarinaStaff->state == 0) {
if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) { if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_METRONOME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_METRONOME_2);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
msgCtx->msgMode++; msgCtx->msgMode++;
} }
@ -3853,8 +3809,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
} }
break; break;
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING: case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_METRONOME_LV - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff(); msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (((u32)msgCtx->ocarinaStaff->pos != 0) && if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) { (sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
@ -3865,14 +3820,12 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->ocarinaStaff->state == 0xFF) { if (msgCtx->ocarinaStaff->state == 0xFF) {
PRINTF(T("輪唱失敗!!!!!!!!!\n", "Musical round failed!!!!!!!!!\n")); PRINTF(T("輪唱失敗!!!!!!!!!\n", "Musical round failed!!!!!!!!!\n"));
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10; msgCtx->stateTimer = 10;
play->msgCtx.ocarinaMode = OCARINA_MODE_03; play->msgCtx.ocarinaMode = OCARINA_MODE_03;
} else if (msgCtx->ocarinaStaff->state == OCARINA_SONG_MEMORY_GAME) { } else if (msgCtx->ocarinaStaff->state == OCARINA_SONG_MEMORY_GAME) {
PRINTF(T("輪唱成功!!!!!!!!!\n", "Musical round succeeded!!!!!!!!!\n")); PRINTF(T("輪唱成功!!!!!!!!!\n", "Musical round succeeded!!!!!!!!!\n"));
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_ITEM);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS; msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS;
msgCtx->stateTimer = 30; msgCtx->stateTimer = 30;
} }
@ -3889,8 +3842,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer--; msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) { if (msgCtx->stateTimer == 0) {
if (AudioOcarina_MemoryGameNextNote() != 1) { if (AudioOcarina_MemoryGameNextNote() != 1) {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_METRONOME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff(); msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0; msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
Message_ResetOcarinaNoteState(); Message_ResetOcarinaNoteState();
@ -4390,8 +4342,7 @@ void Message_Update(PlayState* play) {
} else if (Message_ShouldAdvanceSilent(play)) { } else if (Message_ShouldAdvanceSilent(play)) {
PRINTF("select=%d\n", msgCtx->textboxEndType); PRINTF("select=%d\n", msgCtx->textboxEndType);
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) { if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_PASS);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#if OOT_NTSC #if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) { if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) {
Message_ContinueTextbox(play, MSG_BUF_DECODED_WIDE[msgCtx->textDrawPos]); Message_ContinueTextbox(play, MSG_BUF_DECODED_WIDE[msgCtx->textDrawPos]);
@ -4402,8 +4353,7 @@ void Message_Update(PlayState* play) {
Message_ContinueTextbox(play, sNextTextId); Message_ContinueTextbox(play, sNextTextId);
#endif #endif
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Message_CloseTextbox(play); Message_CloseTextbox(play);
} }
} }

View File

@ -2191,9 +2191,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling && if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
(play->csCtx.state == CS_STATE_IDLE)) { (play->csCtx.state == CS_STATE_IDLE)) {
// clang-format off // clang-format off
if (naviCallState == 0x1E) { Audio_PlaySfxGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4, if (naviCallState == 0x1E) { SFX_PLAY_CENTERED(NA_SE_VO_NAVY_CALL);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
// clang-format on // clang-format on
@ -2244,8 +2242,7 @@ s32 Health_ChangeBy(PlayState* play, s16 amount) {
gSaveContext.save.info.playerData.health, gSaveContext.save.info.playerData.healthCapacity); gSaveContext.save.info.playerData.health, gSaveContext.save.info.playerData.healthCapacity);
// clang-format off // clang-format off
if (amount > 0) { Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, if (amount > 0) { SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (gSaveContext.save.info.playerData.isDoubleDefenseAcquired && (amount < 0)) { } else if (gSaveContext.save.info.playerData.isDoubleDefenseAcquired && (amount < 0)) {
amount >>= 1; amount >>= 1;
PRINTF(T("ハート減少半分!!=%d\n", "Heart decrease halved!! = %d\n"), amount); PRINTF(T("ハート減少半分!!=%d\n", "Heart decrease halved!! = %d\n"), amount);
@ -2382,8 +2379,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
if ((type != MAGIC_ADD) && (gSaveContext.save.info.playerData.magic - amount) < 0) { if ((type != MAGIC_ADD) && (gSaveContext.save.info.playerData.magic - amount) < 0) {
if (gSaveContext.magicCapacity != 0) { if (gSaveContext.magicCapacity != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
return false; return false;
} }
@ -2401,8 +2397,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP; gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
return true; return true;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false; return false;
} }
@ -2419,8 +2414,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3; gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3;
return true; return true;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false; return false;
} }
@ -2451,8 +2445,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2; gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2;
return true; return true;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
return false; return false;
} }
@ -2520,8 +2513,7 @@ void Magic_Update(PlayState* play) {
gSaveContext.save.info.playerData.magic += 4; gSaveContext.save.info.playerData.magic += 4;
if (gSaveContext.gameMode == GAMEMODE_NORMAL && !IS_CUTSCENE_LAYER) { if (gSaveContext.gameMode == GAMEMODE_NORMAL && !IS_CUTSCENE_LAYER) {
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GAUGE_UP - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
PRINTF(T("蓄電 MAGIC_NOW=%d (%d)\n", "Storage MAGIC_NOW=%d (%d)\n"), PRINTF(T("蓄電 MAGIC_NOW=%d (%d)\n", "Storage MAGIC_NOW=%d (%d)\n"),
@ -2611,8 +2603,7 @@ void Magic_Update(PlayState* play) {
!play->actorCtx.lensActive) { !play->actorCtx.lensActive) {
// Force lens off and set magic meter state to idle // Force lens off and set magic meter state to idle
play->actorCtx.lensActive = false; play->actorCtx.lensActive = false;
Audio_PlaySfxGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GLASSMODE_OFF);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.magicState = MAGIC_STATE_IDLE; gSaveContext.magicState = MAGIC_STATE_IDLE;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255; sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
break; break;
@ -2664,8 +2655,7 @@ void Magic_Update(PlayState* play) {
case MAGIC_STATE_ADD: case MAGIC_STATE_ADD:
// Add magic until target is reached // Add magic until target is reached
gSaveContext.save.info.playerData.magic += 4; gSaveContext.save.info.playerData.magic += 4;
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GAUGE_UP - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (gSaveContext.save.info.playerData.magic >= gSaveContext.magicTarget) { if (gSaveContext.save.info.playerData.magic >= gSaveContext.magicTarget) {
gSaveContext.save.info.playerData.magic = gSaveContext.magicTarget; gSaveContext.save.info.playerData.magic = gSaveContext.magicTarget;
gSaveContext.magicState = gSaveContext.prevMagicState; gSaveContext.magicState = gSaveContext.prevMagicState;
@ -3711,22 +3701,16 @@ void Interface_Draw(PlayState* play) {
} else if (gSaveContext.timerSeconds > 60) { } else if (gSaveContext.timerSeconds > 60) {
// Beep at "xx:x1" (every 10 seconds) // Beep at "xx:x1" (every 10 seconds)
if (sTimerDigits[4] == 1) { if (sTimerDigits[4] == 1) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_WOMAN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} else if (gSaveContext.timerSeconds > 10) { } else if (gSaveContext.timerSeconds > 10) {
// Beep on alternating seconds // Beep on alternating seconds
if ((sTimerDigits[4] % 2) != 0) { if ((sTimerDigits[4] % 2) != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} else { } else {
// Beep every second // Beep every second
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_E);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} }
} }
@ -3775,9 +3759,7 @@ void Interface_Draw(PlayState* play) {
sTimerStateTimer = 40; sTimerStateTimer = 40;
gSaveContext.timerState = TIMER_STATE_UP_FREEZE; gSaveContext.timerState = TIMER_STATE_UP_FREEZE;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} }
} }
@ -3912,22 +3894,16 @@ void Interface_Draw(PlayState* play) {
} else if (gSaveContext.subTimerSeconds > 60) { } else if (gSaveContext.subTimerSeconds > 60) {
// Beep at "xx:x1" (every 10 seconds) // Beep at "xx:x1" (every 10 seconds)
if (sTimerDigits[4] == 1) { if (sTimerDigits[4] == 1) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_WOMAN);
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else if (gSaveContext.subTimerSeconds > 10) { } else if (gSaveContext.subTimerSeconds > 10) {
// Beep on alternating seconds // Beep on alternating seconds
if ((sTimerDigits[4] % 2) != 0) { if ((sTimerDigits[4] % 2) != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
// Beep every second // Beep every second
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_E);
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { // SUBTIMER_STATE_UP_TICK } else { // SUBTIMER_STATE_UP_TICK
gSaveContext.subTimerSeconds++; gSaveContext.subTimerSeconds++;
@ -3944,9 +3920,7 @@ void Interface_Draw(PlayState* play) {
// Beep at the minute mark // Beep at the minute mark
if ((gSaveContext.subTimerSeconds % 60) == 0) { if ((gSaveContext.subTimerSeconds % 60) == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} }
} }
@ -4192,8 +4166,7 @@ void Interface_Update(PlayState* play) {
gSaveContext.save.info.playerData.health += 4; gSaveContext.save.info.playerData.health += 4;
if ((gSaveContext.save.info.playerData.health & 0xF) < 4) { if ((gSaveContext.save.info.playerData.health & 0xF) < 4) {
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
PRINTF("now_life=%d max_life=%d\n", gSaveContext.save.info.playerData.health, PRINTF("now_life=%d max_life=%d\n", gSaveContext.save.info.playerData.health,
@ -4233,8 +4206,7 @@ void Interface_Update(PlayState* play) {
if (gSaveContext.save.info.playerData.rupees < CUR_CAPACITY(UPG_WALLET)) { if (gSaveContext.save.info.playerData.rupees < CUR_CAPACITY(UPG_WALLET)) {
gSaveContext.rupeeAccumulator--; gSaveContext.rupeeAccumulator--;
gSaveContext.save.info.playerData.rupees++; gSaveContext.save.info.playerData.rupees++;
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_RUPY_COUNT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
PRINTF(T("ルピー数MAX = %d\n", "Rupee Amount MAX = %d\n"), CUR_CAPACITY(UPG_WALLET)); PRINTF(T("ルピー数MAX = %d\n", "Rupee Amount MAX = %d\n"), CUR_CAPACITY(UPG_WALLET));
gSaveContext.save.info.playerData.rupees = CUR_CAPACITY(UPG_WALLET); gSaveContext.save.info.playerData.rupees = CUR_CAPACITY(UPG_WALLET);
@ -4249,13 +4221,11 @@ void Interface_Update(PlayState* play) {
gSaveContext.save.info.playerData.rupees = 0; gSaveContext.save.info.playerData.rupees = 0;
} }
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_RUPY_COUNT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
gSaveContext.rupeeAccumulator++; gSaveContext.rupeeAccumulator++;
gSaveContext.save.info.playerData.rupees--; gSaveContext.save.info.playerData.rupees--;
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_RUPY_COUNT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
gSaveContext.rupeeAccumulator = 0; gSaveContext.rupeeAccumulator = 0;

View File

@ -95,9 +95,7 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint) {
if ((R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) && (gSaveContext.save.cutsceneIndex < 0xFFF0)) { if ((R_SCENE_CAM_TYPE != SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) && (gSaveContext.save.cutsceneIndex < 0xFFF0)) {
// Play a sfx when the player toggles the camera // Play a sfx when the player toggles the camera
Audio_PlaySfxGeneral((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP, SFX_PLAY_CENTERED((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP);
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
Play_RequestViewpointBgCam(this); Play_RequestViewpointBgCam(this);
@ -873,8 +871,7 @@ void Play_Update(PlayState* this) {
break; break;
case TRANS_MODE_SANDSTORM: case TRANS_MODE_SANDSTORM:
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_EV_SAND_STORM - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->transitionTrigger == TRANS_TRIGGER_END) { if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA < 110) { if (this->envCtx.sandstormPrimA < 110) {
@ -908,8 +905,7 @@ void Play_Update(PlayState* this) {
break; break;
case TRANS_MODE_SANDSTORM_END: case TRANS_MODE_SANDSTORM_END:
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_EV_SAND_STORM - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->transitionTrigger == TRANS_TRIGGER_END) { if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA <= 0) { if (this->envCtx.sandstormPrimA <= 0) {
@ -1043,8 +1039,7 @@ void Play_Update(PlayState* this) {
PRINTF(VT_FGCOL(CYAN) T("デモ中につき視点変更を禁止しております\n", PRINTF(VT_FGCOL(CYAN) T("デモ中につき視点変更を禁止しております\n",
"Changing viewpoint is prohibited during the cutscene\n") VT_RST); "Changing viewpoint is prohibited during the cutscene\n") VT_RST);
} else if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) { } else if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
// C-Up toggle for houses, move between pivot camera and fixed camera // C-Up toggle for houses, move between pivot camera and fixed camera
// Toggle viewpoint between VIEWPOINT_LOCKED and VIEWPOINT_PIVOT // Toggle viewpoint between VIEWPOINT_LOCKED and VIEWPOINT_PIVOT

View File

@ -266,14 +266,12 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_B0); Flags_SetEventChkInf(EVENTCHKINF_B0);
Cutscene_SetScript(play, gDcOpeningCs); Cutscene_SetScript(play, gDcOpeningCs);
gSaveContext.cutsceneTrigger = 1; gSaveContext.cutsceneTrigger = 1;
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_49); Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_49);
} }
if (this->dyna.actor.params < 0) { if (this->dyna.actor.params < 0) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
Actor_Kill(&this->dyna.actor); Actor_Kill(&this->dyna.actor);

View File

@ -176,19 +176,16 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
((play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] == 255) && (this->state == BGDODOAGO_EYE_LEFT))) { ((play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] == 255) && (this->state == BGDODOAGO_EYE_LEFT))) {
Flags_SetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6)); Flags_SetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6));
this->state = 0; this->state = 0;
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgDodoago_SetupAction(this, BgDodoago_OpenJaw); BgDodoago_SetupAction(this, BgDodoago_OpenJaw);
OnePointCutscene_Init(play, 3380, 160, &this->dyna.actor, CAM_ID_MAIN); OnePointCutscene_Init(play, 3380, 160, &this->dyna.actor, CAM_ID_MAIN);
} else if (play->roomCtx.drawParams[this->state] == 0) { } else if (play->roomCtx.drawParams[this->state] == 0) {
OnePointCutscene_Init(play, 3065, 40, &this->dyna.actor, CAM_ID_MAIN); OnePointCutscene_Init(play, 3065, 40, &this->dyna.actor, CAM_ID_MAIN);
BgDodoago_SetupAction(this, BgDodoago_LightOneEye); BgDodoago_SetupAction(this, BgDodoago_LightOneEye);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
OnePointCutscene_Init(play, 3065, 20, &this->dyna.actor, CAM_ID_MAIN); OnePointCutscene_Init(play, 3065, 20, &this->dyna.actor, CAM_ID_MAIN);
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sTimer += 30; sTimer += 30;
return; return;
} }

View File

@ -130,8 +130,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
} else { } else {
this->actionFlags |= 4; this->actionFlags |= 4;
this->timer1 = 304; this->timer1 = 304;
Audio_PlaySfxGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_RED_EYE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
@ -146,8 +145,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) {
} else { } else {
this->actionFlags |= 8; this->actionFlags |= 8;
this->timer2 = 304; this->timer2 = 304;
Audio_PlaySfxGeneral(NA_SE_EV_RED_EYE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_RED_EYE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }

View File

@ -176,8 +176,7 @@ void func_8087B284(BgGndSoulmeiro* this, PlayState* play) {
if (!Flags_GetSwitch(play, PARAMS_GET_U(this->actor.params, 8, 6))) { if (!Flags_GetSwitch(play, PARAMS_GET_U(this->actor.params, 8, 6))) {
this->actor.draw = BgGndSoulmeiro_Draw; this->actor.draw = BgGndSoulmeiro_Draw;
if (this->collider.base.acFlags & AC_HIT) { if (this->collider.base.acFlags & AC_HIT) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->unk_198 = 40; this->unk_198 = 40;
this->actionFunc = func_8087AF38; this->actionFunc = func_8087AF38;
} else { } else {

View File

@ -511,8 +511,7 @@ void BgMizuBwall_Idle(BgMizuBwall* this, PlayState* play) {
this->dList = NULL; this->dList = NULL;
BgMizuBwall_SpawnDebris(this, play); BgMizuBwall_SpawnDebris(this, play);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WALL_BROKEN); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WALL_BROKEN);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actionFunc = BgMizuBwall_Break; this->actionFunc = BgMizuBwall_Break;
} else if (this->dyna.actor.xzDistToPlayer < 600.0f) { } else if (this->dyna.actor.xzDistToPlayer < 600.0f) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);

View File

@ -64,8 +64,7 @@ void BgSpot01Idomizu_UpdateWaterLevel(BgSpot01Idomizu* this, PlayState* play) {
} }
play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y; play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
if (this->waterHeight < this->actor.world.pos.y) { if (this->waterHeight < this->actor.world.pos.y) {
Audio_PlaySfxGeneral(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
Math_ApproachF(&this->actor.world.pos.y, this->waterHeight, 1.0f, 2.0f); Math_ApproachF(&this->actor.world.pos.y, this->waterHeight, 1.0f, 2.0f);
} }

View File

@ -326,8 +326,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, PlayState* play) {
EffectSsGSplash_Spawn(play, &this->dyna.actor.world.pos, NULL, NULL, 1, 700); EffectSsGSplash_Spawn(play, &this->dyna.actor.world.pos, NULL, NULL, 1, 700);
this->collider.elements[0].dim.worldSphere.radius = 45; this->collider.elements[0].dim.worldSphere.radius = 45;
this->actionFunc = BgSpot06Objects_LockPullOutward; this->actionFunc = BgSpot06Objects_LockPullOutward;
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Flags_SetSwitch(play, this->switchFlag); Flags_SetSwitch(play, this->switchFlag);
OnePointCutscene_Init(play, 4120, 170, &this->dyna.actor, CAM_ID_MAIN); OnePointCutscene_Init(play, 4120, 170, &this->dyna.actor, CAM_ID_MAIN);
} else { } else {

View File

@ -111,8 +111,7 @@ void func_808BC65C(BgTreemouth* this, PlayState* play) {
if (cue->id == 2) { if (cue->id == 2) {
BgTreemouth_SetupAction(this, func_808BC80C); BgTreemouth_SetupAction(this, func_808BC80C);
} else if (cue->id == 3) { } else if (cue->id == 3) {
Audio_PlaySfxGeneral(NA_SE_EV_WOODDOOR_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_WOODDOOR_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgTreemouth_SetupAction(this, func_808BC6F8); BgTreemouth_SetupAction(this, func_808BC6F8);
} }
} }
@ -218,8 +217,7 @@ void func_808BCAF0(BgTreemouth* this, PlayState* play) {
if (cue->id == 2) { if (cue->id == 2) {
BgTreemouth_SetupAction(this, func_808BC80C); BgTreemouth_SetupAction(this, func_808BC80C);
} else if (cue->id == 3) { } else if (cue->id == 3) {
Audio_PlaySfxGeneral(NA_SE_EV_WOODDOOR_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_WOODDOOR_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
BgTreemouth_SetupAction(this, func_808BC6F8); BgTreemouth_SetupAction(this, func_808BC6F8);
} }
} }

View File

@ -274,8 +274,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
this->sparkleCounter = 0; this->sparkleCounter = 0;
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f; this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
if (this->actor.params == DEMOKANKYO_WARP_OUT) { if (this->actor.params == DEMOKANKYO_WARP_OUT) {
Audio_PlaySfxGeneral(NA_SE_EV_SARIA_MELODY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_SARIA_MELODY);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
break; break;
case DEMOKANKYO_SPARKLES: case DEMOKANKYO_SPARKLES:
@ -390,8 +389,7 @@ void DemoKankyo_DoNothing(DemoKankyo* this, PlayState* play) {
void DemoKankyo_UpdateWarpIn(DemoKankyo* this, PlayState* play) { void DemoKankyo_UpdateWarpIn(DemoKankyo* this, PlayState* play) {
#if OOT_VERSION < PAL_1_0 #if OOT_VERSION < PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_LINK_WARP_OUT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#endif #endif
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing); DemoKankyo_SetupAction(this, DemoKankyo_DoNothing);
} }
@ -824,8 +822,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
} }
} else { } else {
#if OOT_VERSION >= PAL_1_0 #if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP_OUT - SFX_FLAG, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_EV_LINK_WARP_OUT - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#endif #endif
if (func_800BB2B4(&camPos, &sWarpRoll, &sWarpFoV, sWarpInCameraPoints, &this->unk_150[i].unk_20, if (func_800BB2B4(&camPos, &sWarpRoll, &sWarpFoV, sWarpInCameraPoints, &this->unk_150[i].unk_20,
&this->unk_150[i].unk_1C) != 0) { &this->unk_150[i].unk_1C) != 0) {

View File

@ -126,8 +126,7 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play) {
if (openGrotto) { if (openGrotto) {
this->actor.params &= ~0x0300; this->actor.params &= ~0x0300;
DoorAna_SetupAction(this, DoorAna_WaitOpen); DoorAna_SetupAction(this, DoorAna_WaitOpen);
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
Actor_SetClosestSecretDistance(&this->actor, play); Actor_SetClosestSecretDistance(&this->actor, play);
} }

View File

@ -184,8 +184,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
case PLAYER_MASK_TRUTH: case PLAYER_MASK_TRUTH:
if (!GET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE) && if (!GET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE) &&
(Player_GetMask(play) != PLAYER_MASK_SKULL)) { (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->prize = DNT_PRIZE_NUTS; this->prize = DNT_PRIZE_NUTS;
this->leader->stageSignal = DNT_LEADER_SIGNAL_UP; this->leader->stageSignal = DNT_LEADER_SIGNAL_UP;
reaction = DNT_SIGNAL_LOOK; reaction = DNT_SIGNAL_LOOK;

View File

@ -217,8 +217,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->actor, play)) { if (Actor_TalkOfferAccepted(&this->actor, play)) {
if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_ODD_MUSHROOM) { if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_ODD_MUSHROOM) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
player->actor.textId = 0x504A; player->actor.textId = 0x504A;
this->actionFunc = EnDs_OfferOddPotion; this->actionFunc = EnDs_OfferOddPotion;
} else if (GET_ITEMGETINF(ITEMGETINF_30)) { } else if (GET_ITEMGETINF(ITEMGETINF_30)) {

View File

@ -362,8 +362,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
EnDu_SetupAction(this, func_809FE890); EnDu_SetupAction(this, func_809FE890);
play->msgCtx.ocarinaMode = OCARINA_MODE_04; play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) { } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectSongCs); play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectSongCs);
gSaveContext.cutsceneTrigger = 1; gSaveContext.cutsceneTrigger = 1;
this->unk_1E8 = 0; this->unk_1E8 = 0;

View File

@ -1409,9 +1409,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, PlayState* play) {
if (key != NULL) { if (key != NULL) {
key->actor.world.rot.y = Math_Vec3f_Yaw(&key->actor.world.pos, &this->actor.home.pos); key->actor.world.rot.y = Math_Vec3f_Yaw(&key->actor.world.pos, &this->actor.home.pos);
key->actor.speed = 6.0f; key->actor.speed = 6.0f;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} }
EnGeldB_SetupDefeated(this); EnGeldB_SetupDefeated(this);

View File

@ -622,8 +622,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
FALLTHROUGH; FALLTHROUGH;
case 0x3054: case 0x3054:
if (dialogState == TEXT_STATE_NONE) { if (dialogState == TEXT_STATE_NONE) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
break; break;
} }
@ -906,8 +905,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) {
return false; return false;
} else { } else {
if (this->collider.base.acFlags & AC_HIT) { if (this->collider.base.acFlags & AC_HIT) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actor.flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; this->actor.flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
this->collider.base.acFlags &= ~AC_HIT; this->collider.base.acFlags &= ~AC_HIT;
EnGo2_StopRolling(this, play); EnGo2_StopRolling(this, play);

View File

@ -329,14 +329,12 @@ void func_80A4ED34(EnGs* this, PlayState* play) {
if (this->unk_200 < 20) { if (this->unk_200 < 20) {
Color_RGBA8_Copy(&this->flashColor, &flashRed); Color_RGBA8_Copy(&this->flashColor, &flashRed);
if ((this->unk_200 % 20) == 7) { if ((this->unk_200 % 20) == 7) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_E);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
Color_RGBA8_Copy(&this->flashColor, &flashBlue); Color_RGBA8_Copy(&this->flashColor, &flashBlue);
if ((this->unk_200 % 20) == 7) { if ((this->unk_200 % 20) == 7) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} }

View File

@ -3409,8 +3409,7 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) {
this->numBoosts++; this->numBoosts++;
if (!EN_HORSE_CHECK_4(this)) { if (!EN_HORSE_CHECK_4(this)) {
Audio_PlaySfxGeneral(NA_SE_SY_CARROT_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CARROT_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
if (this->numBoosts < 6) { if (this->numBoosts < 6) {
@ -3426,8 +3425,7 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) {
this->numBoosts = 6; this->numBoosts = 6;
if (!EN_HORSE_CHECK_4(this)) { if (!EN_HORSE_CHECK_4(this)) {
Audio_PlaySfxGeneral(NA_SE_SY_CARROT_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CARROT_RECOVER);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} }

View File

@ -167,8 +167,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
ingoHorse->inRace = 1; ingoHorse->inRace = 1;
this->startFlags |= INGO_RACE_INGO_MOVE; this->startFlags |= INGO_RACE_INGO_MOVE;
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_START_SHOT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
this->startTimer++; this->startTimer++;
@ -198,8 +197,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
this->result = INGO_RACE_PLAYER_WIN; this->result = INGO_RACE_PLAYER_WIN;
this->finishTimer = 55; this->finishTimer = 55;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_START_SHOT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
this->playerCheck[i] = 0; this->playerCheck[i] = 0;
@ -214,8 +212,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
this->finishTimer = 70; this->finishTimer = 70;
ingoHorse->stateFlags |= ENHORSE_INGO_WON; ingoHorse->stateFlags |= ENHORSE_INGO_WON;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_START_SHOT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
this->ingoCheck[i] = 0; this->ingoCheck[i] = 0;
@ -354,8 +351,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, PlayState* play
rideHorse->inRace = 1; rideHorse->inRace = 1;
} else if ((this->startTimer > 81) && !(this->raceFlags & MALONRACE_START_SFX)) { } else if ((this->startTimer > 81) && !(this->raceFlags & MALONRACE_START_SFX)) {
this->raceFlags |= MALONRACE_START_SFX; this->raceFlags |= MALONRACE_START_SFX;
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_START_SHOT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
this->startTimer++; this->startTimer++;
@ -394,8 +390,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, PlayState* play
} else if (this->fenceCheck[15] == 1) { } else if (this->fenceCheck[15] == 1) {
this->lapCount = 2; this->lapCount = 2;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_START_SHOT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->result = MALONRACE_SUCCESS; this->result = MALONRACE_SUCCESS;
this->finishTimer = 70; this->finishTimer = 70;
gSaveContext.timerState = TIMER_STATE_UP_FREEZE; gSaveContext.timerState = TIMER_STATE_UP_FREEZE;

View File

@ -789,9 +789,7 @@ s16 EnHy_UpdateTalkState(PlayState* play, Actor* thisx) {
case 0x709E: case 0x709E:
case 0x709F: case 0x709F:
if (!this->playedSfx) { if (!this->playedSfx) {
Audio_PlaySfxGeneral(this->actor.textId == 0x709F ? NA_SE_SY_CORRECT_CHIME : NA_SE_SY_ERROR, SFX_PLAY_CENTERED(this->actor.textId == 0x709F ? NA_SE_SY_CORRECT_CHIME : NA_SE_SY_ERROR);
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->playedSfx = true; this->playedSfx = true;
} }
break; break;

View File

@ -689,8 +689,7 @@ void func_80A7A568(EnIn* this, PlayState* play) {
SET_INFTABLE(INFTABLE_AB); SET_INFTABLE(INFTABLE_AB);
} }
if (gSaveContext.timerState == TIMER_STATE_STOP) { if (gSaveContext.timerState == TIMER_STATE_STOP) {
Audio_PlaySfxGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FOUND);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
func_80A79C78(this, play); func_80A79C78(this, play);
this->actionFunc = func_80A7B024; this->actionFunc = func_80A7B024;
gSaveContext.timerState = TIMER_STATE_OFF; gSaveContext.timerState = TIMER_STATE_OFF;
@ -707,8 +706,7 @@ void func_80A7A568(EnIn* this, PlayState* play) {
phi_a2 = 2; phi_a2 = 2;
transitionType = TRANS_TYPE_FADE_BLACK; transitionType = TRANS_TYPE_FADE_BLACK;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FOUND);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (!GET_EVENTCHKINF(EVENTCHKINF_1B)) { if (!GET_EVENTCHKINF(EVENTCHKINF_1B)) {
if (GET_INFTABLE(INFTABLE_AB)) { if (GET_INFTABLE(INFTABLE_AB)) {
SET_EVENTCHKINF(EVENTCHKINF_1B); SET_EVENTCHKINF(EVENTCHKINF_1B);

View File

@ -759,8 +759,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
(play->msgCtx.unk_E3F2 == OCARINA_SONG_LULLABY)) { (play->msgCtx.unk_E3F2 == OCARINA_SONG_LULLABY)) {
this->actionState = ENKANBAN_REPAIR; this->actionState = ENKANBAN_REPAIR;
this->bounceX = 1; this->bounceX = 1;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
break; break;
} }

View File

@ -576,8 +576,7 @@ s16 EnKo_UpdateTalkState(PlayState* play, Actor* thisx) {
case 0x10B7: case 0x10B7:
case 0x10B8: case 0x10B8:
if (this->unk_210 == 0) { if (this->unk_210 == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->unk_210 = 1; this->unk_210 = 1;
} }
} }

View File

@ -175,13 +175,11 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
case TEXT_STATE_DONE_FADING: case TEXT_STATE_DONE_FADING:
if (this->actor.textId != 0x4014) { if (this->actor.textId != 0x4014) {
if (this->actor.textId == 0x401B && !this->sfxPlayed) { if (this->actor.textId == 0x401B && !this->sfxPlayed) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->sfxPlayed = true; this->sfxPlayed = true;
} }
} else if (!this->sfxPlayed) { } else if (!this->sfxPlayed) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->sfxPlayed = true; this->sfxPlayed = true;
} }
break; break;

View File

@ -315,8 +315,7 @@ void EnMa2_WaitForEponasSong(EnMa2* this, PlayState* play) {
this->actionFunc = EnMa2_WaitForOcarina; this->actionFunc = EnMa2_WaitForOcarina;
play->msgCtx.ocarinaMode = OCARINA_MODE_04; play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) { } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->timer = 0x1E; this->timer = 0x1E;
SET_INFTABLE(INFTABLE_PLAYED_SONG_FOR_ADULT_MALON); SET_INFTABLE(INFTABLE_PLAYED_SONG_FOR_ADULT_MALON);
this->actionFunc = EnMa2_ForceTalkAfterSong; this->actionFunc = EnMa2_ForceTalkAfterSong;

View File

@ -220,8 +220,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_A) || if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_A) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) { CHECK_BTN_ALL(input->press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->mainAlpha = 210; this->mainAlpha = 210;
this->subAlpha = 255; this->subAlpha = 255;
@ -258,8 +257,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
if (play->transitionTrigger != TRANS_TRIGGER_START) { if (play->transitionTrigger != TRANS_TRIGGER_START) {
Audio_SetCutsceneFlag(0); Audio_SetCutsceneFlag(0);
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.gameMode = GAMEMODE_FILE_SELECT; gSaveContext.gameMode = GAMEMODE_FILE_SELECT;
play->transitionTrigger = TRANS_TRIGGER_START; play->transitionTrigger = TRANS_TRIGGER_START;

View File

@ -815,8 +815,7 @@ void EnMd_ListenToOcarina(EnMd* this, PlayState* play) {
this->actionFunc = EnMd_BlockPath; this->actionFunc = EnMd_BlockPath;
play->msgCtx.ocarinaMode = OCARINA_MODE_04; play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) { } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actor.textId = 0x1067; this->actor.textId = 0x1067;
Actor_OfferTalk(&this->actor, play, this->collider.dim.radius + 30.0f); Actor_OfferTalk(&this->actor, play, this->collider.dim.radius + 30.0f);

View File

@ -283,8 +283,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
} }
if (PARAMS_GET_S(thisx->params, 13, 3) >= 3) { if (PARAMS_GET_S(thisx->params, 13, 3) >= 3) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
switch (PARAMS_GET_S(thisx->params, 13, 3)) { switch (PARAMS_GET_S(thisx->params, 13, 3)) {
@ -629,8 +628,7 @@ void func_80B0D878(EnSw* this, PlayState* play) {
this->actor.shape.rot = this->actor.world.rot; this->actor.shape.rot = this->actor.world.rot;
if ((this->unk_394 == 0) && (this->unk_392 == 0)) { if ((this->unk_394 == 0) && (this->unk_392 == 0)) {
Audio_PlaySfxGeneral(NA_SE_SY_KINSTA_MARK_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_KINSTA_MARK_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
x = (this->unk_364.x * 10.0f); x = (this->unk_364.x * 10.0f);
y = (this->unk_364.y * 10.0f); y = (this->unk_364.y * 10.0f);
z = (this->unk_364.z * 10.0f); z = (this->unk_364.z * 10.0f);

View File

@ -640,8 +640,7 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_SY_ERROR); Actor_PlaySfx(&this->actor, NA_SE_SY_ERROR);
} else if (this->currentReward == 4) { } else if (this->currentReward == 4) {
/* Heart piece */ /* Heart piece */
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
/* Rupee */ /* Rupee */
Actor_PlaySfx(&this->actor, NA_SE_SY_TRE_BOX_APPEAR); Actor_PlaySfx(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);

View File

@ -137,8 +137,7 @@ void EnTr_CrySpellcast(EnTr* this, PlayState* play) {
if (this->timer == 11) { if (this->timer == 11) {
// Both cry in the title screen cutscene, but only Kotake in the in-game cutscene // Both cry in the title screen cutscene, but only Kotake in the in-game cutscene
if ((this->actor.params != TR_KOUME) || (gSaveContext.sceneLayer == 6)) { if ((this->actor.params != TR_KOUME) || (gSaveContext.sceneLayer == 6)) {
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_VOICE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EN_TWINROBA_SHOOT_VOICE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }

View File

@ -246,8 +246,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
case 380: case 380:
case 409: case 409:
case 438: case 438:
Audio_PlaySfxGeneral(NA_SE_SY_DEMO_CUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DEMO_CUT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
break; break;
} }
} }
@ -456,8 +455,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
case 0: case 0:
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[1] != NULL) && if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[1] != NULL) &&
(play->csCtx.actorCues[1]->id == 7)) { (play->csCtx.actorCues[1]->id == 7)) {
Audio_PlaySfxGeneral(NA_SE_EN_GANON_LAUGH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EN_GANON_LAUGH);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Animation_MorphToPlayOnce(&this->skin.skelAnime, &gYoungGanondorfLaughStartAnim, -5.0f); Animation_MorphToPlayOnce(&this->skin.skelAnime, &gYoungGanondorfLaughStartAnim, -5.0f);
this->state++; this->state++;
} }
@ -800,8 +798,7 @@ void EnViewer_UpdatePosition(EnViewer* this, PlayState* play) {
} }
} }
if (type == ENVIEWER_TYPE_5_GANONDORF) { if (type == ENVIEWER_TYPE_5_GANONDORF) {
Audio_PlaySfxGeneral(NA_SE_EV_BURNING - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_BURNING - SFX_FLAG);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
EnViewer_DrawFireEffects(this, play); EnViewer_DrawFireEffects(this, play);
} }
} }

View File

@ -2622,8 +2622,7 @@ void func_80B59828(EnZl3* this, PlayState* play) {
void func_80B59A80(EnZl3* this, PlayState* play) { void func_80B59A80(EnZl3* this, PlayState* play) {
if (func_80B59768(this, play)) { if (func_80B59768(this, play)) {
Audio_PlaySfxGeneral(NA_SE_OC_REVENGE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_OC_REVENGE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }

View File

@ -75,8 +75,7 @@ void func_80B9D0B0(ObjRoomtimer* this, PlayState* play) {
} }
if ((this->actor.params != 0x3FF) && (gSaveContext.timerSeconds == 0)) { if ((this->actor.params != 0x3FF) && (gSaveContext.timerSeconds == 0)) {
Audio_PlaySfxGeneral(NA_SE_OC_ABYSS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_OC_ABYSS);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Play_TriggerVoidOut(play); Play_TriggerVoidOut(play);
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }

View File

@ -13706,8 +13706,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) {
((this->getItemId >= GI_RUPEE_PURPLE) && (this->getItemId <= GI_RUPEE_GOLD)) || ((this->getItemId >= GI_RUPEE_PURPLE) && (this->getItemId <= GI_RUPEE_GOLD)) ||
((this->getItemId >= GI_RUPEE_GREEN_LOSE) && (this->getItemId <= GI_RUPEE_PURPLE_LOSE)) || ((this->getItemId >= GI_RUPEE_GREEN_LOSE) && (this->getItemId <= GI_RUPEE_PURPLE_LOSE)) ||
(this->getItemId == GI_RECOVERY_HEART)) { (this->getItemId == GI_RECOVERY_HEART)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_BOXITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_GET_BOXITEM);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
if ((this->getItemId == GI_HEART_CONTAINER_2) || (this->getItemId == GI_HEART_CONTAINER) || if ((this->getItemId == GI_HEART_CONTAINER_2) || (this->getItemId == GI_HEART_CONTAINER) ||
((this->getItemId == GI_HEART_PIECE) && ((this->getItemId == GI_HEART_PIECE) &&

View File

@ -155,10 +155,8 @@ void FileSelect_UpdateInitialLanguageMenu(FileSelectState* this) {
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) || if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
CHECK_BTN_ALL(input->press.button, BTN_START)) { CHECK_BTN_ALL(input->press.button, BTN_START)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sramCtx->readBuff[2] = gSaveContext.language; sramCtx->readBuff[2] = gSaveContext.language;
Sram_WriteSramHeader(sramCtx); Sram_WriteSramHeader(sramCtx);
this->configMode++; this->configMode++;
@ -166,15 +164,13 @@ void FileSelect_UpdateInitialLanguageMenu(FileSelectState* this) {
} }
if (sInitialLanguageStickAdjX < -30) { if (sInitialLanguageStickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.language--; gSaveContext.language--;
if (gSaveContext.language >= LANGUAGE_MAX) { if (gSaveContext.language >= LANGUAGE_MAX) {
gSaveContext.language = LANGUAGE_MAX - 1; gSaveContext.language = LANGUAGE_MAX - 1;
} }
} else if (sInitialLanguageStickAdjX > 30) { } else if (sInitialLanguageStickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.language++; gSaveContext.language++;
if (gSaveContext.language >= LANGUAGE_MAX) { if (gSaveContext.language >= LANGUAGE_MAX) {
gSaveContext.language = 0; gSaveContext.language = 0;
@ -527,8 +523,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) {
GET_NEWF(sramCtx, this->buttonIndex, 5)); GET_NEWF(sramCtx, this->buttonIndex, 5));
if (!SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { if (!SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->configMode = CM_ROTATE_TO_NAME_ENTRY; this->configMode = CM_ROTATE_TO_NAME_ENTRY;
this->kbdButton = FS_KBD_BTN_NONE; this->kbdButton = FS_KBD_BTN_NONE;
@ -550,16 +545,14 @@ void FileSelect_UpdateMainMenu(GameState* thisx) {
this->nameEntryBoxAlpha = 0; this->nameEntryBoxAlpha = 0;
MemCpy(&this->fileNames[this->buttonIndex][0], &emptyName, sizeof(emptyName)); MemCpy(&this->fileNames[this->buttonIndex][0], &emptyName, sizeof(emptyName));
} else if (this->n64ddFlags[this->buttonIndex] == this->n64ddFlag) { } else if (this->n64ddFlags[this->buttonIndex] == this->n64ddFlag) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actionTimer = 8; this->actionTimer = 8;
this->selectMode = SM_FADE_MAIN_TO_SELECT; this->selectMode = SM_FADE_MAIN_TO_SELECT;
this->selectedFileIndex = this->buttonIndex; this->selectedFileIndex = this->buttonIndex;
this->menuMode = FS_MENU_MODE_SELECT; this->menuMode = FS_MENU_MODE_SELECT;
this->nextTitleLabel = FS_TITLE_OPEN_FILE; this->nextTitleLabel = FS_TITLE_OPEN_FILE;
} else if (!this->n64ddFlags[this->buttonIndex]) { } else if (!this->n64ddFlags[this->buttonIndex]) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
#if PLATFORM_N64 #if PLATFORM_N64
if (D_80121212 != 0) { if (D_80121212 != 0) {
@ -571,8 +564,7 @@ void FileSelect_UpdateMainMenu(GameState* thisx) {
} }
} else { } else {
if (this->warningLabel == FS_WARNING_NONE) { if (this->warningLabel == FS_WARNING_NONE) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->prevConfigMode = this->configMode; this->prevConfigMode = this->configMode;
if (this->buttonIndex == FS_BTN_MAIN_COPY) { if (this->buttonIndex == FS_BTN_MAIN_COPY) {
@ -593,14 +585,12 @@ void FileSelect_UpdateMainMenu(GameState* thisx) {
this->actionTimer = 8; this->actionTimer = 8;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} else { } else {
if (ABS(this->stickAdjY) > 30) { if (ABS(this->stickAdjY) > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickAdjY > 30) { if (this->stickAdjY > 30) {
this->buttonIndex--; this->buttonIndex--;
@ -1762,22 +1752,18 @@ void FileSelect_ConfirmFile(GameState* thisx) {
if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) { if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) {
if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) { if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) {
Rumble_Request(300.0f, 180, 20, 100); Rumble_Request(300.0f, 180, 20, 100);
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->selectMode = SM_FADE_OUT; this->selectMode = SM_FADE_OUT;
func_800F6964(0xF); func_800F6964(0xF);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->selectMode++; this->selectMode++;
} }
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->selectMode++; this->selectMode++;
} else if (ABS(this->stickAdjY) >= 30) { } else if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->confirmButtonIndex ^= 1; this->confirmButtonIndex ^= 1;
} }
} }
@ -1882,8 +1868,7 @@ void FileSelect_LoadGame(GameState* thisx) {
#if DEBUG_FEATURES #if DEBUG_FEATURES
if (this->buttonIndex == FS_BTN_SELECT_FILE_1) { if (this->buttonIndex == FS_BTN_SELECT_FILE_1) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.fileNum = this->buttonIndex; gSaveContext.fileNum = this->buttonIndex;
Sram_OpenSave(&this->sramCtx); Sram_OpenSave(&this->sramCtx);
gSaveContext.gameMode = GAMEMODE_NORMAL; gSaveContext.gameMode = GAMEMODE_NORMAL;
@ -1892,8 +1877,7 @@ void FileSelect_LoadGame(GameState* thisx) {
} else } else
#endif #endif
{ {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.fileNum = this->buttonIndex; gSaveContext.fileNum = this->buttonIndex;
Sram_OpenSave(&this->sramCtx); Sram_OpenSave(&this->sramCtx);
gSaveContext.gameMode = GAMEMODE_NORMAL; gSaveContext.gameMode = GAMEMODE_NORMAL;

View File

@ -98,24 +98,20 @@ void FileSelect_SelectCopySource(GameState* thisx) {
this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->nextTitleLabel = FS_TITLE_SELECT_FILE;
this->configMode = CM_COPY_RETURN_MAIN; this->configMode = CM_COPY_RETURN_MAIN;
this->warningLabel = FS_WARNING_NONE; this->warningLabel = FS_WARNING_NONE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
if (SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { if (SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
this->actionTimer = 8; this->actionTimer = 8;
this->selectedFileIndex = this->buttonIndex; this->selectedFileIndex = this->buttonIndex;
this->configMode = CM_SETUP_COPY_DEST_1; this->configMode = CM_SETUP_COPY_DEST_1;
this->nextTitleLabel = FS_TITLE_COPY_TO; this->nextTitleLabel = FS_TITLE_COPY_TO;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
if (ABS(this->stickAdjY) >= 30) { if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickAdjY >= 30) { if (this->stickAdjY >= 30) {
this->buttonIndex--; this->buttonIndex--;
@ -270,25 +266,21 @@ void FileSelect_SelectCopyDest(GameState* thisx) {
this->nextTitleLabel = FS_TITLE_COPY_FROM; this->nextTitleLabel = FS_TITLE_COPY_FROM;
this->actionTimer = 8; this->actionTimer = 8;
this->configMode = CM_EXIT_TO_COPY_SOURCE_1; this->configMode = CM_EXIT_TO_COPY_SOURCE_1;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
if (!SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { if (!SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
this->copyDestFileIndex = this->buttonIndex; this->copyDestFileIndex = this->buttonIndex;
this->nextTitleLabel = FS_TITLE_COPY_CONFIRM; this->nextTitleLabel = FS_TITLE_COPY_CONFIRM;
this->actionTimer = 8; this->actionTimer = 8;
this->configMode = CM_SETUP_COPY_CONFIRM_1; this->configMode = CM_SETUP_COPY_CONFIRM_1;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
if (ABS(this->stickAdjY) >= 30) { if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickAdjY >= 30) { if (this->stickAdjY >= 30) {
this->buttonIndex--; this->buttonIndex--;
@ -553,8 +545,7 @@ void FileSelect_CopyConfirm(GameState* thisx) {
this->actionTimer = 8; this->actionTimer = 8;
this->nextTitleLabel = FS_TITLE_COPY_TO; this->nextTitleLabel = FS_TITLE_COPY_TO;
this->configMode = CM_RETURN_TO_COPY_DEST; this->configMode = CM_RETURN_TO_COPY_DEST;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
dayTime = gSaveContext.save.dayTime; dayTime = gSaveContext.save.dayTime;
Sram_CopySave(this, sramCtx); Sram_CopySave(this, sramCtx);
@ -564,11 +555,9 @@ void FileSelect_CopyConfirm(GameState* thisx) {
this->actionTimer = 8; this->actionTimer = 8;
this->configMode = CM_COPY_ANIM_1; this->configMode = CM_COPY_ANIM_1;
Rumble_Request(300.0f, 180, 20, 100); Rumble_Request(300.0f, 180, 20, 100);
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (ABS(this->stickAdjY) >= 30) { } else if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->buttonIndex ^= 1; this->buttonIndex ^= 1;
} }
} }
@ -758,8 +747,7 @@ void FileSelect_CopyAnim3(GameState* thisx) {
if (this->actionTimer == 75) { if (this->actionTimer == 75) {
this->connectorAlpha[this->copyDestFileIndex] = 255; this->connectorAlpha[this->copyDestFileIndex] = 255;
Audio_PlaySfxGeneral(NA_SE_EV_DIAMOND_SWITCH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_DIAMOND_SWITCH);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
this->actionTimer--; this->actionTimer--;
@ -769,8 +757,7 @@ void FileSelect_CopyAnim3(GameState* thisx) {
this->actionTimer = 8; this->actionTimer = 8;
this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->nextTitleLabel = FS_TITLE_SELECT_FILE;
this->configMode++; this->configMode++;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} }
@ -1154,24 +1141,20 @@ void FileSelect_EraseSelect(GameState* thisx) {
this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->nextTitleLabel = FS_TITLE_SELECT_FILE;
this->configMode = CM_EXIT_ERASE_TO_MAIN; this->configMode = CM_EXIT_ERASE_TO_MAIN;
this->warningLabel = FS_WARNING_NONE; this->warningLabel = FS_WARNING_NONE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
if (SLOT_OCCUPIED(sramCtx, this->buttonIndex)) { if (SLOT_OCCUPIED(sramCtx, this->buttonIndex)) {
this->actionTimer = 8; this->actionTimer = 8;
this->selectedFileIndex = this->buttonIndex; this->selectedFileIndex = this->buttonIndex;
this->configMode = CM_SETUP_ERASE_CONFIRM_1; this->configMode = CM_SETUP_ERASE_CONFIRM_1;
this->nextTitleLabel = FS_TITLE_ERASE_CONFIRM; this->nextTitleLabel = FS_TITLE_ERASE_CONFIRM;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
if (ABS(this->stickAdjY) >= 30) { if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (this->stickAdjY >= 30) { if (this->stickAdjY >= 30) {
this->buttonIndex--; this->buttonIndex--;
@ -1391,20 +1374,17 @@ void FileSelect_EraseConfirm(GameState* thisx) {
this->nextTitleLabel = FS_TITLE_ERASE_FILE; this->nextTitleLabel = FS_TITLE_ERASE_FILE;
this->configMode = CM_EXIT_TO_ERASE_SELECT_1; this->configMode = CM_EXIT_TO_ERASE_SELECT_1;
this->actionTimer = 8; this->actionTimer = 8;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) { } else if (CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) {
this->n64ddFlags[this->selectedFileIndex] = this->connectorAlpha[this->selectedFileIndex] = 0; this->n64ddFlags[this->selectedFileIndex] = this->connectorAlpha[this->selectedFileIndex] = 0;
Audio_PlaySfxGeneral(NA_SE_EV_DIAMOND_SWITCH, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_EV_DIAMOND_SWITCH);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->actionTimer = 8; this->actionTimer = 8;
this->configMode = CM_ERASE_ANIM_1; this->configMode = CM_ERASE_ANIM_1;
this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE; this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE;
Rumble_Request(200.0f, 255, 20, 150); Rumble_Request(200.0f, 255, 20, 150);
sEraseDelayTimer = 15; sEraseDelayTimer = 15;
} else if (ABS(this->stickAdjY) >= 30) { } else if (ABS(this->stickAdjY) >= 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->buttonIndex ^= 1; this->buttonIndex ^= 1;
} }
} }
@ -1622,8 +1602,7 @@ void FileSelect_EraseAnim1(GameState* thisx) {
sEraseDelayTimer--; sEraseDelayTimer--;
if (sEraseDelayTimer == 0) { if (sEraseDelayTimer == 0) {
Audio_PlaySfxGeneral(NA_SE_OC_ABYSS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_OC_ABYSS);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} }
@ -1641,8 +1620,7 @@ void FileSelect_EraseAnim2(GameState* thisx) {
this->actionTimer = 8; this->actionTimer = 8;
this->nextTitleLabel = FS_TITLE_SELECT_FILE; this->nextTitleLabel = FS_TITLE_SELECT_FILE;
this->configMode++; this->configMode++;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CLOSE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }

View File

@ -649,8 +649,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
if (this->configMode == CM_NAME_ENTRY) { if (this->configMode == CM_NAME_ENTRY) {
if (CHECK_BTN_ALL(input->press.button, BTN_START)) { if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
// place cursor on END button // place cursor on END button
this->kbdY = 5; this->kbdY = 5;
this->kbdX = 4; this->kbdX = 4;
@ -661,8 +660,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE; this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
this->newFileNameCharCount--; this->newFileNameCharCount--;
@ -675,8 +673,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE; this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} else { } else {
@ -695,18 +692,12 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
(gCharPageHira[this->charIndex] == FILENAME_HANDAKUTEN)) { (gCharPageHira[this->charIndex] == FILENAME_HANDAKUTEN)) {
if (!FileSelect_ApplyDiacriticToFilename(&this->state, if (!FileSelect_ApplyDiacriticToFilename(&this->state,
gCharPageHira[this->charIndex])) { gCharPageHira[this->charIndex])) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
this->fileNames[this->buttonIndex][this->newFileNameCharCount] = this->fileNames[this->buttonIndex][this->newFileNameCharCount] =
gCharPageHira[this->charIndex]; gCharPageHira[this->charIndex];
this->newFileNameCharCount++; this->newFileNameCharCount++;
@ -724,18 +715,12 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
(gCharPageHira[this->charIndex] == FILENAME_HANDAKUTEN)) { (gCharPageHira[this->charIndex] == FILENAME_HANDAKUTEN)) {
if (!FileSelect_ApplyDiacriticToFilename(&this->state, if (!FileSelect_ApplyDiacriticToFilename(&this->state,
gCharPageHira[this->charIndex])) { gCharPageHira[this->charIndex])) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
this->fileNames[this->buttonIndex][this->newFileNameCharCount] = this->fileNames[this->buttonIndex][this->newFileNameCharCount] =
gCharPageKata[this->charIndex]; gCharPageKata[this->charIndex];
this->newFileNameCharCount++; this->newFileNameCharCount++;
@ -751,9 +736,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
font->fontBuf + gCharPageEng[this->charIndex] * FONT_CHAR_TEX_SIZE, 0); font->fontBuf + gCharPageEng[this->charIndex] * FONT_CHAR_TEX_SIZE, 0);
if (CHECK_BTN_ALL(input->press.button, BTN_A)) { if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
this->fileNames[this->buttonIndex][this->newFileNameCharCount] = this->fileNames[this->buttonIndex][this->newFileNameCharCount] =
gCharPageEng[this->charIndex]; gCharPageEng[this->charIndex];
this->newFileNameCharCount++; this->newFileNameCharCount++;
@ -770,24 +753,21 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} else { } else {
this->charPage = FS_CHAR_PAGE_ENG_TO_HIRA; this->charPage = FS_CHAR_PAGE_ENG_TO_HIRA;
} }
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (this->kbdButton == FS_KBD_BTN_KATA) { } else if (this->kbdButton == FS_KBD_BTN_KATA) {
if (this->charPage == FS_CHAR_PAGE_HIRA) { if (this->charPage == FS_CHAR_PAGE_HIRA) {
this->charPage = FS_CHAR_PAGE_HIRA_TO_KATA; this->charPage = FS_CHAR_PAGE_HIRA_TO_KATA;
} else { } else {
this->charPage = FS_CHAR_PAGE_ENG_TO_KATA; this->charPage = FS_CHAR_PAGE_ENG_TO_KATA;
} }
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (this->kbdButton == FS_KBD_BTN_ENG) { } else if (this->kbdButton == FS_KBD_BTN_ENG) {
if (this->charPage == FS_CHAR_PAGE_HIRA) { if (this->charPage == FS_CHAR_PAGE_HIRA) {
this->charPage = FS_CHAR_PAGE_HIRA_TO_ENG; this->charPage = FS_CHAR_PAGE_HIRA_TO_ENG;
} else { } else {
this->charPage = FS_CHAR_PAGE_KATA_TO_ENG; this->charPage = FS_CHAR_PAGE_KATA_TO_ENG;
} }
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else { } else {
if (this->kbdButton == FS_KBD_BTN_BACKSPACE) { if (this->kbdButton == FS_KBD_BTN_BACKSPACE) {
if ((this->newFileNameCharCount == 7) && if ((this->newFileNameCharCount == 7) &&
@ -797,9 +777,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE; this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
this->newFileNameCharCount--; this->newFileNameCharCount--;
@ -812,9 +790,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE; this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} else if (this->kbdButton == FS_KBD_BTN_END) { } else if (this->kbdButton == FS_KBD_BTN_END) {
validName = false; validName = false;
@ -827,9 +803,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
if (validName) { if (validName) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
gSaveContext.fileNum = this->buttonIndex; gSaveContext.fileNum = this->buttonIndex;
dayTime = ((void)0, gSaveContext.save.dayTime); dayTime = ((void)0, gSaveContext.save.dayTime);
Sram_InitSave(this, &this->sramCtx); Sram_InitSave(this, &this->sramCtx);
@ -839,25 +813,21 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
this->connectorAlpha[this->buttonIndex] = 255; this->connectorAlpha[this->buttonIndex] = 255;
Rumble_Request(300.0f, 180, 20, 100); Rumble_Request(300.0f, 180, 20, 100);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} }
} }
} }
if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) { if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->newFileNameCharCount++; this->newFileNameCharCount++;
if (this->newFileNameCharCount > 7) { if (this->newFileNameCharCount > 7) {
this->newFileNameCharCount = 7; this->newFileNameCharCount = 7;
} }
} else if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->newFileNameCharCount--; this->newFileNameCharCount--;
if (this->newFileNameCharCount < 0) { if (this->newFileNameCharCount < 0) {
@ -865,8 +835,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
} else if (CHECK_BTN_ALL(input->press.button, BTN_Z)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_Z)) {
if (FileSelect_ApplyDiacriticToFilename(&this->state, FILENAME_SPACE)) { if (FileSelect_ApplyDiacriticToFilename(&this->state, FILENAME_SPACE)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
#else #else
@ -880,8 +849,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
font->fontBuf + gCharPageEng[this->charIndex] * FONT_CHAR_TEX_SIZE, 0); font->fontBuf + gCharPageEng[this->charIndex] * FONT_CHAR_TEX_SIZE, 0);
if (CHECK_BTN_ALL(input->press.button, BTN_A)) { if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->fileNames[this->buttonIndex][this->newFileNameCharCount] = gCharPageEng[this->charIndex]; this->fileNames[this->buttonIndex][this->newFileNameCharCount] = gCharPageEng[this->charIndex];
this->newFileNameCharCount++; this->newFileNameCharCount++;
@ -898,9 +866,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE; this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} else { } else {
this->newFileNameCharCount--; this->newFileNameCharCount--;
@ -913,9 +879,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE; this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_S);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
} }
} else if (this->kbdButton == FS_KBD_BTN_END) { } else if (this->kbdButton == FS_KBD_BTN_END) {
validName = false; validName = false;
@ -928,9 +892,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
} }
if (validName) { if (validName) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
gSaveContext.fileNum = this->buttonIndex; gSaveContext.fileNum = this->buttonIndex;
dayTime = ((void)0, gSaveContext.save.dayTime); dayTime = ((void)0, gSaveContext.save.dayTime);
Sram_InitSave(this, &this->sramCtx); Sram_InitSave(this, &this->sramCtx);
@ -940,23 +902,20 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
this->connectorAlpha[this->buttonIndex] = 255; this->connectorAlpha[this->buttonIndex] = 255;
Rumble_Request(300.0f, 180, 20, 100); Rumble_Request(300.0f, 180, 20, 100);
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} }
if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) { if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->newFileNameCharCount++; this->newFileNameCharCount++;
if (this->newFileNameCharCount > 7) { if (this->newFileNameCharCount > 7) {
this->newFileNameCharCount = 7; this->newFileNameCharCount = 7;
} }
} else if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->newFileNameCharCount--; this->newFileNameCharCount--;
if (this->newFileNameCharCount < 0) { if (this->newFileNameCharCount < 0) {
@ -1020,16 +979,13 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
if (gSaveContext.language == LANGUAGE_JPN) { if (gSaveContext.language == LANGUAGE_JPN) {
if (this->charPage == FS_CHAR_PAGE_HIRA) { if (this->charPage == FS_CHAR_PAGE_HIRA) {
this->charPage = FS_CHAR_PAGE_HIRA_TO_KATA; this->charPage = FS_CHAR_PAGE_HIRA_TO_KATA;
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (this->charPage == FS_CHAR_PAGE_KATA) { } else if (this->charPage == FS_CHAR_PAGE_KATA) {
this->charPage = FS_CHAR_PAGE_KATA_TO_ENG; this->charPage = FS_CHAR_PAGE_KATA_TO_ENG;
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (this->charPage == FS_CHAR_PAGE_ENG) { } else if (this->charPage == FS_CHAR_PAGE_ENG) {
this->charPage = FS_CHAR_PAGE_ENG_TO_HIRA; this->charPage = FS_CHAR_PAGE_ENG_TO_HIRA;
Audio_PlaySfxGeneral(NA_SE_SY_WIN_OPEN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_OPEN);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} else { } else {
@ -1037,8 +993,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
if (this->kbdY != 5) { if (this->kbdY != 5) {
if (this->stickAdjX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->charIndex--; this->charIndex--;
this->kbdX--; this->kbdX--;
if (this->kbdX < 0) { if (this->kbdX < 0) {
@ -1046,8 +1001,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->charIndex = this->kbdY * 13 + this->kbdX; this->charIndex = this->kbdY * 13 + this->kbdX;
} }
} else if (this->stickAdjX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->charIndex++; this->charIndex++;
this->kbdX++; this->kbdX++;
if (this->kbdX >= 13) { if (this->kbdX >= 13) {
@ -1057,15 +1011,13 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} else if (gSaveContext.language == LANGUAGE_JPN) { } else if (gSaveContext.language == LANGUAGE_JPN) {
if (this->stickAdjX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX--; this->kbdX--;
if (this->kbdX < 0) { if (this->kbdX < 0) {
this->kbdX = 4; this->kbdX = 4;
} }
} else if (this->stickAdjX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX++; this->kbdX++;
if (this->kbdX >= 5) { if (this->kbdX >= 5) {
this->kbdX = 0; this->kbdX = 0;
@ -1073,15 +1025,13 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} else { } else {
if (this->stickAdjX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX--; this->kbdX--;
if (this->kbdX < 3) { if (this->kbdX < 3) {
this->kbdX = 4; this->kbdX = 4;
} }
} else if (this->stickAdjX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX++; this->kbdX++;
if (this->kbdX >= 5) { if (this->kbdX >= 5) {
this->kbdX = 3; this->kbdX = 3;
@ -1090,8 +1040,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
if (this->stickAdjY > 30) { if (this->stickAdjY > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdY--; this->kbdY--;
if (this->kbdY < 0) { if (this->kbdY < 0) {
if (gSaveContext.language == LANGUAGE_JPN) { if (gSaveContext.language == LANGUAGE_JPN) {
@ -1138,8 +1087,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} }
} else if (this->stickAdjY < -30) { } else if (this->stickAdjY < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdY++; this->kbdY++;
if (this->kbdY >= 6) { if (this->kbdY >= 6) {
@ -1207,8 +1155,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
if (this->kbdY != 5) { if (this->kbdY != 5) {
if (this->stickAdjX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->charIndex--; this->charIndex--;
this->kbdX--; this->kbdX--;
if (this->kbdX < 0) { if (this->kbdX < 0) {
@ -1216,8 +1163,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
this->charIndex = this->kbdY * 13 + this->kbdX; this->charIndex = this->kbdY * 13 + this->kbdX;
} }
} else if (this->stickAdjX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->charIndex++; this->charIndex++;
this->kbdX++; this->kbdX++;
if (this->kbdX >= 13) { if (this->kbdX >= 13) {
@ -1227,15 +1173,13 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} else { } else {
if (this->stickAdjX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX--; this->kbdX--;
if (this->kbdX < 3) { if (this->kbdX < 3) {
this->kbdX = 4; this->kbdX = 4;
} }
} else if (this->stickAdjX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdX++; this->kbdX++;
if (this->kbdX >= 5) { if (this->kbdX >= 5) {
this->kbdX = 3; this->kbdX = 3;
@ -1244,8 +1188,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
if (this->stickAdjY > 30) { if (this->stickAdjY > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdY--; this->kbdY--;
if (this->kbdY < 0) { if (this->kbdY < 0) {
// don't go to bottom row // don't go to bottom row
@ -1273,8 +1216,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
} }
} }
} else if (this->stickAdjY < -30) { } else if (this->stickAdjY < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->kbdY++; this->kbdY++;
if (this->kbdY >= 6) { if (this->kbdY >= 6) {
@ -1352,8 +1294,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
Input* input = &this->state.input[0]; Input* input = &this->state.input[0];
if (CHECK_BTN_ALL(input->press.button, BTN_B)) { if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->configMode = CM_OPTIONS_TO_MAIN; this->configMode = CM_OPTIONS_TO_MAIN;
sramCtx->readBuff[0] = gSaveContext.soundSetting; sramCtx->readBuff[0] = gSaveContext.soundSetting;
sramCtx->readBuff[1] = gSaveContext.zTargetSetting; sramCtx->readBuff[1] = gSaveContext.zTargetSetting;
@ -1375,8 +1316,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
} }
if (this->stickAdjX < -30) { if (this->stickAdjX < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sSelectedSetting == FS_SETTING_AUDIO) { if (sSelectedSetting == FS_SETTING_AUDIO) {
gSaveContext.soundSetting--; gSaveContext.soundSetting--;
@ -1400,8 +1340,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
#endif #endif
} }
} else if (this->stickAdjX > 30) { } else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sSelectedSetting == FS_SETTING_AUDIO) { if (sSelectedSetting == FS_SETTING_AUDIO) {
gSaveContext.soundSetting++; gSaveContext.soundSetting++;
@ -1427,32 +1366,27 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
#if !OOT_PAL_N64 #if !OOT_PAL_N64
if ((this->stickAdjY < -30) || (this->stickAdjY > 30)) { if ((this->stickAdjY < -30) || (this->stickAdjY > 30)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting ^= 1; sSelectedSetting ^= 1;
} else if (CHECK_BTN_ALL(input->press.button, BTN_A)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting ^= 1; sSelectedSetting ^= 1;
} }
#else #else
if (this->stickAdjY < -30) { if (this->stickAdjY < -30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting++; sSelectedSetting++;
if (sSelectedSetting >= FS_SETTING_MAX) { if (sSelectedSetting >= FS_SETTING_MAX) {
sSelectedSetting = 0; sSelectedSetting = 0;
} }
} else if (this->stickAdjY > 30) { } else if (this->stickAdjY > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting--; sSelectedSetting--;
if (sSelectedSetting >= FS_SETTING_MAX) { if (sSelectedSetting >= FS_SETTING_MAX) {
sSelectedSetting = FS_SETTING_MAX - 1; sSelectedSetting = FS_SETTING_MAX - 1;
} }
} else if (CHECK_BTN_ALL(input->press.button, BTN_A)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_FSEL_DECIDE_L);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting++; sSelectedSetting++;
if (sSelectedSetting >= FS_SETTING_MAX) { if (sSelectedSetting >= FS_SETTING_MAX) {
sSelectedSetting = 0; sSelectedSetting = 0;

View File

@ -387,15 +387,13 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
if (this->timerUp == 0) { if (this->timerUp == 0) {
this->timerUp = 20; this->timerUp = 20;
this->lockUp = true; this->lockUp = true;
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->verticalInput = R_UPDATE_RATE; this->verticalInput = R_UPDATE_RATE;
} }
} }
if (CHECK_BTN_ALL(input->cur.button, BTN_DUP) && this->timerUp == 0) { if (CHECK_BTN_ALL(input->cur.button, BTN_DUP) && this->timerUp == 0) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->verticalInput = R_UPDATE_RATE * 3; this->verticalInput = R_UPDATE_RATE * 3;
} }
@ -406,27 +404,23 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
if (this->timerDown == 0) { if (this->timerDown == 0) {
this->timerDown = 20; this->timerDown = 20;
this->lockDown = true; this->lockDown = true;
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->verticalInput = -R_UPDATE_RATE; this->verticalInput = -R_UPDATE_RATE;
} }
} }
if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN) && (this->timerDown == 0)) { if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN) && (this->timerDown == 0)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->verticalInput = -R_UPDATE_RATE * 3; this->verticalInput = -R_UPDATE_RATE * 3;
} }
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT) || CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) { if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT) || CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->verticalInput = R_UPDATE_RATE; this->verticalInput = R_UPDATE_RATE;
} }
if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT) || CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) { if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT) || CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->verticalInput = -R_UPDATE_RATE; this->verticalInput = -R_UPDATE_RATE;
} }
} }

View File

@ -252,8 +252,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
// if the cursor point changed // if the cursor point changed
if (pauseCtx->cursorPoint[PAUSE_QUEST] != prevCursorPoint) { if (pauseCtx->cursorPoint[PAUSE_QUEST] != prevCursorPoint) {
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
// Update cursor item and slot // Update cursor item and slot
@ -351,8 +350,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
cursor = pauseCtx->cursorPoint[PAUSE_QUEST]; cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx); KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) { if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
cursorItem = ITEM_STONE_OF_AGONY - QUEST_STONE_OF_AGONY + pauseCtx->cursorPoint[PAUSE_QUEST]; cursorItem = ITEM_STONE_OF_AGONY - QUEST_STONE_OF_AGONY + pauseCtx->cursorPoint[PAUSE_QUEST];
@ -373,8 +371,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
cursor = pauseCtx->cursorPoint[PAUSE_QUEST]; cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx); KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) { if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
// Only the first if may be reached, as QUEST_MEDALLION_FOREST is set above // Only the first if may be reached, as QUEST_MEDALLION_FOREST is set above

View File

@ -377,8 +377,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
pauseCtx->nameDisplayTimer = 0; pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSpecialPos = 0;
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
cursorPoint = cursorX = cursorY = 0; cursorPoint = cursorX = cursorY = 0;
while (true) { while (true) {
@ -424,8 +423,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
if (pauseCtx->stickAdjX < -30) { if (pauseCtx->stickAdjX < -30) {
pauseCtx->nameDisplayTimer = 0; pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSpecialPos = 0;
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
cursorPoint = cursorX = 3; cursorPoint = cursorX = 3;
cursorY = 0; cursorY = 0;
@ -574,21 +572,18 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
Interface_LoadItemIcon1(play, 0); Interface_LoadItemIcon1(play, 0);
} }
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
// Wait 10 frames before accepting input again // Wait 10 frames before accepting input again
pauseCtx->mainState = PAUSE_MAIN_STATE_EQUIP_CHANGED; pauseCtx->mainState = PAUSE_MAIN_STATE_EQUIP_CHANGED;
sEquipTimer = 10; sEquipTimer = 10;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_EQUIP]) { if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_EQUIP]) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_CHANGED) && (pauseCtx->pageIndex == PAUSE_EQUIP)) { } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_CHANGED) && (pauseCtx->pageIndex == PAUSE_EQUIP)) {
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx); KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx);

View File

@ -257,8 +257,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
pauseCtx->nameDisplayTimer = 0; pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSpecialPos = 0;
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
cursorPoint = cursorX = cursorY = 0; cursorPoint = cursorX = cursorY = 0;
while (true) { while (true) {
@ -288,8 +287,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
pauseCtx->nameDisplayTimer = 0; pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSpecialPos = 0;
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
cursorPoint = cursorX = ITEM_GRID_COLS - 1; cursorPoint = cursorX = ITEM_GRID_COLS - 1;
cursorY = 0; cursorY = 0;
@ -416,20 +414,16 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
if (pauseCtx->equipTargetItem == ITEM_ARROW_LIGHT) { if (pauseCtx->equipTargetItem == ITEM_ARROW_LIGHT) {
index = 2; index = 2;
} }
Audio_PlaySfxGeneral(NA_SE_SY_SET_FIRE_ARROW + index, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_SET_FIRE_ARROW + index);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
pauseCtx->equipTargetItem = 0xBF + index; pauseCtx->equipTargetItem = 0xBF + index;
sEquipState = 0; sEquipState = 0;
pauseCtx->equipAnimAlpha = 0; pauseCtx->equipAnimAlpha = 0;
sEquipMoveTimer = 6; sEquipMoveTimer = 6;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
} }
@ -445,8 +439,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
} }
if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_ITEM]) { if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_ITEM]) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_3) && (pauseCtx->pageIndex == PAUSE_ITEM)) { } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_3) && (pauseCtx->pageIndex == PAUSE_ITEM)) {
//! @bug cursorSlot is uninitialized //! @bug cursorSlot is uninitialized
@ -568,8 +561,7 @@ void KaleidoScope_UpdateItemEquip(PlayState* play) {
WREG(90) = 320; WREG(90) = 320;
WREG(87) = WREG(91); WREG(87) = WREG(91);
sEquipState++; sEquipState++;
Audio_PlaySfxGeneral(NA_SE_SY_SYNTH_MAGIC_ARROW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_SYNTH_MAGIC_ARROW);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
return; return;
} }

View File

@ -164,8 +164,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorX[PAUSE_MAP] = 0; pauseCtx->cursorX[PAUSE_MAP] = 0;
j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4; j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4;
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx); KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} else { } else {
if (pauseCtx->stickAdjX < -30) { if (pauseCtx->stickAdjX < -30) {
@ -195,14 +194,12 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
PRINTF("kscope->cursor_point====%d\n", pauseCtx->cursorPoint[PAUSE_MAP]); PRINTF("kscope->cursor_point====%d\n", pauseCtx->cursorPoint[PAUSE_MAP]);
j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4; j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4;
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx); KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_MAP]) { if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_MAP]) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }
@ -607,8 +604,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorSlot[PAUSE_MAP] =
PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
D_8082A6D4 = 0; D_8082A6D4 = 0;
} }
} else { } else {
@ -625,8 +621,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorSlot[PAUSE_MAP] =
PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; PAGE_BG_QUADS + WORLD_MAP_QUAD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
D_8082A6D4 = 0; D_8082A6D4 = 0;
} }
} }
@ -637,8 +632,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
} }
if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_WORLD_MAP]) { if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_WORLD_MAP]) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
} }

View File

@ -19,12 +19,10 @@ void KaleidoScope_UpdatePrompt(PlayState* play) {
(pauseCtx->state == PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT)) { (pauseCtx->state == PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT)) {
if ((pauseCtx->promptChoice == 0) && (stickAdjX >= 30)) { if ((pauseCtx->promptChoice == 0) && (stickAdjX >= 30)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->promptChoice = 4; pauseCtx->promptChoice = 4;
} else if ((pauseCtx->promptChoice != 0) && (stickAdjX <= -30)) { } else if ((pauseCtx->promptChoice != 0) && (stickAdjX <= -30)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;
} }

View File

@ -1020,8 +1020,7 @@ void KaleidoScope_MoveCursorToSpecialPos(PlayState* play, u16 specialPos) {
pauseCtx->cursorSpecialPos = specialPos; pauseCtx->cursorSpecialPos = specialPos;
pauseCtx->pageSwitchInputTimer = 0; pauseCtx->pageSwitchInputTimer = 0;
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultReverb);
} }
void KaleidoScope_DrawQuadTextureRGBA32(GraphicsContext* gfxCtx, void* texture, u16 width, u16 height, u16 point) { void KaleidoScope_DrawQuadTextureRGBA32(GraphicsContext* gfxCtx, void* texture, u16 width, u16 height, u16 point) {
@ -1078,13 +1077,11 @@ void KaleidoScope_SetupPageSwitch(PauseContext* pauseCtx, u8 pt) {
if (!pt) { // PAGE_SWITCH_PT_LEFT if (!pt) { // PAGE_SWITCH_PT_LEFT
pauseCtx->nextPageMode = pauseCtx->pageIndex * 2 + 1; pauseCtx->nextPageMode = pauseCtx->pageIndex * 2 + 1;
Audio_PlaySfxGeneral(NA_SE_SY_WIN_SCROLL_LEFT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_SCROLL_LEFT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_RIGHT; pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_RIGHT;
} else { // PAGE_SWITCH_PT_RIGHT } else { // PAGE_SWITCH_PT_RIGHT
pauseCtx->nextPageMode = pauseCtx->pageIndex * 2; pauseCtx->nextPageMode = pauseCtx->pageIndex * 2;
Audio_PlaySfxGeneral(NA_SE_SY_WIN_SCROLL_RIGHT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_WIN_SCROLL_RIGHT);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_LEFT; pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_LEFT;
} }
@ -4088,8 +4085,7 @@ void KaleidoScope_Update(PlayState* play) {
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
pauseCtx->nextPageMode = 0; pauseCtx->nextPageMode = 0;
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] = gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
gSaveContext.buttonStatus[3] = BTN_DISABLED; gSaveContext.buttonStatus[3] = BTN_DISABLED;
gSaveContext.buttonStatus[4] = BTN_ENABLED; gSaveContext.buttonStatus[4] = BTN_ENABLED;
@ -4136,8 +4132,7 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->nextPageMode = 0; pauseCtx->nextPageMode = 0;
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] = gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
gSaveContext.buttonStatus[3] = BTN_DISABLED; gSaveContext.buttonStatus[3] = BTN_DISABLED;
gSaveContext.buttonStatus[4] = BTN_ENABLED; gSaveContext.buttonStatus[4] = BTN_ENABLED;
@ -4147,16 +4142,14 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT; pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
} else if (pauseCtx->ocarinaStaff->state == pauseCtx->ocarinaSongIdx) { } else if (pauseCtx->ocarinaStaff->state == pauseCtx->ocarinaSongIdx) {
// The player successfully played the song // The player successfully played the song
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_IDLE; sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_IDLE;
sDelayTimer = 30; sDelayTimer = 30;
pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_DONE; pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_DONE;
} else if (pauseCtx->ocarinaStaff->state == 0xFF) { } else if (pauseCtx->ocarinaStaff->state == 0xFF) {
// The player failed to play the song // The player failed to play the song
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_SONG_PROMPT_INIT; sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_SONG_PROMPT_INIT;
sDelayTimer = 20; sDelayTimer = 20;
@ -4190,8 +4183,7 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE; pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->nextPageMode = 0; pauseCtx->nextPageMode = 0;
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] = gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
gSaveContext.buttonStatus[3] = BTN_DISABLED; gSaveContext.buttonStatus[3] = BTN_DISABLED;
gSaveContext.buttonStatus[4] = BTN_ENABLED; gSaveContext.buttonStatus[4] = BTN_ENABLED;
@ -4239,9 +4231,7 @@ void KaleidoScope_Update(PlayState* play) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
#endif #endif
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Play_SaveSceneFlags(play); Play_SaveSceneFlags(play);
gSaveContext.save.info.playerData.savedSceneId = play->sceneId; gSaveContext.save.info.playerData.savedSceneId = play->sceneId;
Sram_WriteSave(&play->sramCtx); Sram_WriteSave(&play->sramCtx);
@ -4499,13 +4489,11 @@ void KaleidoScope_Update(PlayState* play) {
if (CHECK_BTN_ALL(input->press.button, BTN_A)) { if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
if (pauseCtx->promptChoice != 0) { if (pauseCtx->promptChoice != 0) {
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->state = PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT; pauseCtx->state = PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT;
gameOverCtx->state++; gameOverCtx->state++;
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
pauseCtx->promptChoice = 0; pauseCtx->promptChoice = 0;
Play_SaveSceneFlags(play); Play_SaveSceneFlags(play);
gSaveContext.save.info.playerData.savedSceneId = play->sceneId; gSaveContext.save.info.playerData.savedSceneId = play->sceneId;
@ -4536,8 +4524,7 @@ void KaleidoScope_Update(PlayState* play) {
case PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT: case PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT:
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) { if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) {
if (pauseCtx->promptChoice == 0) { if (pauseCtx->promptChoice == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Play_SaveSceneFlags(play); Play_SaveSceneFlags(play);
switch (gSaveContext.save.entranceIndex) { switch (gSaveContext.save.entranceIndex) {
@ -4595,8 +4582,7 @@ void KaleidoScope_Update(PlayState* play) {
break; break;
} }
} else { } else {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} }
pauseCtx->state = PAUSE_STATE_GAME_OVER_FINISH; pauseCtx->state = PAUSE_STATE_GAME_OVER_FINISH;