refac: rename func_8030D90C to sfxsource_createSfxsourceAndReturnIndex and func_8030DBB4 to sfxsource_playSfxAtVolume

Additionally rename properties/variables assigned by sfxsource_createSfxsourceAndReturnIndex to sfxsourceIdx
This commit is contained in:
Bl00D4NGEL
2024-09-22 03:10:19 +02:00
parent fbe20325c2
commit 9bd6988f99
55 changed files with 297 additions and 297 deletions

View File

@@ -78,16 +78,16 @@ s32 func_802F4420(Struct5Ds *this){
}
void func_802F44AC(Struct5Ds *this, enum sfx_e sfx_id, f32 arg2, f32 arg3, s32 arg4){
u8 s0;
u8 sfxsourceIdx;
f32 f0;
s0 = (this->unk1E) ? this->unk1C : this->unk1D;
sfxsourceIdx = (this->unk1E) ? this->unk1C : this->unk1D;
sfxsource_setSfxId(s0, sfx_id);
sfxsource_setSfxId(sfxsourceIdx, sfx_id);
f0 = arg3*0.5;
func_8030DBB4(s0, randf2(arg2 - f0, arg2 + f0));
sfxsource_setSampleRate(s0, arg4);
func_8030E2C4(s0);
sfxsource_playSfxAtVolume(sfxsourceIdx, randf2(arg2 - f0, arg2 + f0));
sfxsource_setSampleRate(sfxsourceIdx, arg4);
func_8030E2C4(sfxsourceIdx);
this->unk1E ^= 1;
}
@@ -107,7 +107,7 @@ void func_802F4554(Struct5Ds *this, enum sfx_e sfx_id, f32 arg2, f32 arg3, f32 a
sfxsource_setSfxId(sp20, sfx_id);
range = arg4*0.5;
func_8030DBB4(sp20, randf2(sp24 - range, sp24 + range));
sfxsource_playSfxAtVolume(sp20, randf2(sp24 - range, sp24 + range));
sfxsource_setSampleRate(sp20, arg5);
func_8030E2C4(sp20);
this->unk1E ^= 1;
@@ -165,11 +165,11 @@ Struct5Ds *func_802F47D0(void){
this->unk1E = 0;
this->unk1F = 1;
this->unk1C = func_8030D90C();
this->unk1C = sfxsource_createSfxsourceAndReturnIndex();
func_8030DD14(this->unk1C, 3);
func_8030DD90(this->unk1C, 0);
this->unk1D = func_8030D90C();
this->unk1D = sfxsource_createSfxsourceAndReturnIndex();
func_8030DD14(this->unk1D, 3);
func_8030DD90(this->unk1D, 0);