diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2021-11-21 01:01:37 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-20 11:01:37 -0300 |
| commit | ea17d924e4b2bd276b01c476557c2361a5ee5f20 (patch) | |
| tree | 9e8a0d11e201a073dd4d933bffa91a03e3c501b8 /src/code | |
| parent | 97425f68aef4a8fc773a5ef6fb5bd61b51d40f71 (diff) | |
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`
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/audio/code_8019AF00.c | 2 | ||||
| -rw-r--r-- | src/code/z_common_data.c | 4 | ||||
| -rw-r--r-- | src/code/z_game_over.c | 4 | ||||
| -rw-r--r-- | src/code/z_scene.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/code/audio/code_8019AF00.c b/src/code/audio/code_8019AF00.c index 227384d0a..9354af188 100644 --- a/src/code/audio/code_8019AF00.c +++ b/src/code/audio/code_8019AF00.c @@ -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") diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index 88fa3e103..26fd324a7 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -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; diff --git a/src/code/z_game_over.c b/src/code/z_game_over.c index c510c1974..979b28cba 100644 --- a/src/code/z_game_over.c +++ b/src/code/z_game_over.c @@ -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; diff --git a/src/code/z_scene.c b/src/code/z_scene.c index dd158ac07..293a9762d 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -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); } } |
