1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 15:34:41 +00:00

Name Actor_PlaySfx and Player_PlaySfx (#1469)

* name two main actor sfx functions

* adjust comments

* fix double s in player

* fix commas
This commit is contained in:
engineer124 2022-12-18 23:18:21 -05:00 committed by GitHub
parent f181c2f10e
commit be22b836f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
213 changed files with 1424 additions and 1414 deletions

View file

@ -1714,12 +1714,18 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4)
func_8002F758(play, actor, arg2, arg3, arg4, 0);
}
void func_8002F7DC(Actor* actor, u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
/**
* Play a sound effect at the player's position
*/
void Player_PlaySfx(Player* player, u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
void Audio_PlayActorSfx2(Actor* actor, u16 sfxId) {
/**
* Play a sound effect at the actor's position
*/
void Actor_PlaySfx(Actor* actor, u16 sfxId) {
func_80078914(&actor->projectedPos, sfxId);
}
@ -1783,7 +1789,7 @@ s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId,
if (SurfaceType_GetFloorType(&play->colCtx, poly, bgId) == FLOOR_TYPE_8) {
play->roomCtx.unk_74[0] = 1;
CollisionCheck_BlueBlood(play, NULL, pos);
Audio_PlayActorSfx2(actor, NA_SE_IT_WALL_HIT_BUYO);
Actor_PlaySfx(actor, NA_SE_IT_WALL_HIT_BUYO);
return true;
}
@ -3664,7 +3670,7 @@ void func_8003424C(PlayState* play, Vec3f* arg1) {
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration) {
if ((colorFlag == COLORFILTER_COLORFLAG_GRAY) && !(colorIntensityMax & COLORFILTER_INTENSITY_FLAG)) {
Audio_PlayActorSfx2(actor, NA_SE_EN_LIGHT_ARROW_HIT);
Actor_PlaySfx(actor, NA_SE_EN_LIGHT_ARROW_HIT);
}
actor->colorFilterParams = colorFlag | bufFlag | ((colorIntensityMax & 0xF8) << 5) | duration;

View file

@ -888,7 +888,7 @@ void EffectSsEnIce_SpawnFlyingVec3f(PlayState* play, Actor* actor, Vec3f* pos, s
initParams.scale = scale;
if (actor != NULL) {
Audio_PlayActorSfx2(actor, NA_SE_PL_FREEZE_S);
Actor_PlaySfx(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
@ -914,7 +914,7 @@ void EffectSsEnIce_SpawnFlyingVec3s(PlayState* play, Actor* actor, Vec3s* pos, s
initParams.scale = scale;
if (actor != NULL) {
Audio_PlayActorSfx2(actor, NA_SE_PL_FREEZE_S);
Actor_PlaySfx(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(play, EFFECT_SS_EN_ICE, 80, &initParams);
@ -993,7 +993,7 @@ void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 sc
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSfx2(actor, NA_SE_EV_FLAME_IGNITION);
Actor_PlaySfx(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);
@ -1014,7 +1014,7 @@ void EffectSsEnFire_SpawnVec3s(PlayState* play, Actor* actor, Vec3s* pos, s16 sc
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSfx2(actor, NA_SE_EV_FLAME_IGNITION);
Actor_PlaySfx(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(play, EFFECT_SS_EN_FIRE, 128, &initParams);

View file

@ -301,7 +301,7 @@ void EnAObj_Block(EnAObj* this, PlayState* play) {
Math_SmoothStepToF(&this->dyna.actor.speedXZ, 0.0f, 1.0f, 1.0f, 0.0f);
if (this->dyna.actor.speedXZ != 0.0f) {
Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
}
this->dyna.unk_154 = 0.0f;

View file

@ -1244,7 +1244,7 @@ void Scene_DrawConfigLostWoods(PlayState* play) {
if ((play->roomCtx.unk_74[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) {
if (play->roomCtx.unk_74[1] == 50) {
func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_EV_CHICKEN_CRY_M);
Player_PlaySfx(GET_PLAYER(play), NA_SE_EV_CHICKEN_CRY_M);
play->roomCtx.unk_74[0] = 1;
}
play->roomCtx.unk_74[1]++;