summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2021-03-22 01:31:55 -0700
committerGitHub <noreply@github.com>2021-03-22 01:31:55 -0700
commit8e3bebad007d5ba082ffb14aafbb2be94dfd8fcd (patch)
treee7c2acbaf8ff9f900487b36e01405a48bc5b2749 /src
parented3cf7d025a2053ea42dfbd791bc393c91cd385e (diff)
parent1c99c78d7476a5fd8f586f4ac53b297f2ca67459 (diff)
Merge pull request #144 from notyourav/pr
Implement audio mus/sfx enum
Diffstat (limited to 'src')
-rw-r--r--src/enemy/gyorgMale.c4
-rw-r--r--src/ezloNag.c5
-rw-r--r--src/fileScreen.c55
-rw-r--r--src/game.c8
-rw-r--r--src/intro.c13
-rw-r--r--src/item14.c5
-rw-r--r--src/loadRoom.c2
-rw-r--r--src/main.c5
-rw-r--r--src/manager/manager15.c3
-rw-r--r--src/manager/manager27.c5
-rw-r--r--src/manager/manager28.c6
-rw-r--r--src/manager/manager30.c7
-rw-r--r--src/manager/manager5.c9
-rw-r--r--src/manager/managerC.c7
-rw-r--r--src/npc/cow.c3
-rw-r--r--src/npc/epona.c3
-rw-r--r--src/npc/simon.c3
-rw-r--r--src/npc/zelda.c3
-rw-r--r--src/object/bird.c3
-rw-r--r--src/object/cloud.c5
-rw-r--r--src/object/greatFairy.c9
-rw-r--r--src/object/heartContainer.c3
-rw-r--r--src/object/itemOnGround.c1
-rw-r--r--src/object/minecart.c7
-rw-r--r--src/object/object49.c3
-rw-r--r--src/object/treeHidingPortal.c3
-rw-r--r--src/object/windcrest.c3
-rw-r--r--src/player.c11
-rw-r--r--src/room.c24
-rw-r--r--src/script.c3
-rw-r--r--src/textbox.c5
31 files changed, 123 insertions, 103 deletions
diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c
index 83a832ee..4b73349a 100644
--- a/src/enemy/gyorgMale.c
+++ b/src/enemy/gyorgMale.c
@@ -163,12 +163,12 @@ void sub_0804696C(Entity* this) {
this->speed = 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/ezloNag.c b/src/ezloNag.c
index 46c94d43..0ad98db7 100644
--- a/src/ezloNag.c
+++ b/src/ezloNag.c
@@ -1,3 +1,4 @@
+#include "audio.h"
#include "global.h"
#include "functions.h"
#include "textbox.h"
@@ -23,8 +24,6 @@ typedef struct {
u8 unk13;
} Element;
-///////////////////////////////////////////////////////////////
-
extern void sub_0805ECEC(u32, u32, u32, u32);
extern void sub_0801CAD0(Element*);
@@ -98,7 +97,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 068bb27b..b55977ca 100644
--- a/src/fileScreen.c
+++ b/src/fileScreen.c
@@ -223,7 +223,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);
}
@@ -445,14 +445,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) {
@@ -596,14 +596,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:
@@ -621,7 +621,7 @@ void sub_08050C54(void) {
}
if (gMenu.column_idx != column_idx) {
gMenu.column_idx = column_idx;
- SoundReq(0x69);
+ SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@@ -674,7 +674,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);
@@ -685,7 +685,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;
}
@@ -699,7 +699,7 @@ void sub_08050DE4(void) {
}
if (gUnk_02000000->gameLanguage != row_idx) {
gUnk_02000000->gameLanguage = row_idx;
- SoundReq(0x69);
+ SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@@ -772,13 +772,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);
@@ -787,11 +787,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;
}
@@ -849,7 +849,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);
}
}
@@ -926,7 +926,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) {
@@ -946,9 +946,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) {
@@ -962,11 +961,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;
}
@@ -990,9 +988,8 @@ u32 sub_080514BC(u32 a1) {
case 0xe:
return c - 0x33;
case 0xf:
- if (c > 0xf5) {
+ if (c > 0xf5)
return c - 0x29;
- }
}
}
@@ -1031,10 +1028,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:
@@ -1047,7 +1044,7 @@ void sub_080515D4(void) {
if (gMenu.column_idx != column_idx) {
gMenu.column_idx = column_idx;
- SoundReq(0x69);
+ SoundReq(SFX_TEXTBOX_CHOICE);
}
}
@@ -1128,20 +1125,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 d4f21b67..91940328 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 c8648715..e3ee0f9d 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -1,3 +1,4 @@
+#include "audio.h"
#include "global.h"
#include "main.h"
#include "entity.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) {
@@ -241,7 +242,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
gScreen.bg.bg1Control = 0xc09;
gFadeControl.field_0x4 = 0x40;
DoFade(6, 0x10);
- SoundReq(0xf8);
+ SoundReq(SFX_F8);
}
}
break;
@@ -271,7 +272,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:
@@ -290,7 +291,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 d9537b8b..5055a986 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/loadRoom.c b/src/loadRoom.c
index 6081af28..0bd68f75 100644
--- a/src/loadRoom.c
+++ b/src/loadRoom.c
@@ -51,7 +51,7 @@ void sub_0804B058(EntityData* dat) {
if ((dat != NULL) && *(u8*)dat != 0xff) {
uVar2 = 0;
do {
- if ((uVar2 < 0x20) && ((dat->type) == 3)) {
+ if ((uVar2 < 0x20) && ((dat->kind) == 3)) {
if (sub_08049D1C(uVar2) != 0) {
ent = LoadRoomEntity(dat);
if ((ent != NULL) && (ent->kind == 3)) {
diff --git a/src/main.c b/src/main.c
index 73674484..c17ba447 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"
@@ -205,7 +206,7 @@ u32 sub_08056134(void) {
}
void InitDMA() {
- SoundReq(0x80040000);
+ SoundReq(SND_VSYNC_OFF);
gScreen._6d = gScreen._6c;
gScreen._6c = 0;
@@ -218,7 +219,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 e3d97ea7..295f14c7 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((EntityData*)&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 5ef41a57..6540c1ad 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"
@@ -41,7 +42,7 @@ void sub_0805C894(Entity* this) {
if (sub_0805C920(this)) {
this->action = 2;
this->actionDelay = 1;
- SoundReq(0x11a);
+ SoundReq(SFX_EM_ARMOS_ON);
}
}
@@ -57,7 +58,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/manager28.c b/src/manager/manager28.c
index f6790624..1e2eb829 100644
--- a/src/manager/manager28.c
+++ b/src/manager/manager28.c
@@ -85,10 +85,10 @@ u32 Manager28_FindMatchingEntities(Manager28* this) {
EntityData* tmp = GetCurrentRoomProperty(this->manager.unk_0b);
if (!tmp)
return 0;
- for (; *((u8*)tmp) != 0xFF && !(tmp->type == 9 && tmp->subtype == 0x28); tmp++) {
+ for (; *((u8*)tmp) != 0xFF && !(tmp->kind == 9 && tmp->id == 0x28); tmp++) {
Entity* tmp2;
u32 i;
- if (tmp->type != 3)
+ if (tmp->kind != 3)
continue;
tmp2 = Manager28_FindMatchingEntity(tmp);
if (!tmp2)
@@ -114,7 +114,7 @@ Entity* Manager28_FindMatchingEntity(EntityData* unk1) {
y = unk1->yPos + gRoomControls.roomOriginY;
tmp = &gUnk_03003D90;
for (i = tmp->first; (u32)i != (u32)tmp; i = i->next) {
- if (x == i->x.HALF.HI && y == i->y.HALF.HI && unk1->subtype == i->id && 3 == i->kind && unk1->form == i->type) {
+ if (x == i->x.HALF.HI && y == i->y.HALF.HI && unk1->id == i->id && 3 == i->kind && unk1->type == i->type) {
return i;
}
}
diff --git a/src/manager/manager30.c b/src/manager/manager30.c
index 84101118..94f3be33 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"
@@ -46,13 +47,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;
@@ -87,7 +88,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 4681e754..fbb4da2e 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"
@@ -69,14 +70,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);
}
}
@@ -93,10 +94,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 5b564409..83b35412 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"
@@ -96,7 +97,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 {
@@ -119,7 +120,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);
}
}
}
@@ -209,7 +210,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 a6452f76..411b139f 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 "random.h"
@@ -210,7 +211,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 a3e8536f..1846d4f9 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"
@@ -84,7 +85,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 f1a683ed..20cb40e5 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"
@@ -32,7 +33,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 916bb4cd..c9a50cfb 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"
@@ -130,7 +131,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
context->unk_18++;
this->field_0x20 = 0x20000;
this->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 7f4bd844..fcf03eab 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 "save.h"
@@ -96,7 +97,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 0b7e7c0a..56b55984 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"
@@ -58,7 +59,7 @@ void sub_0809F548(Entity* this) {
void sub_0809F5B0(Entity* this) {
if (--this->actionDelay == 0) {
- SoundReq(115);
+ SoundReq(SFX_SECRET_BIG);
SetGlobalFlag(KUMOTATSUMAKI);
LoadRoomEntityList((EntityData*)&gUnk_080DD750);
DeleteThisEntity();
@@ -111,7 +112,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 3ec961eb..87afa483 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"
@@ -216,7 +217,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)) {
@@ -283,7 +284,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) {
@@ -322,7 +323,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) {
@@ -501,7 +502,7 @@ void sub_080873D0(Entity* this) {
void sub_080873FC(void) {
Entity* ent;
- SoundReq(0xf7);
+ SoundReq(SFX_APPARATE);
gRoomControls.cameraTarget = NULL;
while (ent = FindEntityByID(0x6, 0x1b, 0x6), ent != NULL) {
diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c
index 501bb7d7..046eb0aa 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"
@@ -51,7 +52,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 b30b1d33..351b21bd 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 5b347736..af74c357 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"
@@ -84,7 +85,7 @@ void sub_080917DC(Entity* this) {
gPlayerEntity.flags &= 0x7f;
ResetPlayer();
sub_0807A108();
- SoundReq(0x7c);
+ SoundReq(SFX_PLY_JUMP);
}
} else {
this->actionDelay = 0;
@@ -152,7 +153,7 @@ void sub_080919AC(Entity* this) {
}
if (--this->field_0xf == 0xff) {
- SoundReq(0x7b);
+ SoundReq(SFX_PLY_VO7);
this->field_0xf = 0x3c;
}
@@ -181,7 +182,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 b483e25a..82d39bd6 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 "coord.h"
@@ -58,7 +59,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 20833f0f..53f593bb 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"
@@ -60,7 +61,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 d2dc4431..b21c5ee0 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 "save.h"
#include "script.h"
@@ -22,7 +23,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 d34024b2..c542c062 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"
@@ -141,8 +142,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) {
@@ -379,8 +380,8 @@ void sub_080710A8(Entity* this) {
this->speed = 256;
sub_0807A108();
- SoundReq(0x7c);
- SoundReq(0x78);
+ SoundReq(SFX_PLY_JUMP);
+ SoundReq(SFX_PLY_VO4);
}
void sub_08071130(Entity* this) {
@@ -436,7 +437,7 @@ void sub_08071130(Entity* this) {
this->subAction++;
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 e196f379..0797da1d 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;
}
@@ -4506,7 +4506,7 @@ void sub_0804E3C4() {
index = 0xE;
}
sub_0804B3C4(&gUnk_080F0E1C[index]);
- SoundReq(0x80100000);
+ SoundReq(SONG_RESET_UNK);
}
u32 sub_0804E45C() {
@@ -4714,7 +4714,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);
@@ -4731,7 +4731,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);
@@ -4783,7 +4783,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 3f19bf23..0710080c 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"
@@ -1466,7 +1467,7 @@ void ScriptCommand_SoundReq3(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_SoundReq0x80100000(Entity* entity, ScriptExecutionContext* context) {
- SoundReq(0x80100000);
+ SoundReq(SONG_RESET_UNK);
}
void ScriptCommand_ModRupees(Entity* entity, ScriptExecutionContext* context) {
diff --git a/src/textbox.c b/src/textbox.c
index 3510e095..6a9cf031 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 "utils.h"
@@ -185,7 +186,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)) {
@@ -200,7 +201,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)) {