mirror of
https://github.com/zeldaret/oot
synced 2026-06-13 14:06:45 -04:00
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:
+48
-96
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user