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:
engineer124 2021-11-21 01:01:37 +11:00 committed by GitHub
parent 97425f68ae
commit ea17d924e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 184 additions and 54 deletions

View File

@ -3,4 +3,134 @@
#define NA_BGM_STOP 0x100000FF #define NA_BGM_STOP 0x100000FF
#define NA_BGM_GENERAL_SFX 0x00 // General Sound Effects
#define NA_BGM_NATURE_AMBIENCE 0x01 // Ambient background noises
#define NA_BGM_TERMINA_FIELD 0x02 // Termina Field
#define NA_BGM_CHASE 0x03 // Forest Chase
#define NA_BGM_MAJORAS_THEME 0x04 // Majora's Theme "STALKID"
#define NA_BGM_CLOCK_TOWER 0x05 // The Clock Tower
#define NA_BGM_STONE_TOWER_TEMPLE 0x06 // Stone Tower Temple
#define NA_BGM_INV_STONE_TOWER_TEMPLE 0x07 // Stone Tower Temple Inverted
#define NA_BGM_FAILURE_0 0x08 // Missed Event 1
#define NA_BGM_FAILURE_1 0x09 // Title
#define NA_BGM_HAPPY_MASK_SALESMAN 0x0A // Mask Salesman "OMENYA"
#define NA_BGM_SONG_OF_HEALING 0x0B // Song of Healing "DEMO_CURE"
#define NA_BGM_SWAMP_REGION 0x0C // Southern Swamp and Woodfall "DAMP_AREA"
#define NA_BGM_ALIEN_INVASION 0x0D // Ghost Attack "UFO"
#define NA_BGM_SWAMP_CRUISE 0x0E // Mini Game "JUNGLE_CREWS"
#define NA_BGM_SHARPS_CURSE 0x0F // Sharp's Curse
#define NA_BGM_GREAT_BAY_REGION 0x10 // Great Bay Coast "SEA_AREA"
#define NA_BGM_IKANA_REGION 0x11 // Ikana Valley
#define NA_BGM_DEKU_KING 0x12 // Court of the Deku King
#define NA_BGM_MOUNTAIN_REGION 0x13 // Mountain Village "SNOW_AREA"
#define NA_BGM_PIRATES_FORTRESS 0x14 // Pirates' Fortress "PIRATE_AREA"
#define NA_BGM_CLOCK_TOWN_DAY_1 0x15 // Clock Town Day 1 This song's filename is dummied out in MM3D "DUMMY_21"
#define NA_BGM_CLOCK_TOWN_DAY_2 0x16 // Clock Town Day 2 his song's filename is dummied out in MM3D "DUMMY_22"
#define NA_BGM_CLOCK_TOWN_DAY_3 0x17 // Clock Town Day 3 This song's filename is dummied out in MM3D "DUMMY_23"
#define NA_BGM_FILE_SELECT 0x18 // This song has no track name, as it's a duplicate of the Fairy's Fountain
#define NA_BGM_CLEAR_EVENT 0x19 // Event Clear
#define NA_BGM_ENEMY 0x1A // Battle
#define NA_BGM_BOSS 0x1B // Boss Battle
#define NA_BGM_WOODFALL_TEMPLE 0x1C // Woodfall Temple "JUNGLE_DUNGEON"
#define NA_BGM_MARKET 0x1D // Clock Town Day 1 Duplicate of #15. Interesting filename in MM3D. ✘
#define NA_BGM_OPENING 0x1E // Forest Ambush
#define NA_BGM_INSIDE_A_HOUSE 0x1F // House "LINK_HOUSE"
#define NA_BGM_GAME_OVER 0x20 // Game Over
#define NA_BGM_CLEAR_BOSS 0x21 // Boss Clear
#define NA_BGM_GET_ITEM 0x22 // Item Catch
#define NA_BGM_GATE_OPEN 0x23 // Clock Town Day 2 Duplicate of #16. In MM3D, it shares its filename with the Door of Time song from OoT
#define NA_BGM_GET_HEART 0x24 // Complete a Heart Piece
#define NA_BGM_MINI_GAME_2 0x25 // Playing Minigame
#define NA_BGM_GORON_RACE 0x26 // Goron Race
#define NA_BGM_MUSIC_BOX_HOUSE 0x27 // Music Box House "ORGEL_HOUSE"
#define NA_BGM_FAIRY_FOUNTAIN 0x28 // Fairy's Fountain In MM3D, it shares its filename with the Door of Time song from OoT "GODESS"
#define NA_BGM_ZELDAS_LULLABY 0x29 // Zelda's Lullaby "HIME"
#define NA_BGM_ROSA_SISTERS 0x2A // Rosa Sisters' Dance "SISTER_DANCER"
#define NA_BGM_OPEN_CHEST 0x2B // Open Chest "OPEN_TRE_BOX"
#define NA_BGM_MARINE_RESEARCH_LAB 0x2C // Marine Research Laboratory "DRUGSTORE"
#define NA_BGM_GIANTS_THEME 0x2D // The Four Giants "KYOJIN_ROOM"
#define NA_BGM_SONG_OF_STORMS 0x2E // Guru-Guru's Song "FUSHA"
#define NA_BGM_ROMANI_RANCH 0x2F // Romani Ranch "RONRON"
#define NA_BGM_GORON_VILLAGE 0x30 // Goron Village
#define NA_BGM_MAYORS_OFFICE 0x31 // Mayor Dotour "MEETING"
#define NA_BGM_OCA_EPONA 0x32 // Ocarina Epona's Song
#define NA_BGM_OCA_SUNS 0x33 // Ocarina Sun's Song
#define NA_BGM_OCA_TIME 0x34 // Ocarina Song of Time "TIME_NORMAL"
#define NA_BGM_OCA_STORM 0x35 // Ocarina Song of Storms
#define NA_BGM_ZORA_HALL 0x36 // Zora Hall
#define NA_BGM_GET_NEW_MASK 0x37 // A New Mask
#define NA_BGM_MINI_BOSS 0x38 // Mini Boss "MIDDLE_BOSS"
#define NA_BGM_GET_SMALL_ITEM 0x39 // Small Item Catch "S_ITEM_GET"
#define NA_BGM_ASTRAL_OBSERVATORY 0x3A // Astral Observatory "TENMONDAI"
#define NA_BGM_CAVERN 0x3B // Clock Town Cavern "NORMAL_DUNGEON"
#define NA_BGM_MILK_BAR 0x3C // Milk Bar Latte
#define NA_BGM_ZELDA_APPEAR 0x3D // Meet Zelda (OoT)
#define NA_BGM_SARIAS_SONG 0x3E // Saria's Theme Song from OoT "MAYOIMORI"
#define NA_BGM_GORON_GOAL 0x3F // Goron Race Goal
#define NA_BGM_HORSE 0x40 // Gorman Race
#define NA_BGM_HORSE_GOAL 0x41 // Race Finish
#define NA_BGM_INGO 0x42 // Gorman Bros. "INGO"
#define NA_BGM_KOTAKE_POTION_SHOP 0x43 // Kotake's Potion Shop "KOTAKE_KOUME"
#define NA_BGM_SHOP 0x44 // Store
#define NA_BGM_OWL 0x45 // Gaebora's Theme
#define NA_BGM_MINI_GAME 0x46 // Target Practice
#define NA_BGM_OCA_SOARING 0x47 // Ocarina Song of Soaring "OCA_BIGWING"
#define NA_BGM_OCA_HEALING 0x48 // Ocarina Song of Healing "OCA_CURE"
#define NA_BGM_INVERTED_SONG_OF_TIME 0x49 // Inverted Song of Time "_SPEED"
#define NA_BGM_SONG_OF_DOUBLE_TIME 0x4A // Song of Double Time "TIME_JUMP"
#define NA_BGM_SONATA_OF_AWAKENING 0x4B // Sonata of Awakening "DEMO_AWAKING"
#define NA_BGM_GORON_LULLABY 0x4C // Goron Lullaby "DEMO_LULLABY"
#define NA_BGM_NEW_WAVE_BOSSA_NOVA 0x4D // New Wave Bossa Nova "DEMO_TIDE"
#define NA_BGM_ELEGY_OF_EMPTINESS 0x4E // Elegy of Emptiness "DEMO_SHELL"
#define NA_BGM_OATH_TO_ORDER 0x4F // Oath to Order "DEMO_PLEDGE"
#define NA_BGM_SWORD_TRAINING_HALL 0x50 // Sword Training "EXERCISE_HALL"
#define NA_BGM_GORON_LULLABY_INTRO 0x51 // Ocarina Goron Lullaby Intro "DEMO_LULLABY_HALF"
#define NA_BGM_OCA_FAIRY 0x52 // New Song "OCA_YOUSEI"
#define NA_BGM_BREMEN_MARCH 0x53 // Bremen March "FACEMASK"
#define NA_BGM_BALLAD_OF_THE_WIND_FISH 0x54 // Quartet performed in on the milk bar stage "QUARTET"
#define NA_BGM_SONG_OF_SOARING 0x55 // Song of Soaring "WING_WARP"
#define NA_BGM_MILK_BAR_DUPLICATE 0x56 // Milk Bar Latte Duplicate. "MILK_BAR_DUMMY"
#define NA_BGM_FINAL_HOURS 0x57 // Final Hours "TIME_LIMIT"
#define NA_BGM_MIKAU_RIFF 0x58 // Mikau's Tale "MIKAU_LIFF"
#define NA_BGM_MIKAU_FINALE 0x59 // A single guitar chord. "MIKAU_FIN"
#define NA_BGM_FROG_SONG 0x5A // Don Gero's Song
#define NA_BGM_OCA_SONATA 0x5B // Ocarina Sonata of Awakening "OCA_AWAKING"
#define NA_BGM_OCA_LULLABY 0x5C // Ocarina Goron Lullaby "OCA_LULLABY"
#define NA_BGM_OCA_NEW_WAVE 0x5D // Ocarina New Wave Bossa Nova "OCA_TIDE"
#define NA_BGM_OCA_ELEGY 0x5E // Ocarina Elegy of Emptiness "OCA_SHELL"
#define NA_BGM_OCA_OATH 0x5F // Ocarina Oath to Order "OCA_PLEDGE"
#define NA_BGM_MAJORAS_LAIR 0x60 // "LAST_DUNGEON"
#define NA_BGM_OCA_LULLABY_INTRO 0x61 // "OCA_LULLABY_HALF"
#define NA_BGM_OCA_GUITAR_BASS_SESSION 0x62 // Bass and Guitar Session "OCA_SESSION"
#define NA_BGM_PIANO_SESSION 0x63 // Piano Solo "DEMO_SESSION"
#define NA_BGM_INDIGO_GO_SESSION 0x64 // The Indigo-Go's Rehearsal "ALLPART_SESSION"
#define NA_BGM_SNOWHEAD_TEMPLE 0x65 // Snowhead Temple "SILVER_DUNGEON"
#define NA_BGM_GREAT_BAY_TEMPLE 0x66 // Great Bay Temple "DEEPBLUE_DUNGEON"
#define NA_BGM_NEW_WAVE_SAXOPHONE 0x67 // "DEMO_TIDE_SAX"
#define NA_BGM_NEW_WAVE_VOCAL 0x68 // "DEMO_TIDE_VOCAL"
#define NA_BGM_MAJORAS_WRATH 0x69 // Majora's Wrath "MUJURA_1"
#define NA_BGM_MAJORAS_INCARNATION 0x6A // Majora's Incarnation "MUJURA_2"
#define NA_BGM_MAJORAS_MASK 0x6B // Majora's Mask Battle "MUJURA_3"
#define NA_BGM_BASS_PLAY 0x6C // Bass Practice "BASS_PLAY"
#define NA_BGM_DRUMS_PLAY 0x6D // Drums Practice "DRUMS_PLAY"
#define NA_BGM_PIANO_PLAY 0x6E // Piano Practice "PIANO_PLAY"
#define NA_BGM_IKANA_CASTLE 0x6F // Ikana Castle
#define NA_BGM_GATHERING_GIANTS 0x70 // Calling the Four Giants
#define NA_BGM_KAMARO_DANCE 0x71 // Kamaro's Dance "CAMARO_DANCE"
#define NA_BGM_CREMIA_CARRIAGE 0x72 // Cremia's Carriage "DONKEY_CART"
#define NA_BGM_KEATON_QUIZ 0x73 // Keaton "QUIZ"
#define NA_BGM_END_CREDITS_1 0x74 // The End/Credits I "END_DEMO"
#define NA_BGM_OPENING_LOOP 0x75 // Forest Ambush (?) Duplicate.
#define NA_BGM_TITLE_THEME 0x76 // Title Screen
#define NA_BGM_DUNGEON_APPEAR 0x77 // Surfacing of Woodfall
#define NA_BGM_WOODFALL_CLEAR 0x78 // Woodfall Clear "PURIFICATION_0"
#define NA_BGM_SNOWHEAD_CLEAR 0x79 // Snowhead Clear "PURIFICATION_1"
#define NA_BGM_INTO_THE_MOON 0x7B // To the Moon
#define NA_BGM_GOODBYE_GIANT 0x7C //
#define NA_BGM_TATL_AND_TAEL 0x7D // Tatl and Tael "CHAT"
#define NA_BGM_MOONS_DESTRUCTION 0x7E // Moon's Destruction "MOON_VANISH"
#define NA_BGM_NO_MUSIC 0x7F //
#define NA_BGM_END_CREDITS_2 0x82 // The End/Credits II "STAFFROLL2"
#define NA_BGM_DISABLED 0xFFFF
#endif #endif

View File

@ -1757,7 +1757,7 @@ void func_800FD654(GlobalContext* globalCtx, Color_RGB8* pzParm2, f32 fParm3);
// u32 get_days_elapsed(void); // u32 get_days_elapsed(void);
// void reset_days_elapsed(void); // void reset_days_elapsed(void);
// u32 get_current_day(void); // u32 get_current_day(void);
void func_800FD750(UNK_TYPE arg0); void func_800FD750(u16 seqId);
// void func_800FD768(void); // void func_800FD768(void);
void func_800FD78C(GlobalContext* globalCtx); void func_800FD78C(GlobalContext* globalCtx);
void func_800FD858(GlobalContext* globalCtx); void func_800FD858(GlobalContext* globalCtx);
@ -3872,7 +3872,7 @@ void func_8019FDC8(UNK_PTR arg0, u16 sfxId, UNK_TYPE arg2);
void func_801A0124(Vec3f* pos, u8 arg1); void func_801A0124(Vec3f* pos, u8 arg1);
// void func_801A0184(void); // void func_801A0184(void);
// void func_801A01C4(void); // void func_801A01C4(void);
void func_801A0204(UNK_TYPE); void func_801A0204(s8 seqId);
// void func_801A0238(void); // void func_801A0238(void);
// void func_801A026C(void); // void func_801A026C(void);
// void func_801A0318(void); // void func_801A0318(void);
@ -3893,10 +3893,10 @@ void func_801A0204(UNK_TYPE);
// void func_801A1904(void); // void func_801A1904(void);
// void func_801A1A10(void); // void func_801A1A10(void);
// void func_801A1A8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_801A1A8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
void func_801A1D44(Vec3f* vec, UNK_TYPE arg1, f32 arg2); void func_801A1D44(Vec3f* vec, u8 seqId, f32 arg2);
void func_801A1DB8(Vec3f* vec, UNK_TYPE arg1, f32 arg2); void func_801A1DB8(Vec3f* vec, u8 seqId, f32 arg2);
// void func_801A1E0C(void); // void func_801A1E0C(void);
void func_801A1F00(s32 arg0, s32 arg1); void func_801A1F00(u8 arg0, u16 seqId);
void func_801A1F88(void); void func_801A1F88(void);
// void func_801A1FB4(void); // void func_801A1FB4(void);
// void func_801A2090(void); // void func_801A2090(void);
@ -3909,20 +3909,20 @@ void func_801A246C(u8 param_1, u8 param_2);
// void func_801A27E8(void); // void func_801A27E8(void);
// void func_801A281C(void); // void func_801A281C(void);
void func_801A29D4(UNK_TYPE arg0, f32 arg1, UNK_TYPE arg2); void func_801A29D4(UNK_TYPE arg0, f32 arg1, UNK_TYPE arg2);
void func_801A2BB8(s32 arg0); void func_801A2BB8(s32 seqId);
void func_801A2C20(void); void func_801A2C20(void);
// void func_801A2C44(void); // void func_801A2C44(void);
// void func_801A2C88(void); // void func_801A2C88(void);
// void func_801A2D54(void); // void func_801A2D54(void);
s32 func_801A2DE0(UNK_TYPE4 arg1); s32 Audio_IsSequencePlaying(u8 seqId);
void func_801A2E54(s32 param_1); void func_801A2E54(s32 param_1);
void func_801A2ED8(void); void func_801A2ED8(void);
// void func_801A2F88(void); // void func_801A2F88(void);
// void func_801A3000(void); // void func_801A3000(void);
// void func_801A3038(void); // void func_801A3038(void);
void func_801A3098(u16 arg0); void func_801A3098(u16 seqId);
// void func_801A312C(void); // void func_801A312C(void);
void func_801A31EC(UNK_TYPE1 arg1, UNK_TYPE4 arg2, u8 arg3); void func_801A31EC(u16 seqId, s8 arg1, u8 arg2);
// void func_801A3238(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5); // void func_801A3238(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_801A32CC(void); // void func_801A32CC(void);
// void func_801A3590(void); // void func_801A3590(void);

View File

@ -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_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") #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2E54.s")

View File

@ -5,9 +5,9 @@ SaveContext gSaveContext;
void SaveContext_Init(void) { void SaveContext_Init(void) {
bzero(&gSaveContext, sizeof(gSaveContext)); bzero(&gSaveContext, sizeof(gSaveContext));
gSaveContext.playerForm = 0; gSaveContext.playerForm = 0;
gSaveContext.seqIndex = 0xFF; gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
gSaveContext.nightSeqIndex = 0xFF; gSaveContext.nightSeqIndex = 0xFF;
gSaveContext.unk_3F46 = 0; gSaveContext.unk_3F46 = NA_BGM_GENERAL_SFX;
gSaveContext.nextCutsceneIndex = 0xFFEF; gSaveContext.nextCutsceneIndex = 0xFFEF;
gSaveContext.cutsceneTrigger = 0; gSaveContext.cutsceneTrigger = 0;
gSaveContext.unk_3F4D = 0; gSaveContext.unk_3F4D = 0;

View File

@ -45,7 +45,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
gSaveContext.unk_3DC0 = 2000; gSaveContext.unk_3DC0 = 2000;
gSaveContext.naviTimer = 0; gSaveContext.naviTimer = 0;
gSaveContext.seqIndex = 0xFF; gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
gSaveContext.nightSeqIndex = 0xFF; gSaveContext.nightSeqIndex = 0xFF;
gSaveContext.eventInf[0] = 0; gSaveContext.eventInf[0] = 0;
gSaveContext.eventInf[1] = 0; gSaveContext.eventInf[1] = 0;
@ -66,7 +66,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND; gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND;
break; break;
case GAMEOVER_DEATH_FADE_OUT: case GAMEOVER_DEATH_FADE_OUT:
if (func_801A8A50(1) != 32) { if (func_801A8A50(1) != NA_BGM_GAME_OVER) {
func_80169F78(globalCtx); func_80169F78(globalCtx);
if (gSaveContext.respawnFlag != -7) { if (gSaveContext.respawnFlag != -7) {
gSaveContext.respawnFlag = -6; gSaveContext.respawnFlag = -6;

View File

@ -449,7 +449,7 @@ void Scene_HeaderCmdSoundSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
globalCtx->soundCtx.seqIndex = cmd->soundSettings.musicSeq; globalCtx->soundCtx.seqIndex = cmd->soundSettings.musicSeq;
globalCtx->soundCtx.nightSeqIndex = cmd->soundSettings.nighttimeSFX; 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); audio_setBGM(cmd->soundSettings.bgmId);
} }
} }

View File

@ -1005,7 +1005,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
} }
if (spB0->unk_0144 >= 10) { if (spB0->unk_0144 >= 10) {
Audio_QueueSeqCmd(0x8021); Audio_QueueSeqCmd(NA_BGM_CLEAR_BOSS | 0x8000);
} }
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DEAD_OLD); Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DEAD_OLD);
@ -1342,7 +1342,7 @@ void func_809DC78C(Actor* thisx, GlobalContext* globalCtx) {
if (D_809E0430 != 0) { if (D_809E0430 != 0) {
D_809E0430--; D_809E0430--;
if (D_809E0430 == 0) { if (D_809E0430 == 0) {
Audio_QueueSeqCmd(0x801B); Audio_QueueSeqCmd(NA_BGM_BOSS | 0x8000);
} }
} }
} }

View File

@ -449,7 +449,7 @@ void EnBigpo_SpawnCutsceneStage6(EnBigpo* this, GlobalContext* globalCtx) {
void EnBigpo_SpawnCutsceneStage7(EnBigpo* this) { void EnBigpo_SpawnCutsceneStage7(EnBigpo* this) {
this->idleTimer = 15; this->idleTimer = 15;
if (this->unkBool204 == false) { if (this->unkBool204 == false) {
func_801A2E54(0x38); func_801A2E54(NA_BGM_MINI_BOSS);
this->unkBool204 = true; this->unkBool204 = true;
} }
this->actionFunc = EnBigpo_SpawnCutsceneStage8; this->actionFunc = EnBigpo_SpawnCutsceneStage8;
@ -535,7 +535,7 @@ void EnBigpo_WarpingIn(EnBigpo* this, GlobalContext* globalCtx) {
if (this->idleTimer == 32) { if (this->idleTimer == 32) {
this->mainColor.a = 255; // fully visible this->mainColor.a = 255; // fully visible
if (this->unkBool204 == false) { if (this->unkBool204 == false) {
func_801A2E54(0x38); func_801A2E54(NA_BGM_MINI_BOSS);
this->unkBool204 = true; this->unkBool204 = true;
} }
EnBigpo_SetupIdleFlying(this); EnBigpo_SetupIdleFlying(this);

View File

@ -528,7 +528,7 @@ void func_8089B3D4(EnDinofos* this, GlobalContext* globalCtx) {
Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, 10.0f); Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, 10.0f);
this->unk_290++; this->unk_290++;
if (this->unk_290 == 10) { if (this->unk_290 == 10) {
func_801A2E54(0x38); func_801A2E54(NA_BGM_MINI_BOSS);
} }
sp28.x = this->actor.world.pos.x; sp28.x = this->actor.world.pos.x;
@ -547,7 +547,7 @@ void func_8089B3D4(EnDinofos* this, GlobalContext* globalCtx) {
void func_8089B4A4(EnDinofos* this) { void func_8089B4A4(EnDinofos* this) {
if (this->unk_290 < 10) { if (this->unk_290 < 10) {
func_801A2E54(0x38); func_801A2E54(NA_BGM_MINI_BOSS);
} }
Animation_PlayOnce(&this->skelAnime, &D_0600C974); Animation_PlayOnce(&this->skelAnime, &D_0600C974);
this->unk_2BC.x = (Math_SinS(this->actor.shape.rot.y + 0x200) * 123.0f) + this->actor.world.pos.x; this->unk_2BC.x = (Math_SinS(this->actor.shape.rot.y + 0x200) * 123.0f) + this->actor.world.pos.x;

View File

@ -464,7 +464,7 @@ void EnElforg_FreeFloating(EnElforg* this, GlobalContext* globalCtx) {
gSaveContext.inventory.strayFairies[gSaveContext.unk_48C8]++; gSaveContext.inventory.strayFairies[gSaveContext.unk_48C8]++;
func_801518B0(globalCtx, 0x11, NULL); func_801518B0(globalCtx, 0x11, NULL);
if (gSaveContext.inventory.strayFairies[(void)0, gSaveContext.unk_48C8] >= 15) { if (gSaveContext.inventory.strayFairies[(void)0, gSaveContext.unk_48C8] >= 15) {
func_801A3098(0x922); func_801A3098(NA_BGM_GET_ITEM | 0x900);
} }
} }
} }

View File

@ -543,7 +543,7 @@ void func_80962660(EnFu* this, GlobalContext* globalCtx) {
player->stateFlags1 |= 0x20; player->stateFlags1 |= 0x20;
this->unk_53C = 0; this->unk_53C = 0;
func_800BDC5C(&this->skelAnime, sAnimations, 3); func_800BDC5C(&this->skelAnime, sAnimations, 3);
func_801A2BB8(0x25); func_801A2BB8(NA_BGM_MINI_GAME_2);
if (this->unk_542 == 0) { if (this->unk_542 == 0) {
if (this->unk_546 == 1) { if (this->unk_546 == 1) {
func_80961EC8(globalCtx); func_80961EC8(globalCtx);
@ -805,7 +805,7 @@ void func_80962F4C(EnFu* this, GlobalContext* globalCtx) {
func_801A2C20(); func_801A2C20();
gSaveContext.unk_3DE0[4] = 0; gSaveContext.unk_3DE0[4] = 0;
gSaveContext.unk_3DD0[4] = 5; gSaveContext.unk_3DD0[4] = 5;
func_801A3098(0x922); func_801A3098(NA_BGM_GET_ITEM | 0x900);
func_8011B4E0(globalCtx, 1); func_8011B4E0(globalCtx, 1);
this->unk_54A = 3; this->unk_54A = 3;
func_809632D0(this); func_809632D0(this);

View File

@ -339,12 +339,12 @@ void EnGuruguru_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.params == 2) { if (this->actor.params == 2) {
if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 100.0f) { if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 100.0f) {
func_801A1DB8(&this->actor.projectedPos, 0x2E, 540.0f); func_801A1DB8(&this->actor.projectedPos, NA_BGM_SONG_OF_STORMS, 540.0f);
} }
return; return;
} }
if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 200.0f) { if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 200.0f) {
func_801A1D44(&this->actor.projectedPos, 0x2E, 540.0f); func_801A1D44(&this->actor.projectedPos, NA_BGM_SONG_OF_STORMS, 540.0f);
} }
if (this->unusedTimer != 0) { if (this->unusedTimer != 0) {
this->unusedTimer--; this->unusedTimer--;

View File

@ -860,7 +860,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
break; break;
case 0x3475: case 0x3475:
SET_FLAGS_START_RACE; SET_FLAGS_START_RACE;
func_800FD750(0x40); func_800FD750(NA_BGM_HORSE);
globalCtx->nextEntranceIndex = 0xCE50; globalCtx->nextEntranceIndex = 0xCE50;
globalCtx->unk_1887F = 5; globalCtx->unk_1887F = 5;
globalCtx->sceneLoadFlag = 0x14; globalCtx->sceneLoadFlag = 0x14;
@ -1107,7 +1107,7 @@ s32 func_808F4414(GlobalContext* globalCtx, EnIn* this, s32 arg2) {
break; break;
case 0x3475: case 0x3475:
SET_FLAGS_START_RACE; SET_FLAGS_START_RACE;
func_800FD750(0x40); func_800FD750(NA_BGM_HORSE);
globalCtx->nextEntranceIndex = 0xCE50; globalCtx->nextEntranceIndex = 0xCE50;
globalCtx->unk_1887F = 5; globalCtx->unk_1887F = 5;
globalCtx->sceneLoadFlag = 0x14; globalCtx->sceneLoadFlag = 0x14;

View File

@ -1699,7 +1699,7 @@ void func_80B4627C(EnInvadepoh* this, GlobalContext* globalCtx) {
} else { } else {
func_80B454BC(this, globalCtx); func_80B454BC(this, globalCtx);
func_80B452EC(this, globalCtx); func_80B452EC(this, globalCtx);
Audio_QueueSeqCmd(0x800D); Audio_QueueSeqCmd(NA_BGM_ALIEN_INVASION | 0x8000);
func_80B46F88(this); func_80B46F88(this);
} }
} else if (D_80B4E940 == 3) { } else if (D_80B4E940 == 3) {
@ -1987,7 +1987,7 @@ void func_80B46EE8(EnInvadepoh* this, GlobalContext* globalCtx) {
this->actionTimer--; this->actionTimer--;
if (this->actionTimer <= 0) { if (this->actionTimer <= 0) {
ActorCutscene_Stop(D_80B50404[0]); ActorCutscene_Stop(D_80B50404[0]);
Audio_QueueSeqCmd(0x800D); Audio_QueueSeqCmd(NA_BGM_ALIEN_INVASION | 0x8000);
func_80B46F88(this); func_80B46F88(this);
} }
} }
@ -2036,7 +2036,7 @@ void func_80B470E0(EnInvadepoh* this) {
void func_80B47108(EnInvadepoh* this, GlobalContext* globalCtx) { void func_80B47108(EnInvadepoh* this, GlobalContext* globalCtx) {
if (this->actionTimer == 100) { if (this->actionTimer == 100) {
func_801A3098(0x19); func_801A3098(NA_BGM_CLEAR_EVENT);
} }
this->actionTimer--; this->actionTimer--;
if (this->actionTimer <= 0) { if (this->actionTimer <= 0) {

View File

@ -811,7 +811,7 @@ void EnKakasi_DancingRemark(EnKakasi* this, GlobalContext* globalCtx) {
if (currentDay == 3 && gSaveContext.isNight) { if (currentDay == 3 && gSaveContext.isNight) {
EnKakasi_SetupDigAway(this); EnKakasi_SetupDigAway(this);
} else { } else {
func_801A2BB8(0x3E); func_801A2BB8(NA_BGM_SARIAS_SONG);
EnKakasi_SetupDanceNightAway(this); EnKakasi_SetupDanceNightAway(this);
} }
} }

View File

@ -751,7 +751,7 @@ void EnMa4_SetupHorsebackGameEnd(EnMa4* this, GlobalContext* globalCtx) {
gSaveContext.weekEventReg[0x8] &= (u8)~0x01; gSaveContext.weekEventReg[0x8] &= (u8)~0x01;
this->actionFunc = EnMa4_HorsebackGameEnd; this->actionFunc = EnMa4_HorsebackGameEnd;
Audio_QueueSeqCmd(NA_BGM_STOP); Audio_QueueSeqCmd(NA_BGM_STOP);
Audio_QueueSeqCmd(0x8041); Audio_QueueSeqCmd(NA_BGM_HORSE_GOAL | 0x8000);
} }
void EnMa4_HorsebackGameEnd(EnMa4* this, GlobalContext* globalCtx) { void EnMa4_HorsebackGameEnd(EnMa4* this, GlobalContext* globalCtx) {

View File

@ -903,7 +903,7 @@ void EnMaYto_SetupAfterMilkRunInit(EnMaYto* this) {
if (gSaveContext.weekEventReg[0x34] & 1) { // if (ProtectedCremia) if (gSaveContext.weekEventReg[0x34] & 1) { // if (ProtectedCremia)
EnMaYto_SetFaceExpression(this, 3, 1); EnMaYto_SetFaceExpression(this, 3, 1);
} else { } else {
func_801A3098(9); func_801A3098(NA_BGM_FAILURE_1);
EnMaYto_SetFaceExpression(this, 5, 2); EnMaYto_SetFaceExpression(this, 5, 2);
} }
this->actionFunc = EnMaYto_AfterMilkRunInit; this->actionFunc = EnMaYto_AfterMilkRunInit;

View File

@ -462,7 +462,7 @@ void EnMinifrog_BeginChoirCutscene(EnMinifrog* this, GlobalContext* globalCtx) {
ActorCutscene_Start(this->actor.cutscene, &this->actor); ActorCutscene_Start(this->actor.cutscene, &this->actor);
this->actionFunc = EnMinifrog_SetupNextFrogChoir; this->actionFunc = EnMinifrog_SetupNextFrogChoir;
this->timer = 5; this->timer = 5;
func_801A1F00(3, 0x5A); func_801A1F00(3, NA_BGM_FROG_SONG);
this->flags |= 0x100; this->flags |= 0x100;
globalCtx->setPlayerTalkAnim(globalCtx, &D_0400E2A8, 0); globalCtx->setPlayerTalkAnim(globalCtx, &D_0400E2A8, 0);
} else { } else {

View File

@ -367,7 +367,7 @@ void func_8095AE60(EnOwl* this, GlobalContext* globalCtx) {
void func_8095AEC0(EnOwl* this, GlobalContext* globalCtx) { void func_8095AEC0(EnOwl* this, GlobalContext* globalCtx) {
func_8095A920(this, globalCtx); func_8095A920(this, globalCtx);
if (func_8095A978(this, globalCtx, 0x7D0, 360.0f, 200.0f)) { if (func_8095A978(this, globalCtx, 0x7D0, 360.0f, 200.0f)) {
func_801A3098(0x45); func_801A3098(NA_BGM_OWL);
this->actionFunc = func_8095AE60; this->actionFunc = func_8095AE60;
} }
} }
@ -396,7 +396,7 @@ void func_8095AF2C(EnOwl* this, GlobalContext* globalCtx) {
void func_8095AFEC(EnOwl* this, GlobalContext* globalCtx) { void func_8095AFEC(EnOwl* this, GlobalContext* globalCtx) {
func_8095A920(this, globalCtx); func_8095A920(this, globalCtx);
if (func_8095A978(this, globalCtx, 0xBF6, 200.0f, 100.0f)) { if (func_8095A978(this, globalCtx, 0xBF6, 200.0f, 100.0f)) {
func_801A3098(0x45); func_801A3098(NA_BGM_OWL);
this->actionFunc = func_8095AF2C; this->actionFunc = func_8095AF2C;
this->unk_406 = 0; this->unk_406 = 0;
this->actionFlags |= 0x40; this->actionFlags |= 0x40;
@ -511,7 +511,7 @@ void func_8095B574(EnOwl* this, GlobalContext* globalCtx) {
func_8095A920(this, globalCtx); func_8095A920(this, globalCtx);
if (func_800B84D0(&this->actor, globalCtx)) { if (func_800B84D0(&this->actor, globalCtx)) {
this->actionFunc = func_8095BA84; this->actionFunc = func_8095BA84;
func_801A3098(0x45); func_801A3098(NA_BGM_OWL);
this->actionFlags |= 0x40; this->actionFlags |= 0x40;
this->unk_406 = 2; this->unk_406 = 2;
} else if (this->actor.xzDistToPlayer < 200.0f) { } else if (this->actor.xzDistToPlayer < 200.0f) {
@ -721,7 +721,7 @@ void func_8095BE0C(EnOwl* this, GlobalContext* globalCtx) {
func_8095A920(this, globalCtx); func_8095A920(this, globalCtx);
if (func_800B84D0(&this->actor, globalCtx)) { if (func_800B84D0(&this->actor, globalCtx)) {
this->actionFunc = func_8095BA84; this->actionFunc = func_8095BA84;
func_801A3098(0x45); func_801A3098(NA_BGM_OWL);
this->unk_406 = 1; this->unk_406 = 1;
this->actionFlags |= 0x40; this->actionFlags |= 0x40;
} else if (this->actor.textId == 0xBF0) { } else if (this->actor.textId == 0xBF0) {

View File

@ -590,9 +590,9 @@ void func_80BD9840(EnPamera* this, GlobalContext* globalCtx) {
func_80BD9904(this); func_80BD9904(this);
} }
if (gSaveContext.weekEventReg[14] & 4) { if (gSaveContext.weekEventReg[14] & 4) {
func_801A0204(0x27); func_801A0204(NA_BGM_MUSIC_BOX_HOUSE);
} else { } else {
func_801A0204(0x1F); func_801A0204(NA_BGM_INSIDE_A_HOUSE);
} }
} }

View File

@ -1054,7 +1054,7 @@ void EnPametfrog_LookAround(EnPametfrog* this, GlobalContext* globalCtx) {
this->actor.shape.rot.y = this->actor.world.rot.y; this->actor.shape.rot.y = this->actor.world.rot.y;
if (SkelAnime_Update(&this->skelAnime) && (func_801690CC(globalCtx) == 0)) { if (SkelAnime_Update(&this->skelAnime) && (func_801690CC(globalCtx) == 0)) {
if (!this->unk_2AE) { if (!this->unk_2AE) {
func_801A2E54(0x38); func_801A2E54(NA_BGM_MINI_BOSS);
this->unk_2AE = true; this->unk_2AE = true;
} }
EnPametfrog_SetupJumpToLink(this); EnPametfrog_SetupJumpToLink(this);
@ -1274,7 +1274,7 @@ void EnPametfrog_SetupTransitionGekkoSnapper(EnPametfrog* this, GlobalContext* g
void EnPametfrog_TransitionGekkoSnapper(EnPametfrog* this, GlobalContext* globalCtx) { void EnPametfrog_TransitionGekkoSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
if (this->actor.params == GEKKO_INIT_SNAPPER) { if (this->actor.params == GEKKO_INIT_SNAPPER) {
func_801A2E54(0x38); func_801A2E54(NA_BGM_MINI_BOSS);
EnPametfrog_SetupRunToSnapper(this); EnPametfrog_SetupRunToSnapper(this);
} }
} }

View File

@ -1139,7 +1139,7 @@ void func_80BAD230(EnSuttari* this, GlobalContext* globalCtx) {
this->textId = 0x2A31; this->textId = 0x2A31;
func_801518B0(globalCtx, this->textId, &this->actor); func_801518B0(globalCtx, this->textId, &this->actor);
this->flags1 |= 0x4000; this->flags1 |= 0x4000;
Audio_QueueSeqCmd(0x8003); Audio_QueueSeqCmd(NA_BGM_CHASE | 0x8000);
this->actionFunc = func_80BAD380; this->actionFunc = func_80BAD380;
} else { } else {
ActorCutscene_SetIntentToPlay(this->cutscenes[1]); ActorCutscene_SetIntentToPlay(this->cutscenes[1]);

View File

@ -337,7 +337,7 @@ void func_809C6C2C(EnSyatekiMan* this, GlobalContext* globalCtx) {
func_80123F2C(globalCtx, 80); func_80123F2C(globalCtx, 80);
this->unk_26A = 1; this->unk_26A = 1;
this->actionFunc = func_809C80C0; this->actionFunc = func_809C80C0;
func_801A2BB8(0x25); func_801A2BB8(NA_BGM_MINI_GAME_2);
break; break;
case 0xA32: case 0xA32:
@ -657,7 +657,7 @@ void func_809C7620(EnSyatekiMan* this, GlobalContext* globalCtx) {
func_80112AFC(globalCtx); func_80112AFC(globalCtx);
func_80123F2C(globalCtx, 0x63); func_80123F2C(globalCtx, 0x63);
this->unk_26A = 1; this->unk_26A = 1;
func_801A2BB8(0x25); func_801A2BB8(NA_BGM_MINI_GAME_2);
this->actionFunc = func_809C8808; this->actionFunc = func_809C8808;
break; break;
@ -1160,7 +1160,7 @@ void func_809C898C(EnSyatekiMan* this, GlobalContext* globalCtx) {
func_801A2C20(); func_801A2C20();
this->actionFunc = func_809C8BF0; this->actionFunc = func_809C8BF0;
if (this->unk_280 == 50) { if (this->unk_280 == 50) {
func_801A3098(0x922); func_801A3098(NA_BGM_GET_ITEM | 0x900);
func_8011B4E0(globalCtx, 1); func_8011B4E0(globalCtx, 1);
} }
} }

View File

@ -612,7 +612,7 @@ s32 func_80BA47E0(EnToto* this, GlobalContext* globalCtx) {
s32 func_80BA49A4(EnToto* this, GlobalContext* globalCtx) { s32 func_80BA49A4(EnToto* this, GlobalContext* globalCtx) {
func_800B7298(globalCtx, NULL, 0x44); func_800B7298(globalCtx, NULL, 0x44);
func_801A31EC(0x54, 4, this->unk2B3 ^ 0xF); func_801A31EC(NA_BGM_BALLAD_OF_THE_WIND_FISH, 4, this->unk2B3 ^ 0xF);
this->unk2B1 = 4; this->unk2B1 = 4;
return 0; return 0;
} }
@ -621,8 +621,8 @@ s32 func_80BA4A00(EnToto* this, GlobalContext* globalCtx) {
Actor* actor; Actor* actor;
if (DECR(this->unk2B1) == 0) { if (DECR(this->unk2B1) == 0) {
if (!func_801A2DE0(0x54)) { if (!Audio_IsSequencePlaying(NA_BGM_BALLAD_OF_THE_WIND_FISH)) {
actor = (Actor*)GET_PLAYER(globalCtx); // Needed for regalloc, possible FAKE MATCH actor = &GET_PLAYER(globalCtx)->actor;
actor = actor->next; actor = actor->next;
while (actor != NULL) { while (actor != NULL) {
Actor_MarkForDeath(actor); Actor_MarkForDeath(actor);

View File

@ -45,7 +45,7 @@ void Select_LoadGame(SelectContext* this, u32 entranceIndex, s32 opt) {
} }
gSaveContext.respawn[0].entranceIndex = 0xFFFF; gSaveContext.respawn[0].entranceIndex = 0xFFFF;
gSaveContext.seqIndex = 0xFF; gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
gSaveContext.nightSeqIndex = 0xFF; gSaveContext.nightSeqIndex = 0xFF;
gSaveContext.showTitleCard = true; gSaveContext.showTitleCard = true;
gSaveContext.respawnFlag = 0; gSaveContext.respawnFlag = 0;

View File

@ -127,7 +127,7 @@ void Title_Main(GameState* thisx) {
Title_UpdateCounters(this); Title_UpdateCounters(this);
Title_Draw(&this->gameState); Title_Draw(&this->gameState);
if (this->exit) { if (this->exit) {
gSaveContext.seqIndex = 0xFF; gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
gSaveContext.nightSeqIndex = 0xFF; gSaveContext.nightSeqIndex = 0xFF;
gSaveContext.gameMode = 1; gSaveContext.gameMode = 1;

View File

@ -3951,7 +3951,7 @@
0x801A2C44:("func_801A2C44",), 0x801A2C44:("func_801A2C44",),
0x801A2C88:("func_801A2C88",), 0x801A2C88:("func_801A2C88",),
0x801A2D54:("func_801A2D54",), 0x801A2D54:("func_801A2D54",),
0x801A2DE0:("func_801A2DE0",), 0x801A2DE0:("Audio_IsSequencePlaying",),
0x801A2E54:("func_801A2E54",), 0x801A2E54:("func_801A2E54",),
0x801A2ED8:("func_801A2ED8",), 0x801A2ED8:("func_801A2ED8",),
0x801A2F88:("func_801A2F88",), 0x801A2F88:("func_801A2F88",),

View File

@ -3469,7 +3469,7 @@ asm/non_matchings/code/code_8019AF00/func_801A2C20.s,func_801A2C20,0x801A2C20,0x
asm/non_matchings/code/code_8019AF00/func_801A2C44.s,func_801A2C44,0x801A2C44,0x11 asm/non_matchings/code/code_8019AF00/func_801A2C44.s,func_801A2C44,0x801A2C44,0x11
asm/non_matchings/code/code_8019AF00/func_801A2C88.s,func_801A2C88,0x801A2C88,0x33 asm/non_matchings/code/code_8019AF00/func_801A2C88.s,func_801A2C88,0x801A2C88,0x33
asm/non_matchings/code/code_8019AF00/func_801A2D54.s,func_801A2D54,0x801A2D54,0x23 asm/non_matchings/code/code_8019AF00/func_801A2D54.s,func_801A2D54,0x801A2D54,0x23
asm/non_matchings/code/code_8019AF00/func_801A2DE0.s,func_801A2DE0,0x801A2DE0,0x1D asm/non_matchings/code/code_8019AF00/Audio_IsSequencePlaying.s,Audio_IsSequencePlaying,0x801A2DE0,0x1D
asm/non_matchings/code/code_8019AF00/func_801A2E54.s,func_801A2E54,0x801A2E54,0x21 asm/non_matchings/code/code_8019AF00/func_801A2E54.s,func_801A2E54,0x801A2E54,0x21
asm/non_matchings/code/code_8019AF00/func_801A2ED8.s,func_801A2ED8,0x801A2ED8,0x2C asm/non_matchings/code/code_8019AF00/func_801A2ED8.s,func_801A2ED8,0x801A2ED8,0x2C
asm/non_matchings/code/code_8019AF00/func_801A2F88.s,func_801A2F88,0x801A2F88,0xF asm/non_matchings/code/code_8019AF00/func_801A2F88.s,func_801A2F88,0x801A2F88,0xF

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
3469 asm/non_matchings/code/code_8019AF00/func_801A2C44.s func_801A2C44 0x801A2C44 0x11
3470 asm/non_matchings/code/code_8019AF00/func_801A2C88.s func_801A2C88 0x801A2C88 0x33
3471 asm/non_matchings/code/code_8019AF00/func_801A2D54.s func_801A2D54 0x801A2D54 0x23
3472 asm/non_matchings/code/code_8019AF00/func_801A2DE0.s asm/non_matchings/code/code_8019AF00/Audio_IsSequencePlaying.s func_801A2DE0 Audio_IsSequencePlaying 0x801A2DE0 0x1D
3473 asm/non_matchings/code/code_8019AF00/func_801A2E54.s func_801A2E54 0x801A2E54 0x21
3474 asm/non_matchings/code/code_8019AF00/func_801A2ED8.s func_801A2ED8 0x801A2ED8 0x2C
3475 asm/non_matchings/code/code_8019AF00/func_801A2F88.s func_801A2F88 0x801A2F88 0xF