mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 09:45:02 +00:00
Document code_8006BA00 (Audio Sound Sources) (#997)
* Document SoundSources * PR Suggestions * Duration timers to dec * `PlaySfxByPosAndId` -> `PlaySoundByPosition` * Improve names * `PlaySfxAtStationaryPosition` -> `PlaySfxAtFixedWorldPos` and `originWorldPos` -> `worldPos` * format
This commit is contained in:
parent
b1d3844325
commit
59e212c197
62 changed files with 119 additions and 111 deletions
|
@ -268,4 +268,4 @@
|
|||
</Array>
|
||||
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
|
@ -829,9 +829,9 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx);
|
|||
void Cutscene_SetSegment(GlobalContext* globalCtx, void* segment);
|
||||
void* MemCopy(void* dest, void* src, s32 size);
|
||||
void GetItem_Draw(GlobalContext* globalCtx, s16 drawId);
|
||||
void func_8006BA00(GlobalContext* globalCtx);
|
||||
void func_8006BA30(GlobalContext* globalCtx);
|
||||
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId);
|
||||
void SoundSource_InitAll(GlobalContext* globalCtx);
|
||||
void SoundSource_UpdateAll(GlobalContext* globalCtx);
|
||||
void SoundSource_PlaySfxAtFixedWorldPos(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId);
|
||||
u16 ElfMessage_GetSariaText(GlobalContext* globalCtx);
|
||||
u16 ElfMessage_GetCUpText(GlobalContext* globalCtx);
|
||||
u16 Text_GetFaceReaction(GlobalContext* globalCtx, u32 reactionSet);
|
||||
|
|
|
@ -282,8 +282,8 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 countdown;
|
||||
/* 0x04 */ Vec3f originPos;
|
||||
/* 0x10 */ Vec3f relativePos;
|
||||
/* 0x04 */ Vec3f worldPos;
|
||||
/* 0x10 */ Vec3f projectedPos;
|
||||
} SoundSource; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
|
|
2
spec
2
spec
|
@ -314,7 +314,7 @@ beginseg
|
|||
include "build/src/code/z_demo.o"
|
||||
include "build/src/code/code_80069420.o"
|
||||
include "build/src/code/z_draw.o"
|
||||
include "build/src/code/code_8006BA00.o"
|
||||
include "build/src/code/z_sound_source.o"
|
||||
include "build/src/code/z_elf_message.o"
|
||||
include "build/src/code/z_face_reaction.o"
|
||||
include "build/src/code/code_8006C3A0.o"
|
||||
|
|
|
@ -2986,7 +2986,7 @@ Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory) {
|
|||
*/
|
||||
void Enemy_StartFinishingBlow(GlobalContext* globalCtx, Actor* actor) {
|
||||
globalCtx->actorCtx.freezeFlashTimer = 5;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
}
|
||||
|
||||
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
|
|
|
@ -228,7 +228,7 @@ void Gameplay_Init(GameState* thisx) {
|
|||
func_80112098(globalCtx);
|
||||
Message_Init(globalCtx);
|
||||
GameOver_Init(globalCtx);
|
||||
func_8006BA00(globalCtx);
|
||||
SoundSource_InitAll(globalCtx);
|
||||
Effect_InitContext(globalCtx);
|
||||
EffectSs_InitInfo(globalCtx, 0x55);
|
||||
CollisionCheck_InitContext(globalCtx, &globalCtx->colChkCtx);
|
||||
|
@ -975,7 +975,7 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
LOG_NUM("1", 1, "../z_play.c", 3771);
|
||||
}
|
||||
|
||||
func_8006BA30(globalCtx);
|
||||
SoundSource_UpdateAll(globalCtx);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3777);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
|
||||
void func_8006BA00(GlobalContext* globalCtx) {
|
||||
void SoundSource_InitAll(GlobalContext* globalCtx) {
|
||||
SoundSource* sources = &globalCtx->soundSources[0];
|
||||
s32 i;
|
||||
|
||||
|
@ -9,16 +9,16 @@ void func_8006BA00(GlobalContext* globalCtx) {
|
|||
// clang-format on
|
||||
}
|
||||
|
||||
void func_8006BA30(GlobalContext* globalCtx) {
|
||||
void SoundSource_UpdateAll(GlobalContext* globalCtx) {
|
||||
SoundSource* source = &globalCtx->soundSources[0];
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); i++) {
|
||||
if (source->countdown != 0) {
|
||||
if (DECR(source->countdown) == 0) {
|
||||
Audio_StopSfxByPos(&source->relativePos);
|
||||
Audio_StopSfxByPos(&source->projectedPos);
|
||||
} else {
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->originPos, &source->relativePos);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ void func_8006BA30(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId) {
|
||||
void SoundSource_PlaySfxAtFixedWorldPos(GlobalContext* globalCtx, Vec3f* worldPos, s32 duration, u16 sfxId) {
|
||||
s32 countdown;
|
||||
SoundSource* source;
|
||||
s32 smallestCountdown = 0xFFFF;
|
||||
|
@ -39,6 +39,7 @@ void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duratio
|
|||
break;
|
||||
}
|
||||
|
||||
// Store the sound source with the smallest remaining countdown
|
||||
countdown = source->countdown;
|
||||
if (countdown < smallestCountdown) {
|
||||
smallestCountdown = countdown;
|
||||
|
@ -47,14 +48,15 @@ void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duratio
|
|||
source++;
|
||||
}
|
||||
|
||||
// If no sound source is available, replace the sound source with the smallest remaining countdown
|
||||
if (i >= ARRAY_COUNT(globalCtx->soundSources)) {
|
||||
source = backupSource;
|
||||
Audio_StopSfxByPos(&source->relativePos);
|
||||
Audio_StopSfxByPos(&source->projectedPos);
|
||||
}
|
||||
|
||||
source->originPos = *pos;
|
||||
source->worldPos = *worldPos;
|
||||
source->countdown = duration;
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->originPos, &source->relativePos);
|
||||
Audio_PlaySoundGeneral(sfxId, &source->relativePos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&globalCtx->viewProjectionMtxF, &source->worldPos, &source->projectedPos);
|
||||
Audio_PlaySoundGeneral(sfxId, &source->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
|
@ -212,7 +212,7 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
func_80033DB8(globalCtx, 10, 15);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 0x28, NA_SE_EV_BOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_BOX_BREAK);
|
||||
}
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ void BgHakaHuta_PlaySound(BgHakaHuta* this, GlobalContext* globalCtx, u16 sfx) {
|
|||
: this->dyna.actor.world.pos.z - 120.0f;
|
||||
pos.x = this->dyna.actor.world.pos.x;
|
||||
pos.y = this->dyna.actor.world.pos.y;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pos, 30, sfx);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &pos, 30, sfx);
|
||||
}
|
||||
|
||||
void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -127,7 +127,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, GlobalContext* globalCtx) {
|
|||
pos.z = this->dyna.actor.world.pos.z;
|
||||
pos.y = this->dyna.actor.world.pos.y + 80.0f;
|
||||
EffectSsBomb2_SpawnLayered(globalCtx, &pos, &sZeroVector, &sZeroVector, 100, 45);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 50, NA_SE_EV_BOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 50, NA_SE_EV_BOX_BREAK);
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &pos, 20.0f, 0, 350, 100, 50, OBJECT_HAKA_OBJECTS, 40,
|
||||
gEffFragments2DL);
|
||||
this->dropTimer = 5;
|
||||
|
|
|
@ -408,7 +408,8 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, GlobalContext* globalCtx) {
|
|||
Quake_SetQuakeValues(quakeIndex, 5, 0, 0, 0);
|
||||
Quake_SetCountdown(quakeIndex, 999);
|
||||
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ELECTRIC_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 30,
|
||||
NA_SE_EV_ELECTRIC_EXPLOSION);
|
||||
return;
|
||||
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
|
||||
|
|
|
@ -307,9 +307,9 @@ void BgHidanKowarerukabe_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
|
||||
|
||||
if ((this->dyna.actor.params & 0xFF) == 0) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_EXPLOSION);
|
||||
} else {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
}
|
||||
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
|
|
|
@ -97,7 +97,7 @@ void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void func_80891CF4(BgIceShutter* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetTempClear(globalCtx, this->dyna.actor.room)) {
|
||||
Flags_SetClear(globalCtx, this->dyna.actor.room);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
this->actionFunc = func_80891DD4;
|
||||
if (this->dyna.actor.shape.rot.x == 0) {
|
||||
OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
|
||||
|
@ -107,7 +107,7 @@ void func_80891CF4(BgIceShutter* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80891D6C(BgIceShutter* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params)) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
this->actionFunc = func_80891DD4;
|
||||
OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ void BgIceTurara_Break(BgIceTurara* this, GlobalContext* globalCtx, f32 arg2) {
|
|||
s32 j;
|
||||
s32 i;
|
||||
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < 10; j++) {
|
||||
pos.x = this->dyna.actor.world.pos.x + Rand_CenteredFloat(8.0f);
|
||||
|
|
|
@ -149,7 +149,7 @@ void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* glob
|
|||
if (this->timer > 10) {
|
||||
BgJyaBombchuiwa_Break(this, globalCtx);
|
||||
BgJyaBombchuiwa_CleanUpAfterExplosion(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
}
|
||||
} else {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
|
|
|
@ -165,7 +165,7 @@ void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
BgJyaBombiwa_Break(this, globalCtx);
|
||||
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
|
|
|
@ -188,7 +188,7 @@ void BgJyaHaheniron_SetupRubbleCollide(BgJyaHaheniron* this) {
|
|||
void BgJyaHaheniron_RubbleCollide(BgJyaHaheniron* this, GlobalContext* globalCtx) {
|
||||
if (this->timer >= 17) {
|
||||
BgJyaHaheniron_SpawnFragments(globalCtx, &this->actor.world.pos, D_808987AC);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR2);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR2);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -248,7 +248,8 @@ void func_808992E8(BgJyaIronobj* this, GlobalContext* globalCtx) {
|
|||
this->colCylinder.base.acFlags &= ~AC_HIT;
|
||||
if (actor != NULL && actor->id == ACTOR_EN_IK) {
|
||||
particleFunc[this->dyna.actor.params & 1](this, globalCtx, (EnIk*)actor);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 80,
|
||||
NA_SE_EN_IRONNACK_BREAK_PILLAR);
|
||||
dropPos.x = this->dyna.actor.world.pos.x;
|
||||
dropPos.y = this->dyna.actor.world.pos.y + 20.0f;
|
||||
dropPos.z = this->dyna.actor.world.pos.z;
|
||||
|
|
|
@ -191,7 +191,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) {
|
|||
if (this->lightTimer > 40) {
|
||||
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
|
||||
BgJyaMegami_SetupExplode(this);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
|
||||
OnePointCutscene_Init(globalCtx, 3440, -99, &this->dyna.actor, MAIN_CAM);
|
||||
} else {
|
||||
if (this->lightTimer < 8) {
|
||||
|
@ -230,7 +230,7 @@ void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx) {
|
|||
|
||||
this->explosionTimer++;
|
||||
if (this->explosionTimer == 30) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_BREAKDOWN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_BREAKDOWN);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->pieces); i++) {
|
||||
|
|
|
@ -53,7 +53,7 @@ void BgSpot01Idohashira_PlayBreakSfx1(BgSpot01Idohashira* this) {
|
|||
}
|
||||
|
||||
void BgSpot01Idohashira_PlayBreakSfx2(BgSpot01Idohashira* this, GlobalContext* globalCtx) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 60, NA_SE_EV_WOODBOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 60, NA_SE_EV_WOODBOX_BREAK);
|
||||
}
|
||||
|
||||
void func_808AAD3C(GlobalContext* globalCtx, Vec3f* vec, u32 arg2) {
|
||||
|
|
|
@ -78,7 +78,7 @@ void func_808AE5A8(BgSpot05Soko* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_808AE5B4(BgSpot05Soko* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
|
||||
Actor_SetFocus(&this->dyna.actor, 50.0f);
|
||||
OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
|
||||
this->actionFunc = func_808AE630;
|
||||
|
|
|
@ -185,7 +185,7 @@ void BgSpot08Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
func_808B0324(this, globalCtx);
|
||||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else if (this->dyna.actor.xzDistToPlayer < 800.0f) {
|
||||
|
|
|
@ -137,7 +137,7 @@ void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
func_808B2218(this, globalCtx);
|
||||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
|
||||
Audio_PlaySoundAtPosition(globalCtx, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
|
|
|
@ -512,7 +512,7 @@ void func_808B5B6C(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
|
|||
if (actor->bgCheckFlags & 8 || (actor->bgCheckFlags & 1 && actor->velocity.y < 0.0f)) {
|
||||
BgSpot16Bombstone_SpawnFragments(this, globalCtx);
|
||||
BgSpot16Bombstone_SpawnDust(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &actor->world.pos, 20, NA_SE_EV_ROCK_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &actor->world.pos, 20, NA_SE_EV_ROCK_BROKEN);
|
||||
Actor_Kill(actor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ void BgSpot17Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->dyna.actor.xzDistToPlayer < 650.0f && func_80033684(globalCtx, &this->dyna.actor) != NULL) {
|
||||
func_808B6BC0(this, globalCtx);
|
||||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
|
|
|
@ -3984,7 +3984,8 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
if (sqrtf(SQ(xDistFromLink) + SQ(yDistFromLink) + SQ(zDistFromLink)) <= 25.0f) {
|
||||
spBA = 5;
|
||||
func_8002F6D4(globalCtx, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x30);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40,
|
||||
NA_SE_EN_GANON_HIT_THUNDER);
|
||||
ganondorf->timers[2] = 20;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(ganondorf->unk_4E4); i++) {
|
||||
|
@ -4026,8 +4027,9 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
case 4:
|
||||
if (sqrtf(SQ(xDistFromGanondorf) + SQ(yDistFromGanondorf) + SQ(zDistFromGanondorf)) < 30.0f) {
|
||||
spBA = 3;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GANON_DAMAGE1);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GANON_DAMAGE1);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40,
|
||||
NA_SE_EN_GANON_HIT_THUNDER);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4083,7 +4085,7 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
sp54 = 15.0f;
|
||||
phi_f20 = 30.0f;
|
||||
sp4E = 70;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 80, NA_SE_EN_GANON_HIT_THUNDER);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 80, NA_SE_EN_GANON_HIT_THUNDER);
|
||||
}
|
||||
|
||||
for (i = 0; i < sp4E; i++) {
|
||||
|
@ -4460,7 +4462,8 @@ void func_808E2544(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if (dorf->timers[2] == 0) {
|
||||
func_8002F6D4(globalCtx, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x50);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40,
|
||||
NA_SE_EN_GANON_HIT_THUNDER);
|
||||
dorf->timers[2] = 20;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_4E4); i++) {
|
||||
|
@ -4528,7 +4531,7 @@ void func_808E2544(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (numEffects) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 80, NA_SE_EN_FANTOM_THUNDER);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 80, NA_SE_EN_FANTOM_THUNDER);
|
||||
|
||||
for (i = 0; i < numEffects; i++) {
|
||||
sp60.x = Rand_CenteredFloat(30.0f);
|
||||
|
|
|
@ -1560,7 +1560,7 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
|
|||
this->drawActor = false;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MOFER_CORE_JUMP);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 70, NA_SE_EN_MOFER_LASTVOICE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 70, NA_SE_EN_MOFER_LASTVOICE);
|
||||
}
|
||||
if (this->timers[0] == 0) {
|
||||
this->csState = MO_DEATH_DRAIN_WATER_1;
|
||||
|
|
|
@ -137,7 +137,7 @@ void DemoGj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void DemoGj_PlayExplosionSfx(DemoGj* this, GlobalContext* globalCtx) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 50, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 50, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
}
|
||||
|
||||
void DemoGj_SpawnSmoke(GlobalContext* globalCtx, Vec3f* pos, f32 arg2) {
|
||||
|
|
|
@ -75,7 +75,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((thisx->params == 0) || (thisx->params == 1)) {
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &thisx->world.pos, &sp20, &sp1C);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &sp20, 20, NA_SE_EV_OBJECT_FALL);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &sp20, 20, NA_SE_EV_OBJECT_FALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ void DemoGt_PlayEarthquakeSfx() {
|
|||
}
|
||||
|
||||
void DemoGt_PlayExplosion1Sfx(GlobalContext* globalCtx, Vec3f* pos) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, pos, 60, NA_SE_IT_BOMB_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, pos, 60, NA_SE_IT_BOMB_EXPLOSION);
|
||||
}
|
||||
|
||||
void DemoGt_PlayExplosion2Sfx(GlobalContext* globalCtx, Vec3f* pos) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, pos, 60, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, pos, 60, NA_SE_EV_GRAVE_EXPLOSION);
|
||||
}
|
||||
|
||||
void DemoGt_Rumble(GlobalContext* globalCtx) {
|
||||
|
|
|
@ -428,13 +428,13 @@ void DoorKiller_Wait(DoorKiller* this, GlobalContext* globalCtx) {
|
|||
} else if ((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x48) != 0) {
|
||||
DoorKiller_SpawnRubble(&this->actor, globalCtx);
|
||||
this->actionFunc = DoorKiller_Die;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK);
|
||||
}
|
||||
} else if (Actor_GetCollidedExplosive(globalCtx, &this->colliderJntSph.base) != NULL) {
|
||||
// AC sphere: die if hit by explosive
|
||||
DoorKiller_SpawnRubble(&this->actor, globalCtx);
|
||||
this->actionFunc = DoorKiller_Die;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK);
|
||||
} else if (!Player_InCsMode(globalCtx) && (fabsf(playerPosRelToDoor.y) < 20.0f) &&
|
||||
(fabsf(playerPosRelToDoor.x) < 20.0f) && (playerPosRelToDoor.z < 50.0f) &&
|
||||
(playerPosRelToDoor.z > 0.0f)) {
|
||||
|
|
|
@ -279,7 +279,7 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
EffectSsStone1_Spawn(globalCtx, &this->actor.world.pos, 0);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, sfxId);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, sfxId);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
EffectSsHitMark_SpawnCustomScale(globalCtx, 0, 150, &this->actor.world.pos);
|
||||
|
|
|
@ -642,7 +642,7 @@ void func_809BE26C(EnBigokuta* this, GlobalContext* globalCtx) {
|
|||
Flags_SetClear(globalCtx, this->actor.room);
|
||||
Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
|
||||
func_8005ACFC(globalCtx->cameraPtrs[MAIN_CAM], 4);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 50, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 50, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xB0);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
|
|
@ -509,7 +509,7 @@ void EnBili_Die(EnBili* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->timer == 14) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_BIRI_BUBLE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_BIRI_BUBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ void EnBubble_Wait(EnBubble* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnBubble_Pop(EnBubble* this, GlobalContext* globalCtx) {
|
||||
if (EnBubble_Explosion(this, globalCtx) >= 0) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 60, NA_SE_EN_AWA_BREAK);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ void EnButte_TransformIntoFairy(EnButte* this, GlobalContext* globalCtx) {
|
|||
EnButte_UpdateTransformationEffect();
|
||||
|
||||
if (this->timer == 5) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 60, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 60, NA_SE_EV_BUTTERFRY_TO_FAIRY);
|
||||
} else if (this->timer == 4) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.focus.pos.x, this->actor.focus.pos.y,
|
||||
this->actor.focus.pos.z, 0, this->actor.shape.rot.y, 0, FAIRY_HEAL_TIMED);
|
||||
|
|
|
@ -563,7 +563,8 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Actor_Kill(&this->actor);
|
||||
// Player laser sound effect if the laser did not time out.
|
||||
if (this->timers[CLEAR_TAG_TIMER_LASER_DEATH] != 0) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_FANTOM_THUNDER_GND);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20,
|
||||
NA_SE_EN_FANTOM_THUNDER_GND);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -630,7 +631,7 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
Vec3f debrisEffectAcceleration;
|
||||
|
||||
this->shouldExplode = false;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_BOMB_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_BOMB_EXPLOSION);
|
||||
|
||||
// Spawn flash effect.
|
||||
crashEffectLocation.x = this->actor.world.pos.x;
|
||||
|
|
|
@ -496,7 +496,7 @@ void EnEiyer_Land(EnEiyer* this, GlobalContext* globalCtx) {
|
|||
if (this->timer == -1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & 1) {
|
||||
this->timer = 10;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_SINK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_SINK);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
EffectSsGSplash_Spawn(globalCtx, &this->actor.world.pos, NULL, NULL, 1, 700);
|
||||
|
|
|
@ -211,7 +211,7 @@ void EnFireRock_Fall(EnFireRock* this, GlobalContext* globalCtx) {
|
|||
default:
|
||||
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale,
|
||||
3, 8.0f, 200, 10, 0);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
|
||||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ void EnGSwitch_ArcheryPot(EnGSwitch* this, GlobalContext* globalCtx) {
|
|||
KAKERA_COLOR_NONE, OBJECT_TSUBO, object_tsubo_DL_001960);
|
||||
}
|
||||
func_80033480(globalCtx, thisPos, 30.0f, 4, 20, 50, 0);
|
||||
Audio_PlaySoundAtPosition(globalCtx, thisPos, 40, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, thisPos, 40, NA_SE_EV_POT_BROKEN);
|
||||
EnGSwitch_Break(this, globalCtx);
|
||||
this->killTimer = 50;
|
||||
this->broken = true;
|
||||
|
|
|
@ -1913,7 +1913,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_IRON_DOOR_OPEN);
|
||||
}
|
||||
if (this->animTimer > 44) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_IRON_DOOR_CLOSE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_IRON_DOOR_CLOSE);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -853,9 +853,9 @@ void EnGoma_SpawnHatchDebris(EnGoma* this, GlobalContext* globalCtx2) {
|
|||
s16 i;
|
||||
|
||||
if (this->actor.params < 6) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EN_GOMA_BJR_EGG2);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GOMA_BJR_EGG2);
|
||||
} else {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EN_GOMA_EGG2);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_GOMA_EGG2);
|
||||
}
|
||||
|
||||
for (i = 0; i < 15; i++) {
|
||||
|
|
|
@ -706,7 +706,7 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (this->actor.colChkInfo.health <= 10) {
|
||||
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_BOSS);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
if (this->switchFlags != 0xFF) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlags);
|
||||
}
|
||||
|
|
|
@ -349,14 +349,15 @@ void EnIshi_Wait(EnIshi* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
EnIshi_SetupLiftedUp(this);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, liftSounds[type]);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, liftSounds[type]);
|
||||
if ((this->actor.params >> 4) & 1) {
|
||||
EnIshi_SpawnBugs(this, globalCtx);
|
||||
}
|
||||
} else if ((this->collider.base.acFlags & AC_HIT) && (type == ROCK_SMALL) &&
|
||||
this->collider.info.acHitInfo->toucher.dmgFlags & 0x40000048) {
|
||||
EnIshi_DropCollectible(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, sBreakSoundDurations[type], sBreakSounds[type]);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, sBreakSoundDurations[type],
|
||||
sBreakSounds[type]);
|
||||
sFragmentSpawnFuncs[type](this, globalCtx);
|
||||
sDustSpawnFuncs[type](this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -423,8 +424,8 @@ void EnIshi_Fly(EnIshi* this, GlobalContext* globalCtx) {
|
|||
EnIshi_DropCollectible(this, globalCtx);
|
||||
sFragmentSpawnFuncs[type](this, globalCtx);
|
||||
if (!(this->actor.bgCheckFlags & 0x20)) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, sBreakSoundDurations[type],
|
||||
sBreakSounds[type]);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, sBreakSoundDurations[type],
|
||||
sBreakSounds[type]);
|
||||
sDustSpawnFuncs[type](this, globalCtx);
|
||||
}
|
||||
if (type == ROCK_LARGE) {
|
||||
|
@ -454,7 +455,7 @@ void EnIshi_Fly(EnIshi* this, GlobalContext* globalCtx) {
|
|||
this->actor.minVelocityY = -6.0f;
|
||||
sRotSpeedX >>= 2;
|
||||
sRotSpeedY >>= 2;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
this->actor.bgCheckFlags &= ~0x40;
|
||||
}
|
||||
Math_StepToF(&this->actor.shape.yOffset, 0.0f, 2.0f);
|
||||
|
|
|
@ -298,12 +298,12 @@ void EnKusa_Main(EnKusa* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (Actor_HasParent(&this->actor, globalCtx)) {
|
||||
EnKusa_SetupLiftedUp(this);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_PL_PULL_UP_PLANT);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_PL_PULL_UP_PLANT);
|
||||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
EnKusa_SpawnFragments(this, globalCtx);
|
||||
EnKusa_DropCollectible(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
|
||||
|
||||
if ((this->actor.params >> 4) & 1) {
|
||||
EnKusa_SpawnBugs(this, globalCtx);
|
||||
|
@ -371,7 +371,7 @@ void EnKusa_Fall(EnKusa* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->actor.bgCheckFlags & 0xB) {
|
||||
if (!(this->actor.bgCheckFlags & 0x20)) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
|
||||
}
|
||||
EnKusa_SpawnFragments(this, globalCtx);
|
||||
EnKusa_DropCollectible(this, globalCtx);
|
||||
|
@ -402,7 +402,7 @@ void EnKusa_Fall(EnKusa* this, GlobalContext* globalCtx) {
|
|||
rotSpeedY >>= 1;
|
||||
rotSpeedYtarget >>= 1;
|
||||
this->actor.bgCheckFlags &= ~0x40;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_DIVE_INTO_WATER_L);
|
||||
}
|
||||
|
||||
EnKusa_UpdateVelY(this);
|
||||
|
|
|
@ -313,8 +313,7 @@ void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnKz* this = (EnKz*)thisx;
|
||||
s32 pad;
|
||||
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelanime, &gKzSkel, NULL, this->jointTable, this->morphTable,
|
||||
12);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelanime, &gKzSkel, NULL, this->jointTable, this->morphTable, 12);
|
||||
ActorShape_Init(&this->actor.shape, 0.0, NULL, 0.0);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
|
|
@ -132,7 +132,7 @@ void func_80ABBBA8(EnNutsball* this, GlobalContext* globalCtx) {
|
|||
sp40.z = this->actor.world.pos.z;
|
||||
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &sp40, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
if (this->timer == -300) {
|
||||
|
|
|
@ -430,7 +430,7 @@ void EnOkuta_Die(EnOkuta* this, GlobalContext* globalCtx) {
|
|||
Actor_SetScale(&this->actor, (((this->timer - 5) * 0.04f) + 0.8f) * 0.01f);
|
||||
} else {
|
||||
if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.0005f)) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0x70);
|
||||
for (i = 0; i < 20; i++) {
|
||||
velocity.x = (Rand_ZeroOne() - 0.5f) * 7.0f;
|
||||
|
@ -499,7 +499,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, GlobalContext* globalCtx) {
|
|||
pos.y = this->actor.world.pos.y + 11.0f;
|
||||
pos.z = this->actor.world.pos.z;
|
||||
EffectSsHahen_SpawnBurst(globalCtx, &pos, 6.0f, 0, 1, 2, 15, 7, 10, gOctorokProjectileDL);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else if (this->timer == -300) {
|
||||
|
|
|
@ -811,7 +811,7 @@ void func_80ADB17C(EnPoSisters* this, GlobalContext* globalCtx) {
|
|||
this->unk_19A++;
|
||||
if (this->unk_19A == 64) {
|
||||
Flags_SetSwitch(globalCtx, this->actor.params);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_FLAME_IGNITION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EV_FLAME_IGNITION);
|
||||
if (this->unk_194 == 0) {
|
||||
Flags_UnsetSwitch(globalCtx, 0x1B);
|
||||
}
|
||||
|
@ -1099,7 +1099,7 @@ void func_80ADBF58(EnPoSisters* this, GlobalContext* globalCtx) {
|
|||
Math_StepToF(&this->actor.speedXZ, 5.0f, 0.2f);
|
||||
}
|
||||
if (this->unk_19A == -70 && this->unk_194 == 1) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &D_80ADD7BC, 40, NA_SE_EN_PO_LAUGH);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &D_80ADD7BC, 40, NA_SE_EN_PO_LAUGH);
|
||||
}
|
||||
if (this->unk_19A < -120) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
|
@ -1901,7 +1901,7 @@ void func_80AEF40C(EnRu1* this) {
|
|||
}
|
||||
|
||||
void func_80AEF4A8(EnRu1* this, GlobalContext* globalCtx) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.projectedPos, 20, NA_SE_VO_RT_FALL);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.projectedPos, 20, NA_SE_VO_RT_FALL);
|
||||
}
|
||||
|
||||
void func_80AEF4E0(EnRu1* this) {
|
||||
|
|
|
@ -423,7 +423,7 @@ s32 EnSb_UpdateDamage(EnSb* this, GlobalContext* globalCtx) {
|
|||
BodyBreak_Alloc(&this->bodyBreak, 8, globalCtx);
|
||||
this->isDead = true;
|
||||
Enemy_StartFinishingBlow(globalCtx, &this->actor);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_SHELL_DEAD);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_SHELL_DEAD);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -488,8 +488,8 @@ void func_80B0D3AC(EnSw* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
this->unk_38C--;
|
||||
if (this->unk_38C == 0) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EN_STALGOLD_UP_CRY);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 0x28, NA_SE_EN_DODO_M_UP);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_STALGOLD_UP_CRY);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_DODO_M_UP);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->actor.bgCheckFlags & 0x20) && (this->actor.yDistToWater > 15.0f)) {
|
||||
EnTuboTrap_SpawnEffectsInWater(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_BOMB_DROP_WATER);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_BOMB_DROP_WATER);
|
||||
EnTuboTrap_DropCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -181,8 +181,8 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
|
|||
if (this->collider.base.atFlags & AT_BOUNCED) {
|
||||
this->collider.base.atFlags &= ~AT_BOUNCED;
|
||||
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
EnTuboTrap_DropCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -191,8 +191,8 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_EXPLOSION);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
EnTuboTrap_DropCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -202,8 +202,8 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
|
|||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
if (this->collider.base.at == &player->actor) {
|
||||
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT);
|
||||
EnTuboTrap_DropCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -212,7 +212,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1)) {
|
||||
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN);
|
||||
EnTuboTrap_DropCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
|
|
@ -247,7 +247,7 @@ void EnVali_SetupDivideAndDie(EnVali* this, GlobalContext* globalCtx) {
|
|||
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0x50);
|
||||
this->timer = Rand_S16Offset(10, 10);
|
||||
this->bodyCollider.base.acFlags &= ~AC_ON;
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_BARI_SPLIT);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_BARI_SPLIT);
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.draw = NULL;
|
||||
this->actionFunc = EnVali_DivideAndDie;
|
||||
|
|
|
@ -1540,7 +1540,7 @@ void EnXc_PlayTriforceSFX(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Matrix_MultVec3f(&sp1C, &src);
|
||||
SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->viewProjectionMtxF, &src, &pos, &wDest);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &pos, 80, NA_SE_EV_TRIFORCE_MARK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &pos, 80, NA_SE_EV_TRIFORCE_MARK);
|
||||
this->unk_2A8 = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
this->collider.base.ocFlags1 &= ~OC1_HIT;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_ROCK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_ROCK);
|
||||
this->actionfunc = EnYukabyun_Break;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ void ObjBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x40000040))) {
|
||||
ObjBombiwa_Break(this, globalCtx);
|
||||
Flags_SetSwitch(globalCtx, this->actor.params & 0x3F);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 80, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 80, NA_SE_EV_WALL_BROKEN);
|
||||
if (((this->actor.params >> 0xF) & 1) != 0) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ void ObjHamishi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->shakeRotSize = 400.0f;
|
||||
} else {
|
||||
ObjHamishi_Break(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 40, NA_SE_EV_WALL_BROKEN);
|
||||
Flags_SetSwitch(globalCtx, this->actor.params & 0x3F);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
|
|
@ -192,12 +192,12 @@ void ObjKibako_Idle(ObjKibako* this, GlobalContext* globalCtx) {
|
|||
ObjKibako_SetupHeld(this);
|
||||
} else if ((this->actor.bgCheckFlags & 0x20) && (this->actor.yDistToWater > 19.0f)) {
|
||||
ObjKibako_WaterBreak(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
ObjKibako_SpawnCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
ObjKibako_AirBreak(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
ObjKibako_SpawnCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
|
@ -254,12 +254,12 @@ void ObjKibako_Thrown(ObjKibako* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->actor.bgCheckFlags & 0xB) || (this->collider.base.atFlags & AT_HIT)) {
|
||||
ObjKibako_AirBreak(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
ObjKibako_SpawnCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (this->actor.bgCheckFlags & 0x40) {
|
||||
ObjKibako_WaterBreak(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
ObjKibako_SpawnCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
|
|
|
@ -146,7 +146,7 @@ void ObjKibako2_Idle(ObjKibako2* this, GlobalContext* globalCtx) {
|
|||
if ((this->collider.base.acFlags & AC_HIT) || (this->dyna.actor.home.rot.z != 0) ||
|
||||
func_80033684(globalCtx, &this->dyna.actor) != NULL) {
|
||||
ObjKibako2_Break(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_4;
|
||||
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.actor.draw = NULL;
|
||||
|
|
|
@ -176,7 +176,7 @@ void func_80B96678(ObjLift* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if ((this->timer & 3) == 3) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 16, NA_SE_EV_BLOCK_SHAKE);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 16, NA_SE_EV_BLOCK_SHAKE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ void func_80B96840(ObjLift* this, GlobalContext* globalCtx) {
|
|||
if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >=
|
||||
(sMaxFallDistances[(this->dyna.actor.params >> 1) & 1] - 0.001f)) {
|
||||
func_80B96160(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_BOX_BREAK);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_BOX_BREAK);
|
||||
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 2) & 0x3F);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
|
|
|
@ -243,14 +243,14 @@ void ObjTsubo_Idle(ObjTsubo* this, GlobalContext* globalCtx) {
|
|||
ObjTsubo_SetupLiftedUp(this);
|
||||
} else if ((this->actor.bgCheckFlags & 0x20) && (this->actor.yDistToWater > 15.0f)) {
|
||||
ObjTsubo_WaterBreak(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
ObjTsubo_SpawnCollectible(this, globalCtx);
|
||||
Actor_Kill(&this->actor);
|
||||
} else if ((this->collider.base.acFlags & AC_HIT) &&
|
||||
(this->collider.info.acHitInfo->toucher.dmgFlags & 0x4FC1FFFC)) {
|
||||
ObjTsubo_AirBreak(this, globalCtx);
|
||||
ObjTsubo_SpawnCollectible(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
if (this->actor.xzDistToPlayer < 600.0f) {
|
||||
|
@ -306,12 +306,12 @@ void ObjTsubo_Thrown(ObjTsubo* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.bgCheckFlags & 0xB) || (this->collider.base.atFlags & AT_HIT)) {
|
||||
ObjTsubo_AirBreak(this, globalCtx);
|
||||
ObjTsubo_SpawnCollectible(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (this->actor.bgCheckFlags & 0x40) {
|
||||
ObjTsubo_WaterBreak(this, globalCtx);
|
||||
ObjTsubo_SpawnCollectible(this, globalCtx);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_POT_BROKEN);
|
||||
Actor_Kill(&this->actor);
|
||||
} else {
|
||||
ObjTsubo_ApplyGravity(this);
|
||||
|
|
Loading…
Reference in a new issue