Name Actor_PlaySfx and Player_PlaySfx (#1190)

* name funcs

* namefixer

* function comments
This commit is contained in:
engineer124
2023-03-03 00:09:16 -05:00
committed by GitHub
parent 5729b6d3f1
commit cc8772a896
280 changed files with 1433 additions and 1425 deletions
+11 -8
View File
@@ -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);
}
}
+3 -3
View File
@@ -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);
+2 -2
View File
@@ -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;