1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 07:24:34 +00:00

Audio WIP (#836)

* being code_800EC960

* wip

* wip

* more audio progress

* migrate data in code_800E11F0

* wip

* make ok

* remove asm

* wip

* move some variables outside of gAudioContext to the AudioContext structure due to the size used in func_800E3094

* more progress

* wip

* wip

* split code_800E11F0

* migrate rodata in code_800E11F0

* match functions that couldn't because of data issues

* move code_800E4FE0 asm files

* wip

* more wip

* fix global functions, and forward declarations

* wip

* wip

* wip

* ocarina wip

* match a couple functions

* some progress

* separate some bss

* match func_800EDA3C

* some matching

* more matches

* migrate audio rodata

* some matches

* more matchess

* start on synthesis

* work on synthesis

* fix function declaration

* Merge branch 'master' into audio

* match a few more functions

* wip

* wip

* more matching, rename Audio_SetBGM to Audio_QueueSeqCmd

* name several audio functions, and audiocontext members

* more naming, rename code_800E11F0 to audio_load, code_800DAAC0 to audio_synthesis

* audio wip

* match a few more functions.

* wip

* add missing NON_MATCHING directive

* wip

* some matching, data reogranization

* match cursed function

* wip

* wip

* formatting

* remove prefix from struct memebers

* missed function rename

* review

Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
krimtonz 2021-07-27 18:44:58 -05:00 committed by GitHub
parent cc9a04feb4
commit d1a5ea5110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
429 changed files with 9047 additions and 17038 deletions

View file

@ -110,8 +110,8 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
} else {
globalCtx->csCtx.segment = D_808BB7A0;
}
Audio_SetBGM(NA_BGM_STOP);
Audio_SetBGM(0x53);
Audio_QueueSeqCmd(NA_BGM_STOP);
Audio_QueueSeqCmd(0x53);
gSaveContext.cutsceneTrigger = 1;
this->actor.parent = NULL;
BgTokiSwd_SetupAction(this, func_808BB0AC);

View file

@ -335,7 +335,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, GlobalContext* globalCtx) {
if (this->unk16C > 3.0f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WEB_VIBRATION);
} else {
func_800F8D04(NA_SE_EV_WEB_VIBRATION);
Audio_StopSfx(NA_SE_EV_WEB_VIBRATION);
}
}
BgYdanSp_UpdateFloorWebCollision(this);

View file

@ -348,7 +348,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
BossDodongo_Walk(this, globalCtx);
if (this->unk_196 == 1) {
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
}
if (this->unk_196 == 0) {
@ -435,7 +435,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, GlobalContext* globalCtx) {
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(&D_06017410),
0xA0, 0xB4, 0x80, 0x28);
}
Audio_SetBGM(0x6B);
Audio_QueueSeqCmd(0x6B);
}
if (this->unk_198 == 0) {
@ -1307,7 +1307,7 @@ void BossDodongo_SetupDeathCutscene(BossDodongo* this) {
this->csState = 0;
this->actor.flags &= ~5;
this->unk_1BC = 1;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
}
void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
@ -1621,7 +1621,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
}
if (this->unk_1DA == 820) {
Audio_SetBGM(0x21);
Audio_QueueSeqCmd(0x21);
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART,
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x,
this->actor.world.pos.y,

View file

@ -189,7 +189,7 @@ void BossFd_Init(Actor* thisx, GlobalContext* globalCtx) {
0);
this->introState = BFD_CS_WAIT;
if (this->introState == BFD_CS_NONE) {
Audio_SetBGM(0x6B);
Audio_QueueSeqCmd(0x6B);
}
this->actor.world.pos.x = this->actor.world.pos.z = 0.0f;
@ -489,7 +489,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
this->camData.yMod = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->camData.shake;
}
if (this->timers[3] == 160) {
Audio_SetBGM(0x6B);
Audio_QueueSeqCmd(0x6B);
}
if ((this->timers[3] == 130) && !(gSaveContext.eventChkInf[7] & 8)) {
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
@ -744,7 +744,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) {
if (this->skinSegments != 0) {
this->skinSegments--;
if (this->skinSegments == 0) {
Audio_SetBGM(0x21);
Audio_QueueSeqCmd(0x21);
}
} else {
this->work[BFD_ACTION_STATE] = BOSSFD_BONES_FALL;

View file

@ -687,7 +687,7 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
if ((this->work[FD2_HOLE_COUNTER] == 1) || (this->work[FD2_HOLE_COUNTER] == 40)) {
this->work[FD2_SCREAM_TIMER] = 20;
if (this->work[FD2_HOLE_COUNTER] == 40) {
func_800F8D04(NA_SE_EN_VALVAISA_DEAD);
Audio_StopSfx(NA_SE_EN_VALVAISA_DEAD);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_VALVAISA_DAMAGE2);
@ -884,7 +884,7 @@ void BossFd2_CollisionCheck(BossFd2* this, GlobalContext* globalCtx) {
BossFd2_SetupDeath(this, globalCtx);
this->work[FD2_DAMAGE_FLASH_TIMER] = 10;
this->work[FD2_INVINC_TIMER] = 30000;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_VALVAISA_DEAD);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else if (damage) {

View file

@ -929,7 +929,7 @@ void BossGanondrof_SetupDeath(BossGanondrof* this, GlobalContext* globalCtx) {
Animation_PlayOnce(&this->skelAnime, &gPhantomGanonDeathBlowAnim);
this->fwork[GND_END_FRAME] = Animation_GetLastFrame(&gPhantomGanonDeathBlowAnim);
this->actionFunc = BossGanondrof_Death;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FANTOM_DEAD);
this->deathState = DEATH_START;
this->actor.flags &= ~1;
@ -1100,7 +1100,7 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
holdCamera = true;
bodyDecayLevel = 10;
if (this->timers[0] == 150) {
Audio_SetBGM(0x21);
Audio_QueueSeqCmd(0x21);
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X,
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, -1);
}

View file

@ -406,7 +406,7 @@ void BossGoma_SetupDefeated(BossGoma* this, GlobalContext* globalCtx) {
this->actor.flags &= ~5;
this->actor.speedXZ = 0.0f;
this->actor.shape.shadowScale = 0.0f;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_DEAD);
}
@ -659,7 +659,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, GlobalContext* globalCtx) {
this->subCameraAt.y = this->actor.world.pos.y;
this->subCameraAt.z = this->actor.world.pos.z;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
}
/**
@ -921,7 +921,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) {
SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex), 0xA0, 0xB4, 0x80, 0x28);
}
Audio_SetBGM(0x1B);
Audio_QueueSeqCmd(0x1B);
gSaveContext.eventChkInf[7] |= 1;
}
@ -1106,7 +1106,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->subCameraAt.z, this->firstTailLimbWorldPos.z, 0.2f, 50.0f, 0.1f);
if (this->timer == 80) {
Audio_SetBGM(0x21);
Audio_QueueSeqCmd(0x21);
}
if (this->timer == 0) {
@ -1828,7 +1828,7 @@ void BossGoma_UpdateHit(BossGoma* this, GlobalContext* globalCtx) {
} else if (this->actionFunc != BossGoma_FloorStunned && this->patienceTimer != 0 &&
(acHitInfo->toucher.dmgFlags & 0x00000005)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_DAM2);
func_800F8D04(NA_SE_EN_GOMA_CRY1);
Audio_StopSfx(NA_SE_EN_GOMA_CRY1);
this->invincibilityFrames = 10;
BossGoma_SetupFloorStunned(this);
this->sfxFaintTimer = 100;

View file

@ -384,7 +384,7 @@ void BossSst_HeadSetupIntro(BossSst* this, GlobalContext* globalCtx) {
}
Gameplay_CameraSetAtEye(globalCtx, sCutsceneCamera, &sCameraAt, &sCameraEye);
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
this->actionFunc = BossSst_HeadIntro;
}
@ -598,7 +598,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) {
TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx,
SEGMENTED_TO_VIRTUAL(&gBongoTitleCardTex), 160, 180, 128, 40);
}
Audio_SetBGM(0x1B);
Audio_QueueSeqCmd(0x1B);
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f);
BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DISAPPEAR);
}
@ -1011,7 +1011,7 @@ void BossSst_HeadSetupDeath(BossSst* this, GlobalContext* globalCtx) {
this->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
sHands[LEFT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
sHands[RIGHT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
sCutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, sCutsceneCamera, CAM_STAT_ACTIVE);
@ -1156,7 +1156,7 @@ void BossSst_HeadMelt(BossSst* this, GlobalContext* globalCtx) {
void BossSst_HeadSetupFinish(BossSst* this) {
this->actor.draw = BossSst_DrawEffect;
this->timer = 40;
Audio_SetBGM(0x21);
Audio_QueueSeqCmd(0x21);
BossSst_SetCameraTargets(1.0 / 40, 6);
this->actionFunc = BossSst_HeadFinish;
}

View file

@ -161,7 +161,7 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
if (!(gSaveContext.itemGetInf[1] & 0x4000)) {
reaction = DNT_SIGNAL_CELEBRATE;
this->prize = DNT_PRIZE_STICK;
Audio_SetBGM(0x3E);
Audio_QueueSeqCmd(0x3E);
break;
}
case PLAYER_MASK_TRUTH:
@ -208,17 +208,17 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
this->action = sResultValues[resultIdx][1];
switch (this->action) {
case DNT_ACTION_LOW_RUPEES:
Audio_SetBGM(0x2D);
Audio_QueueSeqCmd(0x2D);
break;
case DNT_ACTION_ATTACK:
if (this->subCamera != SUBCAM_FREE) {
this->subCamera = SUBCAM_FREE;
OnePointCutscene_Init(globalCtx, 2350, -99, &this->scrubs[3]->actor, MAIN_CAM);
}
Audio_SetBGM(0x81A);
Audio_QueueSeqCmd(0x81A);
break;
case DNT_ACTION_DANCE:
Audio_SetBGM(0x55);
Audio_QueueSeqCmd(0x55);
break;
}
osSyncPrintf("\n\n");

View file

@ -361,7 +361,7 @@ void EnDntJiji_Return(EnDntJiji* this, GlobalContext* globalCtx) {
if ((this->stage->actor.update != NULL) && (this->stage->leaderSignal == DNT_SIGNAL_NONE)) {
this->stage->leaderSignal = DNT_SIGNAL_HIDE;
this->stage->action = DNT_ACTION_ATTACK;
Audio_SetBGM(0x81A);
Audio_QueueSeqCmd(0x81A);
}
}
this->actor.speedXZ = 0.0f;

View file

@ -244,7 +244,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, GlobalContext* globalCtx) {
scorePos.y = this->actor.world.pos.y + 20.0f;
scorePos.z = this->actor.world.pos.z;
EffectSsExtra_Spawn(globalCtx, &scorePos, &scoreVel, &scoreAccel, 4, 2);
func_800F8D04(NA_SE_SY_TRE_BOX_APPEAR);
Audio_StopSfx(NA_SE_SY_TRE_BOX_APPEAR);
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
// Big hit
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);

View file

@ -54,7 +54,7 @@ void func_809FFDC8(EnEg* this, GlobalContext* globalCtx) {
// Void the player out
Gameplay_TriggerRespawn(globalCtx);
gSaveContext.respawnFlag = -2;
Audio_SetBGM(NA_BGM_STOP);
Audio_QueueSeqCmd(NA_BGM_STOP);
globalCtx->fadeTransition = 2;
EnEg_PlayVoidOutSFX();
voided = true;

View file

@ -506,12 +506,12 @@ s16 EnGo2_GetStateGoronCityLink(GlobalContext* globalCtx, EnGo2* this) {
if (globalCtx->msgCtx.choiceIndex == 0) {
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3033 : 0x3035;
if (this->actor.textId == 0x3035) {
func_800F8D04(0x39EB);
Audio_StopSfx(0x39EB);
}
} else {
this->actor.textId = gSaveContext.infTable[16] & 0x800 ? 0x3036 : 0x3033;
if (this->actor.textId == 0x3036) {
func_800F8D04(0x39EB);
Audio_StopSfx(0x39EB);
}
}
func_8010B720(globalCtx, this->actor.textId);

View file

@ -2502,7 +2502,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
this->hbaTimer++;
}
sp20 = func_800F5A58(65, globalCtx);
sp20 = func_800F5A58(65);
EnHorse_UpdateHbaRaceInfo(this, globalCtx, &sHbaInfo);
if (this->hbaFlags & 1 || this->hbaTimer >= 46) {
if (sp20 != 1 && gSaveContext.minigameState != 3) {
@ -2530,7 +2530,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, GlobalContext* globalCtx) {
if ((globalCtx->interfaceCtx.hbaAmmo == 0) || (this->hbaFlags & 2)) {
if (this->hbaFlags & 4) {
this->hbaFlags &= ~4;
Audio_SetBGM(65);
Audio_QueueSeqCmd(65);
}
}

View file

@ -183,7 +183,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, GlobalContext* g
if (this->playerFinish > 0) {
this->result = INGORACE_PLAYER_WIN;
this->finishTimer = 55;
Audio_SetBGM(0x41);
Audio_QueueSeqCmd(0x41);
Audio_PlaySoundGeneral(NA_SE_SY_START_SHOT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
for (i = 0; i < 3; i++) {
@ -198,7 +198,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, GlobalContext* g
this->result = INGORACE_INGO_WIN;
this->finishTimer = 70;
ingoHorse->stateFlags |= ENHORSE_INGO_WON;
Audio_SetBGM(0x41);
Audio_QueueSeqCmd(0x41);
Audio_PlaySoundGeneral(NA_SE_SY_START_SHOT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
for (i = 0; i < 3; i++) {
@ -206,12 +206,12 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, GlobalContext* g
}
}
if (((player2->rideActor != NULL) && AT_RANCH_EXIT(player2->rideActor)) || AT_RANCH_EXIT(&player2->actor)) {
Audio_SetBGM(0x41);
Audio_QueueSeqCmd(0x41);
this->result = INGORACE_INGO_WIN;
this->finishTimer = 20;
}
if ((gSaveContext.timer1Value >= 180) && (this->startFlags & 2)) {
Audio_SetBGM(0x41);
Audio_QueueSeqCmd(0x41);
this->result = INGORACE_TIME_UP;
this->finishTimer = 20;
}
@ -376,7 +376,7 @@ s32 EnHorseGameCheck_UpdateMalonRace(EnHorseGameCheckBase* base, GlobalContext*
this->finishTimer = 30;
} else if (this->fenceCheck[15] == 1) {
this->lapCount = 2;
Audio_SetBGM(0x41);
Audio_QueueSeqCmd(0x41);
Audio_PlaySoundGeneral(NA_SE_SY_START_SHOT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
this->result = MALONRACE_SUCCESS;
this->finishTimer = 70;

View file

@ -349,7 +349,7 @@ void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) {
func_8002DF54(globalCtx, &this->actor, 8);
if (func_8002F334(&this->actor, globalCtx)) {
Audio_SetBGM(0x110000FF);
Audio_QueueSeqCmd(0x110000FF);
func_80ACA62C(this, globalCtx);
this->actor.flags &= ~0x10000;
}
@ -359,7 +359,7 @@ void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) {
func_8002DF54(globalCtx, &this->actor, 8);
if (func_8002F334(&this->actor, globalCtx)) {
Audio_SetBGM(0x110000FF);
Audio_QueueSeqCmd(0x110000FF);
if ((this->unk_3EE & 0x3F) == 0) {
func_80ACA62C(this, globalCtx);
} else {
@ -559,7 +559,7 @@ void func_80ACB03C(EnOwl* this, GlobalContext* globalCtx) {
func_8002DF54(globalCtx, &this->actor, 8);
if (func_8002F334(&this->actor, globalCtx)) {
Audio_SetBGM(0x110000FF);
Audio_QueueSeqCmd(0x110000FF);
func_80ACA62C(this, globalCtx);
this->actor.flags &= ~0x10000;
}
@ -588,7 +588,7 @@ void EnOwl_WaitZoraRiver(EnOwl* this, GlobalContext* globalCtx) {
void func_80ACB148(EnOwl* this, GlobalContext* globalCtx) {
if (func_8002F334(&this->actor, globalCtx)) {
Audio_SetBGM(0x110000FF);
Audio_QueueSeqCmd(0x110000FF);
func_80ACA5C8(this);
this->actionFunc = func_80ACC30C;
Flags_SetSwitch(globalCtx, 0x23);
@ -608,7 +608,7 @@ void EnOwl_WaitHyliaShortcut(EnOwl* this, GlobalContext* globalCtx) {
void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
if (func_8002F334(&this->actor, globalCtx)) {
Audio_SetBGM(0x110000FF);
Audio_QueueSeqCmd(0x110000FF);
func_80ACA5C8(this);
this->actionFunc = func_80ACC30C;
}
@ -616,7 +616,7 @@ void func_80ACB22C(EnOwl* this, GlobalContext* globalCtx) {
void func_80ACB274(EnOwl* this, GlobalContext* globalCtx) {
if (func_8002F334(&this->actor, globalCtx)) {
Audio_SetBGM(0x110000FF);
Audio_QueueSeqCmd(0x110000FF);
this->actionFunc = EnOwl_WaitDeathMountainShortcut;
}
}

View file

@ -425,6 +425,6 @@ void EnSyatekiMan_Draw(Actor* thisx, GlobalContext* globalCtx) {
void EnSyatekiMan_SetBgm(void) {
if (BREG(80)) {
BREG(80) = false;
Audio_SetBGM(sBgmList[BREG(81)]);
Audio_QueueSeqCmd(sBgmList[BREG(81)]);
}
}

View file

@ -728,7 +728,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
this->unk_2E0 &= ~0x10;
this->unk_2E0 &= ~0x100;
gSaveContext.eventInf[0] |= 0x100;
Audio_SetBGM(NA_BGM_STOP);
Audio_QueueSeqCmd(NA_BGM_STOP);
this->unk_2E0 &= ~0x200;
func_800F5C64(0x39);
return;
@ -757,7 +757,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) {
}
if (gSaveContext.timer1Value == 0 && !Gameplay_InCsMode(globalCtx)) {
Audio_SetBGM(NA_BGM_STOP);
Audio_QueueSeqCmd(NA_BGM_STOP);
this->unk_2E0 &= ~0x200;
func_80078884(NA_SE_SY_FOUND);
gSaveContext.timer1State = 0;

View file

@ -269,7 +269,7 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
}
}
if (globalCtx->csCtx.frames == 1020) {
Audio_SetBGM(0x1000023);
Audio_QueueSeqCmd(0x1000023);
}
if (globalCtx->csCtx.frames == 960) {
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_GROAN, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,

View file

@ -307,7 +307,7 @@ void EnWallmas_WaitToDrop(EnWallmas* this, GlobalContext* globalCtx) {
if ((player->stateFlags1 & 0x100000) || (player->stateFlags1 & 0x8000000) || !(player->actor.bgCheckFlags & 1) ||
((this->actor.params == 1) && (320.0f < Math_Vec3f_DistXZ(&this->actor.home.pos, playerPos)))) {
func_800F8D04(NA_SE_EN_FALL_AIM);
Audio_StopSfx(NA_SE_EN_FALL_AIM);
this->timer = 0x82;
}

View file

@ -183,7 +183,7 @@ void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) {
func_800F5C64(0x922);
}
if (scoreIndex == 1) {
func_800F8D04(NA_SE_SY_TRE_BOX_APPEAR);
Audio_StopSfx(NA_SE_SY_TRE_BOX_APPEAR);
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
}
if (scoreIndex == 0) {

View file

@ -88,7 +88,7 @@ void EnZl3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80B53468(void) {
Audio_SetBGM(0x62);
Audio_QueueSeqCmd(0x62);
}
BossGanon2* func_80B53488(EnZl3* this, GlobalContext* globalCtx) {

View file

@ -147,7 +147,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
}
if (this->timers[0] == 51) {
Audio_PlayActorSound2(this->actor.child, NA_SE_EV_SPEAR_FENCE);
Audio_SetBGM(0x1B);
Audio_QueueSeqCmd(0x1B);
}
if (this->timers[0] == 0) {
EnfHG_SetupApproach(this, globalCtx, Rand_ZeroOne() * 5.99f);
@ -163,7 +163,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
this->cutsceneState = INTRO_FENCE;
this->timers[0] = 60;
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
gSaveContext.eventChkInf[7] |= 4;
Flags_SetSwitch(globalCtx, 0x23);
case INTRO_FENCE:
@ -199,7 +199,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
func_8002DF54(globalCtx, &this->actor, 9);
}
if (this->timers[0] == 1) {
Audio_SetBGM(0x23);
Audio_QueueSeqCmd(0x23);
}
Math_ApproachF(&this->cameraEye.x, GND_BOSSROOM_CENTER_X + 40.0f, 0.05f, this->cameraSpeedMod * 20.0f);
Math_ApproachF(&this->cameraEye.y, GND_BOSSROOM_CENTER_Y + 37.0f, 0.05f, this->cameraSpeedMod * 20.0f);
@ -287,7 +287,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
this->bossGndSignal = FHG_RIDE;
}
if (this->timers[0] == 130) {
Audio_SetBGM(0x105000FF);
Audio_QueueSeqCmd(0x105000FF);
}
if (this->timers[0] == 30) {
bossGnd->work[GND_EYE_STATE] = GND_EYESTATE_BRIGHTEN;
@ -300,7 +300,7 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
func_80078914(&audioVec, NA_SE_EN_FANTOM_ST_LAUGH);
}
if (this->timers[0] == 20) {
Audio_SetBGM(0x1B);
Audio_QueueSeqCmd(0x1B);
}
if (this->timers[0] == 2) {
this->cameraSpeedMod = 0.0f;

View file

@ -869,7 +869,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
D_80B7E0AC = 0;
D_80B7E0A6 = 10;
Audio_SetBGM(0x100100FF);
Audio_QueueSeqCmd(0x100100FF);
if (sLinkAge == 1) {
if ((HIGH_SCORE(HS_FISHING) & 0x7F) != 0) {
@ -3586,7 +3586,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_198 = 1.7f;
this->unk_19C = 7000.0f;
D_80B7E124 = 1;
Audio_SetBGM(0x81A);
Audio_QueueSeqCmd(0x81A);
D_80B7E0A6 = 0;
if (this->unk_150 == 1) {
@ -3791,7 +3791,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
} else {
D_80B7E086 = 0x4082;
func_800A9F6C(0.0f, 1, 3, 1);
Audio_SetBGM(0x100A00FF);
Audio_QueueSeqCmd(0x100A00FF);
}
this->unk_158 = this->unk_15A = 0;
@ -3859,7 +3859,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
}
if (this->unk_17A[0] == 90) {
Audio_SetBGM(0x924);
Audio_QueueSeqCmd(0x924);
D_80B7A67C = 40;
if (this->unk_150 == 0) {
@ -3969,7 +3969,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
D_80B7E148 = 520.0f;
D_80B7E144 = 195.0f;
Audio_SetBGM(0x100A00FF);
Audio_QueueSeqCmd(0x100A00FF);
D_80B7E0A6 = 20;
D_80B7A6CC = 3;
}
@ -5204,7 +5204,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
D_80B7A6CC = 20;
func_800A9F6C(0.0f, 150, 10, 10);
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
Audio_SetBGM(0x101400FF);
Audio_QueueSeqCmd(0x101400FF);
}
if (KREG(0) != 0) {
@ -5213,7 +5213,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
D_80B7A6CC = 20;
func_800A9F6C(0.0f, 150, 10, 10);
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
Audio_SetBGM(0x101400FF);
Audio_QueueSeqCmd(0x101400FF);
}
if (D_80B7A6D0 != 0) {
@ -5429,7 +5429,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
case 22:
if (D_80B7A6D0 == 30) {
Audio_SetBGM(0x922);
Audio_QueueSeqCmd(0x922);
}
D_80B7A6D4 = 1;
@ -5739,15 +5739,15 @@ void Fishing_DrawOwner(Actor* thisx, GlobalContext* globalCtx) {
if (D_80B7E0A6 == 0) {
if (sLinkAge != 1) {
Audio_SetBGM(0x19);
Audio_QueueSeqCmd(0x19);
} else {
Audio_SetBGM(0x27);
Audio_QueueSeqCmd(0x27);
}
if (sLinkAge != 1) {
Audio_SetBGM(0x19);
Audio_QueueSeqCmd(0x19);
} else {
Audio_SetBGM(0x27);
Audio_QueueSeqCmd(0x27);
}
}
}

View file

@ -190,9 +190,9 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
D_8082A11C = 0;
func_800ED858(1);
func_800ECC04((1 << pauseCtx->unk_264) + 0x8000);
pauseCtx->unk_194 = func_800EE3F8();
pauseCtx->unk_194->unk_02 = 0;
pauseCtx->unk_194->unk_01 = 0xFF;
pauseCtx->unk_194 = Audio_OcaGetDisplayStaff();
pauseCtx->unk_194->pos = 0;
pauseCtx->unk_194->state = 0xFF;
VREG(21) = -62;
VREG(22) = -56;
VREG(23) = -49;
@ -278,8 +278,8 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
pauseCtx->unk_264 = D_80153960[phi_s6];
func_800ED93C(pauseCtx->unk_264 + 1, 1);
pauseCtx->unk_1E4 = 2;
pauseCtx->unk_194 = func_800EE3F8();
pauseCtx->unk_194->unk_02 = 0;
pauseCtx->unk_194 = Audio_OcaGetDisplayStaff();
pauseCtx->unk_194->pos = 0;
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
}
@ -471,11 +471,11 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
}
if (pauseCtx->unk_1E4 == 2) {
pauseCtx->unk_194 = func_800EE3F8();
pauseCtx->unk_194 = Audio_OcaGetDisplayStaff();
if (pauseCtx->unk_194->unk_02 != 0) {
if (D_8082A11C == (pauseCtx->unk_194->unk_02 - 1)) {
D_8082A124[pauseCtx->unk_194->unk_02 - 1] = pauseCtx->unk_194->unk_00;
if (pauseCtx->unk_194->pos != 0) {
if (D_8082A11C == (pauseCtx->unk_194->pos - 1)) {
D_8082A124[pauseCtx->unk_194->pos - 1] = pauseCtx->unk_194->noteIdx;
D_8082A11C++;
}
@ -519,12 +519,12 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
} else if (((pauseCtx->unk_1E4 >= 4) && (pauseCtx->unk_1E4 <= 6)) || (pauseCtx->unk_1E4 == 8)) {
phi_a2 = pauseCtx->unk_264;
sp226 = D_80131C00[phi_a2][0];
sp226 = gOcarinaSongNotes[phi_a2].len;
sp218 = sp21A;
for (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 + D_80131C00[phi_a2][phi_s3 + 1]);
VREG(21 + gOcarinaSongNotes[phi_a2].notesIdx[phi_s3]);
pauseCtx->questVtx[sp21A + 2].v.ob[1] = pauseCtx->questVtx[sp21A + 3].v.ob[1] =
pauseCtx->questVtx[sp21A + 0].v.ob[1] - 12;
@ -532,7 +532,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
gDPPipeSync(POLY_OPA_DISP++);
if (pauseCtx->unk_1E4 == 8) {
if (D_80131C00[phi_a2][phi_s3 + 1] == 0) {
if (gOcarinaSongNotes[phi_a2].notesIdx[phi_s3] == 0) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 255, 150, 200);
} else {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, 200);
@ -545,9 +545,9 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
gDPLoadTextureBlock(POLY_OPA_DISP++, D_8082A130[D_80131C00[phi_a2][phi_s3 + 1]], 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[gOcarinaSongNotes[phi_a2].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);
if (1) {}
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
@ -556,11 +556,11 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
if (pauseCtx->unk_1E4 != 8) {
pauseCtx->unk_194 = func_800EE3D4();
if (pauseCtx->unk_194->unk_02 != 0) {
if (D_8082A11C == (pauseCtx->unk_194->unk_02 - 1)) {
if ((pauseCtx->unk_194->unk_00 >= 0) && (pauseCtx->unk_194->unk_00 < 5)) {
D_8082A124[pauseCtx->unk_194->unk_02 - 1] = pauseCtx->unk_194->unk_00;
D_8082A124[pauseCtx->unk_194->unk_02] = 0xFF;
if (pauseCtx->unk_194->pos != 0) {
if (D_8082A11C == (pauseCtx->unk_194->pos - 1)) {
if ((pauseCtx->unk_194->noteIdx >= 0) && (pauseCtx->unk_194->noteIdx < 5)) {
D_8082A124[pauseCtx->unk_194->pos - 1] = pauseCtx->unk_194->noteIdx;
D_8082A124[pauseCtx->unk_194->pos] = 0xFF;
D_8082A11C++;
}
}
@ -612,9 +612,9 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
D_8082A11C = 0;
func_800ED858(1);
func_800ECC04((1 << pauseCtx->unk_264) + 0x8000);
pauseCtx->unk_194 = func_800EE3F8();
pauseCtx->unk_194->unk_02 = 0;
pauseCtx->unk_194->unk_01 = 0xFE;
pauseCtx->unk_194 = Audio_OcaGetDisplayStaff();
pauseCtx->unk_194->pos = 0;
pauseCtx->unk_194->state = 0xFE;
pauseCtx->unk_1E4 = 5;
}
}

View file

@ -2924,8 +2924,8 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
break;
case 2:
pauseCtx->unk_194 = func_800EE3F8();
if (pauseCtx->unk_194->unk_01 == 0) {
pauseCtx->unk_194 = Audio_OcaGetDisplayStaff();
if (pauseCtx->unk_194->state == 0) {
pauseCtx->unk_1E4 = 4;
func_800ED858(0);
}
@ -2962,13 +2962,13 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
Interface_ChangeAlpha(50);
pauseCtx->unk_1EC = 0;
pauseCtx->state = 7;
} else if (pauseCtx->unk_194->unk_01 == pauseCtx->unk_264) {
} else if (pauseCtx->unk_194->state == pauseCtx->unk_264) {
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
D_8082B258 = 0;
D_8082B25C = 30;
pauseCtx->unk_1E4 = 6;
} else if (pauseCtx->unk_194->unk_01 == 0xFF) {
} else if (pauseCtx->unk_194->state == 0xFF) {
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
D_8082B258 = 4;
@ -3383,7 +3383,7 @@ void KaleidoScope_Update(GlobalContext* globalCtx) {
gSaveContext.respawnFlag = -2;
gSaveContext.nextTransition = 2;
gSaveContext.health = 0x30;
Audio_SetBGM(0xF000000A);
Audio_QueueSeqCmd(0xF000000A);
gSaveContext.healthAccumulator = 0;
gSaveContext.unk_13F0 = 0;
gSaveContext.unk_13F2 = 0;

View file

@ -1292,7 +1292,7 @@ void func_808326F0(Player* this) {
s32 i;
for (i = 0; i < 4; i++) {
func_800F8D04((u16)(*entry + this->ageProperties->unk_92));
Audio_StopSfx((u16)(*entry + this->ageProperties->unk_92));
entry++;
}
}

View file

@ -31,7 +31,7 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
gSaveContext.buttonStatus[1] = BTN_ENABLED;
gSaveContext.buttonStatus[0] = BTN_ENABLED;
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
Audio_SetBGM(NA_BGM_STOP);
Audio_QueueSeqCmd(NA_BGM_STOP);
gSaveContext.entranceIndex = entranceIndex;
gSaveContext.respawnFlag = 0;
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = -1;