1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-02 22:14:33 +00:00

Audio Ocarina Documentation (#1026)

* Begin ocarina documentation

* Many ocarina-related docs

* More ocarina docs

* Introduce Ocarina Fonts Enum

* Fix ocarina font enum

* Fix incorrect documentation, more documentation

* Ocarina recording documentation

* cleanup

* Small touch-ups

* Fix font -> instrument

* format

* Better docs on playback, memory game

* more cleanup

* Add z64ocarina.h

* Clean up names

* final cleanup

* typo

* Fix description

* better docs

* Fix channel -> channelIdx

* Fix old "font" name to correct "instrument" name, add io port docs

* Add comments to clarify certain lines/functions

* format

* Rename noteIdx to pitch

* Missed a name

* Add comment on pitch

* `reset` -> `SetInstrument` and `displayed` -> `playback`

* Clarify audio_update and windmill comment

* Minor PR fixes

* Revert Audio_Update because there are 2 different Audio_Update functions

* PR Feedback

* Ocarina Idx -> Index

* Introduce OCARINA_BTN_C_RIGHT_OR_C_LEFT

* PR Suggestions

* Next PR Suggestions

* Next PR Feedback

* consistency

* Better docs (PR)

* Better comment
This commit is contained in:
engineer124 2022-05-10 02:59:23 +10:00 committed by GitHub
parent 6cd8029cd5
commit 95b4317931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1872 additions and 1593 deletions

View file

@ -208,7 +208,7 @@ static u8 sJumpOrder[] = {
};
static u8 sOcarinaNotes[] = {
OCARINA_NOTE_A, OCARINA_NOTE_C_DOWN, OCARINA_NOTE_C_RIGHT, OCARINA_NOTE_C_LEFT, OCARINA_NOTE_C_UP,
OCARINA_BTN_A, OCARINA_BTN_C_DOWN, OCARINA_BTN_C_RIGHT, OCARINA_BTN_C_LEFT, OCARINA_BTN_C_UP,
};
void EnFr_OrientUnderwater(EnFr* this) {
@ -696,21 +696,22 @@ void EnFr_ListeningToOcarinaNotes(EnFr* this, GlobalContext* globalCtx) {
case OCARINA_MODE_04:
EnFr_OcarinaMistake(this, globalCtx);
break;
case OCARINA_MODE_01: // Ocarina note played, but no song played
switch (globalCtx->msgCtx.lastOcaNoteIdx) { // Jumping frogs in open ocarina based on ocarina note played
case OCARINA_NOTE_A:
case OCARINA_MODE_01: // Ocarina note played, but no song played
switch (globalCtx->msgCtx.lastOcarinaButtonIndex) {
// Jumping frogs in open ocarina based on ocarina note played
case OCARINA_BTN_A:
EnFr_SetupJumpingUp(this, FROG_BLUE);
break;
case OCARINA_NOTE_C_DOWN:
case OCARINA_BTN_C_DOWN:
EnFr_SetupJumpingUp(this, FROG_YELLOW);
break;
case OCARINA_NOTE_C_RIGHT:
case OCARINA_BTN_C_RIGHT:
EnFr_SetupJumpingUp(this, FROG_RED);
break;
case OCARINA_NOTE_C_LEFT:
case OCARINA_BTN_C_LEFT:
EnFr_SetupJumpingUp(this, FROG_PURPLE);
break;
case OCARINA_NOTE_C_UP:
case OCARINA_BTN_C_UP:
EnFr_SetupJumpingUp(this, FROG_WHITE);
break;
}
@ -834,7 +835,7 @@ s32 EnFr_IsFrogSongComplete(EnFr* this, GlobalContext* globalCtx) {
MessageContext* msgCtx = &globalCtx->msgCtx;
u8 ocarinaNoteIndex;
if (this->ocarinaNote == (*msgCtx).lastOcaNoteIdx) { // required to match, possibly an array?
if (this->ocarinaNote == (*msgCtx).lastOcarinaButtonIndex) { // required to match, possibly an array?
this->ocarinaNoteIndex++;
ocarinaNoteIndex = this->ocarinaNoteIndex;
if (1) {}
@ -856,7 +857,7 @@ void EnFr_OcarinaMistake(EnFr* this, GlobalContext* globalCtx) {
Message_CloseTextbox(globalCtx);
this->reward = GI_NONE;
func_80078884(NA_SE_SY_OCARINA_ERROR);
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
sEnFrPointers.flags = 12;
EnFr_DeactivateButterfly();
this->actionFunc = EnFr_Deactivate;
@ -889,20 +890,20 @@ void EnFr_ContinueFrogSong(EnFr* this, GlobalContext* globalCtx) {
if (globalCtx->msgCtx.msgMode == MSGMODE_FROGS_WAITING) {
globalCtx->msgCtx.msgMode = MSGMODE_FROGS_START;
switch (globalCtx->msgCtx.lastOcaNoteIdx) {
case OCARINA_NOTE_A:
switch (globalCtx->msgCtx.lastOcarinaButtonIndex) {
case OCARINA_BTN_A:
EnFr_SetupJumpingUp(this, FROG_BLUE);
break;
case OCARINA_NOTE_C_DOWN:
case OCARINA_BTN_C_DOWN:
EnFr_SetupJumpingUp(this, FROG_YELLOW);
break;
case OCARINA_NOTE_C_RIGHT:
case OCARINA_BTN_C_RIGHT:
EnFr_SetupJumpingUp(this, FROG_RED);
break;
case OCARINA_NOTE_C_LEFT:
case OCARINA_BTN_C_LEFT:
EnFr_SetupJumpingUp(this, FROG_PURPLE);
break;
case OCARINA_NOTE_C_UP:
case OCARINA_BTN_C_UP:
EnFr_SetupJumpingUp(this, FROG_WHITE);
}
if (EnFr_IsFrogSongComplete(this, globalCtx)) {
@ -921,7 +922,7 @@ void EnFr_SetupReward(EnFr* this, GlobalContext* globalCtx, u8 unkCondition) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
}
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
this->actionFunc = EnFr_PrintTextBox;
}

View file

@ -203,7 +203,8 @@ void EnFu_TeachSong(EnFu* this, GlobalContext* globalCtx) {
// if dialog state is 2, start song demonstration
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) {
this->behaviorFlags &= ~FU_WAIT;
Audio_OcaSetInstrument(4); // seems to be related to setting instrument type
// Ocarina is set to harp here but is immediately overwritten to the grind organ in the message system
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_HARP);
func_8010BD58(globalCtx, OCARINA_ACTION_TEACH_STORMS);
this->actionFunc = EnFu_WaitForPlayback;
}

View file

@ -92,7 +92,7 @@ void func_80A8F28C(EnKakasi* this) {
}
void func_80A8F320(EnKakasi* this, GlobalContext* globalCtx, s16 arg) {
s16 ocarinaNote = globalCtx->msgCtx.lastOcaNoteIdx;
s16 ocarinaNote = globalCtx->msgCtx.lastOcarinaButtonIndex;
s16 currentFrame;
if (arg != 0) {
@ -105,30 +105,30 @@ void func_80A8F320(EnKakasi* this, GlobalContext* globalCtx, s16 arg) {
ocarinaNote = this->unk_1A6;
}
switch (ocarinaNote) {
case OCARINA_NOTE_A:
case OCARINA_BTN_A:
this->unk_19A++;
if (this->unk_1A4 == 0) {
this->unk_1A4 = 1;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_KAKASHI_ROLL);
}
break;
case OCARINA_NOTE_C_DOWN:
case OCARINA_BTN_C_DOWN:
this->unk_19A++;
this->unk_1B8 = 1.0f;
break;
case OCARINA_NOTE_C_RIGHT:
case OCARINA_BTN_C_RIGHT:
this->unk_19A++;
if (this->unk_1AC == 0) {
this->unk_1AC = 0x1388;
}
break;
case OCARINA_NOTE_C_LEFT:
case OCARINA_BTN_C_LEFT:
this->unk_19A++;
if (this->unk_1A8 == 0) {
this->unk_1A8 = 0x1388;
}
break;
case OCARINA_NOTE_C_UP:
case OCARINA_BTN_C_UP:
this->unk_19A++;
this->unk_1B8 = 2.0f;
break;
@ -178,13 +178,13 @@ void func_80A8F660(EnKakasi* this, GlobalContext* globalCtx) {
this->unk_196 = TEXT_STATE_DONE;
if (!LINK_IS_ADULT) {
this->unk_194 = false;
if (gSaveContext.scarecrowCustomSongSet) {
if (gSaveContext.scarecrowLongSongSet) {
this->actor.textId = 0x407A;
this->unk_196 = TEXT_STATE_EVENT;
}
} else {
this->unk_194 = true;
if (gSaveContext.scarecrowCustomSongSet) {
if (gSaveContext.scarecrowLongSongSet) {
this->actor.textId = 0x4079;
this->unk_196 = TEXT_STATE_EVENT;
}
@ -341,7 +341,7 @@ void EnKakasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (BREG(3) != 0) {
osSyncPrintf("\n\n");
// "flag!"
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ フラグ! ☆☆☆☆☆ %d\n" VT_RST, gSaveContext.scarecrowCustomSongSet);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ フラグ! ☆☆☆☆☆ %d\n" VT_RST, gSaveContext.scarecrowLongSongSet);
}
func_80093D18(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,

View file

@ -96,7 +96,7 @@ void func_80A90E28(EnKakasi3* this) {
void func_80A90EBC(EnKakasi3* this, GlobalContext* globalCtx, s32 arg) {
s16 currentFrame;
s16 ocarinaNote = globalCtx->msgCtx.lastOcaNoteIdx;
s16 ocarinaNote = globalCtx->msgCtx.lastOcarinaButtonIndex;
if (arg != 0) {
if (this->unk_19C[3] == 0) {
@ -108,30 +108,30 @@ void func_80A90EBC(EnKakasi3* this, GlobalContext* globalCtx, s32 arg) {
ocarinaNote = this->unk_1A6;
}
switch (ocarinaNote) {
case OCARINA_NOTE_A:
case OCARINA_BTN_A:
this->unk_19A++;
if (this->unk_1A4 == 0) {
this->unk_1A4 = 1;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_KAKASHI_ROLL);
}
break;
case OCARINA_NOTE_C_DOWN:
case OCARINA_BTN_C_DOWN:
this->unk_19A++;
this->unk_1B8 = 1.0f;
break;
case OCARINA_NOTE_C_RIGHT:
case OCARINA_BTN_C_RIGHT:
this->unk_19A++;
if (this->unk_1AE == 0x0) {
this->unk_1AE = 0x1388;
}
break;
case OCARINA_NOTE_C_LEFT:
case OCARINA_BTN_C_LEFT:
this->unk_19A++;
if (this->unk_1AA == 0x0) {
this->unk_1AA = 0x1388;
}
break;
case OCARINA_NOTE_C_UP:
case OCARINA_BTN_C_UP:
this->unk_19A++;
this->unk_1B8 = 2.0f;
break;
@ -269,7 +269,7 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
void func_80A915B8(EnKakasi3* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
Message_CloseTextbox(globalCtx);
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_RECORDING);
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_SPAWN_RECORDING);
this->actionFunc = func_80A91620;
}
}
@ -312,7 +312,7 @@ void func_80A91760(EnKakasi3* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if (this->dialogState == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) {
globalCtx->msgCtx.msgMode = MSGMODE_PAUSED;
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_PLAYBACK);
func_8010BD58(globalCtx, OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK);
this->actionFunc = func_80A917FC;
this->camId = OnePointCutscene_Init(globalCtx, 2280, -99, &this->actor, MAIN_CAM);
}
@ -333,7 +333,7 @@ void func_80A917FC(EnKakasi3* this, GlobalContext* globalCtx) {
void func_80A9187C(EnKakasi3* this, GlobalContext* globalCtx) {
if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT && Message_ShouldAdvance(globalCtx)) {
Message_CloseTextbox(globalCtx);
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_SCARECROW);
func_8010BD58(globalCtx, OCARINA_ACTION_CHECK_SCARECROW_SPAWN);
this->actionFunc = func_80A918E4;
}
}

View file

@ -367,7 +367,7 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) {
void func_80AA106C(EnMa1* this, GlobalContext* globalCtx) {
GET_PLAYER(globalCtx)->stateFlags2 |= PLAYER_STATE2_23;
if (this->unk_1E8.unk_00 == 2) {
Audio_OcaSetInstrument(2);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_MALON);
func_8010BD58(globalCtx, OCARINA_ACTION_TEACH_EPONA);
this->actor.flags &= ~ACTOR_FLAG_16;
this->actionFunc = func_80AA10EC;

View file

@ -1440,7 +1440,7 @@ void EnSkj_WaitForPlayback(EnSkj* this, GlobalContext* globalCtx) {
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid->minigameState =
SKULL_KID_OCARINA_PLAY_NOTES;
}
Message_UpdateOcarinaGame(globalCtx);
Message_UpdateOcarinaMemoryGame(globalCtx);
}
break;
case MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_WAIT:
@ -1448,7 +1448,7 @@ void EnSkj_WaitForPlayback(EnSkj* this, GlobalContext* globalCtx) {
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid->minigameState = SKULL_KID_OCARINA_WAIT;
}
if (!Audio_IsSfxPlaying(NA_SE_SY_METRONOME)) {
Message_UpdateOcarinaGame(globalCtx);
Message_UpdateOcarinaMemoryGame(globalCtx);
this->songFailTimer = 160;
}
break;
@ -1472,8 +1472,8 @@ void EnSkj_WaitForPlayback(EnSkj* this, GlobalContext* globalCtx) {
SKULL_KID_OCARINA_PLAY_NOTES;
}
this->songFailTimer = 160;
Audio_OcaSetInstrument(6); // related instrument sound (flute?)
Audio_OcaSetSongPlayback(OCARINA_SONG_MEMORY_GAME + 1, 1);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_FLUTE);
AudioOcarina_SetPlaybackSong(OCARINA_SONG_MEMORY_GAME + 1, 1);
globalCtx->msgCtx.msgMode = MSGMODE_MEMORY_GAME_LEFT_SKULLKID_PLAYING;
globalCtx->msgCtx.stateTimer = 2;
}

View file

@ -2779,7 +2779,7 @@ s32 func_80835C58(GlobalContext* globalCtx, Player* this, PlayerFunc674 func, s3
}
if (func_8084E3C4 == this->func_674) {
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
this->stateFlags2 &= ~(PLAYER_STATE2_24 | PLAYER_STATE2_25);
} else if (func_808507F4 == this->func_674) {
func_80832340(globalCtx, this);

View file

@ -187,9 +187,9 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
}
D_8082A11C = 0;
Audio_OcaSetInstrument(1);
func_800ECC04((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_Start((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
pauseCtx->ocarinaStaff->pos = 0;
pauseCtx->ocarinaStaff->state = 0xFF;
VREG(21) = -62;
@ -198,13 +198,13 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
VREG(24) = -46;
VREG(25) = -41;
pauseCtx->unk_1E4 = 8;
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
}
} else if (pauseCtx->unk_1E4 == 5) {
if ((pauseCtx->stickRelX != 0) || (pauseCtx->stickRelY != 0)) {
pauseCtx->unk_1E4 = 0;
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
} else if (pauseCtx->unk_1E4 == 8) {
if (CHECK_BTN_ALL(input->press.button, BTN_A) && (sp216 >= QUEST_SONG_MINUET) &&
@ -274,12 +274,12 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
VREG(24) = -46;
VREG(25) = -41;
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
Audio_OcaSetInstrument(1);
Audio_OcaSetInstrument(1);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[sp216 - QUEST_SONG_MINUET];
Audio_OcaSetSongPlayback(pauseCtx->ocarinaSongIdx + 1, 1);
AudioOcarina_SetPlaybackSong(pauseCtx->ocarinaSongIdx + 1, 1);
pauseCtx->unk_1E4 = 2;
pauseCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
pauseCtx->ocarinaStaff->pos = 0;
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
@ -471,12 +471,12 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
}
if (pauseCtx->unk_1E4 == 2) {
pauseCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (pauseCtx->ocarinaStaff->pos != 0) {
if (D_8082A11C + 1 == pauseCtx->ocarinaStaff->pos) {
D_8082A11C++;
D_8082A124[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->noteIdx;
D_8082A124[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
}
for (sp218 = 0, phi_s3 = 0; sp218 < 8; sp218++, phi_s3 += 4, sp21A += 4) {
@ -517,11 +517,11 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
}
} else if (((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 6)) || (pauseCtx->unk_1E4 == 8)) {
sp224 = pauseCtx->ocarinaSongIdx;
sp226 = gOcarinaSongNotes[sp224].len;
sp226 = gOcarinaSongButtons[sp224].numButtons;
for (sp218 = sp21A, phi_s3 = 0; phi_s3 < sp226; phi_s3++, sp21A += 4) {
pauseCtx->questVtx[sp21A + 0].v.ob[1] = pauseCtx->questVtx[sp21A + 1].v.ob[1] =
VREG(21 + gOcarinaSongNotes[sp224].notesIdx[phi_s3]);
VREG(21 + gOcarinaSongButtons[sp224].buttonsIndex[phi_s3]);
pauseCtx->questVtx[sp21A + 2].v.ob[1] = pauseCtx->questVtx[sp21A + 3].v.ob[1] =
pauseCtx->questVtx[sp21A + 0].v.ob[1] - 12;
@ -529,7 +529,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
gDPPipeSync(POLY_OPA_DISP++);
if (pauseCtx->unk_1E4 == 8) {
if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == 0) {
if (gOcarinaSongButtons[sp224].buttonsIndex[phi_s3] == OCARINA_BTN_A) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 255, 150, 200);
} else {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, 200);
@ -542,21 +542,21 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
gDPLoadTextureBlock(POLY_OPA_DISP++, D_8082A130[gOcarinaSongNotes[sp224].notesIdx[phi_s3]], G_IM_FMT_IA,
G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gDPLoadTextureBlock(POLY_OPA_DISP++, D_8082A130[gOcarinaSongButtons[sp224].buttonsIndex[phi_s3]],
G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
if (pauseCtx->unk_1E4 != 8) {
pauseCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
pauseCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (pauseCtx->ocarinaStaff->pos != 0) {
if (D_8082A11C == (pauseCtx->ocarinaStaff->pos - 1)) {
if ((pauseCtx->ocarinaStaff->noteIdx >= OCARINA_NOTE_A) &&
(pauseCtx->ocarinaStaff->noteIdx <= OCARINA_NOTE_C_UP)) {
D_8082A124[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->noteIdx;
if ((pauseCtx->ocarinaStaff->buttonIndex >= OCARINA_BTN_A) &&
(pauseCtx->ocarinaStaff->buttonIndex <= OCARINA_BTN_C_UP)) {
D_8082A124[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
D_8082A124[pauseCtx->ocarinaStaff->pos] = 0xFF;
D_8082A11C++;
}
@ -608,9 +608,9 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
}
D_8082A11C = 0;
Audio_OcaSetInstrument(1);
func_800ECC04((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_Start((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
pauseCtx->ocarinaStaff->pos = 0;
pauseCtx->ocarinaStaff->state = 0xFE;
pauseCtx->unk_1E4 = 5;

View file

@ -2927,10 +2927,10 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
break;
case 2:
pauseCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (pauseCtx->ocarinaStaff->state == 0) {
pauseCtx->unk_1E4 = 4;
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
break;
@ -2942,10 +2942,10 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
break;
case 5:
pauseCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
pauseCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Interface_SetDoAction(globalCtx, DO_ACTION_NONE);
pauseCtx->state = 0x12;
WREG(2) = -6240;
@ -2953,7 +2953,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
pauseCtx->unk_1E4 = 0;
break;
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
pauseCtx->unk_1E4 = 0;
pauseCtx->mode = 0;
pauseCtx->promptChoice = 0;
@ -2986,7 +2986,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
if (D_8082B25C == 0) {
pauseCtx->unk_1E4 = D_8082B258;
if (pauseCtx->unk_1E4 == 0) {
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
}
break;
@ -2996,14 +2996,14 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
case 8:
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Interface_SetDoAction(globalCtx, DO_ACTION_NONE);
pauseCtx->state = 0x12;
WREG(2) = -6240;
func_800F64E0(0);
pauseCtx->unk_1E4 = 0;
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
Audio_OcaSetInstrument(0);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
pauseCtx->unk_1E4 = 0;
pauseCtx->mode = 0;
pauseCtx->promptChoice = 0;