From 7bbc6d3b69d2fcdd4d0a43c9b6344555b83e2b9f Mon Sep 17 00:00:00 2001 From: Owlenuff Date: Wed, 2 Oct 2024 20:31:43 +0200 Subject: [PATCH] Document sfxsource --- include/functions.h | 2 +- manual_syms.pal.txt | 2 +- src/CC/code_1F70.c | 2 +- src/CC/code_530.c | 2 +- src/CCW/code_14B0.c | 2 +- src/CCW/code_2B00.c | 2 +- src/CCW/code_950.c | 2 +- src/FP/ch/xmastree.c | 4 ++-- src/FP/code_B4D0.c | 2 +- src/GV/ch/gobi1.c | 4 ++-- src/GV/ch/histup.c | 2 +- src/GV/code_6370.c | 2 +- src/RBB/ch/cog.c | 2 +- src/SM/code_2990.c | 6 +++--- src/TTC/code_3E30.c | 4 ++-- src/core1/code_7090.c | 2 +- src/core2/bs/bFlap.c | 2 +- src/core2/bs/bLongLeg.c | 4 ++-- src/core2/bs/bShock.c | 2 +- src/core2/ch/bigbutt.c | 2 +- src/core2/ch/gravestone.c | 2 +- src/core2/ch/mole.c | 6 +++--- src/core2/ch/soundsource.c | 2 +- src/core2/code_126C0.c | 14 +++++++------- src/core2/code_16010.c | 2 +- src/core2/code_45310.c | 4 ++-- src/core2/code_47BD0.c | 2 +- src/core2/code_6D490.c | 4 ++-- src/core2/code_72B10.c | 2 +- src/core2/code_85800.c | 8 ++++---- src/core2/code_9900.c | 2 +- src/core2/code_9C170.c | 2 +- src/core2/code_9E370.c | 2 +- src/core2/code_B9770.c | 8 ++++---- src/core2/code_C62B0.c | 4 ++-- src/core2/code_C8760.c | 2 +- src/core2/code_C9F00.c | 2 +- src/core2/code_D0CA0.c | 4 ++-- src/core2/gc/zoombox.c | 4 ++-- src/fight/chbossjinjobase.c | 14 +++++++------- src/fight/chfinalboss.c | 12 ++++++------ src/fight/chjinjonator.c | 4 ++-- src/fight/chjinjonatorbase.c | 2 +- src/fight/chspellbarrier.c | 4 ++-- src/lair/code_5ED0.c | 2 +- 45 files changed, 83 insertions(+), 83 deletions(-) diff --git a/include/functions.h b/include/functions.h index eca224a4..28f82e50 100644 --- a/include/functions.h +++ b/include/functions.h @@ -198,7 +198,7 @@ ParticleEmitter *partEmitMgr_newEmitter(u32); void func_802BB3DC(s32, f32, f32); void __spawnQueue_add_4(GenFunction_4, s32, s32, s32, s32); Actor *spawnQueue_actor_f32(enum actor_e actor_id, s32 x, s32 y, s32 z); -void func_8030DA44(u8); +void sfxsource_freeSfxsourceByIndex(u8); void particleEmitter_emitInVolume(ParticleEmitter *, f32[3], f32[3], s32); diff --git a/manual_syms.pal.txt b/manual_syms.pal.txt index 2fa6f976..a6e388e4 100644 --- a/manual_syms.pal.txt +++ b/manual_syms.pal.txt @@ -278,7 +278,7 @@ func_8030C704 = 0x8030c8a4; scissorBox_setSmall = 0x8030c8b0; func_8030C77C = 0x8030c91c; sfxsource_createSfxsourceAndReturnIndex = 0x8030daac; -func_8030DA44 = 0x8030dbe4; +sfxsource_freeSfxsourceByIndex = 0x8030dbe4; sfxsource_setSfxId = 0x8030dc20; sfxsource_setSampleRate = 0x8030dc5c; sfxsource_playSfxAtVolume = 0x8030dd54; diff --git a/src/CC/code_1F70.c b/src/CC/code_1F70.c index 38176809..5d336fbe 100644 --- a/src/CC/code_1F70.c +++ b/src/CC/code_1F70.c @@ -249,7 +249,7 @@ int CC_func_80388CA0(void){ void func_80388CB4(void){ if(D_80389FA0.unk21){ skeletalAnim_free(D_80389FA0.unk0); - func_8030DA44(D_80389FA0.sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(D_80389FA0.sfxsourceIdx); func_80340690(D_80389FA0.unk18); func_8034A2A8(D_80389FA0.unk34); if(model_getVtxList(D_80389FA0.unk24) != D_80389FA0.unk40) diff --git a/src/CC/code_530.c b/src/CC/code_530.c index 80565216..e20f628d 100644 --- a/src/CC/code_530.c +++ b/src/CC/code_530.c @@ -77,7 +77,7 @@ void func_80386AD0(ActorMarker *arg0, s32 arg1) { void func_80386AF8(Actor *arg0) { ActorLocal_CC_530 *local = (ActorLocal_CC_530 *)&arg0->local; CC_func_80386920(arg0, 0); - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); } void func_80386B28(Actor *this){ diff --git a/src/CCW/code_14B0.c b/src/CCW/code_14B0.c index a5e03fee..4d5b9230 100644 --- a/src/CCW/code_14B0.c +++ b/src/CCW/code_14B0.c @@ -55,7 +55,7 @@ void func_803878A0(Actor *this, s32 next_state) { void CCW_func_80387A20(Actor *this){ ActorLocal_CCW_14B0 *local = (ActorLocal_CCW_14B0 *)&this->local; - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); } void CCW_func_80387A40(Actor *this) { diff --git a/src/CCW/code_2B00.c b/src/CCW/code_2B00.c index 92aed154..f60d02bd 100644 --- a/src/CCW/code_2B00.c +++ b/src/CCW/code_2B00.c @@ -118,7 +118,7 @@ void func_803891B0(void* marker) { void func_8038921C(void* marker) { Actor* actor = marker_getActor(reinterpret_cast(ActorMarker*, marker)); func_8030E394(actor->unk44_31); - func_8030DA44(actor->unk44_31); + sfxsource_freeSfxsourceByIndex(actor->unk44_31); actor->unk44_31 = 0U; FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 25000); } diff --git a/src/CCW/code_950.c b/src/CCW/code_950.c index ef8a104b..e2f2e842 100644 --- a/src/CCW/code_950.c +++ b/src/CCW/code_950.c @@ -91,7 +91,7 @@ void func_8038717C(Actor *this){ ActorLocal_CCW_950 *local; local = (ActorLocal_CCW_950 *)&this->local; - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); } void chwasp_update(Actor *this) { diff --git a/src/FP/ch/xmastree.c b/src/FP/ch/xmastree.c index f6ae70b6..269901d9 100644 --- a/src/FP/ch/xmastree.c +++ b/src/FP/ch/xmastree.c @@ -28,7 +28,7 @@ void __chXmasTree_free(Actor *this){ item_set(ITEM_6_HOURGLASS, FALSE); tmp_a0 = this->unk44_31; if(tmp_a0){ - func_8030DA44(tmp_a0); + sfxsource_freeSfxsourceByIndex(tmp_a0); this->unk44_31 = 0; } } @@ -165,7 +165,7 @@ void chXmasTree_update(Actor *this){ item_set(ITEM_6_HOURGLASS, FALSE); tmp_a0 = this->unk44_31; if(tmp_a0){ - func_8030DA44(tmp_a0); + sfxsource_freeSfxsourceByIndex(tmp_a0); this->unk44_31 = 0; } func_80324E38(0.0f, 3); diff --git a/src/FP/code_B4D0.c b/src/FP/code_B4D0.c index cc5525b8..5e6c31f6 100644 --- a/src/FP/code_B4D0.c +++ b/src/FP/code_B4D0.c @@ -27,7 +27,7 @@ void func_803918C0(void){ void func_8039195C(void){ if(D_803935E0.sfxsourceIdx){ - func_8030DA44(D_803935E0.sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(D_803935E0.sfxsourceIdx); D_803935E0.sfxsourceIdx = 0; } } diff --git a/src/GV/ch/gobi1.c b/src/GV/ch/gobi1.c index 27fa47f1..4184d21b 100644 --- a/src/GV/ch/gobi1.c +++ b/src/GV/ch/gobi1.c @@ -89,8 +89,8 @@ s32 func_80387360(void){ void func_8038736C(Actor *this){ ActorLocal_chGobi1 *local = (ActorLocal_chGobi1 *)&this->local; chGobi1_setState(this, 0); - func_8030DA44(local->unk0[0]); - func_8030DA44(local->unk0[1]); + sfxsource_freeSfxsourceByIndex(local->unk0[0]); + sfxsource_freeSfxsourceByIndex(local->unk0[1]); } void func_803873B0(ActorMarker *this_marker, ActorMarker *other_marker){ diff --git a/src/GV/ch/histup.c b/src/GV/ch/histup.c index 70342b4a..d2bf5556 100644 --- a/src/GV/ch/histup.c +++ b/src/GV/ch/histup.c @@ -98,7 +98,7 @@ void func_8038DB88(Actor *this){ if(func_8030E3FC(tmp)){ func_8030E394(this->unk44_31); } - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } } diff --git a/src/GV/code_6370.c b/src/GV/code_6370.c index 8125cfd8..0894465c 100644 --- a/src/GV/code_6370.c +++ b/src/GV/code_6370.c @@ -74,7 +74,7 @@ void func_8038C8A0(Actor *this, s32 next_state){ this->marker->propPtr->unk8_3 = (next_state == 1) ? FALSE : TRUE; this->marker->collidable = (next_state == 1) ? FALSE : TRUE; if(this->state == 4 || this->state == 5) - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); if(next_state == 4 || next_state == 5){ local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex(); diff --git a/src/RBB/ch/cog.c b/src/RBB/ch/cog.c index c100a461..71d2a457 100644 --- a/src/RBB/ch/cog.c +++ b/src/RBB/ch/cog.c @@ -38,7 +38,7 @@ void func_80388BD0(Actor *this, s32 arg1){ void func_80388BE8(Actor *actor){ ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local; if(actor->modelCacheIndex == 0x17b){ - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); } } diff --git a/src/SM/code_2990.c b/src/SM/code_2990.c index 940eaf46..3bc76cdd 100644 --- a/src/SM/code_2990.c +++ b/src/SM/code_2990.c @@ -6,7 +6,7 @@ Actor *func_802D94B4(ActorMarker*, Gfx**, Mtx**, Vtx**); void func_8028E668(f32*, f32, f32, f32); void func_80328FB0(Actor *, f32); -void func_8030DA44(u8); +void sfxsource_freeSfxsourceByIndex(u8); void timed_exitStaticCamera(f32); void subaddie_set_state_with_direction(Actor *, s32, f32, s32); @@ -128,7 +128,7 @@ void func_80388FA0(Actor *this, s32 arg1){ case 4://L80388FF8 this->unk138_23 = 0; case 2://L80389004 - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; break; case 5://L80389018 @@ -387,7 +387,7 @@ void func_80389984(Actor * this){ tmp = this->unk44_31; if(tmp) - func_8030DA44(tmp); + sfxsource_freeSfxsourceByIndex(tmp); } void chsmmole_Update(Actor * this){ diff --git a/src/TTC/code_3E30.c b/src/TTC/code_3E30.c index a814f789..25f6f143 100644 --- a/src/TTC/code_3E30.c +++ b/src/TTC/code_3E30.c @@ -377,8 +377,8 @@ void func_8038AFC8(void){ void func_8038B04C(void){ if(D_8038D720.model1){ func_8038A258(0); - func_8030DA44(D_8038D720.sfxsourceIdx); - func_8030DA44(D_8038D720.unkA); + sfxsource_freeSfxsourceByIndex(D_8038D720.sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(D_8038D720.unkA); } } diff --git a/src/core1/code_7090.c b/src/core1/code_7090.c index 2997c0d9..6087d87c 100644 --- a/src/core1/code_7090.c +++ b/src/core1/code_7090.c @@ -64,7 +64,7 @@ void func_80244BB0(s32 arg0, s32 arg1, s32 arg2, f32 arg3){ void func_80244C78(int arg0){ if(D_802758E0[arg0]){ - func_8030DA44(D_802758E0[arg0]); + sfxsource_freeSfxsourceByIndex(D_802758E0[arg0]); } D_802758E0[arg0] = 0; } diff --git a/src/core2/bs/bFlap.c b/src/core2/bs/bFlap.c index e68c7040..29720a32 100644 --- a/src/core2/bs/bFlap.c +++ b/src/core2/bs/bFlap.c @@ -196,5 +196,5 @@ void bsbflap_end(void) { baphysics_reset_gravity(); baphysics_reset_terminal_velocity(); func_8029E090(0, 0.2f); - func_8030DA44(D_8037D30C); + sfxsource_freeSfxsourceByIndex(D_8037D30C); } diff --git a/src/core2/bs/bLongLeg.c b/src/core2/bs/bLongLeg.c index fd80bdcd..c80ff853 100644 --- a/src/core2/bs/bLongLeg.c +++ b/src/core2/bs/bLongLeg.c @@ -152,7 +152,7 @@ void bsblongleg_enter_update(void){ void bsblongleg_enter_end(void){ func_802A5404(); - func_8030DA44(D_8037D361); + sfxsource_freeSfxsourceByIndex(D_8037D361); } void bsblongleg_stand_enter(void){ @@ -308,7 +308,7 @@ void bsblongleg_exit_update(void){ } void bsblongleg_exit_end(void){ - func_8030DA44(D_8037D361); + sfxsource_freeSfxsourceByIndex(D_8037D361); func_802A5404(); } diff --git a/src/core2/bs/bShock.c b/src/core2/bs/bShock.c index a8eed1ef..8f0aa431 100644 --- a/src/core2/bs/bShock.c +++ b/src/core2/bs/bShock.c @@ -116,7 +116,7 @@ void bsbshock_charge_update(void){ } void bsbshock_charge_end(void){ - func_8030DA44(D_8037D382); + sfxsource_freeSfxsourceByIndex(D_8037D382); func_8029E064(0); func_8029E070(0); if(baModel_80292230() != 0.0f){ diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index ec0903ef..8ae7390e 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -263,7 +263,7 @@ void func_802C6240(Actor *this){ if (0.0f == this->actor_specific_1_f) { animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); subaddie_set_state_with_direction(this, 1, 0.65f, 1); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; sfxsource_playHighPriority(SFX_19_BANJO_LANDING_08); } diff --git a/src/core2/ch/gravestone.c b/src/core2/ch/gravestone.c index ee3de36f..6d935a09 100644 --- a/src/core2/ch/gravestone.c +++ b/src/core2/ch/gravestone.c @@ -91,7 +91,7 @@ void func_8035EDB0(f32 position[3], s32 count, enum asset_e sprite) { void func_8035EE48(Actor *this){ u8 val = this->unk44_31; if(val != 0){ - func_8030DA44(val); + sfxsource_freeSfxsourceByIndex(val); this->unk44_31 = 0; } } diff --git a/src/core2/ch/mole.c b/src/core2/ch/mole.c index ac327701..7ec24dbb 100644 --- a/src/core2/ch/mole.c +++ b/src/core2/ch/mole.c @@ -294,7 +294,7 @@ void chmole_spawnMolehill(ActorMarker *marker){ void func_802D9C90(Actor *this){ u8 tmp_a1 = this->unk44_31; if(tmp_a1){ - func_8030DA44(tmp_a1); + sfxsource_freeSfxsourceByIndex(tmp_a1); } } @@ -413,7 +413,7 @@ void chmole_update(Actor *this){ }//L802DA128 if(actor_animationIsAt(this, 0.9999f)){ chmole_setFacingDirection(this); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } else if(actor_animationIsAt(this, 0.14f)){//L802DA154 @@ -466,7 +466,7 @@ void chmole_update(Actor *this){ } else if(actor_animationIsAt(this, 0.9999f)){//L802DA45C func_802D9600(this); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } break; diff --git a/src/core2/ch/soundsource.c b/src/core2/ch/soundsource.c index 901aee85..fd3a137f 100644 --- a/src/core2/ch/soundsource.c +++ b/src/core2/ch/soundsource.c @@ -47,7 +47,7 @@ void func_802D0500(Actor *this){ void func_802D05A0(Actor *this, s32 next_state){ ActorLocal_Core2_49570 *local = (ActorLocal_Core2_49570 *)this->local; if(this->state == 2 && local->sfxsourceIdx){ - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); local->sfxsourceIdx = 0; } if(next_state == 2){ diff --git a/src/core2/code_126C0.c b/src/core2/code_126C0.c index a04524ff..94bd653f 100644 --- a/src/core2/code_126C0.c +++ b/src/core2/code_126C0.c @@ -77,7 +77,7 @@ void func_802997E8(void){ if(D_8037C6D0.sfxsourceIdx){ D_8037C6D0.unk4 += time_getDelta(); if(D_8037C6D0.unk8 <= D_8037C6D0.unk4){ - func_8030DA44(D_8037C6D0.sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(D_8037C6D0.sfxsourceIdx); D_8037C6D0.sfxsourceIdx = 0; } else{ @@ -127,13 +127,13 @@ void func_80299900(void){ } void func_80299A20(void){ - func_8030DA44(D_8037C6C1); - func_8030DA44(D_8037C6C0); - func_8030DA44(D_8037C6C3); - func_8030DA44(D_8037C6C2); - func_8030DA44(D_8037C6C4); + sfxsource_freeSfxsourceByIndex(D_8037C6C1); + sfxsource_freeSfxsourceByIndex(D_8037C6C0); + sfxsource_freeSfxsourceByIndex(D_8037C6C3); + sfxsource_freeSfxsourceByIndex(D_8037C6C2); + sfxsource_freeSfxsourceByIndex(D_8037C6C4); if(D_8037C6D0.sfxsourceIdx){ - func_8030DA44(D_8037C6D0.sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(D_8037C6D0.sfxsourceIdx); } } diff --git a/src/core2/code_16010.c b/src/core2/code_16010.c index 33cfd739..34c9b014 100644 --- a/src/core2/code_16010.c +++ b/src/core2/code_16010.c @@ -19,7 +19,7 @@ bool func_8029CFA0(void){ } void func_8029CFF8(void){ - func_8030DA44(D_8037D210); + sfxsource_freeSfxsourceByIndex(D_8037D210); } void func_8029D01C(void){ diff --git a/src/core2/code_45310.c b/src/core2/code_45310.c index 006b08d9..a8c7e63a 100644 --- a/src/core2/code_45310.c +++ b/src/core2/code_45310.c @@ -262,7 +262,7 @@ void func_802CCBC8(Actor *this) { local = (ActorLocal_Core2_45310 * )&this->local; if(local->unk0 != 0){ - func_8030DA44(local->unk0); + sfxsource_freeSfxsourceByIndex(local->unk0); } } @@ -324,7 +324,7 @@ void func_802CCC5C(Actor *this) { } if (!subaddie_playerIsWithinSphere(this, 4000)) { if (local->unk0 != 0) { - func_8030DA44(local->unk0); + sfxsource_freeSfxsourceByIndex(local->unk0); local->unk0 = 0; } } else { diff --git a/src/core2/code_47BD0.c b/src/core2/code_47BD0.c index 29106801..52a24102 100644 --- a/src/core2/code_47BD0.c +++ b/src/core2/code_47BD0.c @@ -385,7 +385,7 @@ void chBeeSwarm_update(Actor *this) { return; if (!subaddie_playerIsWithinSphere(this, 0x5DC)) { if ((u8)this->unk44_31 != 0) { - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; D_8037DCBC = 0; } diff --git a/src/core2/code_6D490.c b/src/core2/code_6D490.c index 7f0ac3cb..592fd9e1 100644 --- a/src/core2/code_6D490.c +++ b/src/core2/code_6D490.c @@ -155,8 +155,8 @@ void func_802F46F4(Struct5Ds *this){ } void func_802F4798(Struct5Ds *this){ - func_8030DA44(this->unk1C); - func_8030DA44(this->unk1D); + sfxsource_freeSfxsourceByIndex(this->unk1C); + sfxsource_freeSfxsourceByIndex(this->unk1D); free(this); } diff --git a/src/core2/code_72B10.c b/src/core2/code_72B10.c index 1c690219..8ecbb9dd 100644 --- a/src/core2/code_72B10.c +++ b/src/core2/code_72B10.c @@ -86,7 +86,7 @@ void func_802F9D38(s32 arg0){ ptr = vector_at(D_803810A0, arg0); if(ptr->unk0){ func_8030E394(ptr->unk0); - func_8030DA44(ptr->unk0); + sfxsource_freeSfxsourceByIndex(ptr->unk0); ptr->unk0 = 0; } } diff --git a/src/core2/code_85800.c b/src/core2/code_85800.c index 169dadd7..0dd12bdd 100644 --- a/src/core2/code_85800.c +++ b/src/core2/code_85800.c @@ -358,7 +358,7 @@ void func_8030D310(u8 indx){ switch(func_8030C7E8(ptr)){ case 1://L8030D468 if( func_8030C814(ptr, 0) || (func_8030C814(ptr, 1) && !ptr->unk40)) - func_8030DA44(indx); + sfxsource_freeSfxsourceByIndex(indx); break; case 2://L8030D4A4 if(func_8030C814(ptr, 1) && sfxsource_isFlagCleared(ptr, 1)) @@ -444,7 +444,7 @@ void func_8030D778(void){ int temp_s1; for(i = 1; i < 35; i++){ if(sfxsources[i].busy) - func_8030DA44(i); + sfxsource_freeSfxsourceByIndex(i); } do{ temp_s1 = 0; @@ -511,8 +511,8 @@ u8 sfxsource_createSfxsourceAndReturnIndex(void){ return s1; } -void func_8030DA44(u8 indx){ - SfxSource * sp1C = sfxsource_at(indx); +void sfxsource_freeSfxsourceByIndex(u8 indx) { + SfxSource *sp1C = sfxsource_at(indx); func_8030E394(indx); func_8030C7F8(sp1C, 3); } diff --git a/src/core2/code_9900.c b/src/core2/code_9900.c index d96c30a9..8c0db8ef 100644 --- a/src/core2/code_9900.c +++ b/src/core2/code_9900.c @@ -44,7 +44,7 @@ f32 func_80290920(f32 arg0, f32 arg1, f32 arg2){ } void func_8029099C(void){ - func_8030DA44(D_8037C040); + sfxsource_freeSfxsourceByIndex(D_8037C040); D_8037C040 = 0; } diff --git a/src/core2/code_9C170.c b/src/core2/code_9C170.c index 4f3ecf7f..f80b81bb 100644 --- a/src/core2/code_9C170.c +++ b/src/core2/code_9C170.c @@ -31,7 +31,7 @@ void func_80323190(void){ } void func_803231E8(void){ - func_8030DA44(D_80383370); + sfxsource_freeSfxsourceByIndex(D_80383370); } void func_8032320C(void){ diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index a54c0553..0c52f417 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -376,7 +376,7 @@ void func_80325FE8(Actor *this) { } temp_v0 = this->unk44_31; if (temp_v0 != 0) { - func_8030DA44(temp_v0); + sfxsource_freeSfxsourceByIndex(temp_v0); } this->animctrl = NULL; this->unk44_31 = 0; diff --git a/src/core2/code_B9770.c b/src/core2/code_B9770.c index dac9e251..937b8614 100644 --- a/src/core2/code_B9770.c +++ b/src/core2/code_B9770.c @@ -528,7 +528,7 @@ void func_80341A54(void) { for(var_s0 = 0; var_s0 < 0x40; var_s0++){ if (D_803858A0[var_s0] != 0) { - func_8030DA44(D_803858A0[var_s0]); + sfxsource_freeSfxsourceByIndex(D_803858A0[var_s0]); } } @@ -801,7 +801,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ sfxsource_setSampleRate(sfxsourceIdx, sp74); func_8030E2C4(sfxsourceIdx); if (D_803858A0[sp70] != 0){ - func_8030DA44(D_803858A0[sp70]); + sfxsource_freeSfxsourceByIndex(D_803858A0[sp70]); } D_803858A0[sp70] = sfxsourceIdx; } else { @@ -836,7 +836,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ case 5: if (D_803858A0[arg1->t0.unk10.common.bit7] != 0){ - func_8030DA44(D_803858A0[arg1->t0.unk10.common.bit7]); + sfxsource_freeSfxsourceByIndex(D_803858A0[arg1->t0.unk10.common.bit7]); D_803858A0[arg1->t0.unk10.common.bit7] = 0; } break; @@ -1274,7 +1274,7 @@ void func_80343E20(s32 arg0, s32 arg1, f32 arg2, s32 arg3) { sfxsource_setSampleRate(temp_v0, arg1); func_8030E2C4(temp_v0); if (D_803858A0[arg3] != 0) { - func_8030DA44(D_803858A0[arg3]); + sfxsource_freeSfxsourceByIndex(D_803858A0[arg3]); } D_803858A0[arg3] = temp_v0; } diff --git a/src/core2/code_C62B0.c b/src/core2/code_C62B0.c index e5988f86..19ea61b7 100644 --- a/src/core2/code_C62B0.c +++ b/src/core2/code_C62B0.c @@ -127,7 +127,7 @@ bool func_8034DC80(Struct6Ds *arg0, f32 arg1[3]) { void func_8034DD48(Struct6Ds *arg0){ if(arg0->unk0 != 0){ - func_8030DA44(arg0->unk0); + sfxsource_freeSfxsourceByIndex(arg0->unk0); } } @@ -359,7 +359,7 @@ void func_8034E26C(Struct6Ds *arg0, BKModel *model, s32 mesh_id) { arg0->unk10(arg0); } if (arg0->unk0 != 0) { - func_8030DA44(arg0->unk0); + sfxsource_freeSfxsourceByIndex(arg0->unk0); arg0->unk0 = 0; } } diff --git a/src/core2/code_C8760.c b/src/core2/code_C8760.c index 5ab5112c..8ecc91af 100644 --- a/src/core2/code_C8760.c +++ b/src/core2/code_C8760.c @@ -21,7 +21,7 @@ void func_8034F6F0(Gfx **gdl, Mtx **mptr, s32 vptr){ void func_8034F734(void){ if(D_803720A0.unk0){ - func_8030DA44(D_803720A0.sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(D_803720A0.sfxsourceIdx); particleEmitter_free(D_803720A0.unk0); } } diff --git a/src/core2/code_C9F00.c b/src/core2/code_C9F00.c index 495f1872..de6883a3 100644 --- a/src/core2/code_C9F00.c +++ b/src/core2/code_C9F00.c @@ -345,7 +345,7 @@ void func_803518E8(void){ void func_80351954(Struct68s *arg0){ if(arg0->unk0){ func_8030E394(arg0->unk0); - func_8030DA44(arg0->unk0); + sfxsource_freeSfxsourceByIndex(arg0->unk0); arg0->unk0 = 0; } } diff --git a/src/core2/code_D0CA0.c b/src/core2/code_D0CA0.c index 4eac6687..2377e6aa 100644 --- a/src/core2/code_D0CA0.c +++ b/src/core2/code_D0CA0.c @@ -221,7 +221,7 @@ void func_80358490(Actor *this) { local = (ActorLocal_core2_D0CA0 *)&this->local; if(local->sfxsourceIdx != 0){ - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); } } @@ -307,7 +307,7 @@ void func_80358684(Actor *this) { if (!subaddie_playerIsWithinSphere(this, 4000)) { if (local->sfxsourceIdx != 0) { - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); local->sfxsourceIdx = 0U; } return; diff --git a/src/core2/gc/zoombox.c b/src/core2/gc/zoombox.c index 610cf954..d1725c1f 100644 --- a/src/core2/gc/zoombox.c +++ b/src/core2/gc/zoombox.c @@ -429,7 +429,7 @@ s32 D_8036D924[] = { 70, 35, 18, 9, 4, 2, 1}; /* .bss */ char D_803830B0[0x30]; -void func_8030DA44(u8); +void sfxsource_freeSfxsourceByIndex(u8); void func_80338338(s32, s32, s32); void func_803382FC(u8); @@ -443,7 +443,7 @@ void func_80315200(GcZoombox *this){ }else{ for(s1 =0; s1 < 5; s1++){ if(this->unk108[s1]){ - func_8030DA44(this->unk108[s1]); + sfxsource_freeSfxsourceByIndex(this->unk108[s1]); this->sfx_count--; } } diff --git a/src/fight/chbossjinjobase.c b/src/fight/chbossjinjobase.c index d29096b1..2fa53ad9 100644 --- a/src/fight/chbossjinjobase.c +++ b/src/fight/chbossjinjobase.c @@ -22,7 +22,7 @@ void chbossjinjobase_spawnStoneJinjo(ActorMarker *marker) { } void chBossJinjoBase_createSmokeParticles(f32 position[3], s32 count) { - ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count); + ParticleEmitter *pCtrl = partEmitMgr_newEmitter(count); particleEmitter_setSprite(pCtrl, ASSET_70E_SPRITE_SMOKE_2); particleEmitter_setRGB(pCtrl, chBossJinjoBase_SmokeColor); particleEmitter_setStartingFrameRange(pCtrl, 0, 7); @@ -61,11 +61,11 @@ void chBossJinjoBase_free(Actor *this) { ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *) &this->local; if ((u8)this->unk44_31 != 0) { - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } if (local->sfxsourceIdx != 0) { - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); local->sfxsourceIdx = 0; } } @@ -124,9 +124,9 @@ void chBossJinjoBase_update(Actor *this) { func_8030E2C4(local->sfxsourceIdx); } - position_delta[0] = (rumbling & 1) ? 3.0f : -3.0f; + position_delta[0] = (rumbling & 1) ? 3.0f : -3.0f; position_delta[1] = y_delta; - position_delta[2] = (rumbling & 2) ? 3.0f : -3.0f; + position_delta[2] = (rumbling & 2) ? 3.0f : -3.0f; this->position_x = this->unk1C[0]; this->position_z = this->unk1C[2]; @@ -142,9 +142,9 @@ void chBossJinjoBase_update(Actor *this) { } else { subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); local->sfxsourceIdx = 0; TUPLE_COPY(this->position, this->unk1C); TUPLE_COPY(actor_stonejinjo->position, this->unk1C); diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index 293fc577..4709eedd 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -447,7 +447,7 @@ void chfinalboss_func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 a } } -void chfinalboss_func_803872F8(Actor *arg0) { +void chfinalboss_func_803872F8(Actor *arg0) { f32 vec[3]; func_8034A174(arg0->marker->unk44, 0xA, vec); @@ -1044,7 +1044,7 @@ void chfinalboss_phase1_update(ActorMarker *marker) { chfinalboss_func_8038871C(this, 460.0f, 400.0f * sp54); chfinalboss_func_803873DC(this, 600.0f, 2000.0f); if (actor_animationIsAt(this, 0.9999f)) { - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0U; chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_2_AIR); } @@ -1657,7 +1657,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) { timed_exitStaticCamera(0.0f); func_80324E38(0.0f, 0); chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_5_JINJONATOR); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0U; } break; @@ -1874,7 +1874,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { } if (actor_animationIsAt(this, 0.9999f)) { chfinalboss_phase5_setState(this, 0x27); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } break; @@ -1888,7 +1888,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { v0 = this->unk44_31; if (v0 != 0) { func_8030E394(v0); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } } @@ -1982,7 +1982,7 @@ bool chfinalboss_func_8038B834(ActorMarker *marker, ActorMarker *other_marker) { marker->id = 0x25E; } break; - + case FINALBOSS_PHASE_2_AIR: if (local->unkA == 0) { marker->id = 0x260; diff --git a/src/fight/chjinjonator.c b/src/fight/chjinjonator.c index 733844a5..b0e77010 100644 --- a/src/fight/chjinjonator.c +++ b/src/fight/chjinjonator.c @@ -189,7 +189,7 @@ void chjinjonator_update(Actor *this){ subaddie_set_state_with_direction(this, JINJONATOR_STATE_3_MOVE_UPWARD, 0.001f, 1); actor_playAnimationOnce(this); func_8030E394(this->unk44_31); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; local->velocity_move_up = (320.0f - this->position_y) * 0.5; func_80324CFC(0.0f, COMUSIC_8C_JINJONATOR_POWERUP, 32000); @@ -255,7 +255,7 @@ void chjinjonator_update(Actor *this){ func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); if((u8)this->unk44_31){ func_8030E394(this->unk44_31); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } func_80324D2C(0.0f, COMUSIC_8C_JINJONATOR_POWERUP); diff --git a/src/fight/chjinjonatorbase.c b/src/fight/chjinjonatorbase.c index 0a7e9f68..161bd8a9 100644 --- a/src/fight/chjinjonatorbase.c +++ b/src/fight/chjinjonatorbase.c @@ -170,7 +170,7 @@ void chjinjonatorbase_update(Actor *this){ FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 32000); func_8030E394(this->unk44_31); - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; this->position_x = this->unk1C[0]; diff --git a/src/fight/chspellbarrier.c b/src/fight/chspellbarrier.c index ad12941b..db28742d 100644 --- a/src/fight/chspellbarrier.c +++ b/src/fight/chspellbarrier.c @@ -42,12 +42,12 @@ void chspellbarrier_free(Actor *this) { ActorLocal_SpellBarrier *local = (ActorLocal_SpellBarrier *) &this->local; if ((u8) this->unk44_31) { - func_8030DA44(this->unk44_31); + sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } if (local->sfxsourceIdx != 0) { - func_8030DA44(local->sfxsourceIdx); + sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx); local->sfxsourceIdx = 0; } } diff --git a/src/lair/code_5ED0.c b/src/lair/code_5ED0.c index 3e53a221..03eb5b9c 100644 --- a/src/lair/code_5ED0.c +++ b/src/lair/code_5ED0.c @@ -536,7 +536,7 @@ void lair_func_8038CC9C(void) return; func_8030E394(D_8037DCB8->UNK_18); - func_8030DA44(D_8037DCB8->UNK_18); + sfxsource_freeSfxsourceByIndex(D_8037DCB8->UNK_18); D_8037DCB8->UNK_18 = 0; }