1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 14:31:17 +00:00

Match func_800EEA50 + some surrounding doc (#916)

* Match func_800EEA50

* Document some audio debug stuff

* more doc

* more doc

* formatting

* Fix enums, and some more bits of doc

* review

* LIM -> MAX

* missed review suggestion...

* more review

* ganon comments

* more review

* 🐍☠️

* more review

* Update functions.h

* quotes

* review

Co-authored-by: zelda2774 <zelda2774@invalid>
This commit is contained in:
zelda2774 2021-08-30 02:08:41 +02:00 committed by GitHub
parent 28e72bb486
commit a75c70358c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 1562 additions and 5496 deletions

View file

@ -176,7 +176,7 @@ static f32 sGrowingScale[] = {
270.0f,
};
static u8 sPitchSmallFrog[] = {
static u8 sSmallFrogNotes[] = {
5, // C-Down Ocarina
2, // A Button Ocarina
9, // C-Right Ocarina
@ -184,7 +184,7 @@ static u8 sPitchSmallFrog[] = {
14, // C Up Ocarina
};
static s8 sPitchLargeFrog[] = {
static s8 sLargeFrogNotes[] = {
-7, // C-Down Ocarina
-10, // A Button Ocarina
-3, // C-Right Ocarina
@ -583,15 +583,15 @@ void EnFr_UpdateActive(Actor* thisx, GlobalContext* globalCtx) {
s32 EnFr_SetupJumpingUp(EnFr* this, s32 frogIndex) {
EnFr* frog = sEnFrPointers.frogs[frogIndex];
u8 audioPitch;
u8 semitone;
if (frog != NULL && frog->isJumpingUp == false) {
audioPitch = frog->growingScaleIndex == 3 ? sPitchLargeFrog[frogIndex] : sPitchSmallFrog[frogIndex];
semitone = frog->growingScaleIndex == 3 ? sLargeFrogNotes[frogIndex] : sSmallFrogNotes[frogIndex];
if (this->songIndex == FROG_CHOIR_SONG) {
frog->isJumpingToFrogSong = true;
}
frog->isJumpingUp = true;
func_800F4BF4(&frog->actor.projectedPos, NA_SE_EV_FROG_JUMP, (s8)audioPitch);
Audio_PlaySoundTransposed(&frog->actor.projectedPos, NA_SE_EV_FROG_JUMP, semitone);
return true;
} else {
return false;