From 3add37c3a081241a4015f0ea84b534965047ff82 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sat, 7 Sep 2024 15:48:30 +0200 Subject: [PATCH] Fixup actor audio flags docs (#1682) * Fixup actor audio flags docs * format --- include/functions.h | 2 +- src/code/z_actor.c | 40 +++++++++---------- .../actors/ovl_Arms_Hook/z_arms_hook.c | 2 +- .../ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c | 4 +- .../actors/ovl_Demo_Effect/z_demo_effect.c | 4 +- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 2 +- .../actors/ovl_En_Hanabi/z_en_hanabi.c | 2 +- .../actors/ovl_En_Stream/z_en_stream.c | 2 +- .../actors/ovl_En_Takaraya/z_en_takaraya.c | 2 +- src/overlays/actors/ovl_En_Test6/z_en_test6.c | 2 +- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 2 +- src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c | 2 +- .../actors/ovl_Obj_Sound/z_obj_sound.c | 2 +- .../actors/ovl_Obj_Wturn/z_obj_wturn.c | 2 +- .../actors/ovl_player_actor/z_player.c | 23 +++++------ tools/disasm/functions.txt | 6 +-- tools/namefixer.py | 7 ++-- tools/sizes/code_functions.csv | 6 +-- 18 files changed, 56 insertions(+), 56 deletions(-) diff --git a/include/functions.h b/include/functions.h index 39493ff043..1cc08c1745 100644 --- a/include/functions.h +++ b/include/functions.h @@ -123,9 +123,9 @@ s32 Actor_HasNoRider(PlayState* play, Actor* horse); void Actor_PlaySfx(Actor* actor, u16 sfxId); 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_FlaggedCentered3(Actor* actor, u16 sfxId); void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId); void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer); void Actor_PlaySeq_FlaggedKamaroDance(Actor* actor); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 52684408e8..37d5d4cf1c 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -46,17 +46,17 @@ struct Actor* D_801ED920; // 2 funcs. 1 out of z_actor #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/object_bdoor/object_bdoor.h" -#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS (1 << 0) -#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 1) -#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 2) -#define ACTOR_AUDIO_FLAG_SFX_CENTERED_3 (1 << 3) +#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1 (1 << 0) +#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2 (1 << 1) // identical behavior to ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1 +#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 2) +#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 3) // identical behavior to ACTOR_AUDIO_FLAG_SFX_CENTERED_1 #define ACTOR_AUDIO_FLAG_SFX_TIMER (1 << 4) #define ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE (1 << 5) #define ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE (1 << 6) #define ACTOR_AUDIO_FLAG_SFX_ALL \ - (ACTOR_AUDIO_FLAG_SFX_TIMER | ACTOR_AUDIO_FLAG_SFX_CENTERED_3 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | \ - ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_ACTOR_POS) + (ACTOR_AUDIO_FLAG_SFX_TIMER | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | \ + ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1) #define ACTOR_AUDIO_FLAG_SEQ_ALL (ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE | ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE) #define ACTOR_AUDIO_FLAG_ALL (ACTOR_AUDIO_FLAG_SFX_ALL | ACTOR_AUDIO_FLAG_SEQ_ALL) @@ -2326,6 +2326,15 @@ void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor) { Audio_PlaySfx_AtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset); } +/** + * Play a sfx at the actor's position using the shared audioFlag system + */ +void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId) { + actor->sfxId = sfxId; + actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; + actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2; +} + /** * Play a sfx at the center of the screen using the shared audioFlag system */ @@ -2344,22 +2353,13 @@ void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) { actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2; } -/** - * Play a sfx at the center of the screen using the shared audioFlag system - */ -void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId) { - actor->sfxId = sfxId; - actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; - actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_3; -} - /** * Play a sfx at the actor's position using the shared audioFlag system */ void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId) { actor->sfxId = sfxId; actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; - actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS; + actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1; } void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer) { @@ -2781,16 +2781,16 @@ void Actor_UpdateFlaggedAudio(Actor* actor) { s32 sfxId = actor->sfxId; if (sfxId != NA_SE_NONE) { - if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) { + if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2) { AudioSfx_PlaySfx(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) { + } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) { Audio_PlaySfx(sfxId); - } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_3) { + } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) { Audio_PlaySfx_2(sfxId); } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_TIMER) { Audio_PlaySfx_AtPosWithChannelIO(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1)); - } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS) { + } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1) { Audio_PlaySfx_AtPos(&actor->projectedPos, sfxId); } } 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 8d35680b0f..422cf4908b 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -135,7 +135,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { return; } - Actor_PlaySfx_FlaggedCentered1(&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_Bg_Hakugin_Post/z_bg_hakugin_post.c b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c index 9fe77b05bb..fb1bfb074e 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Post/z_bg_hakugin_post.c @@ -801,7 +801,7 @@ void func_80A9CD14(BgHakuginPost* this, PlayState* play) { Audio_PlaySfx_2(NA_SE_EV_STONEDOOR_STOP); func_80A9CE00(this); } else { - Actor_PlaySfx_FlaggedCentered3(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG); } } @@ -879,7 +879,7 @@ void func_80A9D0B4(BgHakuginPost* this, PlayState* play) { Audio_PlaySfx_2(NA_SE_EV_STONEDOOR_STOP); func_80A9CC84(this); } else { - Actor_PlaySfx_FlaggedCentered3(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG); } } 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 9ed16ca917..9130b48564 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -216,7 +216,7 @@ void DemoEffect_FinishTimewarp(DemoEffect* this, PlayState* play) { this->actor.scale.x = scale; this->actor.scale.z = scale; DemoEffect_SetPerVertexAlpha(alphaScale); - Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_TIMETRIP_LIGHT - SFX_FLAG); } else { DemoEffect_SetPerVertexAlpha(1.0f); Actor_Kill(&this->actor); @@ -227,7 +227,7 @@ void DemoEffect_FinishTimewarp(DemoEffect* this, PlayState* play) { * Runs until animation plays to frame 59 and pauses it on frame 59. */ void DemoEffect_StartTimewarp(DemoEffect* this, PlayState* play) { - Actor_PlaySfx_FlaggedCentered3(&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); 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 67a867fc0d..5a4251bf41 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 @@ -324,7 +324,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { } if (this->isMoving) { - Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); } if (this->actor.speed != 0.0f) { diff --git a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c index 6e8d5c6e2d..faaae0db94 100644 --- a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c +++ b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c @@ -328,7 +328,7 @@ void func_80B23934(EnHanabi* this, PlayState* play) { if ((gSaveContext.save.entrance == ENTRANCE(TERMINA_FIELD, 1)) && (gSaveContext.sceneLayer == 7)) { if (play->csCtx.curFrame > 1650) { func_80B236C8(this, play); - Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_FIREWORKS_LAUNCH - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_FIREWORKS_LAUNCH - SFX_FLAG); } } 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 8e1f9fe887..db69575bc8 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -127,7 +127,7 @@ void EnStream_Update(Actor* thisx, PlayState* play) { EnStream* this = THIS; this->actionFunc(this, play); - Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_WHIRLPOOL - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_WHIRLPOOL - SFX_FLAG); } void EnStream_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c b/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c index 282367a267..2558d89067 100644 --- a/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c +++ b/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c @@ -261,7 +261,7 @@ void EnTakaraya_Talk(EnTakaraya* this, PlayState* play) { } void func_80ADF2D4(EnTakaraya* this) { - Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_SY_FOUND); + Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_SY_FOUND); Audio_PlaySubBgm(NA_BGM_TIMED_MINI_GAME); this->timer = 145; SET_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT); diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c index 69261490ed..b608e02cce 100644 --- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c +++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c @@ -776,7 +776,7 @@ void EnTest6_DoubleSoTCutscene(EnTest6* this, PlayState* play) { play->unk_18844 = false; } - Actor_PlaySfx_FlaggedCentered1(&player->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); + Actor_PlaySfx_Flagged2(&player->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); switch (this->timer) { case 119: 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 5f82028148..0dbebc240c 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -383,7 +383,7 @@ void MirRay_Update(Actor* thisx, PlayState* play) { MirRay_MakeShieldLight(this, play); if (this->reflectIntensity > 0.0f) { - Actor_PlaySfx_FlaggedCentered1(&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_Mir_Ray3/z_mir_ray3.c b/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c index 08b4bdcb58..4346a25068 100644 --- a/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c +++ b/src/overlays/actors/ovl_Mir_Ray3/z_mir_ray3.c @@ -139,7 +139,7 @@ void MirRay3_Update(Actor* thisx, PlayState* play) { } if (this->unk_214 > 0.1f) { - Actor_PlaySfx_FlaggedCentered1(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); + Actor_PlaySfx_Flagged2(&player->actor, NA_SE_IT_SHIELD_BEAM - SFX_FLAG); } Math_ApproachZeroF(&this->unk_214, 1.0f, 0.1f); diff --git a/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c b/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c index 51295590a9..b49724204c 100644 --- a/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c +++ b/src/overlays/actors/ovl_Obj_Sound/z_obj_sound.c @@ -54,7 +54,7 @@ void ObjSound_Update(Actor* thisx, PlayState* play) { if (this->sfxType != 0) { Actor_PlaySfx_Flagged(&this->actor, gAudioEnvironmentalSfx[this->actor.params]); } else { - Actor_PlaySfx_FlaggedCentered3(&this->actor, gAudioEnvironmentalSfx[this->actor.params]); + Actor_PlaySfx_FlaggedCentered2(&this->actor, gAudioEnvironmentalSfx[this->actor.params]); } } else if (this->unk_144) { if (this->soundType == OBJ_SOUND_TYPE_BGM) { diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c index 071b564f23..1ab5c274f5 100644 --- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c +++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c @@ -94,7 +94,7 @@ void func_808A7BA0(ObjWturn* this, PlayState* play) { if (Math_ScaledStepToS(&this->actor.shape.rot.z, -0x8000, 0x200)) { func_808A7C04(this, play); } - Actor_PlaySfx_FlaggedCentered3(&this->actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); + Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_EV_EARTHQUAKE - SFX_FLAG); Play_SetCameraRoll(play, this->subCamId, this->actor.shape.rot.z); } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 77672f335b..87bdb3bcc6 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -8702,7 +8702,7 @@ void func_8083BF54(PlayState* play, Player* this) { this->unk_AB8 = CLAMP(this->unk_AB8, 0.0f, var_fa1); if ((this->linearVelocity == 0.0f) && (fabsf(this->unk_AB8 - temp_fv1_2) > 2.0f)) { - Actor_PlaySfx_FlaggedCentered1(&this->actor, sfxId); + Actor_PlaySfx_Flagged2(&this->actor, sfxId); } this->actor.gravity -= this->unk_AB8 * 0.004f; @@ -11660,7 +11660,7 @@ void func_808445C4(PlayState* play, Player* this) { pos.y = (Rand_CenteredFloat(5.0f) + bodyPartsPos->y) - this->actor.world.pos.y; pos.z = (Rand_CenteredFloat(5.0f) + bodyPartsPos->z) - this->actor.world.pos.z; EffectSsFhgFlash_SpawnShock(play, &this->actor, &pos, scale, FHGFLASH_SHOCK_PLAYER); - Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_SPARK - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_SPARK - SFX_FLAG); } } @@ -14818,9 +14818,9 @@ void Player_Action_26(Player* this, PlayState* play) { func_8083CB58(this, speedTarget, this->actor.shape.rot.y); if (func_8083FBC4(play, this)) { - Actor_PlaySfx_FlaggedCentered1(&this->actor, (this->floorSfxOffset == NA_SE_PL_WALK_SNOW - SFX_FLAG) - ? NA_SE_PL_ROLL_SNOW_DUST - SFX_FLAG - : NA_SE_PL_ROLL_DUST - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, (this->floorSfxOffset == NA_SE_PL_WALK_SNOW - SFX_FLAG) + ? NA_SE_PL_ROLL_SNOW_DUST - SFX_FLAG + : NA_SE_PL_ROLL_DUST - SFX_FLAG); } Player_PlayAnimSfx(this, D_8085D61C); @@ -16439,7 +16439,7 @@ void Player_Action_56(Player* this, PlayState* play) { this->unk_B86[0] = 1; } else { speedTarget = 9.0f; - Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_ZORA_SWIM_LV - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_ZORA_SWIM_LV - SFX_FLAG); } // Y @@ -17743,8 +17743,7 @@ void Player_Action_83(Player* this, PlayState* play) { } this->shockTimer = 40; - Actor_PlaySfx_FlaggedCentered1(&this->actor, - this->ageProperties->voiceSfxIdOffset + (NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG)); + Actor_PlaySfx_Flagged2(&this->actor, this->ageProperties->voiceSfxIdOffset + (NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG)); } void Player_Action_84(Player* this, PlayState* play) { @@ -18745,7 +18744,7 @@ void Player_Action_95(Player* this, PlayState* play) { func_800AE930(&play->colCtx, Effect_GetByIndex(this->meleeWeaponEffectIndex[2]), &this->actor.world.pos, 2.0f, this->currentYaw, this->actor.floorPoly, this->actor.floorBgId); - Actor_PlaySfx_FlaggedCentered1(&this->actor, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG)); + Actor_PlaySfx_Flagged2(&this->actor, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG)); } } @@ -18773,7 +18772,7 @@ void func_808576BC(PlayState* play, Player* this) { } if (var_v0 > 0x1770) { - Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_GORON_SLIP - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_GORON_SLIP - SFX_FLAG); } if (func_8083F8A8(play, this, 12.0f, -1 - (var_v0 >> 0xC), (var_v0 >> 0xA) + 1.0f, (var_v0 >> 7) + 160, 20, true)) { @@ -19045,7 +19044,7 @@ void Player_Action_96(Player* this, PlayState* play) { if ((gSaveContext.magicState == MAGIC_STATE_IDLE) && (gSaveContext.save.saveInfo.playerData.magic >= 2) && (this->av2.actionVar2 >= 0x36B0)) { this->av1.actionVar1++; - Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_GORON_BALL_CHARGE - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_GORON_BALL_CHARGE - SFX_FLAG); } else { this->av1.actionVar1 = 4; } @@ -20169,7 +20168,7 @@ void Player_CsAction_32(PlayState* play, Player* this, CsCmdActorCue* cue) { if (this->skelAnime.animation == &gPlayerAnim_cl_nigeru) { Player_PlayAnimSfx(this, D_8085DA48); } else if (this->skelAnime.animation == &gPlayerAnim_alink_rakkatyu) { - Actor_PlaySfx_FlaggedCentered1(&this->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); + Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_FLYING_AIR - SFX_FLAG); } else { Player_CsAnimHelper_PlayAnimSfxLostHorse(this); } diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 27b465c246..44274859a8 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -803,9 +803,9 @@ 0x800B8E58:("Player_PlaySfx",), 0x800B8EC8:("Actor_PlaySfx",), 0x800B8EF4:("Actor_PlaySfx_SurfaceBomb",), - 0x800B8F98:("Actor_PlaySfx_FlaggedCentered1",), - 0x800B8FC0:("Actor_PlaySfx_FlaggedCentered2",), - 0x800B8FE8:("Actor_PlaySfx_FlaggedCentered3",), + 0x800B8F98:("Actor_PlaySfx_Flagged2",), + 0x800B8FC0:("Actor_PlaySfx_FlaggedCentered1",), + 0x800B8FE8:("Actor_PlaySfx_FlaggedCentered2",), 0x800B9010:("Actor_PlaySfx_Flagged",), 0x800B9038:("Actor_PlaySfx_FlaggedTimer",), 0x800B9084:("Actor_PlaySeq_FlaggedKamaroDance",), diff --git a/tools/namefixer.py b/tools/namefixer.py index ec50b9fe8c..2084f12aa5 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -282,9 +282,10 @@ wordReplace = { "func_8019FE74": "Audio_SetSfxVolumeTransition", "func_801A4428": "Audio_SetSfxReverbIndexExceptOcarinaBank", "func_800B8EF4": "Actor_PlaySfx_SurfaceBomb", - "func_800B8F98": "Actor_PlaySfx_FlaggedCentered1", - "func_800B8FC0": "Actor_PlaySfx_FlaggedCentered2", - "func_800B8FE8": "Actor_PlaySfx_FlaggedCentered3", + "func_800B8F98": "Actor_PlaySfx_Flagged2", + "func_800B8FC0": "Actor_PlaySfx_FlaggedCentered1", + "func_800B8FE8": "Actor_PlaySfx_FlaggedCentered2", + "Actor_PlaySfx_FlaggedCentered3": "Actor_PlaySfx_FlaggedCentered2", "func_800B9010": "Actor_PlaySfx_Flagged", "func_800B9038": "Actor_PlaySfx_FlaggedTimer", "func_800B9084": "Actor_PlaySeq_FlaggedKamaroDance", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index beca6c6660..23cb7b534d 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -317,9 +317,9 @@ asm/non_matchings/code/z_actor/func_800B8E1C.s,func_800B8E1C,0x800B8E1C,0xF asm/non_matchings/code/z_actor/Player_PlaySfx.s,Player_PlaySfx,0x800B8E58,0x1C asm/non_matchings/code/z_actor/Actor_PlaySfx.s,Actor_PlaySfx,0x800B8EC8,0xB asm/non_matchings/code/z_actor/Actor_PlaySfx_SurfaceBomb.s,Actor_PlaySfx_SurfaceBomb,0x800B8EF4,0x29 -asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered1.s,Actor_PlaySfx_FlaggedCentered1,0x800B8F98,0xA -asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered2.s,Actor_PlaySfx_FlaggedCentered2,0x800B8FC0,0xA -asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered3.s,Actor_PlaySfx_FlaggedCentered3,0x800B8FE8,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_Flagged2.s,Actor_PlaySfx_Flagged2,0x800B8F98,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered1.s,Actor_PlaySfx_FlaggedCentered1,0x800B8FC0,0xA +asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedCentered2.s,Actor_PlaySfx_FlaggedCentered2,0x800B8FE8,0xA asm/non_matchings/code/z_actor/Actor_PlaySfx_Flagged.s,Actor_PlaySfx_Flagged,0x800B9010,0xA asm/non_matchings/code/z_actor/Actor_PlaySfx_FlaggedTimer.s,Actor_PlaySfx_FlaggedTimer,0x800B9038,0x13 asm/non_matchings/code/z_actor/Actor_PlaySeq_FlaggedKamaroDance.s,Actor_PlaySeq_FlaggedKamaroDance,0x800B9084,0x5