mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-07 20:01:20 -04:00
Audio BGM Macros (#460)
* Introduce bgms * Fill in bgm enums * Rename bgm to clearer names * Fix spacing * Fix "No_Music" define * remove comment * Improve bgm names, found another seqId function * Another seqId function * Another name change * Woods of Mystery -> Sarias Song * add saria's song bgm to pierre * Another bgm function found! * Add bgm's to `gSaveContext.seqIndex`
This commit is contained in:
@@ -296,7 +296,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2D54.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2DE0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_IsSequencePlaying.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2E54.s")
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ SaveContext gSaveContext;
|
||||
void SaveContext_Init(void) {
|
||||
bzero(&gSaveContext, sizeof(gSaveContext));
|
||||
gSaveContext.playerForm = 0;
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.unk_3F46 = 0;
|
||||
gSaveContext.unk_3F46 = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.unk_3F4D = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
||||
|
||||
gSaveContext.unk_3DC0 = 2000;
|
||||
gSaveContext.naviTimer = 0;
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[1] = 0;
|
||||
@@ -66,7 +66,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
||||
gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND;
|
||||
break;
|
||||
case GAMEOVER_DEATH_FADE_OUT:
|
||||
if (func_801A8A50(1) != 32) {
|
||||
if (func_801A8A50(1) != NA_BGM_GAME_OVER) {
|
||||
func_80169F78(globalCtx);
|
||||
if (gSaveContext.respawnFlag != -7) {
|
||||
gSaveContext.respawnFlag = -6;
|
||||
|
||||
+1
-1
@@ -449,7 +449,7 @@ void Scene_HeaderCmdSoundSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->soundCtx.seqIndex = cmd->soundSettings.musicSeq;
|
||||
globalCtx->soundCtx.nightSeqIndex = cmd->soundSettings.nighttimeSFX;
|
||||
|
||||
if (gSaveContext.seqIndex == 0xFF || func_801A8A50(0) == 0x57) {
|
||||
if (gSaveContext.seqIndex == (u8)NA_BGM_DISABLED || func_801A8A50(0) == NA_BGM_FINAL_HOURS) {
|
||||
audio_setBGM(cmd->soundSettings.bgmId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user