From a903f8b8bcc32d8f6c0a76ce5eeead271c297772 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 8 Sep 2024 22:26:01 +0200 Subject: [PATCH] Document `ACTOR_FLAG_SFX_` flags and functions (#2162) * Document `ACTOR_FLAG_SFX_` flags and functions * format --- include/functions.h | 12 ++-- include/z64actor.h | 16 ++---- src/code/z_actor.c | 55 ++++++++++++------- .../actors/ovl_Arms_Hook/z_arms_hook.c | 2 +- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 2 +- .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 2 +- .../actors/ovl_Arrow_Light/z_arrow_light.c | 2 +- .../ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c | 14 ++--- .../actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c | 2 +- .../ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 2 +- .../ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c | 2 +- .../ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 2 +- src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c | 2 +- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 4 +- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 8 +-- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 2 +- .../actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c | 2 +- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 10 ++-- .../ovl_Bg_Haka_Water/z_bg_haka_water.c | 4 +- .../ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c | 4 +- .../z_bg_hidan_firewall.c | 2 +- .../ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c | 4 +- .../ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 6 +- .../ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 4 +- .../ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 2 +- .../z_bg_hidan_rsekizou.c | 2 +- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 4 +- .../ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 2 +- .../ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c | 4 +- .../ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 2 +- .../ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 2 +- .../z_bg_jya_amishutter.c | 4 +- .../actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 2 +- .../actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 2 +- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 2 +- .../z_bg_jya_zurerukabe.c | 2 +- .../z_bg_menkuri_kaiten.c | 2 +- .../ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 8 +-- .../ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c | 2 +- .../ovl_Bg_Mizu_Water/z_bg_mizu_water.c | 4 +- .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 2 +- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 2 +- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 2 +- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 2 +- .../z_bg_spot00_hanebasi.c | 4 +- .../z_bg_spot02_objects.c | 2 +- .../z_bg_spot06_objects.c | 4 +- .../ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 2 +- .../ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c | 2 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 2 +- .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 2 +- .../z_bg_spot18_shutter.c | 4 +- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 12 ++-- .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 4 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 20 +++---- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 12 ++-- .../actors/ovl_Demo_Effect/z_demo_effect.c | 10 ++-- .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 6 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 2 +- src/overlays/actors/ovl_En_Bili/z_en_bili.c | 2 +- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 2 +- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 4 +- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 2 +- src/overlays/actors/ovl_En_Boom/z_en_boom.c | 2 +- src/overlays/actors/ovl_En_Box/z_en_box.c | 2 +- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 6 +- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 6 +- .../actors/ovl_En_Floormas/z_en_floormas.c | 4 +- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 4 +- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 4 +- .../actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 4 +- src/overlays/actors/ovl_En_Ny/z_en_ny.c | 2 +- .../actors/ovl_En_Po_Desert/z_en_po_desert.c | 4 +- .../actors/ovl_En_Po_Field/z_en_po_field.c | 6 +- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 10 ++-- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 6 +- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 12 ++-- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 2 +- .../actors/ovl_En_Stream/z_en_stream.c | 2 +- src/overlays/actors/ovl_En_Tr/z_en_tr.c | 8 +-- src/overlays/actors/ovl_En_Vali/z_en_vali.c | 2 +- .../actors/ovl_En_Yukabyun/z_en_yukabyun.c | 4 +- .../actors/ovl_Magic_Dark/z_magic_dark.c | 6 +- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 2 +- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 6 +- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 2 +- .../actors/ovl_player_actor/z_player.c | 8 +-- tools/disasm/ntsc-1.2/functions.txt | 14 ++--- 88 files changed, 227 insertions(+), 218 deletions(-) diff --git a/include/functions.h b/include/functions.h index ada903e586..4bcd52766b 100644 --- a/include/functions.h +++ b/include/functions.h @@ -404,12 +404,12 @@ void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4); void Player_PlaySfx(Player* player, u16 sfxId); void Actor_PlaySfx(Actor* actor, u16 sfxId); -void func_8002F850(PlayState* play, Actor* actor); -void func_8002F8F0(Actor* actor, u16 sfxId); -void func_8002F91C(Actor* actor, u16 sfxId); -void func_8002F948(Actor* actor, u16 sfxId); -void func_8002F974(Actor* actor, u16 sfxId); -void func_8002F994(Actor* actor, s32 timer); +void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor); +void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId); +void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId); +void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId); +void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId); +void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer); s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos); void Actor_DisableLens(PlayState* play); void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* playerEntry); diff --git a/include/z64actor.h b/include/z64actor.h index 91e715e5a5..42ac0c3bef 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -168,14 +168,10 @@ typedef struct ActorShape { // #define ACTOR_FLAG_18 (1 << 18) -// -#define ACTOR_FLAG_19 (1 << 19) - -// -#define ACTOR_FLAG_20 (1 << 20) - -// -#define ACTOR_FLAG_21 (1 << 21) +// Flags controlling the use of `Actor.sfx`. Do not use directly. +#define ACTOR_FLAG_SFX_ACTOR_POS_2 (1 << 19) // see Actor_PlaySfx_Flagged2 +#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 20) // see Actor_PlaySfx_FlaggedCentered1 +#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 21) // see Actor_PlaySfx_FlaggedCentered2 // ignores point lights but not directional lights (such as environment lights) #define ACTOR_FLAG_IGNORE_POINT_LIGHTS (1 << 22) @@ -196,8 +192,8 @@ typedef struct ActorShape { // Navi will still be able to hover over the actor, assuming `ACTOR_FLAG_ATTENTION_ENABLED` is set. #define ACTOR_FLAG_LOCK_ON_DISABLED (1 << 27) -// -#define ACTOR_FLAG_28 (1 << 28) +// Flag controlling the use of `Actor.sfx`. Do not use directly. See Actor_PlaySfx_FlaggedTimer +#define ACTOR_FLAG_SFX_TIMER (1 << 28) #define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5) #define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF) diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 069bca7fa9..e45d96552e 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1938,7 +1938,7 @@ void Actor_PlaySfx(Actor* actor, u16 sfxId) { Sfx_PlaySfxAtPos(&actor->projectedPos, sfxId); } -void func_8002F850(PlayState* play, Actor* actor) { +void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor) { s32 surfaceSfxOffset; if (actor->bgCheckFlags & BGCHECKFLAG_WATER) { @@ -1955,32 +1955,45 @@ void func_8002F850(PlayState* play, Actor* actor) { Sfx_PlaySfxAtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset); } -void func_8002F8F0(Actor* actor, u16 sfxId) { +/** + * Play a sfx at the actor's position using the shared flagged audio system + */ +void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= ACTOR_FLAG_19; - actor->flags &= ~(ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28); + actor->flags |= ACTOR_FLAG_SFX_ACTOR_POS_2; + actor->flags &= ~(ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_FLAG_SFX_TIMER); } -void func_8002F91C(Actor* actor, u16 sfxId) { +/** + * Play a sfx at the center of the screen using the shared flagged audio system + */ +void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= ACTOR_FLAG_20; - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_21 | ACTOR_FLAG_28); + actor->flags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_1; + actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_FLAG_SFX_TIMER); } -void func_8002F948(Actor* actor, u16 sfxId) { +/** + * Play a sfx at the center of the screen using the shared flagged audio system + */ +void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= ACTOR_FLAG_21; - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_28); + actor->flags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2; + actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_FLAG_SFX_TIMER); } -void func_8002F974(Actor* actor, u16 sfxId) { - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28); +/** + * Play a sfx at the actor's position using the shared flagged audio system + */ +void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId) { + actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | + ACTOR_FLAG_SFX_TIMER); actor->sfx = sfxId; } -void func_8002F994(Actor* actor, s32 timer) { - actor->flags |= ACTOR_FLAG_28; - actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21); +void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer) { + actor->flags |= ACTOR_FLAG_SFX_TIMER; + actor->flags &= ~(ACTOR_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2); // The sfx field is not used for an actual sound effect here. // Instead, it controls the tick speed of the timer sound effect. @@ -2507,15 +2520,15 @@ void Actor_Draw(PlayState* play, Actor* actor) { Fault_RemoveClient(&faultClient); } -void func_80030ED8(Actor* actor) { - if (actor->flags & ACTOR_FLAG_19) { +void Actor_UpdateFlaggedAudio(Actor* actor) { + if (actor->flags & ACTOR_FLAG_SFX_ACTOR_POS_2) { Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - } else if (actor->flags & ACTOR_FLAG_20) { + } else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) { Sfx_PlaySfxCentered(actor->sfx); - } else if (actor->flags & ACTOR_FLAG_21) { + } else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) { Sfx_PlaySfxCentered2(actor->sfx); - } else if (actor->flags & ACTOR_FLAG_28) { + } else if (actor->flags & ACTOR_FLAG_SFX_TIMER) { func_800F4C58(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1)); } else { Sfx_PlaySfxAtPos(&actor->projectedPos, actor->sfx); @@ -2687,7 +2700,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) { if (!OOT_DEBUG || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(69) == 0)) { if (actor->sfx != 0) { - func_80030ED8(actor); + Actor_UpdateFlaggedAudio(actor); } } diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 48b2a6c4d5..a2d9d98149 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -146,7 +146,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { return; } - func_8002F8F0(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG); + Actor_PlaySfx_Flagged2(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG); ArmsHook_CheckForCancel(this); if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) && diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 2dde5c416c..2cecc071cf 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -74,7 +74,7 @@ void ArrowFire_Charge(ArrowFire* this, PlayState* play) { this->actor.world.pos = arrow->actor.world.pos; this->actor.shape.rot = arrow->actor.shape.rot; - func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_ARROW_CHARGE_FIRE - SFX_FLAG); // if arrow has no parent, player has fired the arrow if (arrow->actor.parent == NULL) { diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index da5e1bc000..e75e5f288a 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -75,7 +75,7 @@ void ArrowIce_Charge(ArrowIce* this, PlayState* play) { this->actor.world.pos = arrow->actor.world.pos; this->actor.shape.rot = arrow->actor.shape.rot; - func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_ICE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_ARROW_CHARGE_ICE - SFX_FLAG); // if arrow has no parent, player has fired the arrow if (arrow->actor.parent == NULL) { diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 87546c713f..c330c0aa5c 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -74,7 +74,7 @@ void ArrowLight_Charge(ArrowLight* this, PlayState* play) { this->actor.world.pos = arrow->actor.world.pos; this->actor.shape.rot = arrow->actor.shape.rot; - func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_LIGHT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_ARROW_CHARGE_LIGHT - SFX_FLAG); // if arrow has no parent, player has fired the arrow if (arrow->actor.parent == NULL) { diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 9b30e3bbb6..8ff123e07e 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -232,7 +232,7 @@ void BgBdanObjects_OctoPlatform_RaiseToUpperPosition(BgBdanObjects* this, PlaySt Rumble_Request(0.0f, 120, 20, 10); this->timer = 11; } - func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_RISING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BUYOSTAND_RISING - SFX_FLAG); } } @@ -283,7 +283,7 @@ void BgBdanObjects_OctoPlatform_DescendWithBigOcto(BgBdanObjects* this, PlayStat player->actor.world.rot.y = player->actor.shape.rot.y; Rumble_Request(0.0f, 255, 30, 150); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG); if (this->timer != 0) { this->timer--; } @@ -360,7 +360,7 @@ void BgBdanObjects_RaiseToUpperPosition(BgBdanObjects* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_A); this->actionFunc = BgBdanObjects_DoNothing; } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_RISING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BUYOSTAND_RISING - SFX_FLAG); } } @@ -411,12 +411,12 @@ void BgBdanObjects_ChangeWaterBoxLevel(BgBdanObjects* this, PlayState* play) { Flags_UnsetSwitch(play, this->var.switchFlag); this->actionFunc = BgBdanObjects_WaitForSwitch; } - func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } else { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 75.0f, 0.5f)) { this->actionFunc = BgBdanObjects_WaitForTimerExpired; } - func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } play->colCtx.colHeader->waterBoxes[7].ySurface = this->dyna.actor.world.pos.y; } @@ -425,7 +425,7 @@ void BgBdanObjects_WaitForTimerExpired(BgBdanObjects* this, PlayState* play) { if (this->timer != 0) { this->timer--; } - func_8002F994(&this->dyna.actor, this->timer); // play ticking sound effect + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->timer); // play ticking sound effect if (this->timer == 0) { this->actionFunc = BgBdanObjects_ChangeWaterBoxLevel; } @@ -454,7 +454,7 @@ void BgBdanObjects_FallToLowerPos(BgBdanObjects* this, PlayState* play) { // Using `CAM_ID_NONE` here defaults to the active camera Play_CopyCamera(play, CAM_ID_MAIN, CAM_ID_NONE); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c index 783ea51244..dc5a1cba23 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c @@ -146,7 +146,7 @@ void BgDdanJd_MoveEffects(BgDdanJd* this, PlayState* play) { func_80033480(play, &dustPos, 5.0f, 1, 20, 60, 1); } if (this->ySpeed == SHORTCUT_Y_SPEED) { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index 7195811d4e..801475e3f3 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -147,7 +147,7 @@ void BgGndDarkmeiro_UpdateBlockTimer(BgGndDarkmeiro* this, PlayState* play) { timeLeft = CLAMP_MIN(this->timer1, this->timer2); if (timeLeft > 0) { - func_8002F994(&this->dyna.actor, timeLeft); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, timeLeft); } if ((this->timer1 >= 64) || (this->timer2 >= 64)) { Flags_SetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 8, 6)); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index 8773496bb4..46501d8b72 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -72,7 +72,7 @@ void BgGndFiremeiro_Sink(BgGndFiremeiro* this, PlayState* play) { this->dyna.actor.world.pos.y = sunkHeight; } - func_8002F948(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG); } if (this->timer > 0) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index 441455f3d1..75e44cb218 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -339,7 +339,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) { pos.x = thisx->world.pos.x - (60.0f * Math_SinS(this->dyna.unk_158)) + (Math_CosS(this->dyna.unk_158) * spread); pos.z = thisx->world.pos.z - (60.0f * Math_CosS(this->dyna.unk_158)) - (Math_SinS(this->dyna.unk_158) * spread); func_8002829C(play, &pos, &velocity, &sZeroVec, &sWhite, &sGray, 250, Rand_S16Offset(40, 15)); - func_8002F974(thisx, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index 563a67e3da..0ad951eab2 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -111,7 +111,7 @@ void BgHaka_Pull(BgHaka* this, PlayState* play) { } this->actionFunc = BgHaka_IdleOpened; } - func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } void BgHaka_IdleOpened(BgHaka* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index ce41d4717c..f4333df608 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -215,7 +215,7 @@ void BgHakaGate_StatueTurn(BgHakaGate* this, PlayState* play) { this->actionFunc = BgHakaGate_StatueIdle; this->dyna.unk_150 = 0.0f; } - func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } void BgHakaGate_FloorClosed(BgHakaGate* this, PlayState* play) { @@ -277,7 +277,7 @@ void BgHakaGate_GateOpen(BgHakaGate* this, PlayState* play) { this->dyna.actor.flags &= ~ACTOR_FLAG_4; this->actionFunc = BgHakaGate_DoNothing; } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index 5171623cbe..3bcaac0071 100644 --- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -147,7 +147,7 @@ void func_8087E10C(BgHakaMeganeBG* this, PlayState* play) { if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 640.0f, this->dyna.actor.velocity.y)) { - func_8002F974(&this->dyna.actor, NA_SE_EV_CHINETRAP_DOWN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_CHINETRAP_DOWN - SFX_FLAG); } if (this->unk_16A == 0) { @@ -159,7 +159,7 @@ void func_8087E10C(BgHakaMeganeBG* this, PlayState* play) { void func_8087E1E0(BgHakaMeganeBG* this, PlayState* play) { Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 16.0f / 3.0f); - func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); if (this->unk_16A != 0) { this->unk_16A--; @@ -173,7 +173,7 @@ void func_8087E1E0(BgHakaMeganeBG* this, PlayState* play) { void func_8087E258(BgHakaMeganeBG* this, PlayState* play) { this->dyna.actor.shape.rot.y += 0x180; - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } void func_8087E288(BgHakaMeganeBG* this, PlayState* play) { @@ -190,7 +190,7 @@ void func_8087E2D8(BgHakaMeganeBG* this, PlayState* play) { Actor_SetFocus(&this->dyna.actor, 50.0f); this->actionFunc = func_8087E34C; } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN); } } diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index bf908cd4bc..a86d14723b 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -282,7 +282,7 @@ void BgHakaSgami_Spin(BgHakaSgami* this, PlayState* play) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderScythe.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderScytheCenter.base); - func_8002F974(&this->actor, NA_SE_EV_ROLLCUTTER_MOTOR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ROLLCUTTER_MOTOR - SFX_FLAG); } void BgHakaSgami_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index e24478584e..c2f1616ea8 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -164,7 +164,7 @@ void BgHakaShip_CrashShake(BgHakaShip* this, PlayState* play) { this->dyna.actor.gravity = -1.0f; this->actionFunc = BgHakaShip_CrashFall; } - func_8002F974(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BLOCKSINK - SFX_FLAG); } void BgHakaShip_CrashFall(BgHakaShip* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index a017dcf17e..e914e070bf 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -232,7 +232,7 @@ void func_808801B8(BgHakaTrap* this, PlayState* play) { if ((D_80880F30 == 0) && (!Player_InCsMode(play))) { if (!Math_StepToF(&this->dyna.actor.world.pos.x, this->dyna.actor.home.pos.x, 0.5f)) { - func_8002F974(&this->dyna.actor, NA_SE_EV_TRAP_OBJ_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_TRAP_OBJ_SLIDE - SFX_FLAG); } else if (this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL) { D_80881018 |= 1; } else if (this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL_2) { @@ -262,7 +262,7 @@ void func_808802D8(BgHakaTrap* this, PlayState* play) { this->timer--; } - func_8002F974(&this->dyna.actor, NA_SE_EV_BURN_OUT - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BURN_OUT - SFX_FLAG); for (i = 0; i < 2; i++) { f32 rand = Rand_ZeroOne(); @@ -385,7 +385,7 @@ void func_808806BC(BgHakaTrap* this, PlayState* play) { } if (this->dyna.actor.velocity.y >= 0.01f) { - func_8002F974(&this->dyna.actor, NA_SE_EV_CHINETRAP_DOWN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_CHINETRAP_DOWN - SFX_FLAG); } if (this->timer == 0) { @@ -455,7 +455,7 @@ void func_80880AE8(BgHakaTrap* this, PlayState* play) { this->dyna.actor.shape.rot.z += this->dyna.actor.world.rot.z; if (this->dyna.actor.world.rot.z >= 0x1801) { - func_8002F974(&this->dyna.actor, NA_SE_EV_WIND_TRAP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WIND_TRAP - SFX_FLAG); } func_808809E4(this, play, this->dyna.actor.world.rot.z); @@ -466,7 +466,7 @@ void func_80880C0C(BgHakaTrap* this, PlayState* play) { this->timer--; } - func_8002F974(&this->dyna.actor, NA_SE_EV_WIND_TRAP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WIND_TRAP - SFX_FLAG); if (this->timer == 0) { this->timer = 1; diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index 588fddb5ed..d65e4a0519 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -85,9 +85,9 @@ void BgHakaWater_ChangeWaterLevel(BgHakaWater* this, PlayState* play) { } if (this->actor.home.pos.y < this->actor.world.pos.y) { - func_8002F948(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } else { - func_8002F948(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } if (Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y, 0.5f) != 0) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index 2195ec4ea6..832965b176 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -196,7 +196,7 @@ void BgHidanCurtain_WaitForTimer(BgHidanCurtain* this, PlayState* play) { this->actionFunc = BgHidanCurtain_TurnOn; } if ((this->type == 1) || (this->type == 3)) { - func_8002F994(&this->actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->actor, this->timer); } } @@ -230,7 +230,7 @@ void BgHidanCurtain_Update(Actor* thisx, PlayState* play2) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); if (!IS_CUTSCENE_LAYER) { - func_8002F974(&this->actor, NA_SE_EV_FIRE_PILLAR_S - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PILLAR_S - SFX_FLAG); } } else if ((this->type == 1) && Flags_GetTreasure(play, this->treasureFlag)) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index cd89e1fd16..559e7d5ec9 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -188,7 +188,7 @@ void BgHidanFirewall_Update(Actor* thisx, PlayState* play) { BgHidanFirewall_ColliderFollowPlayer(this, play); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - func_8002F974(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PLATE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index 202eea4241..1b4ecb10eb 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -102,7 +102,7 @@ void BgHidanFslift_Descend(BgHidanFslift* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); BgHidanFslift_SetupIdle(this); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); } BgHidanFslift_SetHookshotTargetPos(this); } @@ -113,7 +113,7 @@ void BgHidanFslift_Ascend(BgHidanFslift* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); BgHidanFslift_SetupIdle(this); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); } } else { BgHidanFslift_SetupIdle(this); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index e33330d8d1..6cd66ab586 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -170,7 +170,7 @@ void BgHidanFwbig_WaitForTimer(BgHidanFwbig* this, PlayState* play) { if (this->timer == 0) { this->actionFunc = BgHidanFwbig_Rise; } - func_8002F994(&this->actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->actor, this->timer); } void BgHidanFwbig_WaitForPlayer(BgHidanFwbig* this, PlayState* play) { @@ -236,9 +236,9 @@ void BgHidanFwbig_Update(Actor* thisx, PlayState* play) { if ((this->actor.home.pos.y - 200.0f) < this->actor.world.pos.y) { if (!IS_CUTSCENE_LAYER) { - func_8002F974(&this->actor, NA_SE_EV_BURNING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_BURNING - SFX_FLAG); } else if ((s16)this->actor.world.pos.x == -513) { - func_8002F974(&this->actor, NA_SE_EV_FLAME_OF_FIRE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FLAME_OF_FIRE - SFX_FLAG); } BgHidanFwbig_MoveCollider(this, play); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 0a4309f112..5c71725bc8 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -128,7 +128,7 @@ void func_80889C18(BgHidanKousi* this, PlayState* play) { BgHidanKousi_SetupAction(this, func_80889C90); } Actor_MoveXZGravity(&this->dyna.actor); - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } void func_80889C90(BgHidanKousi* this, PlayState* play) { @@ -139,7 +139,7 @@ void func_80889C90(BgHidanKousi* this, PlayState* play) { BgHidanKousi_SetupAction(this, func_80889D28); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index 8ea9f48b9d..ce4a6eb25b 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -157,7 +157,7 @@ void func_8088B268(BgHidanRock* this, PlayState* play) { this->timer = 5; } - func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } else { player->stateFlags2 &= ~PLAYER_STATE2_4; this->dyna.unk_150 = 0.0f; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index f170e28115..06c6346401 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -178,7 +178,7 @@ void BgHidanRsekizou_Update(Actor* thisx, PlayState* play) { } CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - func_8002F974(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); } Gfx* BgHidanRsekizou_DrawFireball(PlayState* play, BgHidanRsekizou* this, s16 frame, MtxF* mf, s32 a, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c index d0b7310bff..9b52993671 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c @@ -284,13 +284,13 @@ void BgHidanSekizou_Update(Actor* thisx, PlayState* play2) { if (this->unk_168[0] > 0) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - func_8002F974(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); } } else { if ((this->unk_168[0] > 0) || (this->unk_168[1] > 0) || (this->unk_168[2] > 0) || (this->unk_168[3] > 0)) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); - func_8002F974(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index b736d24e4c..1c20c4bf6a 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -188,7 +188,7 @@ void func_8088E7A8(BgHidanSima* this, PlayState* play) { this->timer = 20; this->actionFunc = func_8088E760; } - func_8002F974(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); } void func_8088E90C(BgHidanSima* this) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c index 0714a51c6c..b5d5f4f372 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c @@ -74,7 +74,7 @@ void func_8088F514(BgHidanSyoku* this, PlayState* play) { if (this->timer == 0) { func_8088F47C(this); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); } } @@ -86,7 +86,7 @@ void func_8088F5A0(BgHidanSyoku* this, PlayState* play) { if (this->timer == 0) { func_8088F47C(this); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index fc8bc31925..f257aa5ef4 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -192,7 +192,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) { pos.x = thisx->world.pos.x - (60.0f * Math_SinS(this->dyna.unk_158)) + (Math_CosS(this->dyna.unk_158) * spread); pos.z = thisx->world.pos.z - (60.0f * Math_CosS(this->dyna.unk_158)) - (Math_SinS(this->dyna.unk_158) * spread); func_8002829C(play, &pos, &velocity, &sZeroVec, &sWhite, &sGray, 250, Rand_S16Offset(40, 15)); - func_8002F974(thisx, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_PL_SLIP_ICE_LEVEL - SFX_FLAG); } BgIceObjects_CheckPits(this, play); } diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index 83df9766dd..0f81ee9373 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -165,7 +165,7 @@ void BgJya1flift_Move(BgJya1flift* this, PlayState* play) { BgJya1flift_ResetMoveDelay(this); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE3 - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c index b610da9e42..10548a1d16 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c +++ b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c @@ -93,7 +93,7 @@ void func_80893438(BgJyaAmishutter* this) { func_808934B0(this); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } } @@ -116,7 +116,7 @@ void func_8089350C(BgJyaAmishutter* this) { BgJyaAmishutter_SetupWaitForPlayer(this); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index 0c6a191db9..d234c42ab3 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -517,7 +517,7 @@ void func_80896ABC(BgJyaCobra* this, PlayState* play) { } this->dyna.unk_150 = 0.0f; - func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } void BgJyaCobra_Update(Actor* thisx, PlayState* play2) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index d26f9e400e..8b3375967e 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -119,7 +119,7 @@ void BgJyaLift_Move(BgJyaLift* this, PlayState* play) { BgJyaLift_SetFinalPosY(this); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_ELEVATOR_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index e0486556ca..212a74515a 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -190,7 +190,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, PlayState* play) { if (play->gameplayFrames % 4 == 0) { BgJyaMegami_SetupSpawnEffect(this, play, (this->crumbleIndex * 0.04f) + 0.05f); } - func_8002F974(&this->dyna.actor, NA_SE_EV_FACE_CRUMBLE_SLOW - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_FACE_CRUMBLE_SLOW - SFX_FLAG); } else if (this->lightTimer > 0) { this->lightTimer--; } diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c index 2786512bc6..1baa36c389 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c +++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c @@ -170,7 +170,7 @@ void func_8089B870(BgJyaZurerukabe* this, PlayState* play) { } D_8089B9C0[this->unk_168] = D_8089BA08[this->unk_168] * this->unk_16E; - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } void BgJyaZurerukabe_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c index 7b3e0b5b44..95b9bbb95d 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c @@ -51,7 +51,7 @@ void BgMenkuriKaiten_Update(Actor* thisx, PlayState* play) { BgMenkuriKaiten* this = (BgMenkuriKaiten*)thisx; if (!Flags_GetSwitch(play, this->dyna.actor.params) && DynaPolyActor_IsPlayerAbove(&this->dyna)) { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); this->dyna.actor.shape.rot.y += 0x80; } } diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index c2d7cfff8d..9dbf6f317e 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -290,9 +290,9 @@ void BgMizuMovebg_UpdateMain(BgMizuMovebg* this, PlayState* play) { } if (this->sfxFlags & 2) { if (this->dyna.actor.room == 0) { - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } else { - func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } } } @@ -312,7 +312,7 @@ void BgMizuMovebg_UpdateMain(BgMizuMovebg* this, PlayState* play) { this->sfxFlags |= 2; } if (this->sfxFlags & 2) { - func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } } break; @@ -367,7 +367,7 @@ void BgMizuMovebg_UpdateHookshotPlatform(BgMizuMovebg* this, PlayState* play) { this->sfxFlags |= 1; } if (this->sfxFlags & 1) { - func_8002F948(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ROLL_STAND_2 - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c index b92f747655..8805462c43 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c @@ -138,7 +138,7 @@ void BgMizuShutter_Move(BgMizuShutter* this, PlayState* play) { void BgMizuShutter_WaitForTimer(BgMizuShutter* this, PlayState* play) { if (this->timerMax != 0x3F * 20) { this->timer--; - func_8002F994(&this->dyna.actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->timer); if (this->timer == 0) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALDOOR_CLOSE); Flags_UnsetSwitch(play, BGMIZUSHUTTER_GET_SWITCH(&this->dyna.actor)); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index 141a4617bd..2a34e9862d 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -286,10 +286,10 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, PlayState* play) { if (this->targetY < this->actor.world.pos.y) { Rumble_Request(0.0f, 120, 20, 10); - func_8002F948(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } else if (this->targetY > this->actor.world.pos.y) { Rumble_Request(0.0f, 120, 20, 10); - func_8002F948(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index a1222249ca..67a1d8bc39 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -211,7 +211,7 @@ void func_808A3E54(BgMoriHineri* this, PlayState* play) { } } if ((sSubCamId >= CAM_ID_SUB_FIRST) && ((GET_ACTIVE_CAM(play)->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) { - func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 67fedc30b6..f2dbe45664 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -410,7 +410,7 @@ void BgPoEvent_BlockPush(BgPoEvent* this, PlayState* play) { BgPoEvent_CheckBlock(this); BgPoEvent_CheckBlock((BgPoEvent*)this->dyna.actor.parent); } - func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } void BgPoEvent_BlockReset(BgPoEvent* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index ec97d9a604..9b99aec877 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -135,7 +135,7 @@ void BgPoSyokudai_Update(Actor* thisx, PlayState* play) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); if (Flags_GetSwitch(play, this->actor.params)) { - func_8002F974(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); } this->flameTextureScroll++; } diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index caa1c6e897..3b1f559479 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -134,7 +134,7 @@ void func_808A91AC(BgRelayObjects* this, PlayState* play) { if (this->timer != 0) { this->timer--; } - func_8002F994(&this->dyna.actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->timer); } if ((this->timer == 0) || (this->unk_169 == play->roomCtx.curRoom.num)) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE); diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index c4e9946972..d2d7b8f08c 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -177,13 +177,13 @@ void BgSpot00Hanebasi_DrawbridgeRiseAndFall(BgSpot00Hanebasi* this, PlayState* p if (this->actionFunc == BgSpot00Hanebasi_DrawbridgeWait) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG); } } else { if (this->actionFunc == BgSpot00Hanebasi_DrawbridgeWait) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index 1d7cbed6ca..56f8649b10 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -178,7 +178,7 @@ void func_808ACB58(BgSpot02Objects* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP); this->actionFunc = func_808AC8FC; } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index d55b4e6ad7..c3dde47f41 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -256,7 +256,7 @@ void BgSpot06Objects_GateOpen(BgSpot06Objects* this, PlayState* play) { this->timer = 0; Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); } } @@ -506,5 +506,5 @@ void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* pl play->colCtx.colHeader->waterBoxes[LHWB_MAIN_2].ySurface = this->dyna.actor.world.pos.y; } - func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index f38397020b..113fdfad9e 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -125,7 +125,7 @@ void func_808B318C(BgSpot12Gate* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c index ef9e86b905..abbb7bd80b 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c @@ -109,7 +109,7 @@ void func_808B3604(BgSpot12Saku* this, PlayState* play) { func_808B3714(this); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALGATE_OPEN - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 4aafd3439f..1289560e2d 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -230,7 +230,7 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) { } } } - func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } void func_808B7D38(BgSpot18Basket* this) { diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c index fed7a4263e..4156815ddf 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c @@ -259,7 +259,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) { Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index af649f2e79..789921509e 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -109,7 +109,7 @@ void func_808B9698(BgSpot18Shutter* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP); this->actionFunc = func_808B95AC; } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG); } } @@ -125,7 +125,7 @@ void func_808B971C(BgSpot18Shutter* this, PlayState* play) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP); this->actionFunc = func_808B95AC; } else { - func_8002F974(&this->dyna.actor, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index 2574e5640c..3673771efa 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -113,12 +113,12 @@ void BgYdanHasi_MoveWater(BgYdanHasi* this, PlayState* play) { Flags_UnsetSwitch(play, this->type); this->actionFunc = BgYdanHasi_InitWater; } - func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } else { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 47.0f, 0.5f)) { this->actionFunc = BgYdanHasi_DecWaterTimer; } - func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG); } waterBox = &play->colCtx.colHeader->waterBoxes[1]; waterBox->ySurface = this->dyna.actor.world.pos.y; @@ -128,7 +128,7 @@ void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, PlayState* play) { if (this->timer != 0) { this->timer--; } - func_8002F994(&this->dyna.actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->timer); if (this->timer == 0) { this->actionFunc = BgYdanHasi_MoveWater; } @@ -153,13 +153,13 @@ void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, PlayState* play) { this->dyna.actor.draw = NULL; this->actionFunc = BgYdanHasi_SetupThreeBlocks; } else { - func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } } else if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f)) { - func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); } else { - func_8002F994(&this->dyna.actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->timer); } } diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index 3fe00945b0..fd0f8ac0b1 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -141,7 +141,7 @@ void func_808BEFF4(BgYdanMaruta* this, PlayState* play) { } this->dyna.actor.shape.rot.x += 0x360; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); - func_8002F974(&this->dyna.actor, NA_SE_EV_TOGE_STICK_ROLLING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_TOGE_STICK_ROLLING - SFX_FLAG); } void func_808BF078(BgYdanMaruta* this, PlayState* play) { @@ -178,7 +178,7 @@ void func_808BF108(BgYdanMaruta* this, PlayState* play) { this->dyna.actor.world.pos.x = (Math_CosS(this->dyna.actor.shape.rot.y) * temp) + this->dyna.actor.home.pos.x; this->dyna.actor.world.pos.z = (Math_SinS(this->dyna.actor.shape.rot.y) * temp) + this->dyna.actor.home.pos.z; - func_8002F974(&this->dyna.actor, NA_SE_EV_TRAP_OBJ_SLIDE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_TRAP_OBJ_SLIDE - SFX_FLAG); } void func_808BF1EC(BgYdanMaruta* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 0733975b37..e7aee5729e 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -1433,7 +1433,7 @@ void BossSst_HandRetreat(BossSst* this, PlayState* play) { inPosition = Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 0x200); inPosition &= Math_ScaledStepToS(&this->actor.shape.rot.z, this->actor.home.rot.z, 0x200); inPosition &= Math_ScaledStepToS(&this->handYRotMod, 0, 0x800); - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); if ((Math_SmoothStepToF(&this->actor.world.pos.y, ROOM_CENTER_Y + 250.0f, 0.5f, 70.0f, 5.0f) < 1.0f) && inPosition && (diff < 10.0f)) { this->timer = 8; @@ -1468,7 +1468,7 @@ void BossSst_HandReadySlam(BossSst* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.x, -0x1000, 0x100); Math_ApproachF(&this->actor.world.pos.x, player->actor.world.pos.x, 0.5f, 40.0f); Math_ApproachF(&this->actor.world.pos.z, player->actor.world.pos.z, 0.5f, 40.0f); - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } } @@ -1553,7 +1553,7 @@ void BossSst_HandReadySweep(BossSst* this, PlayState* play) { if (inPosition) { BossSst_HandSetupSweep(this); } else { - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } } @@ -1646,7 +1646,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) { BossSst_HandSetupRetreat(this); } - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } void BossSst_HandSetupReadyClap(BossSst* this) { @@ -1746,7 +1746,7 @@ void BossSst_HandClap(BossSst* this, PlayState* play) { } this->ready = true; } else { - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } this->actor.world.pos.x = (Math_SinS(this->actor.shape.rot.y) * this->radius) + sHead->actor.world.pos.x; @@ -1837,7 +1837,7 @@ void BossSst_HandGrab(BossSst* this, PlayState* play) { } else { this->actor.speed *= 1.26f; this->actor.speed = CLAMP_MAX(this->actor.speed, 70.0f); - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } if (this->colliderJntSph.base.atFlags & AT_HIT) { @@ -1964,7 +1964,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) { Player_PlaySfx(player, NA_SE_PL_BODY_HIT); } - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } void BossSst_HandSetupReel(BossSst* this) { @@ -2025,7 +2025,7 @@ void BossSst_HandReadyShake(BossSst* this, PlayState* play) { if ((diff < 30.0f) && inPosition) { BossSst_HandSetupShake(this); } else { - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } } @@ -2280,7 +2280,7 @@ void BossSst_HandRecover(BossSst* this, PlayState* play) { this->ready = true; } } - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } void BossSst_HandSetupFrozen(BossSst* this) { @@ -2406,7 +2406,7 @@ void BossSst_HandBreakIce(BossSst* this, PlayState* play) { BossSst_HandSetupRetreat(this); } - func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); } void BossSst_HandGrabPlayer(BossSst* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index d3c65de390..5d7e6e9144 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -207,11 +207,11 @@ void Demo6K_WaitForObject(Demo6K* this, PlayState* play) { void func_80966E04(Demo6K* this, PlayState* play) { if (play->csCtx.curFrame > 214) { - func_8002F948(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); } if (play->csCtx.curFrame > 264) { - func_8002F948(&this->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG); } if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[6] != NULL) && @@ -222,8 +222,8 @@ void func_80966E04(Demo6K* this, PlayState* play) { void func_80966E98(Demo6K* this, PlayState* play) { if (play->csCtx.curFrame < 353) { - func_8002F948(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); - func_8002F948(&this->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG); } if (play->csCtx.curFrame == 342) { @@ -300,7 +300,7 @@ void func_8096712C(Demo6K* this, PlayState* play) { this->timer2++; if ((play->sceneId == SCENE_INSIDE_GANONS_CASTLE) && (play->csCtx.curFrame < D_8096932C[this->actor.params - 3])) { - func_8002F974(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); } } @@ -465,7 +465,7 @@ void func_80967AD0(Demo6K* this, PlayState* play) { if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[1] != NULL)) { if (play->csCtx.actorCues[1]->id == 2) { this->unk_170++; - func_8002F948(&this->actor, NA_SE_EV_RAINBOW_SHOWER - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_RAINBOW_SHOWER - SFX_FLAG); } func_809691BC(this, play, 1); diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 4639979c7b..001af32b89 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -756,7 +756,7 @@ void DemoEffect_UpdateTimeWarpReturnFromChamberOfSages(DemoEffect* this, PlaySta DemoEffect_TimewarpShrink(shrinkProgress * 5.0f); } - func_8002F948(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); } /** @@ -780,7 +780,7 @@ void DemoEffect_UpdateTimeWarpTimeblock(DemoEffect* this, PlayState* play) { this->actor.scale.x = scale; this->actor.scale.z = scale; DemoEffect_TimewarpShrink(shrinkProgress); - func_8002F948(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); return; } @@ -793,7 +793,7 @@ void DemoEffect_UpdateTimeWarpTimeblock(DemoEffect* this, PlayState* play) { * This is an Update Func that is only ran for one frame. */ void DemoEffect_InitTimeWarpTimeblock(DemoEffect* this, PlayState* play) { - func_8002F948(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); if (SkelCurve_Update(play, &this->skelCurve)) { SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 60.0f, 59.0f, 0.0f); @@ -1494,10 +1494,10 @@ void DemoEffect_JewelSparkle(DemoEffect* this, PlayState* play, s32 spawnerCount void DemoEffect_PlayJewelSfx(DemoEffect* this, PlayState* play) { if (!DemoEffect_CheckForCue(this, play, 1)) { if (this->actor.params == sSfxJewelId[0]) { - func_8002F974(&this->actor, NA_SE_EV_SPIRIT_STONE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_SPIRIT_STONE - SFX_FLAG); } else if (sSfxJewelId[0] == 0) { sSfxJewelId[0] = this->actor.params; - func_8002F974(&this->actor, NA_SE_EV_SPIRIT_STONE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_SPIRIT_STONE - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index a51816bee3..fa10cef753 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -178,7 +178,7 @@ void DemoKekkai_TowerBarrier(DemoKekkai* this, PlayState* play) { } } if (!(this->sfxFlag & 1)) { - func_8002F974(&this->actor, NA_SE_EV_TOWER_BARRIER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TOWER_BARRIER - SFX_FLAG); } } @@ -226,7 +226,7 @@ void DemoKekkai_TrialBarrierDispel(Actor* thisx, PlayState* play) { this->orbScale = 0.0f; } if (this->orbScale != 0.0f) { - func_8002F974(&this->actor, NA_SE_EV_TOWER_ENERGY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TOWER_ENERGY - SFX_FLAG); } this->timer++; } @@ -260,7 +260,7 @@ void DemoKekkai_TrialBarrierIdle(Actor* thisx, PlayState* play) { gSaveContext.cutsceneTrigger = 1; } CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider2.base); - func_8002F974(&this->actor, NA_SE_EV_TOWER_ENERGY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TOWER_ENERGY - SFX_FLAG); } void DemoKekkai_DrawTrialBarrier(Actor* thisx, PlayState* play2) { diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index d1ee18c4d1..fef2174361 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -244,7 +244,7 @@ void func_809BCF68(EnBigokuta* this, PlayState* play) { } EffectSsGSplash_Spawn(play, &effectPos, NULL, NULL, 1, 800); if (this->actionFunc != func_809BE4A4) { - func_8002F974(&this->actor, NA_SE_EN_DAIOCTA_SPLASH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_DAIOCTA_SPLASH - SFX_FLAG); } } diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index dac6872172..d3c0271f0d 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -374,7 +374,7 @@ void EnBili_DischargeLightning(EnBili* this, PlayState* play) { } SkelAnime_Update(&this->skelAnime); - func_8002F974(&this->actor, NA_SE_EN_BIRI_SPARK - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_BIRI_SPARK - SFX_FLAG); if (this->timer != 0) { this->timer--; diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 962f50e34c..6aba2ef11a 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -147,7 +147,7 @@ void EnBom_Move(EnBom* this, PlayState* play) { } else { Math_StepToF(&this->actor.speed, 0.0f, 1.0f); if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -3.0f)) { - func_8002F850(play, &this->actor); + Actor_PlaySfx_SurfaceBomb(play, &this->actor); this->actor.velocity.y *= -0.3f; this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH; } else if (this->timer >= 4) { diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 27b8af3059..47b7da4c80 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -235,7 +235,7 @@ void EnBomChu_WaitForRelease(EnBomChu* this, PlayState* play) { //! and will cause a crash inside this function. EnBomChu_UpdateFloorPoly(this, this->actor.floorPoly, play); this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; // make chu targetable - func_8002F850(play, &this->actor); + Actor_PlaySfx_SurfaceBomb(play, &this->actor); this->actionFunc = EnBomChu_Move; } } @@ -342,7 +342,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 0x800); Math_ScaledStepToS(&this->actor.shape.rot.z, this->actor.world.rot.z, 0x800); - func_8002F8F0(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); } void EnBomChu_WaitForKill(EnBomChu* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 8127fd4622..2eb859805b 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -238,7 +238,7 @@ void EnBombf_Move(EnBombf* this, PlayState* play) { } else { Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 1.5f, 0.0f); if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -6.0f)) { - func_8002F850(play, &this->actor); + Actor_PlaySfx_SurfaceBomb(play, &this->actor); this->actor.velocity.y *= -0.5f; } else if (this->timer >= 4) { Actor_OfferCarry(&this->actor, play); diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 9940d74c13..ba2e6e2909 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -150,7 +150,7 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) { // Set xyz speed, move forward, and play the boomerang sound effect Actor_SetProjectileSpeed(&this->actor, 12.0f); Actor_MoveXZGravity(&this->actor); - func_8002F974(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG); // If the boomerang collides with EnItem00 or a Skulltula token, set grabbed pointer to pick it up collided = this->collider.base.atFlags & AT_HIT; diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 890bcf256d..f8f31956a9 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -486,7 +486,7 @@ void EnBox_SpawnIceSmoke(EnBox* this, PlayState* play) { f32 f0; this->iceSmokeTimer++; - func_8002F974(&this->dyna.actor, NA_SE_EN_MIMICK_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EN_MIMICK_BREATH - SFX_FLAG); if (Rand_ZeroOne() < 0.3f) { f0 = 2.0f * Rand_ZeroOne() - 1.0f; pos = this->dyna.actor.world.pos; diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index dc9bf033a3..d9b561492e 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -445,7 +445,7 @@ void EnEiyer_Glide(EnEiyer* this, PlayState* play) { EnEiyer_SetupStartAttack(this); } - func_8002F974(&this->actor, NA_SE_EN_EIER_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_EIER_FLY - SFX_FLAG); } void EnEiyer_StartAttack(EnEiyer* this, PlayState* play) { @@ -469,7 +469,7 @@ void EnEiyer_StartAttack(EnEiyer* this, PlayState* play) { this->actor.world.rot.x = -this->actor.shape.rot.x; Math_StepToF(&this->actor.speed, 5.0f, 0.3f); Math_ApproachS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 2, 0x71C); - func_8002F974(&this->actor, NA_SE_EN_EIER_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_EIER_FLY - SFX_FLAG); } void EnEiyer_DiveAttack(EnEiyer* this, PlayState* play) { @@ -484,7 +484,7 @@ void EnEiyer_DiveAttack(EnEiyer* this, PlayState* play) { this->collider.base.atFlags &= ~(AT_ON | AT_HIT); } - func_8002F974(&this->actor, NA_SE_EN_EIER_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_EIER_FLY - SFX_FLAG); } void EnEiyer_Land(EnEiyer* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index cb62c9d622..57659f2dea 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -526,9 +526,9 @@ void EnFd_SpinAndSpawnFire(EnFd* this, PlayState* play) { f32 rotSpeed; if ((this->spinTimer < 31) && (this->invincibilityTimer == 0)) { - func_8002F974(&this->actor, NA_SE_EN_FLAME_FIRE_ATTACK - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLAME_FIRE_ATTACK - SFX_FLAG); } else { - func_8002F974(&this->actor, NA_SE_EN_FLAME_ROLL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLAME_ROLL - SFX_FLAG); } if (DECR(this->spinTimer) != 0) { @@ -617,7 +617,7 @@ void EnFd_Run(EnFd* this, PlayState* play) { EnFd_GetPosAdjAroundCircle(&adjPos, this, this->runRadius, this->runDir); Math_SmoothStepToS(&this->actor.shape.rot.y, RAD_TO_BINANG(Math_FAtan2F(adjPos.x, adjPos.z)), 4, 0xFA0, 1); this->actor.world.rot = this->actor.shape.rot; - func_8002F974(&this->actor, NA_SE_EN_FLAME_RUN - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLAME_RUN - SFX_FLAG); if (this->skelAnime.curFrame == 6.0f || this->skelAnime.curFrame == 13.0f || this->skelAnime.curFrame == 28.0f) { Actor_PlaySfx(&this->actor, NA_SE_EN_FLAME_KICK); } diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 516a2ed6aa..997d40d1b4 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -580,7 +580,7 @@ void EnFloormas_Slide(EnFloormas* this, PlayState* play) { func_800286CC(play, &pos, &velocity, &accel, 450, 100); - func_8002F974(&this->actor, NA_SE_EN_FLOORMASTER_SLIDING - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLOORMASTER_SLIDING - SFX_FLAG); } void EnFloormas_Charge(EnFloormas* this, PlayState* play) { @@ -927,7 +927,7 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) { } } } - func_8002F974(&this->actor, NA_SE_EN_FLOORMASTER_RESTORE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLOORMASTER_RESTORE - SFX_FLAG); } void EnFloormas_SmallWait(EnFloormas* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index f3f0165a9a..4b460e5797 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -510,7 +510,7 @@ void EnFz_BlowSmoke(EnFz* this, PlayState* play) { } else if (this->timer >= 11) { isTimerMod8 = false; primAlpha = 150; - func_8002F974(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); if ((this->timer - 10) < 16) { // t < 26 primAlpha = (this->timer * 10) - 100; @@ -622,7 +622,7 @@ void EnFz_BlowSmokeStationary(EnFz* this, PlayState* play) { } else { isTimerMod8 = false; primAlpha = 150; - func_8002F974(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FREEZAD_BREATH - SFX_FLAG); if ((this->counter & 0x3F) >= 48) { primAlpha = 630 - ((this->counter & 0x3F) * 10); diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 28d8779629..0c5e3cf4e4 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -353,7 +353,7 @@ void func_80A4ED34(EnGs* this, PlayState* play) { (s16)Rand_ZeroFloat(50.0f) + 200, 40, 15); } - func_8002F974(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); if (this->unk_200++ >= 40) { this->unk_19E |= 0x10; this->actor.flags |= ACTOR_FLAG_4; @@ -380,7 +380,7 @@ void func_80A4ED34(EnGs* this, PlayState* play) { this->unk_19E |= 8; this->actionFunc = func_80A4F700; } else { - func_8002F974(&this->actor, NA_SE_EV_STONE_LAUNCH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_STONE_LAUNCH - SFX_FLAG); } Actor_MoveXZGravity(&this->actor); diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index 64a4b02589..82bd1b700d 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -221,7 +221,7 @@ void EnIceHono_CapturableFlame(EnIceHono* this, PlayState* play) { if (this->actor.xzDistToPlayer < 200.0f) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); } - func_8002F8F0(&this->actor, NA_SE_EV_FIRE_PILLAR_S - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_EV_FIRE_PILLAR_S - SFX_FLAG); } void EnIceHono_SetupActionDroppedFlame(EnIceHono* this) { @@ -348,7 +348,7 @@ void EnIceHono_Update(Actor* thisx, PlayState* play) { this->timer--; } if (this->actor.params == 0) { - func_8002F8F0(&this->actor, NA_SE_IT_FLAME - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_IT_FLAME - SFX_FLAG); } if ((this->actor.params == -1) || (this->actor.params == 0)) { this->unk_154 += 0x1111; diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index d0eac54fa0..1a06442304 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -225,7 +225,7 @@ void EnNy_Move(EnNy* this, PlayState* play) { s32 stoneTimer; if (!(this->unk_1F0 < this->actor.depthInWater)) { - func_8002F974(&this->actor, NA_SE_EN_NYU_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_NYU_MOVE - SFX_FLAG); } func_80ABCD40(this); stoneTimer = this->stoneTimer; diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index 626b9e880a..0764411926 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -130,7 +130,7 @@ void EnPoDesert_UpdateSpeedModifier(EnPoDesert* this) { } void EnPoDesert_WaitForPlayer(EnPoDesert* this, PlayState* play) { - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); if (this->actor.xzDistToPlayer < 200.0f && (this->currentPathPoint != 2 || play->actorCtx.lensActive)) { if (this->currentPathPoint == 2) { if (Play_InCsMode(play)) { @@ -161,7 +161,7 @@ void EnPoDesert_MoveToNextPoint(EnPoDesert* this, PlayState* play) { this->actor.world.rot.y = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos); Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y + 0x8000, 5, 0x400); this->actor.speed = sinf(this->speedModifier * (M_PI / 32.0f)) * 2.5f + 5.5f; - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); this->targetY = this->actor.home.pos.y - ((temp_f20 * this->yDiff) / this->initDistToNextPoint); if (temp_f20 < 40.0f) { if (this->currentPathPoint != 0) { diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index a0946648c6..e65fec05a1 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -495,7 +495,7 @@ void EnPoField_CirclePlayer(EnPoField* this, PlayState* play) { EnPoField_SpawnFlame(this); } EnPoField_CorrectYPos(this, play); - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } void EnPoField_Flee(EnPoField* this, PlayState* play) { @@ -523,7 +523,7 @@ void EnPoField_Flee(EnPoField* this, PlayState* play) { } else { EnPoField_CorrectYPos(this, play); } - func_8002F974(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } void EnPoField_Damage(EnPoField* this, PlayState* play) { @@ -690,7 +690,7 @@ void EnPoField_SoulInteract(EnPoField* this, PlayState* play) { if (this->actor.textId != 0x5005) { EnPoField_SoulUpdateProperties(this, -13); } else { - func_8002F974(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); } if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) { if (Message_ShouldAdvance(play)) { diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 54b3fadb85..63b4311d15 100644 --- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -168,7 +168,7 @@ void EnPoRelay_Idle(EnPoRelay* this, PlayState* play) { this->actor.textId = this->textId; Actor_OfferTalk(&this->actor, play, 250.0f); } - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } void EnPoRelay_Talk(EnPoRelay* this, PlayState* play) { @@ -178,7 +178,7 @@ void EnPoRelay_Talk(EnPoRelay* this, PlayState* play) { this->textId = this->actor.textId; EnPoRelay_SetupRace(this); } - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } void EnPoRelay_Race(EnPoRelay* this, PlayState* play) { @@ -250,7 +250,7 @@ void EnPoRelay_Race(EnPoRelay* this, PlayState* play) { } } this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec); - func_8002F974(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } void EnPoRelay_EndRace(EnPoRelay* this, PlayState* play) { @@ -264,7 +264,7 @@ void EnPoRelay_EndRace(EnPoRelay* this, PlayState* play) { this->actor.textId = this->textId; Actor_OfferTalk(&this->actor, play, 250.0f); } - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } void EnPoRelay_Talk2(EnPoRelay* this, PlayState* play) { @@ -284,7 +284,7 @@ void EnPoRelay_Talk2(EnPoRelay* this, PlayState* play) { this->actionTimer = 0; this->actionFunc = EnPoRelay_DisappearAndReward; } - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 70a6114653..9606a85cf0 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -591,9 +591,9 @@ void func_80ADA35C(EnPoSisters* this, PlayState* play) { this->actor.world.pos.y += (2.0f + 0.5f * Rand_ZeroOne()) * Math_SinS(this->unk_196 * 0x800); if (this->unk_22E.a == 255 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADA7F0) { if (this->actionFunc == func_80ADAC70) { - func_8002F974(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } else { - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } } @@ -1050,7 +1050,7 @@ void func_80ADBC88(EnPoSisters* this, PlayState* play) { func_80ADA10C(this); } } - func_8002F974(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); } void func_80ADBD38(EnPoSisters* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index fafee9e204..6205aaac94 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -488,7 +488,7 @@ void func_80ADEAC4(EnPoh* this, PlayState* play) { EnPoh_SetupIdle(this); } if (this->lightColor.a == 255) { - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } @@ -510,7 +510,7 @@ void EnPoh_Idle(EnPoh* this, PlayState* play) { } } if (this->lightColor.a == 255) { - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } @@ -539,7 +539,7 @@ void func_80ADEC9C(EnPoh* this, PlayState* play) { EnPoh_SetupAttack(this); } if (this->lightColor.a == 255) { - func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } } @@ -708,7 +708,7 @@ void func_80ADF894(EnPoh* this, PlayState* play) { this->actor.world.rot.y = this->actor.shape.rot.y; EnPoh_SetupIdle(this); } - func_8002F974(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_AWAY - SFX_FLAG); } void EnPoh_Death(EnPoh* this, PlayState* play) { @@ -808,7 +808,7 @@ void EnPoh_TalkRegular(EnPoh* this, PlayState* play) { if (this->actor.textId != 0x5005) { func_80ADFA90(this, -13); } else { - func_8002F974(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); } if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) { if (Message_ShouldAdvance(play)) { @@ -834,7 +834,7 @@ void EnPoh_TalkRegular(EnPoh* this, PlayState* play) { } void EnPoh_TalkComposer(EnPoh* this, PlayState* play) { - func_8002F974(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) { if (Message_ShouldAdvance(play)) { if (play->msgCtx.choiceIndex == 0) { diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 6d6f5baba0..44e7410969 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -202,7 +202,7 @@ void func_80AFC218(EnSiofuki* this, PlayState* play) { break; } } else { - func_8002F994(&this->dyna.actor, this->timer); + Actor_PlaySfx_FlaggedTimer(&this->dyna.actor, this->timer); } if ((PARAMS_GET_U((u16)this->dyna.actor.params, 12, 4) == EN_SIOFUKI_LOWERING) && diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index c5c3a56494..3d094eb73f 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -124,7 +124,7 @@ void EnStream_Update(Actor* thisx, PlayState* play) { EnStream* this = (EnStream*)thisx; this->actionFunc(this, play); - func_8002F948(thisx, NA_SE_EV_WHIRLPOOL - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(thisx, NA_SE_EV_WHIRLPOOL - SFX_FLAG); } void EnStream_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c index 8908dad6c8..e2d612d61b 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -135,7 +135,7 @@ void EnTr_CrySpellcast(EnTr* this, PlayState* play) { } else if (this->actor.child != NULL) { this->actor.child = NULL; } - func_8002F974(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); } void EnTr_DoNothing(EnTr* this, PlayState* play) { @@ -170,7 +170,7 @@ void EnTr_ChooseAction2(EnTr* this, PlayState* play) { EnTr_SetRotFromCue(this, play, this->cueChannel); break; } - func_8002F974(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); } } } @@ -200,7 +200,7 @@ void EnTr_FlyKidnapCutscene(EnTr* this, PlayState* play) { } if (play->csCtx.curFrame < 670) { - func_8002F974(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); } } } @@ -291,7 +291,7 @@ void EnTr_Reappear(EnTr* this, PlayState* play) { if (this->timer > 0) { this->timer--; } - func_8002F974(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_TWINROBA_FLY_DEMO - SFX_FLAG); } void EnTr_WaitToReappear(EnTr* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/src/overlays/actors/ovl_En_Vali/z_en_vali.c index 8654a0dc08..28b40fe9c9 100644 --- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -301,7 +301,7 @@ void EnVali_DischargeLightning(EnVali* this, PlayState* play) { } } - func_8002F974(&this->actor, NA_SE_EN_BIRI_SPARK - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_BIRI_SPARK - SFX_FLAG); } void EnVali_Lurk(EnVali* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 02196544f2..a3317eef79 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -94,7 +94,7 @@ void func_80B43AD4(EnYukabyun* this, PlayState* play) { this->actionfunc = func_80B43B6C; } Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 30.0f, 1.0f); - func_8002F974(&this->actor, NA_SE_EN_YUKABYUN_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_YUKABYUN_FLY - SFX_FLAG); } void func_80B43B6C(EnYukabyun* this, PlayState* play) { @@ -103,7 +103,7 @@ void func_80B43B6C(EnYukabyun* this, PlayState* play) { Actor_Kill(&this->actor); return; } - func_8002F974(&this->actor, NA_SE_EN_YUKABYUN_FLY - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_YUKABYUN_FLY - SFX_FLAG); } void EnYukabyun_Break(EnYukabyun* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index cab83bbb76..bbf6a50bba 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -133,9 +133,9 @@ void MagicDark_DiamondUpdate(Actor* thisx, PlayState* play) { gSaveContext.nayrusLoveTimer = nayrusLoveTimer + 1; if (nayrusLoveTimer < 1100) { - func_8002F974(thisx, NA_SE_PL_MAGIC_SOUL_NORMAL - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_PL_MAGIC_SOUL_NORMAL - SFX_FLAG); } else { - func_8002F974(thisx, NA_SE_PL_MAGIC_SOUL_FLASH - SFX_FLAG); + Actor_PlaySfx_Flagged(thisx, NA_SE_PL_MAGIC_SOUL_FLASH - SFX_FLAG); } } @@ -178,7 +178,7 @@ void MagicDark_OrbUpdate(Actor* thisx, PlayState* play) { s32 pad; Player* player = GET_PLAYER(play); - func_8002F974(&this->actor, NA_SE_PL_MAGIC_SOUL_BALL - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_PL_MAGIC_SOUL_BALL - SFX_FLAG); if (this->timer < 35) { MagicDark_DimLighting(play, this->timer * (1 / 45.0f)); Math_SmoothStepToF(&thisx->scale.x, this->scale * (1 / 12.000001f), 0.05f, 0.01f, 0.0001f); diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index 981b869447..ee4e7acc75 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -256,7 +256,7 @@ void MirRay_Update(Actor* thisx, PlayState* play) { MirRay_MakeShieldLight(this, play); if (this->reflectIntensity > 0.0f) { - func_8002F8F0(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); + Actor_PlaySfx_Flagged2(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); } } } diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 664b1a87fa..9157deeeeb 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -580,7 +580,7 @@ void func_80B8FEAC(ObjBean* this, PlayState* play) { } else { this->timer = 1; } - func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_GROW_UP - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_PLANT_GROW_UP - SFX_FLAG); } void func_80B8FF50(ObjBean* this) { @@ -676,7 +676,7 @@ void ObjBean_GrowWaterPhase2(ObjBean* this, PlayState* play) { if (this->stalkSizeMultiplier >= 0.1f) { // 100 Frames ObjBean_SetupGrowWaterPhase3(this); } - func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_TALLER - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_PLANT_TALLER - SFX_FLAG); } void ObjBean_SetupGrowWaterPhase3(ObjBean* this) { @@ -785,7 +785,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) { } else if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) { - func_8002F974(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_PL_PLANT_MOVE - SFX_FLAG); if (play->sceneId == SCENE_LOST_WOODS) { Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BEAN_LOST_WOODS); diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 5450d8650d..6d9318525c 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -252,7 +252,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { lightRadius = (this->litTimer * 200.0f) / 20.0f; } brightness = (u8)(Rand_ZeroOne() * 127.0f) + 128; - func_8002F974(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); + Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); } Lights_PointSetColorAndRadius(&this->lightInfo, brightness, brightness, 0, lightRadius); this->flameTexScroll++; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 14f1e1dff8..0a82afeed2 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -7530,7 +7530,7 @@ void func_8084029C(Player* this, f32 arg1) { if ((this->currentBoots == PLAYER_BOOTS_HOVER) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->hoverBootsTimer != 0)) { - func_8002F8F0(&this->actor, NA_SE_PL_HOBBERBOOTS_LV - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_HOBBERBOOTS_LV - SFX_FLAG); } else if (func_8084021C(this->unk_868, arg1, 29.0f, 10.0f) || func_8084021C(this->unk_868, arg1, 29.0f, 24.0f)) { Player_PlaySteppingSfx(this, this->speedXZ); if (this->speedXZ > 4.0f) { @@ -9181,7 +9181,7 @@ void Player_Action_80844708(Player* this, PlayState* play) { func_8083DF68(this, speedTarget, this->actor.shape.rot.y); if (func_8084269C(play, this)) { - func_8002F8F0(&this->actor, NA_SE_PL_ROLL_DUST - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_ROLL_DUST - SFX_FLAG); } Player_ProcessAnimSfxList(this, D_8085460C); @@ -10871,7 +10871,7 @@ void Player_UpdateBodyShock(PlayState* play, Player* this) { shockPos.z = (Rand_CenteredFloat(5.0f) + randBodyPart->z) - this->actor.world.pos.z; EffectSsFhgFlash_SpawnShock(play, &this->actor, &shockPos, shockScale, FHGFLASH_SHOCK_PLAYER); - func_8002F8F0(&this->actor, NA_SE_PL_SPARK - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_SPARK - SFX_FLAG); } } @@ -13792,7 +13792,7 @@ void Player_Action_8084FBF4(Player* this, PlayState* play) { } this->bodyShockTimer = 40; - func_8002F8F0(&this->actor, NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG + this->ageProperties->unk_92); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG + this->ageProperties->unk_92); } #if OOT_DEBUG diff --git a/tools/disasm/ntsc-1.2/functions.txt b/tools/disasm/ntsc-1.2/functions.txt index 03469ea75e..2d9b9f38af 100644 --- a/tools/disasm/ntsc-1.2/functions.txt +++ b/tools/disasm/ntsc-1.2/functions.txt @@ -436,12 +436,12 @@ func_8002F758 = 0x80023540; // type:func func_8002F7A0 = 0x80023588; // type:func Player_PlaySfx = 0x800235C4; // type:func Actor_PlaySfx = 0x80023610; // type:func -func_8002F850 = 0x8002363C; // type:func -func_8002F8F0 = 0x800236E0; // type:func -func_8002F91C = 0x80023714; // type:func -func_8002F948 = 0x80023748; // type:func -func_8002F974 = 0x8002377C; // type:func -func_8002F994 = 0x800237A4; // type:func +Actor_PlaySfx_SurfaceBomb = 0x8002363C; // type:func +Actor_PlaySfx_Flagged2 = 0x800236E0; // type:func +Actor_PlaySfx_FlaggedCentered1 = 0x80023714; // type:func +Actor_PlaySfx_FlaggedCentered2 = 0x80023748; // type:func +Actor_PlaySfx_Flagged = 0x8002377C; // type:func +Actor_PlaySfx_FlaggedTimer = 0x800237A4; // type:func func_8002F9EC = 0x800237FC; // type:func func_8002FA60 = 0x80023874; // type:func Actor_DrawFaroresWindPointer = 0x800239C4; // type:func @@ -451,7 +451,7 @@ Actor_InitContext = 0x8002425C; // type:func Actor_UpdateAll = 0x800243B0; // type:func Actor_FaultPrint = 0x8002484C; // type:func Actor_Draw = 0x800248C0; // type:func -func_80030ED8 = 0x80024B80; // type:func +Actor_UpdateFlaggedAudio = 0x80024B80; // type:func Actor_DrawLensOverlay = 0x80024C50; // type:func Actor_DrawLensActors = 0x80024DC4; // type:func func_800314B0 = 0x80024FF8; // type:func