summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_actor.c19
-rw-r--r--src/code/z_effect_soft_sprite_old_init.c6
-rw-r--r--src/code/z_en_hy_code.c4
3 files changed, 16 insertions, 13 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 912c3ee81..6ba05d4f9 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -2130,7 +2130,10 @@ void func_800B8E1C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
func_800B8DD4(play, actor, arg2, arg3, arg4, 0);
}
-void func_800B8E58(Player* player, u16 sfxId) {
+/**
+ * Play a sound effect at the player's position
+ */
+void Player_PlaySfx(Player* player, u16 sfxId) {
if (player->currentMask == PLAYER_MASK_GIANT) {
func_8019F170(&player->actor.projectedPos, sfxId);
} else {
@@ -2140,9 +2143,9 @@ void func_800B8E58(Player* player, u16 sfxId) {
}
/**
- * Plays the sound effect at the actor's position
+ * Play a sound effect at the actor's position
*/
-void Actor_PlaySfxAtPos(Actor* actor, u16 sfxId) {
+void Actor_PlaySfx(Actor* actor, u16 sfxId) {
Audio_PlaySfxAtPos(&actor->projectedPos, sfxId);
}
@@ -3839,7 +3842,7 @@ void Actor_SpawnShieldParticlesMetal(PlayState* play, Vec3f* pos) {
void Actor_SetColorFilter(Actor* actor, u16 colorFlag, u16 colorIntensityMax, u16 xluFlag, u16 duration) {
if ((colorFlag == 0x8000) && !(colorIntensityMax & 0x8000)) {
- Actor_PlaySfxAtPos(actor, NA_SE_EN_LIGHT_ARROW_HIT);
+ Actor_PlaySfx(actor, NA_SE_EN_LIGHT_ARROW_HIT);
}
actor->colorFilterParams = colorFlag | xluFlag | ((colorIntensityMax & 0xF8) << 5) | duration;
@@ -4476,13 +4479,13 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f limbPos[], s16
// Apply sfx along with damage effect
if ((actor != NULL) && (effectAlpha > 0.05f) && (play->gameOverCtx.state == GAMEOVER_INACTIVE)) {
if (type == ACTOR_DRAW_DMGEFF_FIRE) {
- Actor_PlaySfxAtPos(actor, NA_SE_EV_BURN_OUT - SFX_FLAG);
+ Actor_PlaySfx(actor, NA_SE_EV_BURN_OUT - SFX_FLAG);
} else if (type == ACTOR_DRAW_DMGEFF_BLUE_FIRE) {
- Actor_PlaySfxAtPos(actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
+ Actor_PlaySfx(actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG);
} else if (type == ACTOR_DRAW_DMGEFF_FROZEN_SFX) {
- Actor_PlaySfxAtPos(actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG);
+ Actor_PlaySfx(actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG);
} else if ((type == ACTOR_DRAW_DMGEFF_LIGHT_ORBS) || (type == ACTOR_DRAW_DMGEFF_BLUE_LIGHT_ORBS)) {
- Actor_PlaySfxAtPos(actor, NA_SE_EN_COMMON_DEADLIGHT - SFX_FLAG);
+ Actor_PlaySfx(actor, NA_SE_EN_COMMON_DEADLIGHT - SFX_FLAG);
}
}
diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c
index 4f24651d1..0b08f4dd0 100644
--- a/src/code/z_effect_soft_sprite_old_init.c
+++ b/src/code/z_effect_soft_sprite_old_init.c
@@ -805,7 +805,7 @@ void EffectSsEnIce_SpawnFlying(PlayState* play, Actor* actor, Vec3f* pos, Color_
initParams.scale = scale;
if (actor != NULL) {
- Actor_PlaySfxAtPos(actor, NA_SE_PL_FREEZE_S);
+ Actor_PlaySfx(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
@@ -897,7 +897,7 @@ void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 sc
initParams.bodyPart = bodyPart;
if (actor != NULL) {
- Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
+ Actor_PlaySfx(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
@@ -917,7 +917,7 @@ void EffectSsEnFire_SpawnVec3s(PlayState* play, Actor* actor, Vec3s* pos, s16 sc
initParams.bodyPart = bodyPart;
if (actor != NULL) {
- Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
+ Actor_PlaySfx(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
diff --git a/src/code/z_en_hy_code.c b/src/code/z_en_hy_code.c
index 66645753e..85a5e7e84 100644
--- a/src/code/z_en_hy_code.c
+++ b/src/code/z_en_hy_code.c
@@ -267,12 +267,12 @@ s32 EnHy_PlayWalkingSound(EnHy* enHy, PlayState* play, f32 distAboveThreshold) {
enHy->isLeftFootOnGround = isFootOnGround = SubS_IsFloorAbove(play, &enHy->leftFootPos, distAboveThreshold);
if (enHy->isLeftFootOnGround && !wasLeftFootOnGround && isFootOnGround) {
- Actor_PlaySfxAtPos(&enHy->actor, sfxId);
+ Actor_PlaySfx(&enHy->actor, sfxId);
}
enHy->isRightFootOnGround = isFootOnGround = SubS_IsFloorAbove(play, &enHy->rightFootPos, distAboveThreshold);
if (enHy->isRightFootOnGround && !wasRightFootOnGround && isFootOnGround) {
- Actor_PlaySfxAtPos(&enHy->actor, sfxId);
+ Actor_PlaySfx(&enHy->actor, sfxId);
}
return false;