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

@@ -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);
}

View File

@@ -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();
}

View File

@@ -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){

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -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;

View File

@@ -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){

View File

@@ -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);
}
}

View File

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

View File

@@ -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 {

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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;
}
}

View File

@@ -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);
}

View File

@@ -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;
}

View File

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

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;
}
}

View File

@@ -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);
}
}

View File

@@ -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;
}
}

View File

@@ -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;

View File

@@ -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--;
}
}