mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-05 07:24:34 +00:00
Name variables for Audio_PlaySoundGeneral (#1198)
* Rename variables and function * Improve comment * PR Suggestion * PR Suggestions * Revert back to `Audio_PlaySoundGeneral`, make a separate PR `Sound` -> `Sfx` * Oops, fixed that
This commit is contained in:
parent
1e03b662f2
commit
ef870bdd11
98 changed files with 1026 additions and 721 deletions
|
@ -158,7 +158,8 @@ u8 Message_ShouldAdvance(GlobalContext* globalCtx) {
|
|||
|
||||
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_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
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);
|
||||
|
@ -182,7 +183,8 @@ void Message_CloseTextbox(GlobalContext* globalCtx) {
|
|||
msgCtx->stateTimer = 2;
|
||||
msgCtx->msgMode = MSGMODE_TEXT_CLOSING;
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_DEFAULT;
|
||||
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +199,8 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) {
|
|||
if (msgCtx->choiceIndex > 128) {
|
||||
msgCtx->choiceIndex = 0;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) {
|
||||
sAnalogStickHeld = true;
|
||||
|
@ -205,7 +208,8 @@ void Message_HandleChoiceSelection(GlobalContext* globalCtx, u8 numChoices) {
|
|||
if (msgCtx->choiceIndex > numChoices) {
|
||||
msgCtx->choiceIndex = numChoices;
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else if (ABS(input->rel.stick_y) < 30) {
|
||||
sAnalogStickHeld = false;
|
||||
|
@ -739,7 +743,7 @@ u16 Message_DrawItemIcon(GlobalContext* globalCtx, u16 itemId, Gfx** p, u16 i) {
|
|||
MessageContext* msgCtx = &globalCtx->msgCtx;
|
||||
|
||||
// clang-format off
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); }
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
|
||||
// clang-format on
|
||||
|
||||
gDPPipeSync(gfx++);
|
||||
|
@ -890,7 +894,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
case MESSAGE_BOX_BREAK:
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
if (!sTextboxSkipped) {
|
||||
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_AWAIT_NEXT;
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
|
||||
} else {
|
||||
|
@ -907,7 +912,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
case MESSAGE_TEXTID:
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
|
||||
}
|
||||
|
@ -976,8 +982,9 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
// "Sound (SE)"
|
||||
osSyncPrintf("サウンド(SE)\n");
|
||||
sfxHi = msgCtx->msgBufDecoded[i + 1] << 8;
|
||||
Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &D_801333D4, 4, &D_801333E0,
|
||||
&D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
i += 2;
|
||||
break;
|
||||
|
@ -986,7 +993,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
break;
|
||||
case MESSAGE_BACKGROUND:
|
||||
// clang-format off
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); }
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); }
|
||||
// clang-format on
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
@ -1068,8 +1075,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_DEFAULT) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
|
||||
if (globalCtx->csCtx.state == 0) {
|
||||
Interface_SetDoAction(globalCtx, DO_ACTION_RETURN);
|
||||
|
@ -1099,7 +1106,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
return;
|
||||
case MESSAGE_PERSISTENT:
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
|
||||
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_PERSISTENT;
|
||||
}
|
||||
|
@ -1110,14 +1118,16 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
|||
msgCtx->msgMode = MSGMODE_TEXT_DONE;
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_EVENT;
|
||||
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_TRIANGLE);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_END, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
*gfxP = gfx;
|
||||
return;
|
||||
default:
|
||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
|
||||
msgCtx->textDelayTimer == msgCtx->textDelay) {
|
||||
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(0, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
Message_DrawTextChar(globalCtx, &font->charTexBuf[charTexIdx], &gfx);
|
||||
charTexIdx += FONT_CHAR_TEX_SIZE;
|
||||
|
@ -1769,7 +1779,8 @@ void Message_StartOcarina(GlobalContext* globalCtx, u16 ocarinaActionId) {
|
|||
osSyncPrintf("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
|
||||
msgCtx->ocarinaAction = ocarinaActionId;
|
||||
if (ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA && ocarinaActionId <= OCARINA_ACTION_CHECK_STORMS) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_PLAYBACK) {
|
||||
Message_OpenText(globalCtx, 0x86F); // Ocarina
|
||||
|
@ -2097,8 +2108,9 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
|
||||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
|
||||
} else {
|
||||
// "Ocarina_Flog Correct Example Performance"
|
||||
|
@ -2107,15 +2119,17 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
|
||||
msgCtx->stateTimer = 10;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0,
|
||||
&D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
|
||||
} else {
|
||||
|
@ -2125,8 +2139,9 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
|
||||
msgCtx->stateTimer = 10;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0,
|
||||
&D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
|
||||
|
@ -2136,23 +2151,25 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
msgCtx->msgMode = MSGMODE_SONG_PLAYED;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_OCARINA;
|
||||
msgCtx->stateTimer = 10;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
Interface_ChangeAlpha(1);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
|
||||
}
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
|
||||
} else if (CHECK_BTN_ALL(globalCtx->state.input[0].press.button, BTN_B)) {
|
||||
|
@ -2526,11 +2543,11 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
osSyncPrintf("z_message.c 取得メロディ=%d\n", ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state);
|
||||
osSyncPrintf(VT_RST);
|
||||
msgCtx->stateTimer = 20;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_FAIL;
|
||||
}
|
||||
|
@ -2581,8 +2598,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
msgCtx->ocarinaStaff->state);
|
||||
gSaveContext.scarecrowCustomSongSet = true;
|
||||
}
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf("aaaaaaaaaaaaaa\n");
|
||||
Audio_OcaSetRecordingState(0);
|
||||
msgCtx->stateTimer = 10;
|
||||
|
@ -2651,8 +2668,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
msgCtx->stateTimer = 20;
|
||||
gSaveContext.scarecrowSpawnSongSet = true;
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_DONE;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("\n====================================================================\n");
|
||||
MemCopy(gSaveContext.scarecrowSpawnSong, gScarecrowSpawnSongPtr,
|
||||
|
@ -2667,8 +2684,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
// "Played an existing song!!!"
|
||||
osSyncPrintf("すでに存在する曲吹いた!!! \n");
|
||||
Audio_OcaSetRecordingState(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_FAILED;
|
||||
}
|
||||
|
@ -2693,8 +2710,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
break;
|
||||
case MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING:
|
||||
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
if (msgCtx->ocarinaStaff->pos && sOcarinaNoteBufPos == msgCtx->ocarinaStaff->pos - 1) {
|
||||
sOcarinaNoteBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->noteIdx;
|
||||
|
@ -2704,11 +2721,12 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
if (msgCtx->stateTimer == 0) {
|
||||
if (msgCtx->ocarinaStaff->state == 0) {
|
||||
if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_2, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
msgCtx->msgMode++;
|
||||
}
|
||||
|
@ -2726,8 +2744,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
}
|
||||
break;
|
||||
case MSGMODE_MEMORY_GAME_PLAYER_PLAYING:
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME_LV - SFX_FLAG, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
if (msgCtx->ocarinaStaff->pos && sOcarinaNoteBufPos == msgCtx->ocarinaStaff->pos - 1) {
|
||||
sOcarinaNoteBuf[msgCtx->ocarinaStaff->pos - 1] = msgCtx->ocarinaStaff->noteIdx;
|
||||
|
@ -2738,14 +2756,15 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
// "Musical round failed!!!!!!!!!"
|
||||
osSyncPrintf("輪唱失敗!!!!!!!!!\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_03;
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xD) {
|
||||
// "Musical round succeeded!!!!!!!!!"
|
||||
osSyncPrintf("輪唱成功!!!!!!!!!\n");
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_ITEM, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_MEMORY_GAME_ROUND_SUCCESS;
|
||||
msgCtx->stateTimer = 30;
|
||||
}
|
||||
|
@ -2761,8 +2780,8 @@ void Message_DrawMain(GlobalContext* globalCtx, Gfx** p) {
|
|||
msgCtx->stateTimer--;
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
if (Audio_OcaMemoryGameGenNote() != 1) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
Message_ResetOcarinaNoteState();
|
||||
|
@ -3206,11 +3225,12 @@ void Message_Update(GlobalContext* globalCtx) {
|
|||
} else if (Message_ShouldAdvanceSilent(globalCtx)) {
|
||||
osSyncPrintf("select=%d\n", msgCtx->textboxEndType);
|
||||
if (msgCtx->textboxEndType == TEXTBOX_ENDTYPE_HAS_NEXT) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_PASS, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Message_ContinueTextbox(globalCtx, sNextTextId);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
Message_CloseTextbox(globalCtx);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue