1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 07:21:19 +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

@ -484,7 +484,7 @@ void EnMb_SetupSpearPrepareAndCharge(EnMb* this) {
this->state = ENMB_STATE_ATTACK;
this->actor.speedXZ = 0.0f;
this->timer3 = (s16)frameCount + 6;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_AT);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_AT);
if (this->actor.params == ENMB_TYPE_SPEAR_GUARD) {
EnMb_SetupAction(this, EnMb_SpearGuardPrepareAndCharge);
} else {
@ -494,7 +494,7 @@ void EnMb_SetupSpearPrepareAndCharge(EnMb* this) {
void EnMb_SetupSpearPatrolImmediateCharge(EnMb* this) {
Animation_PlayLoop(&this->skelAnime, &gEnMbSpearChargeAnim);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
this->attack = ENMB_ATTACK_SPEAR;
this->state = ENMB_STATE_ATTACK;
this->timer3 = 3;
@ -527,7 +527,7 @@ void EnMb_SetupSpearEndChargeQuick(EnMb* this) {
this->state = ENMB_STATE_ATTACK_END;
this->timer1 = 0;
this->timer3 = 5;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_SLIDE);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_SLIDE);
EnMb_SetupAction(this, EnMb_SpearEndChargeQuick);
}
@ -539,7 +539,7 @@ void EnMb_SetupSpearPatrolEndCharge(EnMb* this) {
this->timer3 = 50;
this->actor.speedXZ = -8.0f;
this->actor.velocity.y = 6.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_SLIDE);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_SLIDE);
EnMb_SetupAction(this, EnMb_SpearPatrolEndCharge);
}
@ -557,7 +557,7 @@ void EnMb_SetupClubDamaged(EnMb* this) {
this->state = ENMB_STATE_CLUB_KNEELING;
this->timer1 = 0;
this->timer3 = 20;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
EnMb_SetupAction(this, EnMb_ClubDamaged);
}
@ -579,7 +579,7 @@ void EnMb_SetupClubDead(EnMb* this) {
this->hitbox.dim.radius = 95;
this->timer1 = 30;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
EnMb_SetupAction(this, EnMb_ClubDead);
}
@ -593,7 +593,7 @@ void EnMb_SetupStunned(EnMb* this) {
if (this->actor.params != ENMB_TYPE_CLUB) {
Animation_PlayOnceSetSpeed(&this->skelAnime, &gEnMbSpearDamagedFromFrontAnim, 0.0f);
}
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
}
EnMb_SetupAction(this, EnMb_Stunned);
}
@ -664,7 +664,7 @@ void EnMb_SpearPatrolTurnTowardsWaypoint(EnMb* this, PlayState* play) {
relYawFromPlayer = this->actor.shape.rot.y - this->actor.yawTowardsPlayer;
if (ABS(relYawFromPlayer) <= 0x4000 || (func_8002DDE4(play) && this->actor.xzDistToPlayer < 160.0f)) {
EnMb_FindWaypointTowardsPlayer(this, play);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
EnMb_SetupSpearPrepareAndCharge(this);
}
}
@ -689,7 +689,7 @@ void EnMb_SpearEndChargeQuick(EnMb* this, PlayState* play) {
Animation_GetLastFrame(&gEnMbSpearPrepareChargeAnim), 0.0f, ANIMMODE_ONCE, 0.0f);
this->timer1 = 1;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
}
} else {
if (this->actor.params <= ENMB_TYPE_SPEAR_GUARD) {
@ -746,7 +746,7 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
Animation_Change(&this->skelAnime, &gEnMbSpearPrepareChargeAnim, -1.0f, lastFrame, 0.0f,
ANIMMODE_ONCE, 0.0f);
this->actor.speedXZ = 0.0f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
}
} else {
if (this->actor.xzDistToPlayer <= 160.0f) {
@ -792,7 +792,7 @@ void EnMb_SpearGuardPrepareAndCharge(EnMb* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
Animation_PlayLoop(&this->skelAnime, &gEnMbSpearChargeAnim);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
}
if (this->timer3 != 0) {
@ -804,7 +804,7 @@ void EnMb_SpearGuardPrepareAndCharge(EnMb* this, PlayState* play) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 100, 15, false);
if (prevFrame != (s32)this->skelAnime.curFrame &&
((s32)this->skelAnime.curFrame == 2 || (s32)this->skelAnime.curFrame == 6)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DASH);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DASH);
}
}
@ -857,7 +857,7 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) {
} else {
effSpawnPos = this->effSpawnPos;
effSpawnPos.y = this->actor.floorHeight;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MONBLIN_HAM_LAND);
Actor_PlaySfx(&this->actor, NA_SE_EN_MONBLIN_HAM_LAND);
Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150);
EffectSsBlast_SpawnWhiteShockwave(play, &effSpawnPos, &effWhiteShockwaveDynamics,
&effWhiteShockwaveDynamics);
@ -869,10 +869,10 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) {
}
} else {
if (this->timer3 != 0 && this->skelAnime.curFrame == 6.0f) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MONBLIN_HAM_UP);
Actor_PlaySfx(&this->actor, NA_SE_EN_MONBLIN_HAM_UP);
} else if (this->timer3 == 0 && this->skelAnime.curFrame == 3.0f) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MONBLIN_HAM_DOWN);
Actor_PlaySfx(&this->actor, NA_SE_EN_MONBLIN_HAM_DOWN);
}
}
}
@ -889,7 +889,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
prevFrame = (s32)this->skelAnime.curFrame;
if (SkelAnime_Update(&this->skelAnime)) {
Animation_PlayLoop(&this->skelAnime, &gEnMbSpearChargeAnim);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
}
if (this->timer3 != 0) {
@ -902,7 +902,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 100, 15, false);
if (prevFrame != (s32)this->skelAnime.curFrame &&
((s32)this->skelAnime.curFrame == 2 || (s32)this->skelAnime.curFrame == 6)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DASH);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DASH);
}
}
@ -918,7 +918,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
}
}
if (!(this->attackCollider.base.atFlags & AT_BOUNCED)) {
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
if (play->grabPlayer(play, player)) {
player->actor.parent = &this->actor;
@ -972,7 +972,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 5.0f, 3, 4.0f, 100, 15, false);
if (prevFrame != (s32)this->skelAnime.curFrame &&
((s32)this->skelAnime.curFrame == 2 || (s32)this->skelAnime.curFrame == 6)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DASH);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DASH);
}
if (this->attackCollider.base.atFlags & AT_HIT) {
@ -987,7 +987,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
}
}
if (!(this->attackCollider.base.atFlags & AT_BOUNCED)) {
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
if (play->grabPlayer(play, player)) {
player->actor.parent = &this->actor;
@ -1104,7 +1104,7 @@ void EnMb_ClubDead(EnMb* this, PlayState* play) {
} else if ((s32)this->skelAnime.curFrame == 15 || (s32)this->skelAnime.curFrame == 22) {
Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150);
Actor_SpawnFloorDustRing(play, &this->actor, &effPos, 50.0f, 10, 3.0f, 400, 60, false);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_RIZA_DOWN);
Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_DOWN);
Camera_RequestQuake(&play->mainCamera, 2, 25, 5);
}
}
@ -1151,7 +1151,7 @@ void EnMb_SpearGuardWalk(EnMb* this, PlayState* play) {
this->timer3--;
}
if (this->timer2 == 0) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
}
this->timer1--;
if (this->timer1 == 0) {
@ -1167,7 +1167,7 @@ void EnMb_SpearGuardWalk(EnMb* this, PlayState* play) {
if (prevFrame != (s32)this->skelAnime.curFrame) {
if ((beforeCurFrame <= 1 && prevFrame + (s32)playSpeedAbs >= 1) ||
(beforeCurFrame <= 20 && prevFrame + (s32)playSpeedAbs >= 20)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_WALK);
}
}
@ -1197,7 +1197,7 @@ void EnMb_SpearPatrolWalkTowardsWaypoint(EnMb* this, PlayState* play) {
relYawTowardsPlayer = (this->actor.shape.rot.y - this->actor.yawTowardsPlayer);
if (ABS(relYawTowardsPlayer) <= 0x4000 || (func_8002DDE4(play) && this->actor.xzDistToPlayer < 160.0f)) {
EnMb_FindWaypointTowardsPlayer(this, play);
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
EnMb_SetupSpearPrepareAndCharge(this);
return;
}
@ -1210,7 +1210,7 @@ void EnMb_SpearPatrolWalkTowardsWaypoint(EnMb* this, PlayState* play) {
this->timer3--;
}
if (this->timer2 == 0) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_VOICE);
this->timer2 = Rand_S16Offset(30, 70);
}
@ -1222,7 +1222,7 @@ void EnMb_SpearPatrolWalkTowardsWaypoint(EnMb* this, PlayState* play) {
if (prevFrame != (s32)this->skelAnime.curFrame) {
if ((beforeCurFrame <= 1 && (s32)playSpeedABS + prevFrame >= 1) ||
(beforeCurFrame <= 20 && (s32)playSpeedABS + prevFrame >= 20)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_WALK);
}
}
@ -1255,7 +1255,7 @@ void EnMb_SetupSpearDamaged(EnMb* this) {
this->timer1 = 30;
this->state = ENMB_STATE_SPEAR_SPEARPATH_DAMAGED;
this->actor.shape.rot.y = this->actor.world.rot.y;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
EnMb_SetupAction(this, EnMb_SpearDamaged);
}
@ -1285,7 +1285,7 @@ void EnMb_SetupSpearDead(EnMb* this) {
this->actor.world.rot.y = this->actor.shape.rot.y;
this->timer1 = 30;
this->state = ENMB_STATE_SPEAR_SPEARPATH_DAMAGED;
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_DEAD);
this->actor.flags &= ~ACTOR_FLAG_0;
EnMb_SetupAction(this, EnMb_SpearDead);
}