summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-08-15 15:44:20 +1000
committerGitHub <noreply@github.com>2023-08-15 01:44:20 -0400
commitb8aa2a251e38c4ca31d2e0ab5042a8ea84fd4be5 (patch)
treede84ab742daf5200d0f47d7c0f2078b16a30e96c /src/code/z_actor.c
parent18d609c1a3006c242d10b12e6937f467c2a1f1eb (diff)
Document z_lib Sfx Functions (#1470)
* document lib sfx * rename functions
Diffstat (limited to 'src/code/z_actor.c')
-rw-r--r--src/code/z_actor.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 47bc082c6..aa1f16291 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -489,7 +489,7 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Pl
lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) ? NA_SE_SY_LOCK_ON
: NA_SE_SY_LOCK_ON_HUMAN;
- func_80078884(lockOnSfxId);
+ Sfx_PlaySfxCentered(lockOnSfxId);
}
targetCtx->targetCenterPos.x = actorArg->world.pos.x;
@@ -1751,7 +1751,7 @@ void Player_PlaySfx(Player* player, u16 sfxId) {
* Play a sound effect at the actor's position
*/
void Actor_PlaySfx(Actor* actor, u16 sfxId) {
- func_80078914(&actor->projectedPos, sfxId);
+ Sfx_PlaySfxAtPos(&actor->projectedPos, sfxId);
}
void func_8002F850(PlayState* play, Actor* actor) {
@@ -1767,8 +1767,8 @@ void func_8002F850(PlayState* play, Actor* actor) {
surfaceSfxOffset = SurfaceType_GetSfxOffset(&play->colCtx, actor->floorPoly, actor->floorBgId);
}
- func_80078914(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
- func_80078914(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
+ Sfx_PlaySfxAtPos(&actor->projectedPos, NA_SE_EV_BOMB_BOUND);
+ Sfx_PlaySfxAtPos(&actor->projectedPos, NA_SE_PL_WALK_GROUND + surfaceSfxOffset);
}
void func_8002F8F0(Actor* actor, u16 sfxId) {
@@ -1965,7 +1965,8 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
//! @bug One of the conditions for this block checks an entrance index to see if the light ball should draw.
//! This does not account for the fact that some dungeons have multiple entrances.
- //! If a dungeon is entered through a different entrance than the one that was saved, the light ball will not draw.
+ //! If a dungeon is entered through a different entrance than the one that was saved, the light ball will not
+ //! draw.
if ((play->csCtx.state == CS_STATE_IDLE) &&
(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex) ==
((void)0, gSaveContext.save.entranceIndex)) &&
@@ -1998,8 +1999,8 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
}
- //! @bug This function call is not contained in the above block, meaning the light for Farore's Wind will draw in
- //! every scene at the same position that it was originally set.
+ //! @bug This function call is not contained in the above block, meaning the light for Farore's Wind will draw
+ //! in every scene at the same position that it was originally set.
Lights_PointNoGlowSetInfo(&D_8015BC00, ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x),
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset,
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z), 255, 255, 255, lightRadius);
@@ -2214,7 +2215,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor = NULL;
if (actorCtx->targetCtx.unk_4B != 0) {
actorCtx->targetCtx.unk_4B = 0;
- func_80078884(NA_SE_SY_LOCK_OFF);
+ Sfx_PlaySfxCentered(NA_SE_SY_LOCK_OFF);
}
}
@@ -2316,13 +2317,13 @@ void func_80030ED8(Actor* actor) {
Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else if (actor->flags & ACTOR_FLAG_20) {
- func_80078884(actor->sfx);
+ Sfx_PlaySfxCentered(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_21) {
- func_800788CC(actor->sfx);
+ Sfx_PlaySfxCentered2(actor->sfx);
} else if (actor->flags & ACTOR_FLAG_28) {
func_800F4C58(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1));
} else {
- func_80078914(&actor->projectedPos, actor->sfx);
+ Sfx_PlaySfxAtPos(&actor->projectedPos, actor->sfx);
}
}