refac: rename unk2A of Sfxsource struct to sample_rate

This commit is contained in:
Bl00D4NGEL 2024-09-03 20:30:13 +02:00
parent 1908fb86b2
commit 90bee21337

View File

@ -28,7 +28,7 @@ typedef struct {
f32 unk20;
f32 unk24;
s16 sfx_uid;
s16 unk2A;//sample_rate
s16 sample_rate;//sample_rate
u8 unk2C;
u8 pad2D[3];
void (*unk30)(u8 indx);
@ -299,14 +299,14 @@ s32 func_8030D10C(u8 indx){
//L8030D228
if(sfxsource_isFlagSet(ptr, SFX_SRC_FLAG_1_UNKOWN)){
tmp_v0 = func_8030CCF0(ptr, ptr->unk2A);
tmp_v0 = func_8030CCF0(ptr, ptr->sample_rate);
if(tmp_v0 < 100)
sp24 = 1;
func_8030D004(ptr->unk40, func_8030D038(ptr, tmp_v0));
func_8030CF9C(ptr->unk40, func_8030CDE4(ptr));
}else{//L8030D288
if(sfxsource_isFlagSet(ptr, SFX_SRC_FLAG_3_UNKOWN)){
tmp_v0 = func_8030D038(ptr, ptr->unk2A);
tmp_v0 = func_8030D038(ptr, ptr->sample_rate);
if(tmp_v0 < 100)
sp24 = 1;
func_8030D004(ptr->unk40, tmp_v0);
@ -486,7 +486,7 @@ u8 func_8030D90C(void){
s0 = sfxsource_at(s1);
s0->unk30 = NULL;
s0->sfx_uid = -1;
s0->unk2A = 22000;
s0->sample_rate = 22000;
s0->unk2C = 0;
s0->unk40 = 0;
s0->unk43_1 = 0;
@ -525,7 +525,7 @@ void sfxsource_setSampleRate(u8 indx, s32 sample_rate){
Sfxsource *temp_v0;
if(indx){
temp_v0 = sfxsource_at(indx);
temp_v0->unk2A = sample_rate;
temp_v0->sample_rate = sample_rate;
sfxsource_setFlag(temp_v0, SFX_SRC_FLAG_3_UNKOWN);
}
}
@ -743,7 +743,7 @@ s32 func_8030E1C4(u8 indx){
return 0;
else{
ptr = sfxsource_at(indx);
return ptr->unk2A;
return ptr->sample_rate;
}
}
@ -772,10 +772,10 @@ s32 func_8030E244(u8 indx){
bool func_8030E280(Sfxsource *arg0){
int temp_v1;
if(sfxsource_isFlagSet(arg0, SFX_SRC_FLAG_1_UNKOWN)){
temp_v1 = func_8030CCF0(arg0, arg0->unk2A);
temp_v1 = func_8030CCF0(arg0, arg0->sample_rate);
}
else{
temp_v1 = arg0->unk2A;
temp_v1 = arg0->sample_rate;
}
return (temp_v1 > 100);
}