diff --git a/include/audio.h b/include/audio.h index 0f1a1b40..ad600283 100644 --- a/include/audio.h +++ b/include/audio.h @@ -1,6 +1,8 @@ +#ifndef AUDIO_H +#define AUDIO_H typedef enum { - NONE, + SFX_NONE, BGM_CASTLE_TOURNAMENT, BGM_VAATI_MOTIF, BGM_TITLE_SCREEN, @@ -210,6 +212,8 @@ typedef enum { SFX_PLY_SHRINKING = 0x16F, SFX_PLY_GROW, + SFX_EZLO_UI = 0x173, + SFX_LAVA_TILE_STEP = 0x17B, SFX_LAVA_TILE_WOBBLE, SFX_LAVA_TILE_SINK, @@ -240,4 +244,18 @@ typedef enum { SFX_VO_CUCCO3, SFX_VO_CUCCO4, SFX_VO_CUCCO5, -} Sound; \ No newline at end of file + + SND_STOP_ALL = 0x80010000, + SONG_VOL_ZERO = 0x80020000, + SND_VOL_RESET_ALL = 0x80030000, + SND_VSYNC_OFF = 0x80040000, + SONG_STOP = 0x80050000, + SND_VSYNC_ON = 0x80060000, + SONG_VOL_FADE_OUT = 0x80080000, + SONG_VOL_RESET = 0x800B0000, + SONG_VOL_CHAN1_SILENT = 0x800D0000, + SONG_VOL_CHAN1_RESET = 0x800E0000, + SONG_RESET_UNK = 0x80100000, +} Sound; + +#endif // AUDIO_H diff --git a/include/fileScreen.h b/include/fileScreen.h index b5782093..629dae40 100644 --- a/include/fileScreen.h +++ b/include/fileScreen.h @@ -1,6 +1,7 @@ #ifndef FILESELECT_H #define FILESELECT_H +#include "audio.h" #include "global.h" #include "functions.h" #include "main.h" diff --git a/include/flags.h b/include/flags.h index 85e6937e..c68be93e 100644 --- a/include/flags.h +++ b/include/flags.h @@ -29,7 +29,7 @@ extern u32 gGlobalFlags; extern u32 gRoomFlags; enum { - NONE, + FLAG_NONE, /*0x01*/ LV0_CLEAR, /* */ /*0x02*/ LV1_CLEAR, /* */ /*0x03*/ LV2_CLEAR, /* */ diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c index 330e68b8..c37838f9 100644 --- a/src/enemy/gyorgMale.c +++ b/src/enemy/gyorgMale.c @@ -164,12 +164,12 @@ void sub_0804696C(Entity* this) { this->nonPlanarMovement = 0x100; this->spriteOrientation.flipY = 3; this->spriteRendering.b3 = 3; - SoundReq(0x2e); + SoundReq(BGM_BOSS_THEME); } if (this->actionDelay) { if (gRoomControls.roomOriginY + 0x258 > this->y.HALF.HI) { this->actionDelay = 0; - SoundReq(0xf7); + SoundReq(SFX_APPARATE); } } } diff --git a/src/ezloCap.c b/src/ezloCap.c index fce6880f..4272564f 100644 --- a/src/ezloCap.c +++ b/src/ezloCap.c @@ -1,3 +1,4 @@ +#include "audio.h" #include "global.h" #include "entity.h" #include "functions.h" @@ -159,7 +160,7 @@ void sub_0806DAE8(Entity* this) { break; } - SoundReq(0xcd); + SoundReq(SFX_TASK_COMPLETE); } // Unknown param_2 struct diff --git a/src/ezloNag.c b/src/ezloNag.c index 7d537a44..51628171 100644 --- a/src/ezloNag.c +++ b/src/ezloNag.c @@ -1,3 +1,4 @@ +#include "audio.h" #include "global.h" #include "entity.h" #include "functions.h" @@ -24,8 +25,6 @@ typedef struct { u8 unk13; } Element; -/////////////////////////////////////////////////////////////// - extern void sub_0805ECEC(u32, u32, u32, u32); extern void sub_0801CAD0(Element*); @@ -99,7 +98,7 @@ void sub_0801CF18(Element* arg0) { arg0->unk4 = 2; arg0->unk1 = 8; gUnk_0200AF00.ezloNagFuncIndex = 3; - SoundReq(0x173); + SoundReq(SFX_EZLO_UI); } } diff --git a/src/fileScreen.c b/src/fileScreen.c index 15280b3d..85fe12ba 100644 --- a/src/fileScreen.c +++ b/src/fileScreen.c @@ -216,7 +216,7 @@ static void HandleFileScreenEnter(void) { gScreen.controls.alphaBlend = BLDALPHA_BLEND(15, 10); gUnk_02024490.unk0 = 1; gMain.funcIndex = 1; - SoundReq(0x7); + SoundReq(BGM_FILE_SELECT); DoFade(4, 8); } @@ -438,14 +438,14 @@ void sub_08050940(void) { if (gUnk_02032EC0.lastState != mode) { SetFileSelectState(mode); - SoundReq(0x6A); + SoundReq(SFX_TEXTBOX_SELECT); } row_idx = (row_idx + num_rows) % num_rows; if (gUnk_02019EE0.unk6 != row_idx) { gUnk_02019EE0.unk6 = row_idx; sub_08050AFC(row_idx); - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } if (gUnk_02019EE0.saveStatus[gUnk_02019EE0.unk6] == SAVE_VALID) { @@ -589,14 +589,14 @@ void sub_08050C54(void) { case A_BUTTON: case START_BUTTON: if (column_idx == 0) { - SoundReq(0x80080000); + SoundReq(SONG_VOL_FADE_OUT); } gMenu.transitionTimer = 0xf; sub_080A7114(1); - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); break; case B_BUTTON: - SoundReq(0x6c); + SoundReq(SFX_MENU_CANCEL); SetFileSelectState(STATE_NONE); break; case DPAD_LEFT: @@ -614,7 +614,7 @@ void sub_08050C54(void) { } if (gMenu.column_idx != column_idx) { gMenu.column_idx = column_idx; - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } } @@ -667,7 +667,7 @@ void sub_08050DE4(void) { break; case A_BUTTON: case START_BUTTON: - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); if (gMenu.field_0x4 != row_idx) { sub_080A7114(2); CreateDialogBox(8, 0); @@ -678,7 +678,7 @@ void sub_08050DE4(void) { case B_BUTTON: row_idx = gMenu.field_0x4; gUnk_02000000->gameLanguage = gMenu.field_0x4; - SoundReq(0x6c); + SoundReq(SFX_MENU_CANCEL); SetFileSelectState(STATE_NONE); break; } @@ -692,7 +692,7 @@ void sub_08050DE4(void) { } if (gUnk_02000000->gameLanguage != row_idx) { gUnk_02000000->gameLanguage = row_idx; - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } } @@ -765,13 +765,13 @@ NONMATCH("asm/non_matching/fileScreen/sub_08050EF4.inc", void sub_08050EF4(void) case 3: gUnk_02019EE0.saves[gUnk_02019EE0.unk6].messageSpeed = gUnk_02019EE0.unk4; gUnk_02019EE0.saves[gUnk_02019EE0.unk6].brightnessPref = gUnk_02019EE0.unk5; - SoundReq(0x6c); + SoundReq(SFX_MENU_CANCEL); sub_080A7114(mode); SetActiveSave(gUnk_02019EE0.unk6); break; case 2: CreateDialogBox(8, 0); - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); default: case 1: sub_080A7114(mode); @@ -780,11 +780,11 @@ NONMATCH("asm/non_matching/fileScreen/sub_08050EF4.inc", void sub_08050EF4(void) case 0: if (gMenu.column_idx != column_idx) { gMenu.column_idx = column_idx; - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } else if (option != *p_option) { *p_option = option; LoadOptionsFromSave(gUnk_02019EE0.unk6); - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } break; } @@ -842,7 +842,7 @@ void sub_08051358(void) { if (gMenu.focusCoords[0] != 0x0b || gMenu.focusCoords[1] != 0x5) { gMenu.focusCoords[1] = 0x5; gMenu.focusCoords[0] = 0xb; - SoundReq(0x67); + SoundReq(SFX_TEXTBOX_NEXT); } } @@ -919,7 +919,7 @@ void sub_08051480(u32 c) { gMenu.unk13 = idx + 1; gSave.playerName[idx] = c; - sub_08051574(0x6b); + sub_08051574(SFX_6B); } u32 sub_080514BC(u32 a1) { @@ -939,9 +939,8 @@ u32 sub_080514BC(u32 a1) { } idx = gMenu.unk13; - if (idx == 0) { + if (idx == 0) return 0; - } c = gSave.playerName[idx - 1]; if (c - 0xa4 < 0x29) { @@ -955,11 +954,10 @@ u32 sub_080514BC(u32 a1) { case 0xE: return c; case 0xF: - if (c < 0xc3) { + if (c < 0xc3) return 0; - } else { + else return c + 10; - } default: return c; } @@ -984,9 +982,8 @@ u32 sub_080514BC(u32 a1) { case 0xe: return c - 0x33; case 0xf: - if (c > 0xf5) { + if (c > 0xf5) return c - 0x29; - } } } @@ -1025,10 +1022,10 @@ void sub_080515D4(void) { if (column_idx == 1) { CreateDialogBox(4, 0); sub_080A7114(2); - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); } else { SetFileSelectState(0); - SoundReq(0x6c); + SoundReq(SFX_MENU_CANCEL); } break; case DPAD_LEFT: @@ -1041,7 +1038,7 @@ void sub_080515D4(void) { if (gMenu.column_idx != column_idx) { gMenu.column_idx = column_idx; - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } } @@ -1122,20 +1119,20 @@ void sub_080517EC(void) { if (gUnk_02019EE0.unk7 < 3) { CreateDialogBox(2, 0); sub_080A7114(2); - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); break; } // fallthrough case B_BUTTON: gUnk_02019EE0.unk7 = 4; - SoundReq(0x6c); + SoundReq(SFX_MENU_CANCEL); SetFileSelectState(0); break; } temp = sub_080517B4(delta); if (temp != gUnk_02019EE0.unk7) { gUnk_02019EE0.unk7 = temp; - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } } diff --git a/src/game.c b/src/game.c index b56f4836..b7a1f757 100644 --- a/src/game.c +++ b/src/game.c @@ -105,13 +105,13 @@ void sub_080521A0(void) { } gMenu.transitionTimer = 0x3c; sub_080A7114(temp2); - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); break; } if (gMenu.field_0x3 != temp) { gMenu.field_0x3 = temp; sub_08052418(0, temp); - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } break; } @@ -170,7 +170,7 @@ void sub_080522F4(void) { break; case 0x1: sub_080A7114(2); - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); if (temp == 0) { DoFade(5, 8); } else { @@ -181,7 +181,7 @@ void sub_080522F4(void) { if (gMenu.field_0x3 != temp) { gMenu.field_0x3 = temp; sub_08052418(1, temp); - SoundReq(0x69); + SoundReq(SFX_TEXTBOX_CHOICE); } } break; diff --git a/src/intro.c b/src/intro.c index 9bc22124..4480e983 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1,3 +1,4 @@ +#include "audio.h" #include "global.h" #include "menu.h" #include "main.h" @@ -158,7 +159,7 @@ static void HandleTitlescreen(void) { UpdateSwordBgAffineData(); } sub_080A3210(); - SoundReq(3); // fanfare + SoundReq(BGM_TITLE_SCREEN); DoFade(6, 8); break; case 1: @@ -182,12 +183,12 @@ static void HandleTitlescreen(void) { advance = GetAdvanceState(); if (advance != ADVANCE_NONE) { if (advance == ADVANCE_KEY_PRESSED) { - SoundReq(0x6a); + SoundReq(SFX_TEXTBOX_SELECT); } else { advance = ADVANCE_NONE; } AdvanceIntroSequence(advance); - SoundReq(0x80080000); + SoundReq(SONG_VOL_FADE_OUT); } UpdatePressStartIcon(); if ((gIntroState.timer & 0x20) == 0) { @@ -242,7 +243,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) { gScreen.bg.bg1Control = 0xc09; gFadeControl.field_0x4 = 0x40; DoFade(6, 0x10); - SoundReq(0xf8); + SoundReq(SFX_F8); } } break; @@ -272,7 +273,7 @@ static void HandleTitlescreenAnimationIntro(void) { if (!gFadeControl.active) { gIntroState.subState = 1; gScreen.lcd.displayControl |= DISPCNT_BG2_ON; - SoundReq(0xF6); + SoundReq(SFX_EVAPORATE); } break; case 1: @@ -291,7 +292,7 @@ static void HandleTitlescreenAnimationIntro(void) { gIntroState.subState++; CreateObject(0xBD, 0, 0); DoFade(6, 16); - SoundReq(0xF8); + SoundReq(SFX_F8); } break; default: diff --git a/src/item14.c b/src/item14.c index 7ca56f53..acf87a63 100644 --- a/src/item14.c +++ b/src/item14.c @@ -1,4 +1,5 @@ #include "entity.h" +#include "audio.h" #include "functions.h" #include "player.h" #include "room.h" @@ -30,7 +31,7 @@ void sub_0805FBE8(Entity* this) { sub_0801766C(this); sub_0806F69C(this); sub_0805FC74(this); - SoundReq(0x13f); + SoundReq(SFX_ITEM_SWORD_BEAM); } void sub_0805FC74(Entity* this) { @@ -39,7 +40,7 @@ void sub_0805FC74(Entity* this) { if (--*(int*)&this->field_0x6c != -1) { GetNextFrame(this); sub_0806F69C(this); - ++this->actionDelay; + this->actionDelay++; if (this->type2 == 0) { sub_0800451C(this); } diff --git a/src/main.c b/src/main.c index eb0d9df1..ba938c55 100644 --- a/src/main.c +++ b/src/main.c @@ -1,3 +1,4 @@ +#include "audio.h" #include "global.h" #include "functions.h" #include "structures.h" @@ -201,7 +202,7 @@ u32 sub_08056134(void) { } void InitDMA() { - SoundReq(0x80040000); + SoundReq(SND_VSYNC_OFF); gScreen._6d = gScreen._6c; gScreen._6c = 0; @@ -214,7 +215,7 @@ void InitDMA() { } void sub_08056208() { - SoundReq(0x80060000); + SoundReq(SND_VSYNC_ON); gScreen._6c = gScreen._6d; gScreen._6d = 0; } diff --git a/src/manager/manager15.c b/src/manager/manager15.c index 87135c56..5e628829 100644 --- a/src/manager/manager15.c +++ b/src/manager/manager15.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "flags.h" #include "screen.h" #include "manager.h" @@ -80,7 +81,7 @@ void sub_0805A370(Manager15* this) { if (this->manager.unk_0d) { LoadRoomEntityList(&gUnk_080E4C08); this->manager.action = 3; - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); } } diff --git a/src/manager/manager27.c b/src/manager/manager27.c index b2e0e15a..feaee671 100644 --- a/src/manager/manager27.c +++ b/src/manager/manager27.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "flags.h" #include "functions.h" @@ -42,7 +43,7 @@ void sub_0805C894(Entity* this) { if (sub_0805C920(this)) { this->action = 2; this->actionDelay = 1; - SoundReq(0x11a); + SoundReq(SFX_EM_ARMOS_ON); } } @@ -58,7 +59,7 @@ void sub_0805C8B4(Entity* this) { } LoadPaletteGroup(gUnk_08108D20[this->field_0xf]); if (this->field_0xf == 0) { - SoundReq(0x11a); + SoundReq(SFX_EM_ARMOS_ON); } } if (sub_0805C920(this) == 0) { diff --git a/src/manager/manager30.c b/src/manager/manager30.c index 8cfde746..ece1698f 100644 --- a/src/manager/manager30.c +++ b/src/manager/manager30.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "manager.h" #include "flags.h" #include "functions.h" @@ -48,13 +49,13 @@ void Manager30_Main(Manager30* this) { case 0x317: // stepped on a red tile again this->manager.action = FAILED; - SoundReq(0x6d); + SoundReq(SFX_MENU_ERROR); break; case 0x318: // stepped on a blue tile // turn the tile into a red tile sub_0807B7D8(0x317, this->player_current_tile, this->manager.unk_0b); - SoundReq(0x6b); + SoundReq(SFX_6B); // decrease the number of remaining tiles and check if we're done if (--this->manager.unk_0e == 0) { this->manager.action = SUCCEEDED; @@ -89,7 +90,7 @@ void Manager30_Main(Manager30* this) { SetFlag(this->flag_succeeded); } } else { - SoundReq(0x72); + SoundReq(SFX_SECRET); } } } diff --git a/src/manager/manager5.c b/src/manager/manager5.c index ec7ee400..4cb39ca8 100644 --- a/src/manager/manager5.c +++ b/src/manager/manager5.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "manager.h" #include "flags.h" #include "functions.h" @@ -71,14 +72,14 @@ void sub_08057BA4(Manager5* this) { sub_08057CA4(this, this->unk_28, this->unk_2a); sub_0807B7D8(this->unk_30, this->unk_38 | (this->unk_3a << 6), this->unk_3c); this->manager.unk_0f++; - SoundReq(0x71); + SoundReq(SFX_HEART_GET); } else { if (!this->manager.unk_0f) return; sub_0807BA8C(this->unk_38 | (this->unk_3a << 6), this->unk_3c); sub_08057CA4(this, this->unk_2c, this->unk_2e); this->manager.unk_0f--; - SoundReq(0x71); + SoundReq(SFX_HEART_GET); } } @@ -95,10 +96,10 @@ void sub_08057C28(Manager5* this) { sub_08057CA4(this, this->unk_28, this->unk_2a); sub_0807B7D8(this->unk_30, this->unk_38 | (this->unk_3a << 6), this->unk_3c); this->manager.unk_0f++; - SoundReq(0x71); + SoundReq(SFX_HEART_GET); } else { if (this->unk_30 != 0x323) { - SoundReq(0x72); + SoundReq(SFX_SECRET); } DeleteManager(&this->manager); } diff --git a/src/manager/managerC.c b/src/manager/managerC.c index 72529c2f..f7092e7b 100644 --- a/src/manager/managerC.c +++ b/src/manager/managerC.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "manager.h" #include "flags.h" #include "structures.h" @@ -100,7 +101,7 @@ void sub_080588F8(ManagerC* this) { case 0xf0: this->unk_28 = this->unk_24.HALF.HI; this->manager.unk_0f = 0x2D; - SoundReq(0x8c); + SoundReq(SFX_BARREL_ROLL_STOP); } } } else { @@ -123,7 +124,7 @@ void sub_080588F8(ManagerC* this) { } if (ABS_DIFF_GT(this->unk_2c, this->unk_24.WORD, 0x100000)) { this->unk_2c = this->unk_24.WORD; - SoundReq(0x8b); + SoundReq(SFX_BARREL_ROLL); } } } @@ -213,7 +214,7 @@ void sub_08058B5C(ManagerC* this, u32 unk1) { gScreenTransition.playerStartPos.HALF.x = gUnk_081082E8[unk1 * 3]; gScreenTransition.playerStartPos.HALF.y = gUnk_081082E8[unk1 * 3 + 1]; gSave.unk7 = gUnk_081082E8[unk1 * 3 + 2]; - SoundReq(0x121); + SoundReq(SFX_STAIRS); } void sub_08058BC8(ManagerC* this) { diff --git a/src/npc/cow.c b/src/npc/cow.c index aeb62982..70674a1f 100644 --- a/src/npc/cow.c +++ b/src/npc/cow.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "player.h" #include "functions.h" @@ -216,7 +217,7 @@ void sub_0806924C(Entity* ent) { Cow_ShowDialogue(ent); sub_080791D0(); } - SoundReq(212); + SoundReq(SFX_VO_COW); ent->interactType = 0; } } diff --git a/src/npc/epona.c b/src/npc/epona.c index a79ccd48..8127eb92 100644 --- a/src/npc/epona.c +++ b/src/npc/epona.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "textbox.h" #include "player.h" @@ -83,7 +84,7 @@ void sub_08065AA4(Entity* this) { sub_08065A50(this); sub_080791D0(); } - SoundReq(0xD3); + SoundReq(SFX_VO_EPONA); this->interactType = 0; } } diff --git a/src/npc/simon.c b/src/npc/simon.c index 35397e80..65270b80 100644 --- a/src/npc/simon.c +++ b/src/npc/simon.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "functions.h" #include "room.h" @@ -35,7 +36,7 @@ void sub_0806C224(void) { void Simon_CreateChest(Entity* this) { CreateObjectWithParent(this, 0xf, 0x43, 0); SetTileType(0x73, COORD_TO_TILE(this), this->collisionLayer); - SoundReq(0x73); + SoundReq(SFX_SECRET_BIG); } void sub_0806C280(void) { diff --git a/src/npc/zelda.c b/src/npc/zelda.c index 90a40fc0..b284b6cf 100644 --- a/src/npc/zelda.c +++ b/src/npc/zelda.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "functions.h" #include "room.h" @@ -140,7 +141,7 @@ void sub_08066E80(Entity* ent, u8* param_2) { param_2[0x18]++; ent->field_0x20 = 0x20000; ent->frames.all &= 0xFE; - SoundReq(0x7C); + SoundReq(SFX_PLY_JUMP); } break; case 2: diff --git a/src/object/bird.c b/src/object/bird.c index 2b6f194b..acda3985 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "flags.h" #include "functions.h" @@ -95,7 +96,7 @@ void sub_0809D0AC(Entity* this) { this->height.WORD = 0; this->collisionLayer = 1; SetLocalFlag(0x45); - SoundReq(0x72); + SoundReq(SFX_SECRET); fx = CreateFx(this, 0x11, 0); if (fx != NULL) { sub_0806FAD8(this, fx); diff --git a/src/object/cloud.c b/src/object/cloud.c index a2637b6b..e7851f07 100644 --- a/src/object/cloud.c +++ b/src/object/cloud.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "room.h" #include "player.h" @@ -70,7 +71,7 @@ void sub_0809F548(Entity* this) { void sub_0809F5B0(Entity* this) { if (--this->actionDelay == 0) { - SoundReq(115); + SoundReq(SFX_SECRET_BIG); SetGlobalFlag(KUMOTATSUMAKI); LoadRoomEntityList(&gUnk_080DD750); DeleteThisEntity(); @@ -123,7 +124,7 @@ void sub_0809F69C(Entity* this) { this->actionDelay = 30; this->action = 4; gRoomControls.cameraTarget = &gPlayerEntity; - SoundReq(115); + SoundReq(SFX_SECRET_BIG); } } diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c index e71ddfc6..2140f167 100644 --- a/src/object/greatFairy.c +++ b/src/object/greatFairy.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "room.h" #include "screen.h" @@ -220,7 +221,7 @@ void GreatFairy_MiniRisingUpdate(Entity* this) { this->height.WORD -= 0x8000; if (this->height.HALF.HI == -20) { this->action = 2; - SoundReq(321); + SoundReq(SFX_HEART_CONTAINER_SPAWN); } else { if (((this->height.HALF.HI == -10) && (this->field_0xf == 0)) && (target = GreatFairy_CreateForm(this, DROPLET, 0), target != NULL)) { @@ -289,7 +290,7 @@ void GreatFairy_DropletInit(Entity* this) { this->spriteSettings.b.draw = 1; this->height.HALF.HI = 0; this->spritePriority.b0 = 5; - SoundReq(320); + SoundReq(SFX_140); } void GreatFairy_DropletUpdate(Entity* this) { @@ -328,7 +329,7 @@ void GreatFairy_BigRippleInit(Entity* this) { this->actionDelay = 120; this->spriteSettings.b.draw = 1; this->spritePriority.b0 = 5; - SoundReq(249); + SoundReq(SFX_TELEPORTER); } void GreatFairy_BigRippleUpdate(Entity* this) { @@ -520,7 +521,7 @@ void sub_080873D0(Entity* this) { void sub_080873FC(void) { Entity* ent; - SoundReq(0xf7); + SoundReq(SFX_APPARATE); gRoomControls.cameraTarget = NULL; while (ent = FindEntityInListBySubtype(0x6, 0x1b, 0x6), ent != NULL) { diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index f6858b50..6fad6461 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "flags.h" #include "functions.h" @@ -54,7 +55,7 @@ static void sub_0808E714(Entity* this) { this->action = 3; this->field_0x3c |= 0x10; sub_0805EC60(this); - SoundReq(0x141); + SoundReq(SFX_HEART_CONTAINER_SPAWN); } sub_08080CB4(this); } diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index 409c1d04..94a0881c 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "flags.h" #include "functions.h" diff --git a/src/object/minecart.c b/src/object/minecart.c index 53d1ff82..e86c814e 100644 --- a/src/object/minecart.c +++ b/src/object/minecart.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "functions.h" #include "room.h" @@ -85,7 +86,7 @@ void sub_080917DC(Entity* this) { gPlayerEntity.flags &= 0x7f; ResetPlayer(); sub_0807A108(); - SoundReq(0x7c); + SoundReq(SFX_PLY_JUMP); } } else { this->actionDelay = 0; @@ -153,7 +154,7 @@ void sub_080919AC(Entity* this) { } if (--this->field_0xf == 0xff) { - SoundReq(0x7b); + SoundReq(SFX_PLY_VO7); this->field_0xf = 0x3c; } @@ -182,7 +183,7 @@ void sub_080919AC(Entity* this) { gPlayerEntity.flags |= 0x80; sub_08004168(this); InitAnimationForceUpdate(this, this->animationState + 0xc); - SoundReq(0x78); + SoundReq(SFX_PLY_VO4); SoundReq(0x139); return; case 0x67: diff --git a/src/object/object49.c b/src/object/object49.c index 16bf7bb9..0479ce1f 100644 --- a/src/object/object49.c +++ b/src/object/object49.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "functions.h" #include "position.h" @@ -59,7 +60,7 @@ static void sub_0808F14C(Entity* this) { sub_0808F2B0(this); if (sub_08003FC4(this, 0x2000) == 0) { this->action++; - SoundReq(0x84); + SoundReq(SFX_WATER_SPLASH); } } diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index 912003b9..9236ce5c 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "flags.h" #include "player.h" @@ -62,7 +63,7 @@ void sub_0809E8EC(Entity* this) { if (--this->actionDelay == 0) { SetFlag(this->field_0x86.HWORD); sub_08078A90(0); - SoundReq(0x73); + SoundReq(SFX_SECRET_BIG); DeleteThisEntity(); } } diff --git a/src/object/windcrest.c b/src/object/windcrest.c index efc11dc4..ffd01ce6 100644 --- a/src/object/windcrest.c +++ b/src/object/windcrest.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "functions.h" #include "save.h" @@ -27,7 +28,7 @@ void sub_080A2124(Entity* this) { } void Windcrest_Unlock(Entity* this) { - SoundReq(0x72); + SoundReq(SFX_SECRET); gSave.windcrests = gSave.windcrests | 1 << (this->type2 + 0x18); CreateFx(this, 0x46, 0); } diff --git a/src/player.c b/src/player.c index e3038077..5c1e2b66 100644 --- a/src/player.c +++ b/src/player.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "player.h" #include "textbox.h" @@ -116,8 +117,8 @@ void sub_08070C3C(Entity* this) { this->spritePriority.b1 = 0; ResetPlayer(); sub_0807A108(); - SoundReq(0x7b); - SoundReq(0x85); + SoundReq(SFX_PLY_VO7); + SoundReq(SFX_FALL_HOLE); } void sub_08070CB4(Entity* this) { @@ -355,8 +356,8 @@ void sub_080710A8(Entity* this) { this->nonPlanarMovement = 0x100; sub_0807A108(); - SoundReq(0x7c); - SoundReq(0x78); + SoundReq(SFX_PLY_JUMP); + SoundReq(SFX_PLY_VO4); } void sub_08071130(Entity* this) { @@ -412,7 +413,7 @@ void sub_08071130(Entity* this) { this->previousActionFlag++; sub_08078F60(); this->field_0x42 = 0; - SoundReq(0x7d); + SoundReq(SFX_PLY_LAND); } void sub_08071208(Entity* this) { diff --git a/src/room.c b/src/room.c index f400ce7f..b940d37f 100644 --- a/src/room.c +++ b/src/room.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "entity.h" #include "area.h" #include "room.h" @@ -2240,7 +2241,7 @@ void sub_0804CD48(void) { if (CheckGlobalFlag(LV1_CLEAR)) { LoadRoomEntityList(&gUnk_080DF94C); } else { - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); gArea.musicIndex = gArea.pMusicIndex; } } @@ -2428,7 +2429,7 @@ void sub_0804CED8(void) { sub_0807AABC(&gPlayerEntity); LoadRoomEntityList(&gUnk_080E1814); } else { - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); gArea.musicIndex = gArea.pMusicIndex; } } @@ -2522,10 +2523,10 @@ void sub_0804CFB0(void) { if (!CheckFlags(0x31)) { if (gScreenTransition.field_0x38 == 0) { - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); } else { if (gScreenTransition.field_0x39 == 0) { - SoundReq(0x80050000); + SoundReq(SONG_STOP); sub_08078A90(3); } } @@ -2756,12 +2757,11 @@ u32 sub_0804D13C() { extern EntityData gUnk_080E49F4; void sub_0804D140(void) { - sub_0805308C(0x100); if (CheckGlobalFlag(LV4_CLEAR)) { LoadRoomEntityList(&gUnk_080E49F4); } else { - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); gArea.musicIndex = gArea.pMusicIndex; } } @@ -3090,7 +3090,7 @@ void sub_0804D384(void) { sub_08078A90(3); LoadRoomEntityList(&gUnk_080E72E4); gArea.musicIndex = gArea.pMusicIndex; - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); } } } @@ -3498,7 +3498,7 @@ u32 sub_0804D6C4() { } void sub_0804D6C8(void) { - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); gArea.musicIndex = gArea.pMusicIndex; } @@ -4508,7 +4508,7 @@ void sub_0804E3C4() { index = 0xE; } sub_0804B3C4(&gUnk_080F0E1C[index]); - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); } u32 sub_0804E45C() { @@ -4716,7 +4716,7 @@ extern EntityData gUnk_080F2E2C; void sub_0804E6E8(void) { if (!CheckGlobalFlag(OUTDOOR)) { gArea.musicIndex = gArea.pMusicIndex; - SoundReq(0x800b0036); + SoundReq(SONG_VOL_RESET | BGM_MINISH_CAP); } if (!CheckGlobalFlag(START)) { LoadRoomEntityList(&gUnk_080F2E2C); @@ -4733,7 +4733,7 @@ extern EntityData gUnk_080F2EC4; void sub_0804E72C(void) { if (!CheckGlobalFlag(OUTDOOR)) { gArea.musicIndex = gArea.pMusicIndex; - SoundReq(0x800b0036); + SoundReq(SONG_VOL_RESET | BGM_MINISH_CAP); } if (!CheckGlobalFlag(START)) { LoadRoomEntityList(&gUnk_080F2E94); @@ -4786,7 +4786,7 @@ void sub_0804E7DC(void) { } if (!CheckGlobalFlag(OUTDOOR)) { gArea.musicIndex = gArea.pMusicIndex; - SoundReq(0x800b0036); + SoundReq(SONG_VOL_RESET | BGM_MINISH_CAP); } if ((gPlayerState.flags.all & 8) == 0) { LoadRoomEntityList(&gUnk_080F31D8); diff --git a/src/script.c b/src/script.c index 494e0ae5..621b1c61 100644 --- a/src/script.c +++ b/src/script.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "flags.h" #include "entity.h" #include "area.h" @@ -1337,7 +1338,7 @@ void sub_0807EFD4(Entity* unk1, ScriptExecutionContext* unk2) { } void sub_0807EFE4(Entity* unk1, ScriptExecutionContext* unk2) { - SoundReq(0x80100000); + SoundReq(SONG_RESET_UNK); } void sub_0807EFF4(Entity* unk1, ScriptExecutionContext* unk2) { diff --git a/src/textbox.c b/src/textbox.c index 8e962960..ee31f8fc 100644 --- a/src/textbox.c +++ b/src/textbox.c @@ -1,4 +1,5 @@ #include "global.h" +#include "audio.h" #include "room.h" #include "entity.h" #include "functions.h" @@ -180,7 +181,7 @@ u32 sub_080565B4(void) { gUnk_02022780._89 = 1; gUnk_02022780._99 = 1; sub_08056F88(gUnk_02022780._3[0], gUnk_02022780._53); - SoundReq(0x65); + SoundReq(SFX_TEXTBOX_OPEN); } if (sub_08056CC0(1)) { @@ -195,7 +196,7 @@ u32 sub_080565F8(void) { gUnk_02022780._89 = 1; gUnk_02022780._99 = 3; sub_08056BDC(0); - SoundReq(0x66); + SoundReq(SFX_TEXTBOX_CLOSE); } if (sub_08056CC0(-1)) {