summaryrefslogtreecommitdiff
path: root/src/manager
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/manager
parented3cf7d025a2053ea42dfbd791bc393c91cd385e (diff)
parent1c99c78d7476a5fd8f586f4ac53b297f2ca67459 (diff)
Merge pull request #144 from notyourav/pr
Implement audio mus/sfx enum
Diffstat (limited to 'src/manager')
-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
6 files changed, 21 insertions, 16 deletions
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) {