1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 15:04:31 +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

@ -404,135 +404,135 @@ f32 gBendPitchTwoSemitonesFrequencies[] = {
1.117368f, 1.118385f, 1.119403f, 1.120422f, 1.121441f, 1.122462f,
};
f32 gNoteFrequencies[] = {
/* 0x00 */ 0.105112f, // NOTE_A0
/* 0x01 */ 0.111362f, // NOTE_BFLAT0
/* 0x02 */ 0.117984f, // NOTE_B0
/* 0x03 */ 0.125f, // NOTE_C1
/* 0x04 */ 0.132433f, // NOTE_DFLAT1
/* 0x05 */ 0.140308f, // NOTE_D1
/* 0x06 */ 0.148651f, // NOTE_EFLAT1
/* 0x07 */ 0.15749f, // NOTE_E1
/* 0x08 */ 0.166855f, // NOTE_F1
/* 0x09 */ 0.176777f, // NOTE_GFLAT1
/* 0x0A */ 0.187288f, // NOTE_G1
/* 0x0B */ 0.198425f, // NOTE_AFLAT1
/* 0x0C */ 0.210224f, // NOTE_A1
/* 0x0D */ 0.222725f, // NOTE_BFLAT1
/* 0x0E */ 0.235969f, // NOTE_B1
/* 0x0F */ 0.25f, // NOTE_C2
/* 0x10 */ 0.264866f, // NOTE_DFLAT2
/* 0x11 */ 0.280616f, // NOTE_D2
/* 0x12 */ 0.297302f, // NOTE_EFLAT2
/* 0x13 */ 0.31498f, // NOTE_E2
/* 0x14 */ 0.33371f, // NOTE_F2
/* 0x15 */ 0.353553f, // NOTE_GFLAT2
/* 0x16 */ 0.374577f, // NOTE_G2
/* 0x17 */ 0.39685f, // NOTE_AFLAT2
/* 0x18 */ 0.420448f, // NOTE_A2
/* 0x19 */ 0.445449f, // NOTE_BFLAT2
/* 0x1A */ 0.471937f, // NOTE_B2
/* 0x1B */ 0.5f, // NOTE_C3
/* 0x1C */ 0.529732f, // NOTE_DFLAT3
/* 0x1D */ 0.561231f, // NOTE_D3
/* 0x1E */ 0.594604f, // NOTE_EFLAT3
/* 0x1F */ 0.629961f, // NOTE_E3
/* 0x20 */ 0.66742f, // NOTE_F3
/* 0x21 */ 0.707107f, // NOTE_GFLAT3
/* 0x22 */ 0.749154f, // NOTE_G3
/* 0x23 */ 0.793701f, // NOTE_AFLAT3
/* 0x24 */ 0.840897f, // NOTE_A3
/* 0x25 */ 0.890899f, // NOTE_BFLAT3
/* 0x26 */ 0.943875f, // NOTE_B3
/* 0x27 */ 1.0f, // NOTE_C4 (Middle C)
/* 0x28 */ 1.059463f, // NOTE_DFLAT4
/* 0x29 */ 1.122462f, // NOTE_D4
/* 0x2A */ 1.189207f, // NOTE_EFLAT4
/* 0x2B */ 1.259921f, // NOTE_E4
/* 0x2C */ 1.33484f, // NOTE_F4
/* 0x2D */ 1.414214f, // NOTE_GFLAT4
/* 0x2E */ 1.498307f, // NOTE_G4
/* 0x2F */ 1.587401f, // NOTE_AFLAT4
/* 0x30 */ 1.681793f, // NOTE_A4
/* 0x31 */ 1.781798f, // NOTE_BFLAT4
/* 0x32 */ 1.887749f, // NOTE_B4
/* 0x33 */ 2.0f, // NOTE_C5
/* 0x34 */ 2.118926f, // NOTE_DFLAT5
/* 0x35 */ 2.244924f, // NOTE_D5
/* 0x36 */ 2.378414f, // NOTE_EFLAT5
/* 0x37 */ 2.519842f, // NOTE_E5
/* 0x38 */ 2.66968f, // NOTE_F5
/* 0x39 */ 2.828428f, // NOTE_GFLAT5
/* 0x3A */ 2.996615f, // NOTE_G5
/* 0x3B */ 3.174803f, // NOTE_AFLAT5
/* 0x3C */ 3.363586f, // NOTE_A5
/* 0x3D */ 3.563596f, // NOTE_BFLAT5
/* 0x3E */ 3.775498f, // NOTE_B5
/* 0x3F */ 4.0f, // NOTE_C6
/* 0x40 */ 4.237853f, // NOTE_DFLAT6
/* 0x41 */ 4.489849f, // NOTE_D6
/* 0x42 */ 4.756829f, // NOTE_EFLAT6
/* 0x43 */ 5.039685f, // NOTE_E6
/* 0x44 */ 5.33936f, // NOTE_F6
/* 0x45 */ 5.656855f, // NOTE_GFLAT6
/* 0x46 */ 5.993229f, // NOTE_G6
/* 0x47 */ 6.349606f, // NOTE_AFLAT6
/* 0x48 */ 6.727173f, // NOTE_A6
/* 0x49 */ 7.127192f, // NOTE_BFLAT6
/* 0x4A */ 7.550996f, // NOTE_B6
/* 0x4B */ 8.0f, // NOTE_C7
/* 0x4C */ 8.475705f, // NOTE_DFLAT7
/* 0x4D */ 8.979697f, // NOTE_D7
/* 0x4E */ 9.513658f, // NOTE_EFLAT7
/* 0x4F */ 10.07937f, // NOTE_E7
/* 0x50 */ 10.6787205f, // NOTE_F7
/* 0x51 */ 11.31371f, // NOTE_GFLAT7
/* 0x52 */ 11.986459f, // NOTE_G7
/* 0x53 */ 12.699211f, // NOTE_AFLAT7
/* 0x54 */ 13.454346f, // NOTE_A7
/* 0x55 */ 14.254383f, // NOTE_BFLAT7
/* 0x56 */ 15.101993f, // NOTE_B7
/* 0x57 */ 16.0f, // NOTE_C8
/* 0x58 */ 16.95141f, // NOTE_DFLAT8
/* 0x59 */ 17.959395f, // NOTE_D8
/* 0x5A */ 19.027315f, // NOTE_EFLAT8
/* 0x5B */ 20.15874f, // NOTE_E8
/* 0x5C */ 21.35744f, // NOTE_F8
/* 0x5D */ 22.62742f, // NOTE_GFLAT8
/* 0x5E */ 23.972918f, // NOTE_G8
/* 0x5F */ 25.398422f, // NOTE_AFLAT8
/* 0x60 */ 26.908691f, // NOTE_A8
/* 0x61 */ 28.508766f, // NOTE_BFLAT8
/* 0x62 */ 30.203985f, // NOTE_B8
/* 0x63 */ 32.0f, // NOTE_C9
/* 0x64 */ 33.90282f, // NOTE_DFLAT9
/* 0x65 */ 35.91879f, // NOTE_D9
/* 0x66 */ 38.05463f, // NOTE_EFLAT9
/* 0x67 */ 40.31748f, // NOTE_E9
/* 0x68 */ 42.71488f, // NOTE_F9
/* 0x69 */ 45.25484f, // NOTE_GFLAT9
/* 0x6A */ 47.945835f, // NOTE_G9
/* 0x6B */ 50.796845f, // NOTE_AFLAT9
/* 0x6C */ 53.817383f, // NOTE_A9
/* 0x6D */ 57.017532f, // NOTE_BFLAT9
/* 0x6E */ 60.40797f, // NOTE_B9
/* 0x6F */ 64.0f, // NOTE_C10
/* 0x70 */ 67.80564f, // NOTE_DFLAT10
/* 0x71 */ 71.83758f, // NOTE_D10
/* 0x72 */ 76.10926f, // NOTE_EFLAT10
/* 0x73 */ 80.63496f, // NOTE_E10
/* 0x74 */ 85.42976f, // NOTE_F10
/* 0x75 */ 0.055681f, // NOTE_BFLATNEG1
/* 0x76 */ 0.058992f, // NOTE_BNEG1
/* 0x77 */ 0.0625f, // NOTE_C0
/* 0x78 */ 0.066216f, // NOTE_DFLAT0
/* 0x79 */ 0.070154f, // NOTE_D0
/* 0x7A */ 0.074325f, // NOTE_EFLAT0
/* 0x7B */ 0.078745f, // NOTE_E0
/* 0x7C */ 0.083427f, // NOTE_F0
/* 0x7D */ 0.088388f, // NOTE_GFLAT0
/* 0x7E */ 0.093644f, // NOTE_G0
/* 0x7F */ 0.099213f, // NOTE_AFLAT0
f32 gPitchFrequencies[] = {
/* 0x00 */ 0.105112f, // PITCH_A0
/* 0x01 */ 0.111362f, // PITCH_BFLAT0
/* 0x02 */ 0.117984f, // PITCH_B0
/* 0x03 */ 0.125f, // PITCH_C1
/* 0x04 */ 0.132433f, // PITCH_DFLAT1
/* 0x05 */ 0.140308f, // PITCH_D1
/* 0x06 */ 0.148651f, // PITCH_EFLAT1
/* 0x07 */ 0.15749f, // PITCH_E1
/* 0x08 */ 0.166855f, // PITCH_F1
/* 0x09 */ 0.176777f, // PITCH_GFLAT1
/* 0x0A */ 0.187288f, // PITCH_G1
/* 0x0B */ 0.198425f, // PITCH_AFLAT1
/* 0x0C */ 0.210224f, // PITCH_A1
/* 0x0D */ 0.222725f, // PITCH_BFLAT1
/* 0x0E */ 0.235969f, // PITCH_B1
/* 0x0F */ 0.25f, // PITCH_C2
/* 0x10 */ 0.264866f, // PITCH_DFLAT2
/* 0x11 */ 0.280616f, // PITCH_D2
/* 0x12 */ 0.297302f, // PITCH_EFLAT2
/* 0x13 */ 0.31498f, // PITCH_E2
/* 0x14 */ 0.33371f, // PITCH_F2
/* 0x15 */ 0.353553f, // PITCH_GFLAT2
/* 0x16 */ 0.374577f, // PITCH_G2
/* 0x17 */ 0.39685f, // PITCH_AFLAT2
/* 0x18 */ 0.420448f, // PITCH_A2
/* 0x19 */ 0.445449f, // PITCH_BFLAT2
/* 0x1A */ 0.471937f, // PITCH_B2
/* 0x1B */ 0.5f, // PITCH_C3
/* 0x1C */ 0.529732f, // PITCH_DFLAT3
/* 0x1D */ 0.561231f, // PITCH_D3
/* 0x1E */ 0.594604f, // PITCH_EFLAT3
/* 0x1F */ 0.629961f, // PITCH_E3
/* 0x20 */ 0.66742f, // PITCH_F3
/* 0x21 */ 0.707107f, // PITCH_GFLAT3
/* 0x22 */ 0.749154f, // PITCH_G3
/* 0x23 */ 0.793701f, // PITCH_AFLAT3
/* 0x24 */ 0.840897f, // PITCH_A3
/* 0x25 */ 0.890899f, // PITCH_BFLAT3
/* 0x26 */ 0.943875f, // PITCH_B3
/* 0x27 */ 1.0f, // PITCH_C4 (Middle C)
/* 0x28 */ 1.059463f, // PITCH_DFLAT4
/* 0x29 */ 1.122462f, // PITCH_D4
/* 0x2A */ 1.189207f, // PITCH_EFLAT4
/* 0x2B */ 1.259921f, // PITCH_E4
/* 0x2C */ 1.33484f, // PITCH_F4
/* 0x2D */ 1.414214f, // PITCH_GFLAT4
/* 0x2E */ 1.498307f, // PITCH_G4
/* 0x2F */ 1.587401f, // PITCH_AFLAT4
/* 0x30 */ 1.681793f, // PITCH_A4
/* 0x31 */ 1.781798f, // PITCH_BFLAT4
/* 0x32 */ 1.887749f, // PITCH_B4
/* 0x33 */ 2.0f, // PITCH_C5
/* 0x34 */ 2.118926f, // PITCH_DFLAT5
/* 0x35 */ 2.244924f, // PITCH_D5
/* 0x36 */ 2.378414f, // PITCH_EFLAT5
/* 0x37 */ 2.519842f, // PITCH_E5
/* 0x38 */ 2.66968f, // PITCH_F5
/* 0x39 */ 2.828428f, // PITCH_GFLAT5
/* 0x3A */ 2.996615f, // PITCH_G5
/* 0x3B */ 3.174803f, // PITCH_AFLAT5
/* 0x3C */ 3.363586f, // PITCH_A5
/* 0x3D */ 3.563596f, // PITCH_BFLAT5
/* 0x3E */ 3.775498f, // PITCH_B5
/* 0x3F */ 4.0f, // PITCH_C6
/* 0x40 */ 4.237853f, // PITCH_DFLAT6
/* 0x41 */ 4.489849f, // PITCH_D6
/* 0x42 */ 4.756829f, // PITCH_EFLAT6
/* 0x43 */ 5.039685f, // PITCH_E6
/* 0x44 */ 5.33936f, // PITCH_F6
/* 0x45 */ 5.656855f, // PITCH_GFLAT6
/* 0x46 */ 5.993229f, // PITCH_G6
/* 0x47 */ 6.349606f, // PITCH_AFLAT6
/* 0x48 */ 6.727173f, // PITCH_A6
/* 0x49 */ 7.127192f, // PITCH_BFLAT6
/* 0x4A */ 7.550996f, // PITCH_B6
/* 0x4B */ 8.0f, // PITCH_C7
/* 0x4C */ 8.475705f, // PITCH_DFLAT7
/* 0x4D */ 8.979697f, // PITCH_D7
/* 0x4E */ 9.513658f, // PITCH_EFLAT7
/* 0x4F */ 10.07937f, // PITCH_E7
/* 0x50 */ 10.6787205f, // PITCH_F7
/* 0x51 */ 11.31371f, // PITCH_GFLAT7
/* 0x52 */ 11.986459f, // PITCH_G7
/* 0x53 */ 12.699211f, // PITCH_AFLAT7
/* 0x54 */ 13.454346f, // PITCH_A7
/* 0x55 */ 14.254383f, // PITCH_BFLAT7
/* 0x56 */ 15.101993f, // PITCH_B7
/* 0x57 */ 16.0f, // PITCH_C8
/* 0x58 */ 16.95141f, // PITCH_DFLAT8
/* 0x59 */ 17.959395f, // PITCH_D8
/* 0x5A */ 19.027315f, // PITCH_EFLAT8
/* 0x5B */ 20.15874f, // PITCH_E8
/* 0x5C */ 21.35744f, // PITCH_F8
/* 0x5D */ 22.62742f, // PITCH_GFLAT8
/* 0x5E */ 23.972918f, // PITCH_G8
/* 0x5F */ 25.398422f, // PITCH_AFLAT8
/* 0x60 */ 26.908691f, // PITCH_A8
/* 0x61 */ 28.508766f, // PITCH_BFLAT8
/* 0x62 */ 30.203985f, // PITCH_B8
/* 0x63 */ 32.0f, // PITCH_C9
/* 0x64 */ 33.90282f, // PITCH_DFLAT9
/* 0x65 */ 35.91879f, // PITCH_D9
/* 0x66 */ 38.05463f, // PITCH_EFLAT9
/* 0x67 */ 40.31748f, // PITCH_E9
/* 0x68 */ 42.71488f, // PITCH_F9
/* 0x69 */ 45.25484f, // PITCH_GFLAT9
/* 0x6A */ 47.945835f, // PITCH_G9
/* 0x6B */ 50.796845f, // PITCH_AFLAT9
/* 0x6C */ 53.817383f, // PITCH_A9
/* 0x6D */ 57.017532f, // PITCH_BFLAT9
/* 0x6E */ 60.40797f, // PITCH_B9
/* 0x6F */ 64.0f, // PITCH_C10
/* 0x70 */ 67.80564f, // PITCH_DFLAT10
/* 0x71 */ 71.83758f, // PITCH_D10
/* 0x72 */ 76.10926f, // PITCH_EFLAT10
/* 0x73 */ 80.63496f, // PITCH_E10
/* 0x74 */ 85.42976f, // PITCH_F10
/* 0x75 */ 0.055681f, // PITCH_BFLATNEG1
/* 0x76 */ 0.058992f, // PITCH_BNEG1
/* 0x77 */ 0.0625f, // PITCH_C0
/* 0x78 */ 0.066216f, // PITCH_DFLAT0
/* 0x79 */ 0.070154f, // PITCH_D0
/* 0x7A */ 0.074325f, // PITCH_EFLAT0
/* 0x7B */ 0.078745f, // PITCH_E0
/* 0x7C */ 0.083427f, // PITCH_F0
/* 0x7D */ 0.088388f, // PITCH_GFLAT0
/* 0x7E */ 0.093644f, // PITCH_G0
/* 0x7F */ 0.099213f, // PITCH_AFLAT0
};
u8 gDefaultShortNoteVelocityTable[] = {

View file

@ -1098,7 +1098,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
gAudioContext.aiBufLengths[i] = 0xA0;
}
gAudioContext.totalTaskCnt = 0;
gAudioContext.totalTaskCount = 0;
gAudioContext.rspTaskIdx = 0;
gAudioContext.curAIBufIdx = 0;
gAudioContext.soundMode = 0;
@ -1162,7 +1162,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
AudioHeap_AllocPoolInit(&gAudioContext.permanentPool, temp_v0_3, D_8014A6C4.permanentPoolSize);
gAudioContextInitalized = true;
osSendMesg(gAudioContext.taskStartQueueP, (OSMesg)gAudioContext.totalTaskCnt, OS_MESG_NOBLOCK);
osSendMesg(gAudioContext.taskStartQueueP, (OSMesg)gAudioContext.totalTaskCount, OS_MESG_NOBLOCK);
}
void AudioLoad_InitSlowLoads(void) {

View file

@ -716,8 +716,8 @@ s32 AudioSeq_SeqLayerProcessScriptStep4(SequenceLayer* layer, s32 cmd) {
}
}
temp_f2 = gNoteFrequencies[semitone2] * tuning;
temp_f14 = gNoteFrequencies[layer->portamentoTargetNote] * tuning;
temp_f2 = gPitchFrequencies[semitone2] * tuning;
temp_f14 = gPitchFrequencies[layer->portamentoTargetNote] * tuning;
switch (PORTAMENTO_MODE(*portamento)) {
case PORTAMENTO_MODE_1:
@ -767,10 +767,10 @@ s32 AudioSeq_SeqLayerProcessScriptStep4(SequenceLayer* layer, s32 cmd) {
sound = Audio_InstrumentGetSound(instrument, semitone);
sameSound = (sound == layer->sound);
layer->sound = sound;
layer->freqScale = gNoteFrequencies[semitone2] * sound->tuning;
layer->freqScale = gPitchFrequencies[semitone2] * sound->tuning;
} else {
layer->sound = NULL;
layer->freqScale = gNoteFrequencies[semitone2];
layer->freqScale = gPitchFrequencies[semitone2];
if (instOrWave >= 0xC0) {
layer->sound = &gAudioContext.synthesisReverbs[instOrWave - 0xC0].sound;
}

View file

@ -35,6 +35,9 @@ AudioTask* func_800E4FE0(void) {
return func_800E5000();
}
/**
* This is Audio_Update for the audio thread
*/
AudioTask* func_800E5000(void) {
static s32 sMaxAbiCmdCnt = 0x80;
static AudioTask* sWaitingAudioTask = NULL;
@ -50,13 +53,13 @@ AudioTask* func_800E5000(void) {
s32 sp48;
s32 i;
gAudioContext.totalTaskCnt++;
if (gAudioContext.totalTaskCnt % (gAudioContext.audioBufferParameters.specUnk4) != 0) {
gAudioContext.totalTaskCount++;
if (gAudioContext.totalTaskCount % (gAudioContext.audioBufferParameters.specUnk4) != 0) {
if (D_801755D0 != NULL) {
D_801755D0();
}
if ((gAudioContext.totalTaskCnt % gAudioContext.audioBufferParameters.specUnk4) + 1 ==
if ((gAudioContext.totalTaskCount % gAudioContext.audioBufferParameters.specUnk4) + 1 ==
gAudioContext.audioBufferParameters.specUnk4) {
return sWaitingAudioTask;
} else {
@ -64,7 +67,7 @@ AudioTask* func_800E5000(void) {
}
}
osSendMesg(gAudioContext.taskStartQueueP, (OSMesg)gAudioContext.totalTaskCnt, OS_MESG_NOBLOCK);
osSendMesg(gAudioContext.taskStartQueueP, (OSMesg)gAudioContext.totalTaskCount, OS_MESG_NOBLOCK);
gAudioContext.rspTaskIdx ^= 1;
gAudioContext.curAIBufIdx++;
gAudioContext.curAIBufIdx %= 3;
@ -163,9 +166,9 @@ AudioTask* func_800E5000(void) {
gAudioContext.curAbiCmdBuf =
AudioSynth_Update(gAudioContext.curAbiCmdBuf, &abiCmdCnt, currAiBuffer, gAudioContext.aiBufLengths[index]);
gAudioContext.audioRandom = (gAudioContext.audioRandom + gAudioContext.totalTaskCnt) * osGetCount();
gAudioContext.audioRandom = (gAudioContext.audioRandom + gAudioContext.totalTaskCount) * osGetCount();
gAudioContext.audioRandom =
gAudioContext.aiBuffers[index][gAudioContext.totalTaskCnt & 0xFF] + gAudioContext.audioRandom;
gAudioContext.aiBuffers[index][gAudioContext.totalTaskCount & 0xFF] + gAudioContext.audioRandom;
gWaveSamples[8] = (s16*)(((u8*)func_800E4FE0) + (gAudioContext.audioRandom & 0xFFF0));
index = gAudioContext.rspTaskIdx;
@ -809,7 +812,7 @@ s32 func_800E66C0(s32 arg0) {
u32 Audio_NextRandom(void) {
static u32 audRand = 0x12345678;
audRand = ((osGetCount() + 0x1234567) * (audRand + gAudioContext.totalTaskCnt));
audRand = ((osGetCount() + 0x1234567) * (audRand + gAudioContext.totalTaskCount));
audRand += gAudioContext.audioRandom;
return audRand;
}

File diff suppressed because it is too large Load diff

View file

@ -533,8 +533,8 @@ void func_80111070(void) {
VREG(25) = 0;
VREG(26) = 0;
VREG(27) = 0;
R_OCARINA_NOTES_XPOS = 98;
R_OCARINA_NOTES_XPOS_OFFSET = 18;
R_OCARINA_BUTTONS_XPOS = 98;
R_OCARINA_BUTTONS_XPOS_OFFSET = 18;
VREG(30) = 0;
VREG(31) = 0;
VREG(32) = 0;
@ -551,13 +551,13 @@ void func_80111070(void) {
VREG(42) = 250;
VREG(43) = 440;
VREG(44) = 10;
R_OCARINA_NOTES_YPOS(0) = 190;
R_OCARINA_NOTES_YPOS(1) = 184;
R_OCARINA_NOTES_YPOS(2) = 176;
R_OCARINA_NOTES_YPOS(3) = 172;
R_OCARINA_NOTES_YPOS(4) = 170;
R_OCARINA_BUTTONS_YPOS(0) = 190;
R_OCARINA_BUTTONS_YPOS(1) = 184;
R_OCARINA_BUTTONS_YPOS(2) = 176;
R_OCARINA_BUTTONS_YPOS(3) = 172;
R_OCARINA_BUTTONS_YPOS(4) = 170;
VREG(50) = 30;
R_OCARINA_NOTES_YPOS_OFFSET = 0;
R_OCARINA_BUTTONS_YPOS_OFFSET = 0;
VREG(52) = -16;
VREG(53) = 230;
VREG(54) = 230;

View file

@ -420,7 +420,7 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
}
break;
case 35:
func_800EE824();
AudioOcarina_PlayLongScarecrowAfterCredits();
csCtx->frames = cmd->startFrame - 1;
break;
}

File diff suppressed because it is too large Load diff

View file

@ -47,8 +47,8 @@ typedef struct {
/* 0x0F18 */ char unk_F18[0x04];
/* 0x0F1C */ u32 worldMapAreaData; // "area_arrival"
/* 0x0F20 */ char unk_F20[0x4];
/* 0x0F24 */ u8 scarecrowCustomSongSet;
/* 0x0F25 */ u8 scarecrowCustomSong[0x360];
/* 0x0F24 */ u8 scarecrowLongSongSet;
/* 0x0F25 */ u8 scarecrowLongSong[0x360];
/* 0x1285 */ char unk_1285[0x24];
/* 0x12A9 */ u8 scarecrowSpawnSongSet;
/* 0x12AA */ u8 scarecrowSpawnSong[0x80];
@ -393,14 +393,14 @@ void Sram_OpenSave(SramContext* sramCtx) {
gSaveContext.health = 0x30;
}
if (gSaveContext.scarecrowCustomSongSet) {
if (gSaveContext.scarecrowLongSongSet) {
osSyncPrintf(VT_FGCOL(BLUE));
osSyncPrintf("\n====================================================================\n");
MemCpy(gScarecrowCustomSongPtr, gSaveContext.scarecrowCustomSong, sizeof(gSaveContext.scarecrowCustomSong));
MemCpy(gScarecrowLongSongPtr, gSaveContext.scarecrowLongSong, sizeof(gSaveContext.scarecrowLongSong));
ptr = (u8*)gScarecrowCustomSongPtr;
for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowCustomSong); i++, ptr++) {
ptr = (u8*)gScarecrowLongSongPtr;
for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowLongSong); i++, ptr++) {
osSyncPrintf("%d, ", *ptr);
}