Add `SFX_PLAY_AT_POS`

This commit is contained in:
Dragorn421 2025-06-14 07:15:55 +02:00
parent a97305c182
commit 205ada315c
No known key found for this signature in database
GPG Key ID: 381AEBAF3D429335
47 changed files with 187 additions and 375 deletions

View File

@ -161,6 +161,10 @@ typedef struct SfxParams {
Audio_PlaySfxGeneral(sfxId, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, \
&gSfxDefaultReverb);
#define SFX_PLAY_AT_POS(projectedPos, sfxId) \
Audio_PlaySfxGeneral(sfxId, projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, \
&gSfxDefaultReverb);
void Audio_SetSfxBanksMute(u16 muteMask);
void Audio_QueueSeqCmdMute(u8 channelIndex);
void Audio_ClearBGMMute(u8 channelIndex);

View File

@ -2816,8 +2816,7 @@ void func_800F4190(Vec3f* pos, u16 sfxId) {
void Audio_PlaySfxRandom(Vec3f* pos, u16 baseSfxId, u8 randLim) {
u8 offset = AudioThread_NextRandom() % randLim;
Audio_PlaySfxGeneral(baseSfxId + offset, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(pos, baseSfxId + offset);
}
void func_800F4254(Vec3f* pos, u8 level) {
@ -3081,7 +3080,7 @@ void func_800F4C58(Vec3f* pos, u16 sfxId, u8 ioData) {
}
channelIndex++;
}
Audio_PlaySfxGeneral(sfxId, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(pos, sfxId);
}
void func_800F4E30(Vec3f* pos, f32 arg1) {

View File

@ -2030,8 +2030,7 @@ void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 sp
* 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);
SFX_PLAY_AT_POS(&player->actor.projectedPos, sfxId);
}
/**
@ -2641,8 +2640,7 @@ void Actor_Draw(PlayState* play, Actor* actor) {
void Actor_UpdateFlaggedAudio(Actor* actor) {
if (actor->flags & ACTOR_FLAG_SFX_ACTOR_POS_2) {
Audio_PlaySfxGeneral(actor->sfx, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&actor->projectedPos, actor->sfx);
} else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) {
Sfx_PlaySfxCentered(actor->sfx);
} else if (actor->flags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) {

View File

@ -1568,8 +1568,7 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
if (collider->actor == NULL) {
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == ATELEM_SFX_NORMAL) { // collider->colMaterial == COL_MATERIAL_METAL
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos);
@ -1583,16 +1582,14 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
if (collider->actor == NULL) {
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
} else if (flags == ATELEM_SFX_WOOD) {
EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos);
if (collider->actor == NULL) {
SFX_PLAY_CENTERED(NA_SE_IT_REFLECTION_WOOD);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
}
}
}
@ -1603,17 +1600,13 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c
s32 CollisionCheck_SwordHitAudio(Collider* atCol, ColliderElement* acElem) {
if (atCol->actor != NULL && atCol->actor->category == ACTORCAT_PLAYER) {
if (acElem->elemMaterial == ELEM_MATERIAL_UNK0) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
} else if (acElem->elemMaterial == ELEM_MATERIAL_UNK1) {
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &atCol->actor->projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
} else if (acElem->elemMaterial == ELEM_MATERIAL_UNK2) {
Audio_PlaySfxGeneral(NA_SE_NONE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_NONE);
} else if (acElem->elemMaterial == ELEM_MATERIAL_UNK3) {
Audio_PlaySfxGeneral(NA_SE_NONE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&atCol->actor->projectedPos, NA_SE_NONE);
}
}
return true;
@ -1705,8 +1698,7 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement
if (acCol->actor == NULL) {
SFX_PLAY_CENTERED(NA_SE_IT_SHIELD_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &acCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&acCol->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
}
}
}
@ -3528,8 +3520,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v) {
*/
void CollisionCheck_SpawnShieldParticlesMetalSfx(PlayState* play, Vec3f* v, Vec3f* pos) {
CollisionCheck_SpawnShieldParticles(play, v);
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_SW, pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(pos, NA_SE_IT_SHIELD_REFLECT_SW);
}
/**
@ -3569,8 +3560,7 @@ void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* a
woodInit.lightPoint.z = woodInit.position.z;
Effect_Add(play, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &woodInit);
Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, actorPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(actorPos, NA_SE_IT_REFLECTION_WOOD);
}
/**

View File

@ -622,6 +622,5 @@ void Sfx_PlaySfxCentered2(u16 sfxId) {
* Play a sound effect at the requested position.
*/
void Sfx_PlaySfxAtPos(Vec3f* projectedPos, u16 sfxId) {
Audio_PlaySfxGeneral(sfxId, projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(projectedPos, sfxId);
}

View File

@ -63,6 +63,5 @@ void SfxSource_PlaySfxAtFixedWorldPos(PlayState* play, Vec3f* worldPos, s32 dura
source->countdown = duration;
SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
Audio_PlaySfxGeneral(sfxId, &source->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&source->projectedPos, sfxId);
}

View File

@ -182,8 +182,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
this->timer = 0;
Audio_PlaySfxGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_IT_ARROW_STICK_CRE);
return;
}
@ -311,12 +310,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
ArmsHook_PullPlayer(this);
Audio_PlaySfxGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_STICK_OBJ);
} else {
CollisionCheck_SpawnShieldParticlesMetal(play, &this->actor.world.pos);
Audio_PlaySfxGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_IT_HOOKSHOT_REFLECT);
}
} else if (CHECK_BTN_ANY(play->state.input[0].press.button,
(BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT))) {

View File

@ -180,8 +180,7 @@ void BgDdanKd_LowerStairs(BgDdanKd* this, PlayState* play) {
func_8003555C(play, &pos1, &velocity, &accel);
}
Camera_RequestQuake(&play->mainCamera, 0, effectStrength * 0.6f, 3);
Audio_PlaySfxGeneral(NA_SE_EV_PILLAR_SINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_PILLAR_SINK - SFX_FLAG);
}
}

View File

@ -263,11 +263,9 @@ void BgDodoago_OpenJaw(BgDodoago* this, PlayState* play) {
if (Math_SmoothStepToS(&this->dyna.actor.shape.rot.x, 0x1333, 110 - this->state, 0x3E8, 0x32) == 0) {
BgDodoago_SetupAction(this, BgDodoago_DoNothing);
Audio_PlaySfxGeneral(NA_SE_EV_STONE_BOUND, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_STONE_BOUND);
} else {
Audio_PlaySfxGeneral(NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_STONE_STATUE_OPEN - SFX_FLAG);
}
}

View File

@ -298,11 +298,9 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, PlayState* play) {
}
} else {
if (this->dropTimer == 1) {
Audio_PlaySfxGeneral(NA_SE_EV_STONEDOOR_STOP, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_STONEDOOR_STOP);
} else {
Audio_PlaySfxGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_BLOCKSINK - SFX_FLAG);
}
Math_ApproachF(&this->dyna.actor.world.pos.y, -1000.0f, 1.0f, this->dyna.actor.speed);
Math_ApproachF(&this->dyna.actor.speed, 100.0f, 1.0f, 0.1f);

View File

@ -95,8 +95,7 @@ void BgVbSima_Update(Actor* thisx, PlayState* play) {
this->dyna.actor.world.pos.z += 2.0f * Math_CosS(this->shakeTimer * 0x8000);
this->dyna.actor.shape.rot.x = (s16)Math_SinS(this->shakeTimer * 0x7000) * 0x37;
this->dyna.actor.shape.rot.z = (s16)Math_SinS(this->shakeTimer * 0x5000) * 0x37;
Audio_PlaySfxGeneral(NA_SE_EV_BLOCKSINK - SFX_FLAG, &this->dyna.actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_BLOCKSINK - SFX_FLAG);
} else if (signal == VBSIMA_KILL) {
Actor_Kill(&this->dyna.actor);
}

View File

@ -65,8 +65,7 @@ void BgZg_Destroy(Actor* thisx, PlayState* play) {
}
void func_808C0C50(BgZg* this) {
Audio_PlaySfxGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_METALDOOR_OPEN);
}
s32 func_808C0C98(BgZg* this, PlayState* play) {

View File

@ -404,8 +404,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->fogMode = 1;
}
if (this->timers[0] < 50) {
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f);
}
@ -425,8 +424,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
case BFD_CS_LOOK_GROUND:
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f);
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
if (this->timers[0] == 0) {
this->introState = BFD_CS_COLLAPSE;
this->subCamEyeNext.x = player2->actor.world.pos.x + 100.0f + 300.0f;
@ -446,8 +444,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->subCamAccel = 0.005f;
this->subCamAtYOffset = Math_CosS(this->work[BFD_MOVE_TIMER] * 0x8000) * this->subCamShake;
Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f);
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
if (this->timers[0] == 100) {
this->platformSignal = VBSIMA_COLLAPSE;
}
@ -483,8 +480,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
PRINTF("WAY_SPD Y = %f\n", this->subCamAtVel.y);
PRINTF("WAY_SPD Z = %f\n", this->subCamAtVel.z);
if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
}
if (this->timers[3] == 190) {
this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f;
@ -694,8 +690,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_CEILING) {
this->fwork[BFD_CEILING_BOUNCE] = -18384.0f;
this->timers[1] = 10;
Audio_PlaySfxGeneral(NA_SE_EV_EXPLOSION, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_EXPLOSION);
Actor_RequestQuakeWithSpeed(play, 3, 10, 0x7530);
this->work[BFD_ROCK_TIMER] = 300;
}
@ -794,8 +789,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
sp150 = 1;
if (this->work[BFD_MOVE_TIMER] & 0x1C) {
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_BURN - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_VALVAISA_BURN - SFX_FLAG);
}
for (i1 = 0; i1 < sp150; i1++) {
if (sp150) { // Needed for matching
@ -867,9 +861,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->work[BFD_CEILING_TARGET]++;
this->timers[1] = 60;
this->work[BFD_CAM_SHAKE_TIMER] = 20;
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_VALVAISA_LAND2);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_5);
for (i1 = 0; i1 < 15; i1++) {
Vec3f sp144 = { 0.0f, 0.0f, 0.0f };
@ -910,8 +902,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
Vec3f sp114 = { 0.0f, 0.0f, 0.0f };
Vec3f sp108 = { 0.0f, 0.03f, 0.0f };
Audio_PlaySfxGeneral(NA_SE_EN_GOMA_LAST - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_GOMA_LAST - SFX_FLAG);
sp120.x = Rand_CenteredFloat(40.0f) + this->actor.world.pos.x;
sp120.y = (Rand_CenteredFloat(10.0f) + this->actor.world.pos.y) - 10.0f;
@ -1159,8 +1150,7 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
if (this->work[BFD_ROAR_TIMER] != 0) {
if (this->work[BFD_ROAR_TIMER] == 37) {
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_ROAR, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_VALVAISA_ROAR);
}
jawAngle = 6000.0f;
jawSpeed = 1300.0f;
@ -1180,8 +1170,7 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
Vec3f spawnPos1;
s16 i;
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_APPEAR - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_VALVAISA_APPEAR - SFX_FLAG);
if (this->work[BFD_SPLASH_TIMER] != 0) {
this->work[BFD_SPLASH_TIMER]--;
if ((this->actor.colChkInfo.health == 0) ||
@ -1259,8 +1248,7 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
this->fogMode = 2;
spawnSpeed2.z = 30.0f;
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_FIRE - SFX_FLAG, &sFireAudioVec, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&sFireAudioVec, NA_SE_EN_VALVAISA_FIRE - SFX_FLAG);
spawnPos2 = this->headPos;
spawnAngleY = BINANG_TO_RAD_ALT(this->actor.world.rot.y);
@ -1322,8 +1310,7 @@ void BossFd_CollisionCheck(BossFd* this, PlayState* play) {
}
this->work[BFD_DAMAGE_FLASH_TIMER] = 10;
this->work[BFD_INVINC_TIMER] = 20;
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_DAMAGE1, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_VALVAISA_DAMAGE1);
}
}

View File

@ -3971,9 +3971,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
if ((hitWithBottle == false) && (acHitElem->atDmgInfo.dmgFlags & DMG_SHIELD)) {
spBA = 2;
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SHIELD_REFLECT_MG);
Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150);
} else {
spBA = 1;
@ -3982,9 +3980,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
Math_Atan2S(sqrtf(SQ(xDistFromGanondorf) + SQ(zDistFromGanondorf)), yDistFromGanondorf);
this->unk_1A4++;
this->timers[1] = 2;
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SWORD_REFLECT_MG);
Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100);
if (hitWithBottle == false) {

View File

@ -745,9 +745,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
player->actor.parent = &this->actor;
this->work[MO_TENT_ACTION_STATE] = MO_TENT_GRAB;
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_CATCH);
Audio_PlaySfxGeneral(NA_SE_VO_LI_DAMAGE_S, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_VO_LI_DAMAGE_S);
} else {
this->work[MO_TENT_ACTION_STATE] = MO_TENT_READY;
this->tentMaxAngle = .001f;

View File

@ -1162,11 +1162,9 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
&this->actor.projectedW);
if (this->actor.params == TW_KOUME) {
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_54C, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_54C, NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG);
} else {
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG, &this->unk_54C, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_54C, NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG);
}
break;
@ -1192,15 +1190,11 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
&this->actor.projectedW);
if (this->actor.params == TW_KOUME) {
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG, &this->unk_558, 4U,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_REFL_FIRE - SFX_FLAG, &this->unk_558, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_558, NA_SE_EN_TWINROBA_SHOOT_FIRE - SFX_FLAG);
SFX_PLAY_AT_POS(&this->unk_558, NA_SE_EN_TWINROBA_REFL_FIRE - SFX_FLAG);
} else {
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG, &this->unk_558, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_REFL_FREEZE - SFX_FLAG, &this->unk_558, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_558, NA_SE_EN_TWINROBA_SHOOT_FREEZE - SFX_FLAG);
SFX_PLAY_AT_POS(&this->unk_558, NA_SE_EN_TWINROBA_REFL_FREEZE - SFX_FLAG);
}
break;
}

View File

@ -3897,8 +3897,7 @@ void BossVa_SpawnTumor(PlayState* play, BossVaEffect* effect, BossVa* this, Vec3
effect->scale = 0.0f;
if (((i % 4) == 0) || (mode == 2)) {
Audio_PlaySfxGeneral(NA_SE_EN_BALINADE_BREAK, &effect->pos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&effect->pos, NA_SE_EN_BALINADE_BREAK);
}
break;
}

View File

@ -338,8 +338,7 @@ void DemoDu_CsPlaySfx_DaruniaHitsLink(PlayState* play) {
s32 pad;
Sfx_PlaySfxAtPos(&player->actor.projectedPos, NA_SE_EN_DARUNIA_HIT_LINK);
Audio_PlaySfxGeneral(NA_SE_VO_LI_DAMAGE_S_KID, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_VO_LI_DAMAGE_S_KID);
}
// Cutscene: Darunia gives Link the Goron's Ruby.
@ -353,8 +352,7 @@ void DemoDu_CsPlaySfx_LinkEscapeFromGorons(PlayState* play) {
if (play->csCtx.curFrame == 1400) {
Player* player = GET_PLAYER(play);
Audio_PlaySfxGeneral(NA_SE_VO_LI_FALL_L_KID, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_VO_LI_FALL_L_KID);
}
}
@ -364,8 +362,7 @@ void DemoDu_CsPlaySfx_LinkSurprised(PlayState* play) {
if (play->csCtx.curFrame == 174) {
Player* player = GET_PLAYER(play);
Audio_PlaySfxGeneral(NA_SE_VO_LI_SURPRISE_KID, &player->actor.projectedPos, 4U, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_VO_LI_SURPRISE_KID);
}
}

View File

@ -56,8 +56,7 @@ void DemoExt_Init(Actor* thisx, PlayState* play) {
void DemoExt_PlayVortexSFX(DemoExt* this) {
if (this->alphaTimer <= (kREG(35) + 40.0f) - 15.0f) {
Audio_PlaySfxGeneral(NA_SE_EV_FANTOM_WARP_L - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_FANTOM_WARP_L - SFX_FLAG);
}
}

View File

@ -104,20 +104,17 @@ void DemoIk_Type1PlaySfx(DemoIk* this) {
switch (this->actor.params) {
case 0:
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND1_DEMO, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_ARMOR_LAND1_DEMO);
}
break;
case 1:
if (Animation_OnFrame(&this->skelAnime, 10.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND3_DEMO, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_ARMOR_LAND3_DEMO);
}
break;
case 2:
if (Animation_OnFrame(&this->skelAnime, 9.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_ARMOR_LAND2_DEMO, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_ARMOR_LAND2_DEMO);
}
break;
}
@ -337,8 +334,7 @@ void DemoIk_Type2Init(DemoIk* this, PlayState* play) {
void DemoIk_Type2PlaySfxOnFrame(DemoIk* this, f32 frame) {
if (Animation_OnFrame(&this->skelAnime, frame)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_ARMOR_OFF_DEMO, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_ARMOR_OFF_DEMO);
}
}

View File

@ -746,8 +746,7 @@ void func_80986570(DemoIm* this, PlayState* play) {
u32 sfxId = NA_SE_PL_WALK_GROUND;
sfxId += SurfaceType_GetSfxOffset(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
Audio_PlaySfxGeneral(sfxId, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, sfxId);
}
}

View File

@ -128,8 +128,7 @@ void func_80993848(DemoTreLgt* this, PlayState* play) {
}
if ((currentFrame > 30.0f) && !(this->status & 1)) {
this->status |= 1;
Audio_PlaySfxGeneral(NA_SE_EV_TRE_BOX_FLASH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_FLASH);
}
if (SkelCurve_Update(play, &this->skelCurve)) {
Actor_Kill(&this->actor);

View File

@ -481,8 +481,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) {
if (DoorWarp1_PlayerInRange(this, play)) {
Player* player = GET_PLAYER(play);
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_EV_LINK_WARP);
OnePointCutscene_Init(play, 0x25E7, 999, &this->actor, CAM_ID_MAIN);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_10);
@ -596,8 +595,7 @@ void func_80999EE0(DoorWarp1* this, PlayState* play) {
void func_80999FE4(DoorWarp1* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) {
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_LINK_WARP);
OnePointCutscene_Init(play, 0x25E9, 999, &this->actor, CAM_ID_MAIN);
// Using `CAM_ID_NONE` here defaults to the active camera
Play_CopyCamera(play, CAM_ID_NONE, sRutoWarpSubCamId);
@ -684,8 +682,7 @@ void func_8099A508(DoorWarp1* this, PlayState* play) {
this->unk_1B2--;
return;
}
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_EV_LINK_WARP);
Animation_ChangeImpl(&this->skelAnime, &gWarpCrystalAnim, 1.0f, Animation_GetLastFrame(&gWarpCrystalAnim),
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 40.0f, ANIMTAPER_ACCEL);

View File

@ -141,8 +141,7 @@ void func_809BC598(EnBdfire* this, PlayState* play) {
this->unk_158 = bossDodongo->unk_1A2;
quarterTurn = false;
if (this->actor.params == 0) {
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_FIRE - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_DODO_K_FIRE - SFX_FLAG);
}
Math_SmoothStepToF(&this->actor.scale.x, this->unk_188, 0.3f, 0.5f, 0.0f);
Actor_SetScale(&this->actor, this->actor.scale.x);

View File

@ -273,8 +273,7 @@ void EnBox_Fall(EnBox* this, PlayState* play) {
EnBox_SetupAction(this, EnBox_WaitOpen);
OnePointCutscene_EndCutscene(play, this->subCamId);
}
Audio_PlaySfxGeneral(NA_SE_EV_COFFIN_CAP_BOUND, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_COFFIN_CAP_BOUND);
EnBox_SpawnDust(this, play);
}
yDiff = this->dyna.actor.world.pos.y - this->dyna.actor.floorHeight;
@ -383,8 +382,7 @@ void EnBox_AppearInit(EnBox* this, PlayState* play) {
this->unk_1A8 = 0;
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y,
this->dyna.actor.home.pos.z, 0, 0, 0, DEMOKANKYO_SPARKLES);
Audio_PlaySfxGeneral(NA_SE_EV_TRE_BOX_APPEAR, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR);
}
}
@ -486,8 +484,7 @@ void EnBox_Open(EnBox* this, PlayState* play) {
}
if (sfxId != 0) {
Audio_PlaySfxGeneral(sfxId, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->dyna.actor.projectedPos, sfxId);
}
if (this->skelanime.jointTable[3].z > 0) {

View File

@ -511,9 +511,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
canBottleReflect2 = canBottleReflect1;
if (!canBottleReflect2 && (acHitElem->atDmgInfo.dmgFlags & DMG_SHIELD)) {
killMode = BALL_IMPACT;
Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SHIELD_REFLECT_MG);
Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150);
} else {
if (bossGnd->flyMode == GND_FLY_NEUTRAL) {
@ -540,9 +538,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
RAD_TO_BINANG(Math_FAtan2F(dyPG, sqrtf((dxPG * dxPG) + (dzPG * dzPG)))) + angleModX;
this->work[FHGFIRE_FIRE_MODE] = FHGFIRE_LIGHT_BLUE;
this->work[FHGFIRE_FX_TIMER] = 2;
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_REFLECT_MG, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SWORD_REFLECT_MG);
Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100);
}
break;
@ -576,12 +572,8 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
if ((fabsf(dxPG) < 30.0f) && (fabsf(dzPG) < 30.0f) && (fabsf(dyPG) < 45.0f)) {
killMode = BALL_IMPACT;
bossGnd->returnCount = this->work[FHGFIRE_RETURN_COUNT] + 1;
Audio_PlaySfxGeneral(NA_SE_EN_FANTOM_HIT_THUNDER, &bossGnd->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_EN_FANTOM_DAMAGE, &bossGnd->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&bossGnd->actor.projectedPos, NA_SE_EN_FANTOM_HIT_THUNDER);
SFX_PLAY_AT_POS(&bossGnd->actor.projectedPos, NA_SE_EN_FANTOM_DAMAGE);
}
}
break;

View File

@ -786,8 +786,7 @@ void EnGo_FireGenericActionFunc(EnGo* this, PlayState* play) {
void EnGo_CurledUp(EnGo* this, PlayState* play) {
if ((DECR(this->unk_210) == 0) && EnGo_IsCameraModified(this, play)) {
Audio_PlaySfxGeneral(NA_SE_EN_GOLON_WAKE_UP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_GOLON_WAKE_UP);
this->skelAnime.playSpeed = 0.1f;
this->skelAnime.playSpeed *= PARAMS_GET_NOSHIFT(this->actor.params, 4, 4) == 0x90 ? 0.5f : 1.0f;
@ -822,8 +821,7 @@ void EnGo_WakeUp(EnGo* this, PlayState* play) {
}
if (DECR(this->unk_212) == 0) {
Audio_PlaySfxGeneral(NA_SE_EN_GOLON_SIT_DOWN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_GOLON_SIT_DOWN);
EnGo_SetupAction(this, func_80A405CC);
} else if (!EnGo_IsCameraModified(this, play)) {
EnGo_ReverseAnimation(this);
@ -842,8 +840,7 @@ void func_80A40494(EnGo* this, PlayState* play) {
frame += this->skelAnime.playSpeed;
if (!(frame >= 0.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_DODO_M_GND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_DODO_M_GND);
EnGo_SpawnDust(this, 10, 0.4f, 0.1f, 16, 26.0f, 2.0f);
EnGo_ReverseAnimation(this);
this->skelAnime.playSpeed = 0.0f;
@ -937,8 +934,7 @@ void func_80A408D8(EnGo* this, PlayState* play) {
EnGo_SetupAction(this, func_80A40494);
} else if (EnGo_IsCameraModified(this, play)) {
EnGo_ReverseAnimation(this);
Audio_PlaySfxGeneral(NA_SE_EN_GOLON_SIT_DOWN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_GOLON_SIT_DOWN);
this->skelAnime.playSpeed = 0.0f;
EnGo_SetupAction(this, func_80A405CC);
}

View File

@ -441,8 +441,7 @@ void EnGoma_Dead(EnGoma* this, PlayState* play) {
parent->childrenGohmaState[this->actor.params] = -1;
}
Audio_PlaySfxGeneral(NA_SE_EN_EXTINCT, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_EXTINCT);
Actor_Kill(&this->actor);
Item_DropCollectibleRandom(play, NULL, &this->actor.world.pos, 0x30);
}

View File

@ -627,8 +627,7 @@ void EnHorse_PlayWalkingSfx(EnHorse* this) {
return;
}
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_WALK);
if (++this->soundTimer >= ARRAY_COUNT(sAnimSoundFrames)) {
this->soundTimer = 0;
}
@ -636,13 +635,11 @@ void EnHorse_PlayWalkingSfx(EnHorse* this) {
}
void EnHorse_PlayTrottingSfx(EnHorse* this) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
}
void EnHorse_PlayGallopingSfx(EnHorse* this) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
}
f32 EnHorse_SlopeSpeedMultiplier(EnHorse* this, PlayState* play) {
@ -677,13 +674,11 @@ void EnHorse_IdleAnimSounds(EnHorse* this, PlayState* play) {
(this->curFrame > 28.0f && this->type == HORSE_HNI)) &&
!(this->stateFlags & ENHORSE_SANDDUST_SOUND)) {
this->stateFlags |= ENHORSE_SANDDUST_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_SANDDUST, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_SANDDUST);
} else if (this->animationIdx == ENHORSE_ANIM_REARING && this->curFrame > 25.0f &&
!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
this->stateFlags |= ENHORSE_LAND2_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND2);
}
}
@ -1100,8 +1095,7 @@ void EnHorse_StartMountedIdle(EnHorse* this) {
if ((this->curFrame > 35.0f && this->type == HORSE_EPONA) || (this->curFrame > 28.0f && this->type == HORSE_HNI)) {
if (!(this->stateFlags & ENHORSE_SANDDUST_SOUND)) {
this->stateFlags |= ENHORSE_SANDDUST_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_SANDDUST, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_SANDDUST);
}
}
curFrame = this->skin.skelAnime.curFrame;
@ -1153,8 +1147,7 @@ void EnHorse_MountedIdleWhinney(EnHorse* this) {
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_GROAN);
}
}
@ -1424,8 +1417,7 @@ void EnHorse_StartRearing(EnHorse* this) {
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
Rumble_Request(0.0f, 180, 20, 100);
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f,
@ -1440,8 +1432,7 @@ void EnHorse_MountedRearing(EnHorse* this, PlayState* play) {
if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
this->stateFlags |= ENHORSE_LAND2_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND2);
Rumble_Request(0.0f, 180, 20, 100);
}
}
@ -1474,8 +1465,7 @@ void EnHorse_StartBraking(EnHorse* this, PlayState* play) {
this->action = ENHORSE_ACT_STOPPING;
this->animationIdx = ENHORSE_ANIM_STOPPING;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_SLIP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_SLIP);
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.5f, 0.0f,
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
@ -1496,8 +1486,7 @@ void EnHorse_Stopping(EnHorse* this, PlayState* play) {
if (Rand_ZeroOne() > 0.5) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
Rumble_Request(0.0f, 180, 20, 100);
this->stateFlags &= ~ENHORSE_STOPPING_NEIGH_SOUND;
@ -1627,8 +1616,7 @@ void EnHorse_StartLowJump(EnHorse* this, PlayState* play) {
y = jointTable->y;
this->riderPos.y -= y * 0.01f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_JUMP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP);
Rumble_Request(0.0f, 170, 10, 10);
}
@ -1662,8 +1650,7 @@ void EnHorse_LowJump(EnHorse* this, PlayState* play) {
if (SkelAnime_Update(&this->skin.skelAnime) ||
(curFrame > 17.0f && this->actor.world.pos.y < this->actor.floorHeight - this->actor.velocity.y + 80.0f)) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND);
Rumble_Request(0.0f, 255, 10, 80);
this->stateFlags &= ~ENHORSE_JUMPING;
this->actor.gravity = -3.5f;
@ -1702,8 +1689,7 @@ void EnHorse_StartHighJump(EnHorse* this, PlayState* play) {
this->riderPos.y -= y * 0.01f;
this->stateFlags |= ENHORSE_CALC_RIDER_POS;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_JUMP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP);
Rumble_Request(0.0f, 170, 10, 10);
}
@ -1738,8 +1724,7 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) {
if (SkelAnime_Update(&this->skin.skelAnime) ||
(curFrame > 23.0f && this->actor.world.pos.y < this->actor.floorHeight - this->actor.velocity.y + 80.0f)) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND);
Rumble_Request(0.0f, 255, 10, 80);
this->stateFlags &= ~ENHORSE_JUMPING;
this->actor.gravity = -3.5f;
@ -1768,8 +1753,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
R_EPONAS_SONG_PLAYED = false;
if (EnHorse_Spawn(this, play)) {
#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH);
#endif
this->stateFlags &= ~ENHORSE_INACTIVE;
gSaveContext.save.info.horseData.sceneId = play->sceneId;
@ -1803,14 +1787,12 @@ void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 sta
} else if (this->animationIdx == ENHORSE_ANIM_WHINNEY) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_GROAN);
}
} else if (this->animationIdx == ENHORSE_ANIM_REARING) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
}
@ -1846,8 +1828,7 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
if (!func_80A5BBBC(play, this, &this->actor.world.pos)) {
if (EnHorse_Spawn(this, play)) {
#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH);
#endif
this->followTimer = 0;
EnHorse_SetFollowAnimation(this, play);
@ -1856,8 +1837,7 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], CAM_DATA_SET_2, NULL, NULL, CAM_ITEM_TYPE_81, 0, 0);
}
} else {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH);
this->followTimer = 0;
EnHorse_StartMovingAnimation(this, 6, -3.0f, 0.0f);
}
@ -1963,8 +1943,7 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) {
this->unk_21C = this->unk_228;
#if OOT_VERSION < PAL_1_0
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
#endif
} else if (this->stateFlags & ENHORSE_TURNING_TO_PLAYER) {
@ -1973,8 +1952,7 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) {
if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
this->stateFlags |= ENHORSE_LAND2_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND2);
}
}
} else {
@ -2001,8 +1979,7 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
}
@ -2030,8 +2007,7 @@ void EnHorse_InitIngoHorse(EnHorse* this) {
EnHorse_UpdateIngoHorseAnim(this);
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_IT_INGO_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_IT_INGO_HORSE_NEIGH);
}
}
@ -2084,12 +2060,10 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) {
animSpeed = this->actor.speed * 0.5f;
} else if (this->animationIdx == ENHORSE_ANIM_TROT) {
animSpeed = this->actor.speed * 0.25f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
} else if (this->animationIdx == ENHORSE_ANIM_GALLOP) {
animSpeed = this->actor.speed * 0.2f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
} else {
animSpeed = 1.0f;
}
@ -2206,8 +2180,7 @@ void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play) {
this->riderPos.y -= y * 0.01f;
this->stateFlags |= ENHORSE_CALC_RIDER_POS;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_JUMP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP);
Rumble_Request(0.0f, 170, 10, 10);
}
@ -2250,8 +2223,7 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorCue* cue) {
if (SkelAnime_Update(&this->skin.skelAnime) ||
(temp_f2 > 19.0f && this->actor.world.pos.y < (this->actor.floorHeight - this->actor.velocity.y) + 80.0f)) {
this->cutsceneFlags |= 1;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND);
Rumble_Request(0.0f, 255, 10, 80);
this->stateFlags &= ~ENHORSE_JUMPING;
this->actor.gravity = -3.5f;
@ -2275,8 +2247,7 @@ void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* cue) {
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f,
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
@ -2287,8 +2258,7 @@ void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorCue* cue) {
if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
this->stateFlags |= ENHORSE_LAND2_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND2);
}
}
if (SkelAnime_Update(&this->skin.skelAnime)) {
@ -2363,8 +2333,7 @@ void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorCue* cu
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f,
@ -2376,8 +2345,7 @@ void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorCue* cue) {
if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
this->stateFlags |= ENHORSE_LAND2_SOUND;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND2);
}
}
if (SkelAnime_Update(&this->skin.skelAnime)) {
@ -2530,13 +2498,11 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) {
animSpeed = this->actor.speed * 0.5f;
} else if (this->animationIdx == ENHORSE_ANIM_TROT) {
animSpeed = this->actor.speed * 0.25f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
Rumble_Request(0.0f, 60, 8, 255);
} else if (this->animationIdx == ENHORSE_ANIM_GALLOP) {
animSpeed = this->actor.speed * 0.2f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
Rumble_Request(0.0f, 120, 8, 255);
} else {
animSpeed = 1.0f;
@ -2638,8 +2604,7 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) {
if (R_EPONAS_SONG_PLAYED || this->type == HORSE_HNI) {
EnHorse_StartIdleRidable(this);
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH);
}
distToHome = Math3D_Vec3f_DistXYZ(&this->actor.home.pos, &this->actor.world.pos);
@ -2749,8 +2714,7 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) {
this->animationIdx = ENHORSE_ANIM_WHINNEY;
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_GROAN);
}
}
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f,
@ -2806,11 +2770,9 @@ void EnHorse_BridgeJumpInit(EnHorse* this, PlayState* play) {
Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f);
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_JUMP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_JUMP);
Rumble_Request(0.0f, 170, 10, 10);
this->postDrawFunc = NULL;
}
@ -2859,8 +2821,7 @@ void EnHorse_CheckBridgeJumpLanding(EnHorse* this, PlayState* play) {
this->actor.world.pos.y = sBridgeJumps[this->bridgeJumpIdx].pos.y;
func_80028A54(play, 25.0f, &this->actor.world.pos);
EnHorse_JumpLanding(this, play);
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND);
Rumble_Request(0.0f, 255, 10, 80);
}
}
@ -3186,8 +3147,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) {
Math_CosS(this->actor.wallYaw - ((void)0, this->actor.world).rot.y) < -0.3f) {
if (this->actor.speed > 4.0f) {
this->actor.speed -= 1.0f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_SANDDUST, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_SANDDUST);
}
}
@ -3391,8 +3351,7 @@ void EnHorse_CheckBoost(EnHorse* thisx, PlayState* play2) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
if (Rand_ZeroOne() < 0.1f) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
}
}
@ -3433,8 +3392,7 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) {
if (this->boostTimer == 8 && Rand_ZeroOne() < 0.25f) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
}
play->interfaceCtx.numHorseBoosts = this->numBoosts;
@ -3576,8 +3534,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
if (this->colliderJntSph.base.acFlags & AC_HIT) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_21C, NA_SE_EV_HORSE_NEIGH);
}
}
if (this->action != ENHORSE_ACT_INGO_RACE) {

View File

@ -166,8 +166,7 @@ void func_80A686A8(EnHorseGanon* this, PlayState* play) {
void func_80A68870(EnHorseGanon* this) {
if ((this->skin.skelAnime.curFrame > D_80A692B8[this->soundCount]) &&
(this->soundCount != 0 || !(this->skin.skelAnime.curFrame > D_80A692B8[1]))) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_WALK);
this->soundCount++;
if (this->soundCount >= 2) {
@ -247,12 +246,10 @@ void func_80A68B20(EnHorseGanon* this) {
sp30 = this->actor.speed / 3.0f;
} else if (this->currentAnimation == 3) {
sp30 = this->actor.speed / 5.0f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
} else if (this->currentAnimation == 4) {
sp30 = this->actor.speed / 7.0f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
} else {
sp30 = 1.0f;
}

View File

@ -107,8 +107,7 @@ void func_80A693D0(EnHorseLinkChild* this) {
if ((this->skin.skelAnime.curFrame > D_80A6AF5C[this->unk_1F0]) &&
!((this->unk_1F0 == 0) && (this->skin.skelAnime.curFrame > D_80A6AF5C[1]))) {
Audio_PlaySfxGeneral(NA_SE_EV_KID_HORSE_WALK, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_WALK);
this->unk_1F0++;
if (this->unk_1F0 >= ARRAY_COUNT(D_80A6AF5C)) {
this->unk_1F0 = 0;
@ -121,15 +120,12 @@ void func_80A6948C(EnHorseLinkChild* this) {
func_80A693D0(this);
} else if (this->skin.skelAnime.curFrame == 0.0f) {
if ((this->animationIdx == 3) || (this->animationIdx == 4)) {
Audio_PlaySfxGeneral(NA_SE_EV_KID_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN);
} else if (this->animationIdx == 1) {
if (Rand_ZeroOne() > 0.5f) {
Audio_PlaySfxGeneral(NA_SE_EV_KID_HORSE_GROAN, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_GROAN);
} else {
Audio_PlaySfxGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH);
}
}
}
@ -368,8 +364,7 @@ void func_80A6A068(EnHorseLinkChild* this, PlayState* play) {
distFromLink = Actor_WorldDistXZToActor(&this->actor, &player->actor);
if (gSaveContext.save.entranceIndex == ENTR_LON_LON_RANCH_1) {
Audio_PlaySfxGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH);
func_80A6A724(this);
return;
}
@ -461,8 +456,7 @@ void func_80A6A5A4(EnHorseLinkChild* this, PlayState* play) {
if (R_EPONAS_SONG_PLAYED) {
R_EPONAS_SONG_PLAYED = false;
Audio_PlaySfxGeneral(NA_SE_EV_KID_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_NEIGH);
func_80A6A724(this);
} else {
this->actor.speed = 0.0f;

View File

@ -167,8 +167,7 @@ void func_80A6B250(EnHorseNormal* this) {
if (D_80A6D4C0[this->unk_200] < this->skin.skelAnime.curFrame &&
((this->unk_200 != 0) || !(D_80A6D4C0[1] < this->skin.skelAnime.curFrame))) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_WALK);
this->unk_200++;
if (this->unk_200 >= ARRAY_COUNT(D_80A6D4C0)) {
this->unk_200 = 0;
@ -360,11 +359,9 @@ void func_80A6BC48(EnHorseNormal* this) {
void func_80A6BCEC(EnHorseNormal* this) {
if (this->animationIdx == 5) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
} else if (this->animationIdx == 6) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
}
}
@ -373,12 +370,10 @@ void func_80A6BD7C(EnHorseNormal* this) {
if (this->animationIdx == 0 && frame > 28.0f && !(this->unk_1E4 & 1)) {
this->unk_1E4 |= 1;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_SANDDUST, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_SANDDUST);
} else if (this->animationIdx == 3 && frame > 25.0f && !(this->unk_1E4 & 2)) {
this->unk_1E4 |= 2;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_LAND2);
}
}
@ -447,11 +442,9 @@ void EnHorseNormal_Wander(EnHorseNormal* this, PlayState* play) {
this->unk_1E4 &= ~1;
this->unk_1E4 &= ~2;
if (phi_t0 == 1) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_GROAN);
} else if (phi_t0 == 3) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_NEIGH);
} else {
func_80A6BCEC(this);
}
@ -478,11 +471,9 @@ void EnHorseNormal_Wander(EnHorseNormal* this, PlayState* play) {
this->unk_1E4 &= ~1;
this->unk_1E4 &= ~2;
if (phi_t0 == 1) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_GROAN);
} else if (phi_t0 == 3) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_NEIGH);
} else {
func_80A6BCEC(this);
}
@ -517,12 +508,10 @@ void EnHorseNormal_Wait(EnHorseNormal* this, PlayState* play) {
this->animationIdx = 0;
} else if (rand < 0.8f) {
this->animationIdx = 1;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_GROAN);
} else {
this->animationIdx = 3;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_NEIGH);
}
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
@ -553,13 +542,11 @@ void EnHorseNormal_WaitClone(EnHorseNormal* this, PlayState* play) {
} else if (rand < 0.8f) {
this->animationIdx = 1;
this->unk_1E4 |= 0x20;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_GROAN);
} else {
this->animationIdx = 3;
this->unk_1E4 |= 0x20;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_204, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_204, NA_SE_EV_HORSE_NEIGH);
}
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
@ -648,20 +635,16 @@ void func_80A6CC88(PlayState* play, EnHorseNormal* this, Vec3f* arg2) {
if (this->animationIdx == 0 && curFrame > 28.0f && !(this->unk_1E4 & 8)) {
this->unk_1E4 |= 8;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_SANDDUST, &this->unk_1E8, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_1E8, NA_SE_EV_HORSE_SANDDUST);
} else if (this->animationIdx == 3 && curFrame > 25.0f && !(this->unk_1E4 & 0x10)) {
this->unk_1E4 |= 0x10;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_LAND2, &this->unk_1E8, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_1E8, NA_SE_EV_HORSE_LAND2);
} else if (this->animationIdx == 3 && this->unk_1E4 & 0x20) {
this->unk_1E4 &= ~0x20;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_1F4, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_1F4, NA_SE_EV_HORSE_NEIGH);
} else if (this->animationIdx == 1 && this->unk_1E4 & 0x20) {
this->unk_1E4 &= ~0x20;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->unk_1F4, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->unk_1F4, NA_SE_EV_HORSE_GROAN);
}
}

View File

@ -212,8 +212,7 @@ void EnHorseZelda_Spur(EnHorseZelda* this) {
this->action = 1;
this->animationIndex = 0;
speedMod = this->actor.speed / 6.0f;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_RUN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN);
Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->animationIndex],
splaySpeeds[this->animationIndex] * speedMod * 1.5f, 0.0f,
Animation_GetLastFrame(sAnimationHeaders[this->animationIndex]), ANIMMODE_ONCE, 0.0f);

View File

@ -1059,30 +1059,23 @@ void EnIk_StartMinibossBgm(void) {
// Cutscene: Nabooru Knuckle Wakes up
void EnIk_UpdateAction2Sfx(EnIk* this) {
if (Animation_OnFrame(&this->skelAnime, 1.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_WAKEUP, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_WAKEUP);
} else if (Animation_OnFrame(&this->skelAnime, 33.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_WALK, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_WALK);
} else if (Animation_OnFrame(&this->skelAnime, 68.0f) || Animation_OnFrame(&this->skelAnime, 80.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_ARMOR_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_ARMOR_DEMO);
} else if (Animation_OnFrame(&this->skelAnime, 107.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_FINGER_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_FINGER_DEMO);
} else if (Animation_OnFrame(&this->skelAnime, 156.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_ARMOR_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_ARMOR_DEMO);
} else if (Animation_OnFrame(&this->skelAnime, 188.0f)) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_WAVE_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_WAVE_DEMO);
}
}
// Cutscene: Summons Axe for Nabooru Knuckle
void EnIk_PlayAxeSpawnSfx(EnIk* this, PlayState* play, Vec3f* pos) {
Audio_PlaySfxGeneral(NA_SE_EN_TWINROBA_TRANSFORM, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_TWINROBA_TRANSFORM);
}
void EnIk_SpawnAxeSmoke(EnIk* this, PlayState* play, Vec3f* pos) {
@ -1198,8 +1191,7 @@ void EnIk_HandleEnemyChange(EnIk* this, PlayState* play, s32 animFinished) {
}
void EnIk_PlayArmorFallSfx(EnIk* this) {
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_STAGGER_DEMO, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_IRONNACK_STAGGER_DEMO);
}
void EnIk_PlayDeathSfx(EnIk* this, PlayState* play) {
@ -1208,8 +1200,7 @@ void EnIk_PlayDeathSfx(EnIk* this, PlayState* play) {
f32 wDest;
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &this->actor.world.pos, &D_80A78FA0, &wDest);
Audio_PlaySfxGeneral(NA_SE_EN_IRONNACK_DEAD, &D_80A78FA0, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&D_80A78FA0, NA_SE_EN_IRONNACK_DEAD);
}
// Cutscene: starts after final hit to Nabooru

View File

@ -652,11 +652,9 @@ void func_80A7A304(EnIn* this, PlayState* play) {
this->animationIdx %= 8;
this->unk_1E8 = this->animationIdx;
if (this->animationIdx == 3 || this->animationIdx == 4) {
Audio_PlaySfxGeneral(NA_SE_IT_LASH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_IT_LASH);
if (Rand_ZeroOne() < 0.3f) {
Audio_PlaySfxGeneral(NA_SE_IT_INGO_HORSE_NEIGH, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_IT_INGO_HORSE_NEIGH);
}
}
Animation_Change(&this->skelAnime, D_80A7B918[this->animationIdx], 1.0f, 0.0f,

View File

@ -85,8 +85,7 @@ void EnLightbox_Update(Actor* thisx, PlayState* play) {
if (thisx->speed) {
if (thisx->bgCheckFlags & BGCHECKFLAG_WALL) {
thisx->world.rot.y = (thisx->world.rot.y + thisx->wallYaw) - thisx->world.rot.y;
Audio_PlaySfxGeneral(NA_SE_EV_BOMB_BOUND, &thisx->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&thisx->projectedPos, NA_SE_EV_BOMB_BOUND);
thisx->speed *= 0.7f;
thisx->bgCheckFlags &= ~BGCHECKFLAG_WALL;
}
@ -97,8 +96,7 @@ void EnLightbox_Update(Actor* thisx, PlayState* play) {
} else {
Math_StepToF(&thisx->speed, 0, IREG(58) / 100.0f);
if ((thisx->bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (thisx->velocity.y < IREG(59) / 100.0f)) {
Audio_PlaySfxGeneral(NA_SE_EV_BOMB_BOUND, &thisx->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&thisx->projectedPos, NA_SE_EV_BOMB_BOUND);
thisx->velocity.y *= IREG(60) / 100.0f;
thisx->bgCheckFlags &= ~BGCHECKFLAG_GROUND;
} else {

View File

@ -93,10 +93,8 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) {
if (!gSaveContext.save.info.playerData.isMagicAcquired || (gSaveContext.magicState != MAGIC_STATE_IDLE) ||
(PARAMS_GET_S(this->actor.params, 8, 8) &&
!(Magic_RequestChange(play, PARAMS_GET_S(this->actor.params, 8, 8), MAGIC_CONSUME_NOW)))) {
Audio_PlaySfxGeneral(NA_SE_IT_ROLLING_CUT, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_ROLLING_CUT);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SWORD_SWING_HARD);
Actor_Kill(&this->actor);
return;
}
@ -108,8 +106,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) {
this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4);
func_80A9EFE0(this, func_80A9F9B4);
this->unk_1C4 = 8;
Audio_PlaySfxGeneral(NA_SE_IT_ROLLING_CUT_LV1, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_ROLLING_CUT_LV1);
this->unk_1AC = 1.0f;
} else {
func_80A9EFE0(this, func_80A9F408);
@ -138,10 +135,8 @@ void func_80A9F350(EnMThunder* this, PlayState* play) {
if (player->stateFlags2 & PLAYER_STATE2_17) {
if (player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) {
Audio_PlaySfxGeneral(NA_SE_IT_ROLLING_CUT, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_ROLLING_CUT);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SWORD_SWING_HARD);
}
Actor_Kill(&this->actor);
@ -189,10 +184,8 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
if (player->unk_858 <= 0.15f) {
if ((player->unk_858 >= 0.1f) && (player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H)) {
Audio_PlaySfxGeneral(NA_SE_IT_ROLLING_CUT, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Audio_PlaySfxGeneral(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_ROLLING_CUT);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_IT_SWORD_SWING_HARD);
}
Actor_Kill(&this->actor);
return;
@ -222,8 +215,7 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
NA_SE_IT_ROLLING_CUT_LV1,
};
Audio_PlaySfxGeneral(sSfxIds[this->unk_1C6], &player->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, sSfxIds[this->unk_1C6]);
}
this->unk_1AC = 1.0f;

View File

@ -78,8 +78,7 @@ void EnPubox_Update(Actor* thisx, PlayState* play) {
thisx->speed = CLAMP(thisx->speed, -2.5f, 2.5f);
Math_SmoothStepToF(&thisx->speed, 0.0f, 1.0f, 1.0f, 0.0f);
if (thisx->speed != 0.0f) {
Audio_PlaySfxGeneral(NA_SE_EV_ROCK_SLIDE - SFX_FLAG, &thisx->projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&thisx->projectedPos, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
}
this->dyna.unk_154 = 0.0f;
this->dyna.unk_150 = 0.0f;

View File

@ -651,8 +651,7 @@ void func_80AEBC30(PlayState* play) {
if (play->csCtx.curFrame == 205) {
player = GET_PLAYER(play);
Audio_PlaySfxGeneral(NA_SE_EV_DIVE_INTO_WATER, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_EV_DIVE_INTO_WATER);
}
}
@ -1261,8 +1260,7 @@ void func_80AED4FC(EnRu1* this) {
void func_80AED520(EnRu1* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Audio_PlaySfxGeneral(NA_SE_PL_PULL_UP_RUTO, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&player->actor.projectedPos, NA_SE_PL_PULL_UP_RUTO);
Sfx_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_VO_RT_LIFT);
}

View File

@ -694,8 +694,7 @@ void func_80AF68E4(EnSa* this, PlayState* play) {
phi_v0 = this->unk_20C;
}
if (phi_v0 == 0) {
Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_DIRT);
this->unk_20C = 8;
}
}

View File

@ -466,8 +466,7 @@ void EnSyatekiNiw_Archery(EnSyatekiNiw* this, PlayState* play) {
}
if ((this->archeryTimer == 0) && ((player->actor.world.pos.z - 30.0f) < this->actor.world.pos.z)) {
Audio_PlaySfxGeneral(NA_SE_VO_LI_DOWN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_VO_LI_DOWN);
this->movementTimer = 20;
this->archeryState = 6;
this->actor.speed = 0.0f;

View File

@ -261,8 +261,7 @@ void EnTp_Head_ApproachPlayer(EnTp* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y + 30.0f, 1.0f, 0.5f, 0.0f);
Audio_PlaySfxGeneral(NA_SE_EN_TAIL_FLY - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_TAIL_FLY - SFX_FLAG);
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
@ -403,8 +402,7 @@ void EnTp_Head_TakeOff(EnTp* this, PlayState* play) {
Math_SmoothStepToF(&this->actor.speed, 2.5f, 0.1f, 0.2f, 0.0f);
Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y + 85.0f + this->horizontalVariation, 1.0f,
this->actor.speed * 0.25f, 0.0f);
Audio_PlaySfxGeneral(NA_SE_EN_TAIL_FLY - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_TAIL_FLY - SFX_FLAG);
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
@ -501,8 +499,7 @@ void EnTp_Head_Wait(EnTp* this, PlayState* play) {
this->actor.shape.rot.y = this->actor.world.rot.y;
if (this->actor.world.pos.y != this->actor.home.pos.y) {
Audio_PlaySfxGeneral(NA_SE_EN_TAIL_FLY - SFX_FLAG, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_TAIL_FLY - SFX_FLAG);
}
}
@ -571,8 +568,7 @@ void EnTp_Head_BurrowReturnHome(EnTp* this, PlayState* play) {
}
if (this->actor.world.pos.y != this->actor.home.pos.y) {
Audio_PlaySfxGeneral(NA_SE_EN_TAIL_FLY - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_TAIL_FLY - SFX_FLAG);
}
if (closeToFloor && ((play->gameplayFrames & 1) != 0)) {
@ -721,8 +717,7 @@ void EnTp_Update(Actor* thisx, PlayState* play) {
this->actor.shape.rot.z += 0x800;
if (this->actor.shape.rot.z == 0) {
Audio_PlaySfxGeneral(NA_SE_EN_TAIL_CRY, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_TAIL_CRY);
}
if (this->actionIndex >= TAILPASARAN_ACTION_TAIL_FOLLOWHEAD) {

View File

@ -147,8 +147,7 @@ void EnVbBall_UpdateBones(EnVbBall* this, PlayState* play) {
this->actor.velocity.z = cosf(angle) * 10.0f;
this->actor.velocity.y *= -0.5f;
if (PARAMS_GET_U(this->actor.params, 0, 1)) {
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_LAND, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EN_VALVAISA_LAND);
}
for (i = 0; i < 10; i++) {
Vec3f dustVel = { 0.0f, 0.0f, 0.0f };
@ -230,9 +229,7 @@ void EnVbBall_Update(Actor* thisx, PlayState* play2) {
this->actor.world.rot.z * 0.5f, this->actor.params + 1);
if (newActor != NULL) {
if ((i == 0) && (this->actor.params == 100)) {
Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_ROCK, &newActor->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&newActor->actor.projectedPos, NA_SE_EN_VALVAISA_ROCK);
}
newActor->actor.parent = this->actor.parent;
newActor->actor.velocity = spawnOffset;

View File

@ -263,8 +263,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, NA_BGM_OPENING_GANON);
}
if (play->csCtx.curFrame == 960) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_GROAN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_GROAN);
}
} else if (type == ENVIEWER_TYPE_6_HORSE_GANONDORF) {
if (gSaveContext.sceneLayer == 5 || gSaveContext.sceneLayer == 10) {
@ -748,8 +747,7 @@ void EnViewer_UpdatePosition(EnViewer* this, PlayState* play) {
if (type == ENVIEWER_TYPE_0_HORSE_ZELDA) {
if (!sHorseSfxPlayed) {
sHorseSfxPlayed = true;
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_HORSE_NEIGH);
}
Actor_PlaySfx(&this->actor, NA_SE_EV_HORSE_RUN_LEVEL - SFX_FLAG);
}

View File

@ -199,9 +199,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
if (interactionType < 0) {
if (player->unk_860 == 0) {
player->unk_860 = 210;
Audio_PlaySfxGeneral(NA_SE_EV_FLAME_IGNITION, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_FLAME_IGNITION);
} else if (player->unk_860 < 200) {
player->unk_860 = 200;
}
@ -237,8 +235,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
this->litTimer = (litTimeScale * 50) + 110;
}
}
Audio_PlaySfxGeneral(NA_SE_EV_FLAME_IGNITION, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->actor.projectedPos, NA_SE_EV_FLAME_IGNITION);
}
}
}

View File

@ -141,7 +141,6 @@ void EffectSsDeadDb_Update(PlayState* play, u32 index, EffectSs* this) {
if (this->rPlaySfx && (this->rTextIdx == 1)) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &this->pos, &this->vec, &w);
Audio_PlaySfxGeneral(NA_SE_EN_EXTINCT, &this->vec, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->vec, NA_SE_EN_EXTINCT);
}
}

View File

@ -50,6 +50,5 @@ void EffectSsDeadSound_Update(PlayState* play, u32 index, EffectSs* this) {
return;
}
Audio_PlaySfxGeneral(this->rSfxId, &this->pos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultReverb);
SFX_PLAY_AT_POS(&this->pos, this->rSfxId);
}