Macroify PlaySfxGeneral calls: introduce SFX_PLAY_CENTERED and SFX_PLAY_AT_POS (#2633)

* Add `SFX_PLAY_CENTERED`

* Add `SFX_PLAY_AT_POS`
This commit is contained in:
Dragorn421
2025-06-16 00:28:37 +02:00
committed by GitHub
parent 05a2818557
commit fd1ea6bc1a
95 changed files with 519 additions and 1070 deletions
+48 -96
View File
@@ -373,8 +373,7 @@ void func_800B44E0(DebugCam* debugCam, Camera* cam) {
if (debugCam->sub.nPoints < 6) {
if (sDebugCamAnim.unk_0A != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
sDebugCamAnim.unk_0A = 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,
&sDebugCamAnim.keyframe, &sDebugCamAnim.curFrame) &&
sDebugCamAnim.unk_0A == 1) {
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
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->sub.demoCtrlActionIdx = 0;
sDebugCamAnim.unk_0A = 0;
Audio_PlaySfxGeneral(NA_SE_SY_LOCK_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_LOCK_ON);
} else if (debugCam->unk_38 == -1) {
debugCam->unk_38 = 1;
} else {
@@ -938,25 +935,21 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
debugCam->unk_1C.z = 0.0f;
debugCam->unk_1C.y = 1.0f;
} else if (debugCam->sub.unk_08 == 2) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->sub.unk_08 = 0;
func_800B41DC(debugCam, debugCam->sub.unkIdx, cam);
} else {
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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
debugCam->sub.nPoints = debugCam->sub.unkIdx + 1;
func_800B4088(debugCam, cam);
} else if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_R)) {
if (debugCam->sub.unkIdx == 0x80) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_PUTAWAY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SWORD_PUTAWAY);
func_800B42C0(debugCam, cam);
if (debugCam->sub.unkIdx == (debugCam->sub.nPoints - 1)) {
debugCam->sub.unkIdx++;
@@ -1009,8 +1002,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
} else {
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)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
PRINTF("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
DebugCamera_PrintPoints("Lookat", debugCam->sub.nPoints, debugCam->sub.lookAt);
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("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
} 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,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
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) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].cur.button, BTN_L)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
if (debugCam->sub.unkIdx > 0) {
debugCam->sub.unkIdx--;
} else {
@@ -1035,8 +1025,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
}
} else {
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,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
if (debugCam->sub.unkIdx > 0) {
debugCam->sub.unkIdx--;
} 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) &&
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CDOWN)) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_IMPACT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
if (debugCam->sub.unkIdx < (debugCam->sub.nPoints - 1)) {
debugCam->sub.unkIdx++;
} else {
@@ -1066,8 +1054,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
}
} else {
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,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SWORD_IMPACT);
if (debugCam->sub.unkIdx < (debugCam->sub.nPoints - 1)) {
debugCam->sub.unkIdx++;
} else {
@@ -1140,8 +1127,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
case 1:
debugCam->unk_3C = true;
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,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
if (debugCam->sub.unk_0A == 0) {
debugCam->sub.unk_0A = 5;
} 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)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
if (debugCam->sub.unk_0A == 5) {
debugCam->sub.unk_0A = 0;
} 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)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
switch (debugCam->sub.unk_0A) {
case 1:
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 ((D_8012D10C++ % 5) == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
}
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)) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
switch (debugCam->sub.unk_0A) {
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 ((D_8012D10C++ % 5) == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ATTENTION_ON, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ATTENTION_ON);
}
switch (debugCam->sub.unk_0A) {
@@ -1460,8 +1441,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
debugCam->fov = 60.0f;
debugCam->rollDegrees = debugCam->roll * 1.40625f;
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->unk_78 = (debugCam->unk_78 + 1) % 3;
debugCam->unk_38 = -1;
}
@@ -1745,8 +1725,7 @@ void DebugCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorIndex) {
void DebugCamera_PrintAllCuts(Camera* cam) {
s32 i;
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
PRINTF("@@@\n@@@\n@@@/* ****** spline point data ** start here ***** */\n@@@\n");
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 (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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->sub.demoCtrlToggleSwitch ^= 1;
}
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 (debugCam->sub.demoCtrlToggleSwitch == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
debugCam->sub.demoCtrlMenu++;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
debugCam->sub.demoCtrlMenu = 0;
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) ||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
if (debugCam->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS)) {
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) ||
CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
debugCam->sub.demoCtrlMenu -= 9;
}
block_2:
@@ -2040,8 +2013,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
sp74[i * 2 + 1] = '\0';
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DRIGHT)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
if (sCurFileIdx >= 4) {
sCurFileIdx = 0;
} 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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
if (sCurFileIdx <= 0) {
sCurFileIdx = 4;
} else {
@@ -2103,25 +2074,21 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx - 1) % 4u;
}
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx + 1) % 4u;
}
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_A)) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
debugCam->sub.demoCtrlToggleSwitch = 0;
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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
debugCam->sub.demoCtrlActionIdx = ACTION_E;
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_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
debugCam->sub.demoCtrlActionIdx = ACTION_E;
}
return 2;
@@ -2146,15 +2112,13 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
default: {
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DUP)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx - 1) % 4u;
sCurFileIdx = 0;
}
if (CHECK_BTN_ALL(sPlay->state.input[DEBUG_CAM_CONTROLLER_PORT].press.button, BTN_DDOWN)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
debugCam->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
debugCam->sub.demoCtrlActionIdx = (debugCam->sub.demoCtrlActionIdx + 1) % 4u;
sCurFileIdx = 0;
@@ -2193,8 +2157,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
if (func_800B91B0(cam, debugCam) == 0) {
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
Letterbox_SetSizeTarget(0);
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
}
sp5C = OLib_Vec3fDiffToVecGeo(&debugCam->eye, &debugCam->at);
debugCam->unk_1C =
@@ -2212,8 +2175,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
sDebugCamAnim.unk_0A = 1;
sDebugCamAnim.unk_0C = 0;
D_8016110C = 0;
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
}
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) {
switch (sp74[sCurFileIdx]) {
case '?':
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
sDebugCamCuts[idx1] = sDebugCamCuts[idx2];
sp74[sCurFileIdx] = '?'; // useless
DebugCamera_ResetCut(idx2, false);
break;
case '-':
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
sp64 = sDebugCamCuts[idx2];
if (sLastFileIdx < sCurFileIdx) {
@@ -2259,8 +2219,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
}
break;
default:
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
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 (sp74[sCurFileIdx] == '?') {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
sp74[sCurFileIdx] = DebugCamera_InitCut(idx1, &debugCam->sub);
if (sp74[sCurFileIdx] == '?') {
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 (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
sp74[sCurFileIdx] = '?';
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 (sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-') {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
for (i = 0; i < sDebugCamCuts[idx1].nPoints; 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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
if (sCurFileIdx == 0x1E) {
sCurFileIdx = 0;
} 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)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
}
@@ -2336,8 +2290,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
DebugCamera_PrintAllCuts(cam);
} 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)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
for (i = 0; i < ARRAY_COUNT(sDebugCamCuts) - 1; i++) {
if (sDebugCamCuts[i].nPoints != 0) {
PRINTF("\n@@@ /* CUT [%d]\t*/", i);
@@ -2353,8 +2306,7 @@ s32 DebugCamera_UpdateDemoControl(DebugCam* debugCam, Camera* cam) {
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
Letterbox_SetSizeTarget(32);
D_8016110C = 0;
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
}
DebugCamera_ScreenTextColored(4, 7, DEBUG_CAM_TEXT_WHITE, D_8012CF50[0]);
+4 -8
View File
@@ -2030,8 +2030,7 @@ void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 sp
* Play a sound effect at the player's position
*/
void Player_PlaySfx(Player* player, u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, sfxId);
}
/**
@@ -2641,8 +2640,7 @@ void Actor_Draw(PlayState* play, Actor* actor) {
void Actor_UpdateFlaggedAudio(Actor* actor) {
if (actor->flags & ACTOR_FLAG_SFX_ACTOR_POS_2) {
Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&actor->projectedPos, actor->sfx);
} else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) {
Sfx_PlaySfxCentered(actor->sfx);
} else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) {
@@ -5670,8 +5668,7 @@ void func_80036E50(u16 textId, s16 arg1) {
Flags_SetInfTable(INFTABLE_0C);
return;
case 0x1033:
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CORRECT_CHIME);
Flags_SetEventChkInf(EVENTCHKINF_04);
Flags_SetInfTable(INFTABLE_0E);
return;
@@ -6136,8 +6133,7 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
case TEXT_STATE_CHOICE:
case TEXT_STATE_EVENT:
if (Message_ShouldAdvance(play) && func_80037C94(play, actor, arg2)) {
Audio_PlaySfxGeneral(NA_SE_SY_CANCEL, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CANCEL);
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
ret = true;
}
+16 -32
View File
@@ -1566,11 +1566,9 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
if (flags == ATELEM_SFX_NORMAL && collider->colMaterial != COL_MATERIAL_METAL) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == ATELEM_SFX_NORMAL) { // collider->colMaterial == COL_MATERIAL_METAL
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos);
@@ -1582,20 +1580,16 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
} else if (flags == ATELEM_SFX_HARD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (collider->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == ATELEM_SFX_WOOD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
if (collider->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_REFLECTION_WOOD);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
}
}
}
@@ -1606,17 +1600,13 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
s32 CollisionCheck_SwordHitAudio(Collider* atCol, ColliderElement* acElem) {
if (atCol->actor != NULL && atCol->actor->category == ACTORCAT_PLAYER) {
if (acElem->elemMaterial == ELEM_MATERIAL_UNK0) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
} else if (acElem->elemMaterial == ELEM_MATERIAL_UNK1) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &atCol->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
} else if (acElem->elemMaterial == ELEM_MATERIAL_UNK2) {
Audio_PlaySfxGeneral(NA_SE_NONE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_NONE);
} else if (acElem->elemMaterial == ELEM_MATERIAL_UNK3) {
Audio_PlaySfxGeneral(NA_SE_NONE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_NONE);
}
}
return true;
@@ -1693,8 +1683,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement
} else if (sHitInfo[acCol->colMaterial].effect == HIT_WOOD) {
if (atCol->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_REFLECTION_WOOD);
} else {
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &atCol->actor->projectedPos);
}
@@ -1707,11 +1696,9 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement
} else {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos);
if (acCol->actor == NULL) {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &acCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&acCol->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
}
}
@@ -3525,8 +3512,7 @@ void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3534,8 +3520,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetalSfx(PlayState* play, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(pos, NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@@ -3575,8 +3560,7 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* a
woodInit.lightPoint.z = woodInit.position.z;
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &woodInit);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(actorPos, NA_SE_IT_REFLECTION_WOOD);
}
/**
+3 -6
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_START)) &&
(gSaveContext.fileNum != 0xFEDC) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_PIECE_OF_HEART);
titleDemoSkipped = true;
}
@@ -1472,14 +1471,12 @@ void CutsceneCmd_Transition(PlayState* play, CutsceneContext* csCtx, CsCmdTransi
play->envCtx.screenFillColor[3] = 255.0f * lerp;
if ((lerp == 0.0f) && (gSaveContext.save.entranceIndex == ENTR_CHAMBER_OF_THE_SAGES_0)) {
Audio_PlaySfxGeneral(NA_SE_SY_WHITE_OUT_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WHITE_OUT_S);
} else if ((lerp == 0.0f) &&
((gSaveContext.save.entranceIndex == ENTR_TEMPLE_OF_TIME_0) ||
(gSaveContext.save.entranceIndex == ENTR_HYRULE_CASTLE_0) ||
(gSaveContext.save.entranceIndex == ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_0))) {
Audio_PlaySfxGeneral(NA_SE_EV_WHITE_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_EV_WHITE_OUT);
} else if ((lerp == 0.0f) && (play->sceneId == SCENE_INSIDE_GANONS_CASTLE)) {
Sfx_PlaySfxCentered2(NA_SE_EV_WHITE_OUT);
}
+2 -4
View File
@@ -965,8 +965,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
if ((*params <= ITEM00_RUPEE_RED) || (*params == ITEM00_RUPEE_ORANGE)) {
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_RUPY);
} else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, play)) {
Flags_SetCollectible(play, this->collectibleFlag);
@@ -974,8 +973,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
}
return;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_ITEM);
}
Flags_SetCollectible(play, this->collectibleFlag);
+2 -4
View File
@@ -68,8 +68,7 @@ void TransitionCircle_Start(void* thisx) {
} else {
this->texY = (s32)(125.0f * (1 << 2));
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_OC_SECRET_WARP_OUT);
}
}
@@ -93,8 +92,7 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) {
if (this->direction != TRANS_CIRCLE_DIR_IN) {
if (this->texY == 0) {
if (this->appearanceType == TCA_RIPPLE) {
Audio_PlaySfxGeneral(NA_SE_OC_SECRET_WARP_IN, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_OC_SECRET_WARP_IN);
}
}
this->texY += this->speed * 3 / updateRate;
+3 -6
View File
@@ -608,22 +608,19 @@ void Color_RGBA8_Copy(Color_RGBA8* dst, Color_RGBA8* src) {
* Play a sound effect at the center of the screen.
*/
void Sfx_PlaySfxCentered(u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(sfxId);
}
/**
* Play a sound effect at the center of the screen. Identical to `Sfx_PlaySfxCentered`.
*/
void Sfx_PlaySfxCentered2(u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(sfxId);
}
/**
* Play a sound effect at the requested position.
*/
void Sfx_PlaySfxAtPos(Vec3f* projectedPos, u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(projectedPos, sfxId);
}
+4 -12
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)) {
PRINTF("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (!R_MINIMAP_DISABLED) { SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_UP);
} else {
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_DOWN);
}
// clang-format on
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)) {
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (!R_MINIMAP_DISABLED) { SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_UP);
} else {
Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_DOWN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CAMERA_ZOOM_DOWN);
}
// clang-format on
R_MINIMAP_DISABLED ^= 1;
+44 -94
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) ||
CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_PASS);
}
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);
@@ -373,8 +372,7 @@ void Message_CloseTextbox(PlayState* play) {
msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
}
}
@@ -390,8 +388,7 @@ void Message_HandleChoiceSelection(PlayState* play, char numChoices) {
if (msgCtx->choiceIndex > 128)
msgCtx->choiceIndex = 0;
else
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
// NOLINTEND
} else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) {
sAnalogStickHeld = true;
@@ -400,8 +397,7 @@ void Message_HandleChoiceSelection(PlayState* play, char numChoices) {
if (msgCtx->choiceIndex > numChoices)
msgCtx->choiceIndex = numChoices;
else
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_CURSOR);
// NOLINTEND
} else if (ABS(input->rel.stick_y) < 30) {
sAnalogStickHeld = false;
@@ -1013,8 +1009,7 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
}
// clang-format on
@@ -1155,8 +1150,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE);
} else {
@@ -1173,8 +1167,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE);
}
@@ -1221,8 +1214,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_SFX:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && !sMessageHasSetSfx) {
sMessageHasSetSfx = true;
Audio_PlaySfxGeneral(MSG_BUF_DECODED_WIDE[i + 1], &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(MSG_BUF_DECODED_WIDE[i + 1]);
}
i++;
break;
@@ -1232,8 +1224,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_BACKGROUND:
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
}
// clang-format on
gDPPipeSync(gfx++);
@@ -1316,8 +1307,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == CS_STATE_IDLE) {
Interface_SetDoAction(play, DO_ACTION_RETURN);
@@ -1347,8 +1337,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
return;
case MESSAGE_WIDE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
}
@@ -1359,8 +1348,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxIcon(&play->msgCtx.font, TEXTBOX_ICON_TRIANGLE);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
}
*gfxP = gfx;
return;
@@ -1382,8 +1370,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
}
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
}
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
charTexIdx += FONT_CHAR_TEX_SIZE;
@@ -1481,8 +1468,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BOX_BREAK:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
if (!sTextboxSkipped) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
} else {
@@ -1499,8 +1485,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
}
@@ -1561,8 +1546,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
PRINTF(T("サウンド(SE)\n", "Sound (SE)\n"));
sfxHi = MSG_BUF_DECODED[i + 1];
sfxHi <<= 8;
Audio_PlaySfxGeneral(sfxHi | MSG_BUF_DECODED[i + 2], &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(sfxHi | MSG_BUF_DECODED[i + 2]);
}
i += 2;
break;
@@ -1572,8 +1556,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
case MESSAGE_BACKGROUND:
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { \
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
}
// clang-format on
gDPPipeSync(gfx++);
@@ -1656,8 +1639,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == 0) {
Interface_SetDoAction(play, DO_ACTION_RETURN);
@@ -1687,8 +1669,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
return;
case MESSAGE_PERSISTENT:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
}
@@ -1699,16 +1680,14 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_END);
}
*gfxP = gfx;
return;
default:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_NONE);
}
#if PLATFORM_IQUE
@@ -2861,8 +2840,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
PRINTF("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
msgCtx->ocarinaAction = ocarinaActionId;
if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
}
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK) {
Message_OpenText(play, 0x86F); // Ocarina
@@ -3207,9 +3185,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW_SPAWN) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
} else {
PRINTF(T("Ocarina_Flog 正解模範演奏=%x\n",
@@ -3219,17 +3195,13 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
}
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW_SPAWN) {
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW_SPAWN) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} else {
@@ -3240,9 +3212,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
}
} 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->textBoxType = TEXTBOX_TYPE_OCARINA;
msgCtx->stateTimer = 10;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
} else {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
}
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
} else {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
}
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
} 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);
PRINTF_RST();
msgCtx->stateTimer = 20;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL;
}
@@ -3705,8 +3667,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->ocarinaStaff->state);
gSaveContext.save.info.scarecrowLongSongSet = true;
}
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
PRINTF("aaaaaaaaaaaaaa\n");
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
msgCtx->stateTimer = 10;
@@ -3777,8 +3738,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer = 20;
gSaveContext.save.info.scarecrowSpawnSongSet = true;
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_TRE_BOX_APPEAR);
PRINTF_COLOR_YELLOW();
PRINTF("\n====================================================================\n");
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)) {
PRINTF(T("すでに存在する曲吹いた!!! \n", "Played an existing song!!! \n"));
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
Message_CloseTextbox(play);
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_FAILED;
}
@@ -3818,8 +3777,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING:
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING:
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_METRONOME_LV - SFX_FLAG);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
@@ -3830,11 +3788,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->stateTimer == 0) {
if (msgCtx->ocarinaStaff->state == 0) {
if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_METRONOME);
} else {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_METRONOME_2);
}
msgCtx->msgMode++;
}
@@ -3853,8 +3809,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
}
break;
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_METRONOME_LV - SFX_FLAG);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
@@ -3865,14 +3820,12 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->ocarinaStaff->state == 0xFF) {
PRINTF(T("輪唱失敗!!!!!!!!!\n", "Musical round failed!!!!!!!!!\n"));
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_OCARINA_ERROR);
msgCtx->stateTimer = 10;
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
} else if (msgCtx->ocarinaStaff->state == OCARINA_SONG_MEMORY_GAME) {
PRINTF(T("輪唱成功!!!!!!!!!\n", "Musical round succeeded!!!!!!!!!\n"));
Audio_PlaySfxGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GET_ITEM);
msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS;
msgCtx->stateTimer = 30;
}
@@ -3889,8 +3842,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
if (AudioOcarina_MemoryGameNextNote() != 1) {
Audio_PlaySfxGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_METRONOME);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
Message_ResetOcarinaNoteState();
@@ -4390,8 +4342,7 @@ void Message_Update(PlayState* play) {
} else if (Message_ShouldAdvanceSilent(play)) {
PRINTF("select=%d\n", msgCtx->textboxEndType);
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_PASS);
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) {
Message_ContinueTextbox(play, MSG_BUF_DECODED_WIDE[msgCtx->textDrawPos]);
@@ -4402,8 +4353,7 @@ void Message_Update(PlayState* play) {
Message_ContinueTextbox(play, sNextTextId);
#endif
} else {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_DECIDE);
Message_CloseTextbox(play);
}
}
+21 -51
View File
@@ -2191,9 +2191,7 @@ void Interface_SetNaviCall(PlayState* play, u16 naviCallState) {
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
(play->csCtx.state == CS_STATE_IDLE)) {
// clang-format off
if (naviCallState == 0x1E) { Audio_PlaySfxGeneral(NA_SE_VO_NAVY_CALL, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
if (naviCallState == 0x1E) { SFX_PLAY_CENTERED(NA_SE_VO_NAVY_CALL);
}
// clang-format on
@@ -2244,8 +2242,7 @@ s32 Health_ChangeBy(PlayState* play, s16 amount) {
gSaveContext.save.info.playerData.health, gSaveContext.save.info.playerData.healthCapacity);
// clang-format off
if (amount > 0) { Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (amount > 0) { SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
} else if (gSaveContext.save.info.playerData.isDoubleDefenseAcquired && (amount < 0)) {
amount >>= 1;
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 (gSaveContext.magicCapacity != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
}
return false;
}
@@ -2401,8 +2397,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
return true;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
return false;
}
@@ -2419,8 +2414,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_3;
return true;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
return false;
}
@@ -2451,8 +2445,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
gSaveContext.magicState = MAGIC_STATE_METER_FLASH_2;
return true;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
return false;
}
@@ -2520,8 +2513,7 @@ void Magic_Update(PlayState* play) {
gSaveContext.save.info.playerData.magic += 4;
if (gSaveContext.gameMode == GAMEMODE_NORMAL && !IS_CUTSCENE_LAYER) {
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GAUGE_UP - SFX_FLAG);
}
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) {
// Force lens off and set magic meter state to idle
play->actorCtx.lensActive = false;
Audio_PlaySfxGeneral(NA_SE_SY_GLASSMODE_OFF, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GLASSMODE_OFF);
gSaveContext.magicState = MAGIC_STATE_IDLE;
sMagicBorderR = sMagicBorderG = sMagicBorderB = 255;
break;
@@ -2664,8 +2655,7 @@ void Magic_Update(PlayState* play) {
case MAGIC_STATE_ADD:
// Add magic until target is reached
gSaveContext.save.info.playerData.magic += 4;
Audio_PlaySfxGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_GAUGE_UP - SFX_FLAG);
if (gSaveContext.save.info.playerData.magic >= gSaveContext.magicTarget) {
gSaveContext.save.info.playerData.magic = gSaveContext.magicTarget;
gSaveContext.magicState = gSaveContext.prevMagicState;
@@ -3711,22 +3701,16 @@ void Interface_Draw(PlayState* play) {
} else if (gSaveContext.timerSeconds > 60) {
// Beep at "xx:x1" (every 10 seconds)
if (sTimerDigits[4] == 1) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_WOMAN);
}
} else if (gSaveContext.timerSeconds > 10) {
// Beep on alternating seconds
if ((sTimerDigits[4] % 2) != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
}
} else {
// Beep every second
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_E);
}
}
}
@@ -3775,9 +3759,7 @@ void Interface_Draw(PlayState* play) {
sTimerStateTimer = 40;
gSaveContext.timerState = TIMER_STATE_UP_FREEZE;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
}
}
}
@@ -3912,22 +3894,16 @@ void Interface_Draw(PlayState* play) {
} else if (gSaveContext.subTimerSeconds > 60) {
// Beep at "xx:x1" (every 10 seconds)
if (sTimerDigits[4] == 1) {
Audio_PlaySfxGeneral(NA_SE_SY_MESSAGE_WOMAN, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_MESSAGE_WOMAN);
}
} else if (gSaveContext.subTimerSeconds > 10) {
// Beep on alternating seconds
if ((sTimerDigits[4] % 2) != 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
}
} else {
// Beep every second
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_E, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_E);
}
} else { // SUBTIMER_STATE_UP_TICK
gSaveContext.subTimerSeconds++;
@@ -3944,9 +3920,7 @@ void Interface_Draw(PlayState* play) {
// Beep at the minute mark
if ((gSaveContext.subTimerSeconds % 60) == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_WARNING_COUNT_N, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_WARNING_COUNT_N);
}
}
}
@@ -4192,8 +4166,7 @@ void Interface_Update(PlayState* play) {
gSaveContext.save.info.playerData.health += 4;
if ((gSaveContext.save.info.playerData.health & 0xF) < 4) {
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_HP_RECOVER);
}
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)) {
gSaveContext.rupeeAccumulator--;
gSaveContext.save.info.playerData.rupees++;
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_RUPY_COUNT);
} else {
PRINTF(T("ルピー数MAX = %d\n", "Rupee Amount MAX = %d\n"), 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;
}
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_RUPY_COUNT);
} else {
gSaveContext.rupeeAccumulator++;
gSaveContext.save.info.playerData.rupees--;
Audio_PlaySfxGeneral(NA_SE_SY_RUPY_COUNT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_RUPY_COUNT);
}
} else {
gSaveContext.rupeeAccumulator = 0;
+4 -9
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)) {
// 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,
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_CENTERED((viewpoint == VIEWPOINT_LOCKED) ? NA_SE_SY_CAMERA_ZOOM_DOWN : NA_SE_SY_CAMERA_ZOOM_UP);
}
Play_RequestViewpointBgCam(this);
@@ -873,8 +871,7 @@ void Play_Update(PlayState* this) {
break;
case TRANS_MODE_SANDSTORM:
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_EV_SAND_STORM - SFX_FLAG);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA < 110) {
@@ -908,8 +905,7 @@ void Play_Update(PlayState* this) {
break;
case TRANS_MODE_SANDSTORM_END:
Audio_PlaySfxGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_EV_SAND_STORM - SFX_FLAG);
if (this->transitionTrigger == TRANS_TRIGGER_END) {
if (this->envCtx.sandstormPrimA <= 0) {
@@ -1043,8 +1039,7 @@ void Play_Update(PlayState* this) {
PRINTF(VT_FGCOL(CYAN) T("デモ中につき視点変更を禁止しております\n",
"Changing viewpoint is prohibited during the cutscene\n") VT_RST);
} else if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_CENTERED(NA_SE_SY_ERROR);
} else {
// C-Up toggle for houses, move between pivot camera and fixed camera
// Toggle viewpoint between VIEWPOINT_LOCKED and VIEWPOINT_PIVOT
+1 -2
View File
@@ -63,6 +63,5 @@ void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 dura
source->countdown = duration;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
Audio_PlaySfxGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&source->projectedPos, sfxId);
}