Document sfxsource

This commit is contained in:
Owlenuff
2024-10-02 20:31:43 +02:00
parent 6fb4f2b3f1
commit 7bbc6d3b69
45 changed files with 83 additions and 83 deletions

View File

@@ -198,7 +198,7 @@ ParticleEmitter *partEmitMgr_newEmitter(u32);
void func_802BB3DC(s32, f32, f32); void func_802BB3DC(s32, f32, f32);
void __spawnQueue_add_4(GenFunction_4, s32, s32, s32, s32); 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); 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); void particleEmitter_emitInVolume(ParticleEmitter *, f32[3], f32[3], s32);

View File

@@ -278,7 +278,7 @@ func_8030C704 = 0x8030c8a4;
scissorBox_setSmall = 0x8030c8b0; scissorBox_setSmall = 0x8030c8b0;
func_8030C77C = 0x8030c91c; func_8030C77C = 0x8030c91c;
sfxsource_createSfxsourceAndReturnIndex = 0x8030daac; sfxsource_createSfxsourceAndReturnIndex = 0x8030daac;
func_8030DA44 = 0x8030dbe4; sfxsource_freeSfxsourceByIndex = 0x8030dbe4;
sfxsource_setSfxId = 0x8030dc20; sfxsource_setSfxId = 0x8030dc20;
sfxsource_setSampleRate = 0x8030dc5c; sfxsource_setSampleRate = 0x8030dc5c;
sfxsource_playSfxAtVolume = 0x8030dd54; sfxsource_playSfxAtVolume = 0x8030dd54;

View File

@@ -249,7 +249,7 @@ int CC_func_80388CA0(void){
void func_80388CB4(void){ void func_80388CB4(void){
if(D_80389FA0.unk21){ if(D_80389FA0.unk21){
skeletalAnim_free(D_80389FA0.unk0); skeletalAnim_free(D_80389FA0.unk0);
func_8030DA44(D_80389FA0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_80389FA0.sfxsourceIdx);
func_80340690(D_80389FA0.unk18); func_80340690(D_80389FA0.unk18);
func_8034A2A8(D_80389FA0.unk34); func_8034A2A8(D_80389FA0.unk34);
if(model_getVtxList(D_80389FA0.unk24) != D_80389FA0.unk40) if(model_getVtxList(D_80389FA0.unk24) != D_80389FA0.unk40)

View File

@@ -77,7 +77,7 @@ void func_80386AD0(ActorMarker *arg0, s32 arg1) {
void func_80386AF8(Actor *arg0) { void func_80386AF8(Actor *arg0) {
ActorLocal_CC_530 *local = (ActorLocal_CC_530 *)&arg0->local; ActorLocal_CC_530 *local = (ActorLocal_CC_530 *)&arg0->local;
CC_func_80386920(arg0, 0); CC_func_80386920(arg0, 0);
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
void func_80386B28(Actor *this){ void func_80386B28(Actor *this){

View File

@@ -55,7 +55,7 @@ void func_803878A0(Actor *this, s32 next_state) {
void CCW_func_80387A20(Actor *this){ void CCW_func_80387A20(Actor *this){
ActorLocal_CCW_14B0 *local = (ActorLocal_CCW_14B0 *)&this->local; ActorLocal_CCW_14B0 *local = (ActorLocal_CCW_14B0 *)&this->local;
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
void CCW_func_80387A40(Actor *this) { void CCW_func_80387A40(Actor *this) {

View File

@@ -118,7 +118,7 @@ void func_803891B0(void* marker) {
void func_8038921C(void* marker) { void func_8038921C(void* marker) {
Actor* actor = marker_getActor(reinterpret_cast(ActorMarker*, marker)); Actor* actor = marker_getActor(reinterpret_cast(ActorMarker*, marker));
func_8030E394(actor->unk44_31); func_8030E394(actor->unk44_31);
func_8030DA44(actor->unk44_31); sfxsource_freeSfxsourceByIndex(actor->unk44_31);
actor->unk44_31 = 0U; actor->unk44_31 = 0U;
FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 25000); FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 25000);
} }

View File

@@ -91,7 +91,7 @@ void func_8038717C(Actor *this){
ActorLocal_CCW_950 *local; ActorLocal_CCW_950 *local;
local = (ActorLocal_CCW_950 *)&this->local; local = (ActorLocal_CCW_950 *)&this->local;
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
void chwasp_update(Actor *this) { void chwasp_update(Actor *this) {

View File

@@ -28,7 +28,7 @@ void __chXmasTree_free(Actor *this){
item_set(ITEM_6_HOURGLASS, FALSE); item_set(ITEM_6_HOURGLASS, FALSE);
tmp_a0 = this->unk44_31; tmp_a0 = this->unk44_31;
if(tmp_a0){ if(tmp_a0){
func_8030DA44(tmp_a0); sfxsource_freeSfxsourceByIndex(tmp_a0);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
} }
@@ -165,7 +165,7 @@ void chXmasTree_update(Actor *this){
item_set(ITEM_6_HOURGLASS, FALSE); item_set(ITEM_6_HOURGLASS, FALSE);
tmp_a0 = this->unk44_31; tmp_a0 = this->unk44_31;
if(tmp_a0){ if(tmp_a0){
func_8030DA44(tmp_a0); sfxsource_freeSfxsourceByIndex(tmp_a0);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
func_80324E38(0.0f, 3); func_80324E38(0.0f, 3);

View File

@@ -27,7 +27,7 @@ void func_803918C0(void){
void func_8039195C(void){ void func_8039195C(void){
if(D_803935E0.sfxsourceIdx){ if(D_803935E0.sfxsourceIdx){
func_8030DA44(D_803935E0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_803935E0.sfxsourceIdx);
D_803935E0.sfxsourceIdx = 0; D_803935E0.sfxsourceIdx = 0;
} }
} }

View File

@@ -89,8 +89,8 @@ s32 func_80387360(void){
void func_8038736C(Actor *this){ void func_8038736C(Actor *this){
ActorLocal_chGobi1 *local = (ActorLocal_chGobi1 *)&this->local; ActorLocal_chGobi1 *local = (ActorLocal_chGobi1 *)&this->local;
chGobi1_setState(this, 0); chGobi1_setState(this, 0);
func_8030DA44(local->unk0[0]); sfxsource_freeSfxsourceByIndex(local->unk0[0]);
func_8030DA44(local->unk0[1]); sfxsource_freeSfxsourceByIndex(local->unk0[1]);
} }
void func_803873B0(ActorMarker *this_marker, ActorMarker *other_marker){ void func_803873B0(ActorMarker *this_marker, ActorMarker *other_marker){

View File

@@ -98,7 +98,7 @@ void func_8038DB88(Actor *this){
if(func_8030E3FC(tmp)){ if(func_8030E3FC(tmp)){
func_8030E394(this->unk44_31); func_8030E394(this->unk44_31);
} }
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
} }

View File

@@ -74,7 +74,7 @@ void func_8038C8A0(Actor *this, s32 next_state){
this->marker->propPtr->unk8_3 = (next_state == 1) ? FALSE : TRUE; this->marker->propPtr->unk8_3 = (next_state == 1) ? FALSE : TRUE;
this->marker->collidable = (next_state == 1) ? FALSE : TRUE; this->marker->collidable = (next_state == 1) ? FALSE : TRUE;
if(this->state == 4 || this->state == 5) if(this->state == 4 || this->state == 5)
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
if(next_state == 4 || next_state == 5){ if(next_state == 4 || next_state == 5){
local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex(); local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();

View File

@@ -38,7 +38,7 @@ void func_80388BD0(Actor *this, s32 arg1){
void func_80388BE8(Actor *actor){ void func_80388BE8(Actor *actor){
ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local; ActorLocal_RBB_27E0 *local = (ActorLocal_RBB_27E0 *)&actor->local;
if(actor->modelCacheIndex == 0x17b){ if(actor->modelCacheIndex == 0x17b){
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
} }
} }

View File

@@ -6,7 +6,7 @@
Actor *func_802D94B4(ActorMarker*, Gfx**, Mtx**, Vtx**); Actor *func_802D94B4(ActorMarker*, Gfx**, Mtx**, Vtx**);
void func_8028E668(f32*, f32, f32, f32); void func_8028E668(f32*, f32, f32, f32);
void func_80328FB0(Actor *, f32); void func_80328FB0(Actor *, f32);
void func_8030DA44(u8); void sfxsource_freeSfxsourceByIndex(u8);
void timed_exitStaticCamera(f32); void timed_exitStaticCamera(f32);
void subaddie_set_state_with_direction(Actor *, s32, f32, s32); void subaddie_set_state_with_direction(Actor *, s32, f32, s32);
@@ -128,7 +128,7 @@ void func_80388FA0(Actor *this, s32 arg1){
case 4://L80388FF8 case 4://L80388FF8
this->unk138_23 = 0; this->unk138_23 = 0;
case 2://L80389004 case 2://L80389004
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
break; break;
case 5://L80389018 case 5://L80389018
@@ -387,7 +387,7 @@ void func_80389984(Actor * this){
tmp = this->unk44_31; tmp = this->unk44_31;
if(tmp) if(tmp)
func_8030DA44(tmp); sfxsource_freeSfxsourceByIndex(tmp);
} }
void chsmmole_Update(Actor * this){ void chsmmole_Update(Actor * this){

View File

@@ -377,8 +377,8 @@ void func_8038AFC8(void){
void func_8038B04C(void){ void func_8038B04C(void){
if(D_8038D720.model1){ if(D_8038D720.model1){
func_8038A258(0); func_8038A258(0);
func_8030DA44(D_8038D720.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_8038D720.sfxsourceIdx);
func_8030DA44(D_8038D720.unkA); sfxsource_freeSfxsourceByIndex(D_8038D720.unkA);
} }
} }

View File

@@ -64,7 +64,7 @@ void func_80244BB0(s32 arg0, s32 arg1, s32 arg2, f32 arg3){
void func_80244C78(int arg0){ void func_80244C78(int arg0){
if(D_802758E0[arg0]){ if(D_802758E0[arg0]){
func_8030DA44(D_802758E0[arg0]); sfxsource_freeSfxsourceByIndex(D_802758E0[arg0]);
} }
D_802758E0[arg0] = 0; D_802758E0[arg0] = 0;
} }

View File

@@ -196,5 +196,5 @@ void bsbflap_end(void) {
baphysics_reset_gravity(); baphysics_reset_gravity();
baphysics_reset_terminal_velocity(); baphysics_reset_terminal_velocity();
func_8029E090(0, 0.2f); func_8029E090(0, 0.2f);
func_8030DA44(D_8037D30C); sfxsource_freeSfxsourceByIndex(D_8037D30C);
} }

View File

@@ -152,7 +152,7 @@ void bsblongleg_enter_update(void){
void bsblongleg_enter_end(void){ void bsblongleg_enter_end(void){
func_802A5404(); func_802A5404();
func_8030DA44(D_8037D361); sfxsource_freeSfxsourceByIndex(D_8037D361);
} }
void bsblongleg_stand_enter(void){ void bsblongleg_stand_enter(void){
@@ -308,7 +308,7 @@ void bsblongleg_exit_update(void){
} }
void bsblongleg_exit_end(void){ void bsblongleg_exit_end(void){
func_8030DA44(D_8037D361); sfxsource_freeSfxsourceByIndex(D_8037D361);
func_802A5404(); func_802A5404();
} }

View File

@@ -116,7 +116,7 @@ void bsbshock_charge_update(void){
} }
void bsbshock_charge_end(void){ void bsbshock_charge_end(void){
func_8030DA44(D_8037D382); sfxsource_freeSfxsourceByIndex(D_8037D382);
func_8029E064(0); func_8029E064(0);
func_8029E070(0); func_8029E070(0);
if(baModel_80292230() != 0.0f){ if(baModel_80292230() != 0.0f){

View File

@@ -263,7 +263,7 @@ void func_802C6240(Actor *this){
if (0.0f == this->actor_specific_1_f) { if (0.0f == this->actor_specific_1_f) {
animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP);
subaddie_set_state_with_direction(this, 1, 0.65f, 1); subaddie_set_state_with_direction(this, 1, 0.65f, 1);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
sfxsource_playHighPriority(SFX_19_BANJO_LANDING_08); sfxsource_playHighPriority(SFX_19_BANJO_LANDING_08);
} }

View File

@@ -91,7 +91,7 @@ void func_8035EDB0(f32 position[3], s32 count, enum asset_e sprite) {
void func_8035EE48(Actor *this){ void func_8035EE48(Actor *this){
u8 val = this->unk44_31; u8 val = this->unk44_31;
if(val != 0){ if(val != 0){
func_8030DA44(val); sfxsource_freeSfxsourceByIndex(val);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
} }

View File

@@ -294,7 +294,7 @@ void chmole_spawnMolehill(ActorMarker *marker){
void func_802D9C90(Actor *this){ void func_802D9C90(Actor *this){
u8 tmp_a1 = this->unk44_31; u8 tmp_a1 = this->unk44_31;
if(tmp_a1){ if(tmp_a1){
func_8030DA44(tmp_a1); sfxsource_freeSfxsourceByIndex(tmp_a1);
} }
} }
@@ -413,7 +413,7 @@ void chmole_update(Actor *this){
}//L802DA128 }//L802DA128
if(actor_animationIsAt(this, 0.9999f)){ if(actor_animationIsAt(this, 0.9999f)){
chmole_setFacingDirection(this); chmole_setFacingDirection(this);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
else if(actor_animationIsAt(this, 0.14f)){//L802DA154 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 else if(actor_animationIsAt(this, 0.9999f)){//L802DA45C
func_802D9600(this); func_802D9600(this);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
break; break;

View File

@@ -47,7 +47,7 @@ void func_802D0500(Actor *this){
void func_802D05A0(Actor *this, s32 next_state){ void func_802D05A0(Actor *this, s32 next_state){
ActorLocal_Core2_49570 *local = (ActorLocal_Core2_49570 *)this->local; ActorLocal_Core2_49570 *local = (ActorLocal_Core2_49570 *)this->local;
if(this->state == 2 && local->sfxsourceIdx){ if(this->state == 2 && local->sfxsourceIdx){
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
local->sfxsourceIdx = 0; local->sfxsourceIdx = 0;
} }
if(next_state == 2){ if(next_state == 2){

View File

@@ -77,7 +77,7 @@ void func_802997E8(void){
if(D_8037C6D0.sfxsourceIdx){ if(D_8037C6D0.sfxsourceIdx){
D_8037C6D0.unk4 += time_getDelta(); D_8037C6D0.unk4 += time_getDelta();
if(D_8037C6D0.unk8 <= D_8037C6D0.unk4){ if(D_8037C6D0.unk8 <= D_8037C6D0.unk4){
func_8030DA44(D_8037C6D0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_8037C6D0.sfxsourceIdx);
D_8037C6D0.sfxsourceIdx = 0; D_8037C6D0.sfxsourceIdx = 0;
} }
else{ else{
@@ -127,13 +127,13 @@ void func_80299900(void){
} }
void func_80299A20(void){ void func_80299A20(void){
func_8030DA44(D_8037C6C1); sfxsource_freeSfxsourceByIndex(D_8037C6C1);
func_8030DA44(D_8037C6C0); sfxsource_freeSfxsourceByIndex(D_8037C6C0);
func_8030DA44(D_8037C6C3); sfxsource_freeSfxsourceByIndex(D_8037C6C3);
func_8030DA44(D_8037C6C2); sfxsource_freeSfxsourceByIndex(D_8037C6C2);
func_8030DA44(D_8037C6C4); sfxsource_freeSfxsourceByIndex(D_8037C6C4);
if(D_8037C6D0.sfxsourceIdx){ if(D_8037C6D0.sfxsourceIdx){
func_8030DA44(D_8037C6D0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_8037C6D0.sfxsourceIdx);
} }
} }

View File

@@ -19,7 +19,7 @@ bool func_8029CFA0(void){
} }
void func_8029CFF8(void){ void func_8029CFF8(void){
func_8030DA44(D_8037D210); sfxsource_freeSfxsourceByIndex(D_8037D210);
} }
void func_8029D01C(void){ void func_8029D01C(void){

View File

@@ -262,7 +262,7 @@ void func_802CCBC8(Actor *this) {
local = (ActorLocal_Core2_45310 * )&this->local; local = (ActorLocal_Core2_45310 * )&this->local;
if(local->unk0 != 0){ 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 (!subaddie_playerIsWithinSphere(this, 4000)) {
if (local->unk0 != 0) { if (local->unk0 != 0) {
func_8030DA44(local->unk0); sfxsource_freeSfxsourceByIndex(local->unk0);
local->unk0 = 0; local->unk0 = 0;
} }
} else { } else {

View File

@@ -385,7 +385,7 @@ void chBeeSwarm_update(Actor *this) {
return; return;
if (!subaddie_playerIsWithinSphere(this, 0x5DC)) { if (!subaddie_playerIsWithinSphere(this, 0x5DC)) {
if ((u8)this->unk44_31 != 0) { if ((u8)this->unk44_31 != 0) {
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
D_8037DCBC = 0; D_8037DCBC = 0;
} }

View File

@@ -155,8 +155,8 @@ void func_802F46F4(Struct5Ds *this){
} }
void func_802F4798(Struct5Ds *this){ void func_802F4798(Struct5Ds *this){
func_8030DA44(this->unk1C); sfxsource_freeSfxsourceByIndex(this->unk1C);
func_8030DA44(this->unk1D); sfxsource_freeSfxsourceByIndex(this->unk1D);
free(this); free(this);
} }

View File

@@ -86,7 +86,7 @@ void func_802F9D38(s32 arg0){
ptr = vector_at(D_803810A0, arg0); ptr = vector_at(D_803810A0, arg0);
if(ptr->unk0){ if(ptr->unk0){
func_8030E394(ptr->unk0); func_8030E394(ptr->unk0);
func_8030DA44(ptr->unk0); sfxsource_freeSfxsourceByIndex(ptr->unk0);
ptr->unk0 = 0; ptr->unk0 = 0;
} }
} }

View File

@@ -358,7 +358,7 @@ void func_8030D310(u8 indx){
switch(func_8030C7E8(ptr)){ switch(func_8030C7E8(ptr)){
case 1://L8030D468 case 1://L8030D468
if( func_8030C814(ptr, 0) || (func_8030C814(ptr, 1) && !ptr->unk40)) if( func_8030C814(ptr, 0) || (func_8030C814(ptr, 1) && !ptr->unk40))
func_8030DA44(indx); sfxsource_freeSfxsourceByIndex(indx);
break; break;
case 2://L8030D4A4 case 2://L8030D4A4
if(func_8030C814(ptr, 1) && sfxsource_isFlagCleared(ptr, 1)) if(func_8030C814(ptr, 1) && sfxsource_isFlagCleared(ptr, 1))
@@ -444,7 +444,7 @@ void func_8030D778(void){
int temp_s1; int temp_s1;
for(i = 1; i < 35; i++){ for(i = 1; i < 35; i++){
if(sfxsources[i].busy) if(sfxsources[i].busy)
func_8030DA44(i); sfxsource_freeSfxsourceByIndex(i);
} }
do{ do{
temp_s1 = 0; temp_s1 = 0;
@@ -511,8 +511,8 @@ u8 sfxsource_createSfxsourceAndReturnIndex(void){
return s1; return s1;
} }
void func_8030DA44(u8 indx){ void sfxsource_freeSfxsourceByIndex(u8 indx) {
SfxSource * sp1C = sfxsource_at(indx); SfxSource *sp1C = sfxsource_at(indx);
func_8030E394(indx); func_8030E394(indx);
func_8030C7F8(sp1C, 3); func_8030C7F8(sp1C, 3);
} }

View File

@@ -44,7 +44,7 @@ f32 func_80290920(f32 arg0, f32 arg1, f32 arg2){
} }
void func_8029099C(void){ void func_8029099C(void){
func_8030DA44(D_8037C040); sfxsource_freeSfxsourceByIndex(D_8037C040);
D_8037C040 = 0; D_8037C040 = 0;
} }

View File

@@ -31,7 +31,7 @@ void func_80323190(void){
} }
void func_803231E8(void){ void func_803231E8(void){
func_8030DA44(D_80383370); sfxsource_freeSfxsourceByIndex(D_80383370);
} }
void func_8032320C(void){ void func_8032320C(void){

View File

@@ -376,7 +376,7 @@ void func_80325FE8(Actor *this) {
} }
temp_v0 = this->unk44_31; temp_v0 = this->unk44_31;
if (temp_v0 != 0) { if (temp_v0 != 0) {
func_8030DA44(temp_v0); sfxsource_freeSfxsourceByIndex(temp_v0);
} }
this->animctrl = NULL; this->animctrl = NULL;
this->unk44_31 = 0; this->unk44_31 = 0;

View File

@@ -528,7 +528,7 @@ void func_80341A54(void) {
for(var_s0 = 0; var_s0 < 0x40; var_s0++){ for(var_s0 = 0; var_s0 < 0x40; var_s0++){
if (D_803858A0[var_s0] != 0) { 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); sfxsource_setSampleRate(sfxsourceIdx, sp74);
func_8030E2C4(sfxsourceIdx); func_8030E2C4(sfxsourceIdx);
if (D_803858A0[sp70] != 0){ if (D_803858A0[sp70] != 0){
func_8030DA44(D_803858A0[sp70]); sfxsource_freeSfxsourceByIndex(D_803858A0[sp70]);
} }
D_803858A0[sp70] = sfxsourceIdx; D_803858A0[sp70] = sfxsourceIdx;
} else { } else {
@@ -836,7 +836,7 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){
case 5: case 5:
if (D_803858A0[arg1->t0.unk10.common.bit7] != 0){ 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; D_803858A0[arg1->t0.unk10.common.bit7] = 0;
} }
break; break;
@@ -1274,7 +1274,7 @@ void func_80343E20(s32 arg0, s32 arg1, f32 arg2, s32 arg3) {
sfxsource_setSampleRate(temp_v0, arg1); sfxsource_setSampleRate(temp_v0, arg1);
func_8030E2C4(temp_v0); func_8030E2C4(temp_v0);
if (D_803858A0[arg3] != 0) { if (D_803858A0[arg3] != 0) {
func_8030DA44(D_803858A0[arg3]); sfxsource_freeSfxsourceByIndex(D_803858A0[arg3]);
} }
D_803858A0[arg3] = temp_v0; D_803858A0[arg3] = temp_v0;
} }

View File

@@ -127,7 +127,7 @@ bool func_8034DC80(Struct6Ds *arg0, f32 arg1[3]) {
void func_8034DD48(Struct6Ds *arg0){ void func_8034DD48(Struct6Ds *arg0){
if(arg0->unk0 != 0){ 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); arg0->unk10(arg0);
} }
if (arg0->unk0 != 0) { if (arg0->unk0 != 0) {
func_8030DA44(arg0->unk0); sfxsource_freeSfxsourceByIndex(arg0->unk0);
arg0->unk0 = 0; arg0->unk0 = 0;
} }
} }

View File

@@ -21,7 +21,7 @@ void func_8034F6F0(Gfx **gdl, Mtx **mptr, s32 vptr){
void func_8034F734(void){ void func_8034F734(void){
if(D_803720A0.unk0){ if(D_803720A0.unk0){
func_8030DA44(D_803720A0.sfxsourceIdx); sfxsource_freeSfxsourceByIndex(D_803720A0.sfxsourceIdx);
particleEmitter_free(D_803720A0.unk0); particleEmitter_free(D_803720A0.unk0);
} }
} }

View File

@@ -345,7 +345,7 @@ void func_803518E8(void){
void func_80351954(Struct68s *arg0){ void func_80351954(Struct68s *arg0){
if(arg0->unk0){ if(arg0->unk0){
func_8030E394(arg0->unk0); func_8030E394(arg0->unk0);
func_8030DA44(arg0->unk0); sfxsource_freeSfxsourceByIndex(arg0->unk0);
arg0->unk0 = 0; arg0->unk0 = 0;
} }
} }

View File

@@ -221,7 +221,7 @@ void func_80358490(Actor *this) {
local = (ActorLocal_core2_D0CA0 *)&this->local; local = (ActorLocal_core2_D0CA0 *)&this->local;
if(local->sfxsourceIdx != 0){ 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 (!subaddie_playerIsWithinSphere(this, 4000)) {
if (local->sfxsourceIdx != 0) { if (local->sfxsourceIdx != 0) {
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
local->sfxsourceIdx = 0U; local->sfxsourceIdx = 0U;
} }
return; return;

View File

@@ -429,7 +429,7 @@ s32 D_8036D924[] = { 70, 35, 18, 9, 4, 2, 1};
/* .bss */ /* .bss */
char D_803830B0[0x30]; char D_803830B0[0x30];
void func_8030DA44(u8); void sfxsource_freeSfxsourceByIndex(u8);
void func_80338338(s32, s32, s32); void func_80338338(s32, s32, s32);
void func_803382FC(u8); void func_803382FC(u8);
@@ -443,7 +443,7 @@ void func_80315200(GcZoombox *this){
}else{ }else{
for(s1 =0; s1 < 5; s1++){ for(s1 =0; s1 < 5; s1++){
if(this->unk108[s1]){ if(this->unk108[s1]){
func_8030DA44(this->unk108[s1]); sfxsource_freeSfxsourceByIndex(this->unk108[s1]);
this->sfx_count--; this->sfx_count--;
} }
} }

View File

@@ -22,7 +22,7 @@ void chbossjinjobase_spawnStoneJinjo(ActorMarker *marker) {
} }
void chBossJinjoBase_createSmokeParticles(f32 position[3], s32 count) { 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_setSprite(pCtrl, ASSET_70E_SPRITE_SMOKE_2);
particleEmitter_setRGB(pCtrl, chBossJinjoBase_SmokeColor); particleEmitter_setRGB(pCtrl, chBossJinjoBase_SmokeColor);
particleEmitter_setStartingFrameRange(pCtrl, 0, 7); particleEmitter_setStartingFrameRange(pCtrl, 0, 7);
@@ -61,11 +61,11 @@ void chBossJinjoBase_free(Actor *this) {
ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *) &this->local; ActorLocal_BossJinjoBase *local = (ActorLocal_BossJinjoBase *) &this->local;
if ((u8)this->unk44_31 != 0) { if ((u8)this->unk44_31 != 0) {
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
if (local->sfxsourceIdx != 0) { if (local->sfxsourceIdx != 0) {
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
local->sfxsourceIdx = 0; local->sfxsourceIdx = 0;
} }
} }
@@ -124,9 +124,9 @@ void chBossJinjoBase_update(Actor *this) {
func_8030E2C4(local->sfxsourceIdx); 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[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_x = this->unk1C[0];
this->position_z = this->unk1C[2]; this->position_z = this->unk1C[2];
@@ -142,9 +142,9 @@ void chBossJinjoBase_update(Actor *this) {
} }
else { else {
subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT); subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
local->sfxsourceIdx = 0; local->sfxsourceIdx = 0;
TUPLE_COPY(this->position, this->unk1C); TUPLE_COPY(this->position, this->unk1C);
TUPLE_COPY(actor_stonejinjo->position, this->unk1C); TUPLE_COPY(actor_stonejinjo->position, this->unk1C);

View File

@@ -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]; f32 vec[3];
func_8034A174(arg0->marker->unk44, 0xA, vec); 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_8038871C(this, 460.0f, 400.0f * sp54);
chfinalboss_func_803873DC(this, 600.0f, 2000.0f); chfinalboss_func_803873DC(this, 600.0f, 2000.0f);
if (actor_animationIsAt(this, 0.9999f)) { if (actor_animationIsAt(this, 0.9999f)) {
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0U; this->unk44_31 = 0U;
chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_2_AIR); chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_2_AIR);
} }
@@ -1657,7 +1657,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) {
timed_exitStaticCamera(0.0f); timed_exitStaticCamera(0.0f);
func_80324E38(0.0f, 0); func_80324E38(0.0f, 0);
chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_5_JINJONATOR); chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_5_JINJONATOR);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0U; this->unk44_31 = 0U;
} }
break; break;
@@ -1874,7 +1874,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) {
} }
if (actor_animationIsAt(this, 0.9999f)) { if (actor_animationIsAt(this, 0.9999f)) {
chfinalboss_phase5_setState(this, 0x27); chfinalboss_phase5_setState(this, 0x27);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
break; break;
@@ -1888,7 +1888,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) {
v0 = this->unk44_31; v0 = this->unk44_31;
if (v0 != 0) { if (v0 != 0) {
func_8030E394(v0); func_8030E394(v0);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
} }
@@ -1982,7 +1982,7 @@ bool chfinalboss_func_8038B834(ActorMarker *marker, ActorMarker *other_marker) {
marker->id = 0x25E; marker->id = 0x25E;
} }
break; break;
case FINALBOSS_PHASE_2_AIR: case FINALBOSS_PHASE_2_AIR:
if (local->unkA == 0) { if (local->unkA == 0) {
marker->id = 0x260; marker->id = 0x260;

View File

@@ -189,7 +189,7 @@ void chjinjonator_update(Actor *this){
subaddie_set_state_with_direction(this, JINJONATOR_STATE_3_MOVE_UPWARD, 0.001f, 1); subaddie_set_state_with_direction(this, JINJONATOR_STATE_3_MOVE_UPWARD, 0.001f, 1);
actor_playAnimationOnce(this); actor_playAnimationOnce(this);
func_8030E394(this->unk44_31); func_8030E394(this->unk44_31);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
local->velocity_move_up = (320.0f - this->position_y) * 0.5; local->velocity_move_up = (320.0f - this->position_y) * 0.5;
func_80324CFC(0.0f, COMUSIC_8C_JINJONATOR_POWERUP, 32000); 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); func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f);
if((u8)this->unk44_31){ if((u8)this->unk44_31){
func_8030E394(this->unk44_31); func_8030E394(this->unk44_31);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
func_80324D2C(0.0f, COMUSIC_8C_JINJONATOR_POWERUP); func_80324D2C(0.0f, COMUSIC_8C_JINJONATOR_POWERUP);

View File

@@ -170,7 +170,7 @@ void chjinjonatorbase_update(Actor *this){
FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 32000); FUNC_8030E624(SFX_7F_HEAVYDOOR_SLAM, 0.8f, 32000);
func_8030E394(this->unk44_31); func_8030E394(this->unk44_31);
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
this->position_x = this->unk1C[0]; this->position_x = this->unk1C[0];

View File

@@ -42,12 +42,12 @@ void chspellbarrier_free(Actor *this) {
ActorLocal_SpellBarrier *local = (ActorLocal_SpellBarrier *) &this->local; ActorLocal_SpellBarrier *local = (ActorLocal_SpellBarrier *) &this->local;
if ((u8) this->unk44_31) { if ((u8) this->unk44_31) {
func_8030DA44(this->unk44_31); sfxsource_freeSfxsourceByIndex(this->unk44_31);
this->unk44_31 = 0; this->unk44_31 = 0;
} }
if (local->sfxsourceIdx != 0) { if (local->sfxsourceIdx != 0) {
func_8030DA44(local->sfxsourceIdx); sfxsource_freeSfxsourceByIndex(local->sfxsourceIdx);
local->sfxsourceIdx = 0; local->sfxsourceIdx = 0;
} }
} }

View File

@@ -536,7 +536,7 @@ void lair_func_8038CC9C(void)
return; return;
func_8030E394(D_8037DCB8->UNK_18); func_8030E394(D_8037DCB8->UNK_18);
func_8030DA44(D_8037DCB8->UNK_18); sfxsource_freeSfxsourceByIndex(D_8037DCB8->UNK_18);
D_8037DCB8->UNK_18 = 0; D_8037DCB8->UNK_18 = 0;
} }