From d9f7ad89ad018ae036b3094ab01b3790c2311a2b Mon Sep 17 00:00:00 2001 From: theo3 Date: Sun, 28 Feb 2021 20:56:06 -0800 Subject: resolve sfx calls --- src/manager/manager15.c | 3 ++- src/manager/manager27.c | 5 +++-- src/manager/manager30.c | 7 ++++--- src/manager/manager5.c | 9 +++++---- src/manager/managerC.c | 7 ++++--- 5 files changed, 18 insertions(+), 13 deletions(-) (limited to 'src/manager') 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) { -- cgit v1.2.3 From 72dbd29bb9548462898de22ae437a0981c044d77 Mon Sep 17 00:00:00 2001 From: theo3 Date: Sun, 28 Feb 2021 23:11:11 -0800 Subject: Update EntityData struct --- src/manager/manager28.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/manager') diff --git a/src/manager/manager28.c b/src/manager/manager28.c index af59e09e..07cac266 100644 --- a/src/manager/manager28.c +++ b/src/manager/manager28.c @@ -86,10 +86,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) @@ -115,7 +115,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; } } -- cgit v1.2.3