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

@@ -5,7 +5,7 @@
extern func_802EBA98(s32, f32[3], s32, f32, s32, f32[3], f32, f32[3]);
typedef struct {
u8 unk0[2];
u8 unk0[2]; // array of sfxsource indexes
//u8 pad2[2];
f32 unk4;
f32 unk8;
@@ -121,8 +121,8 @@ void chGobi1_update(Actor *this){
marker->collidable = TRUE;
GV_D_80391A40.unk0 = 0;
GV_D_80391A40.unk1 = 0;
local->unk0[0] = func_8030D90C();
local->unk0[1] = func_8030D90C();
local->unk0[0] = sfxsource_createSfxsourceAndReturnIndex();
local->unk0[1] = sfxsource_createSfxsourceAndReturnIndex();
local->unk8 = 0.0f;
local->unkC = 0.0f;
local->unk10 = 0.0f;

View File

@@ -222,7 +222,7 @@ void func_8038DBDC(Actor *this){
if(1.0 < this->unk1C[1]){
this->unk1C[1] -= 0.1;
}
func_8030DBB4(this->unk44_31, this->unk1C[1]);
sfxsource_playSfxAtVolume(this->unk44_31, this->unk1C[1]);
}
}
break;

View File

@@ -166,10 +166,10 @@ void func_8038B124(Actor *this){
this->unk138_27 = 1;
this->unk1C[1] = 0.0f;
if(this->unk44_31 == 0){
this->unk44_31 = func_8030D90C();
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
sfxsource_setSfxId(this->unk44_31, SFX_3EC_CCW_DOOR_OPENING);
func_8030DD14(this->unk44_31, 2);
func_8030DBB4(this->unk44_31, 0.1f);
sfxsource_playSfxAtVolume(this->unk44_31, 0.1f);
sfxsource_setSampleRate(this->unk44_31, 32000);
}
}//L8038B25C

View File

@@ -172,10 +172,10 @@ void GV_func_8038BEA0(Actor *this){
if(!this->volatile_initialized){
this->volatile_initialized = TRUE;
if(this->unk44_31 == 0){
this->unk44_31 = func_8030D90C();
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
sfxsource_setSfxId(this->unk44_31, SFX_3EC_CCW_DOOR_OPENING);
func_8030DD14(this->unk44_31, 2);
func_8030DBB4(this->unk44_31, 0.1f);
sfxsource_playSfxAtVolume(this->unk44_31, 0.1f);
sfxsource_setSampleRate(this->unk44_31, 32000);
}
if(this->unk100 == NULL){

View File

@@ -5,7 +5,7 @@
typedef struct {
s32 unk0;
u8 unk4;
u8 sfxsourceIdx;
//u8 pad5[3];
u8 *unk8;
f32 unkC;
@@ -74,15 +74,15 @@ 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->unk4);
func_8030DA44(local->sfxsourceIdx);
if(next_state == 4 || next_state == 5){
local->unk4 = func_8030D90C();
sfxsource_setSfxId(local->unk4, SFX_3EC_CCW_DOOR_OPENING);
func_8030DD14(local->unk4, 3);
func_8030DBB4(local->unk4, 0.8f);
sfxsource_setSampleRate(local->unk4, 0);
func_8030E2C4(local->unk4);
local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();
sfxsource_setSfxId(local->sfxsourceIdx, SFX_3EC_CCW_DOOR_OPENING);
func_8030DD14(local->sfxsourceIdx, 3);
sfxsource_playSfxAtVolume(local->sfxsourceIdx, 0.8f);
sfxsource_setSampleRate(local->sfxsourceIdx, 0);
func_8030E2C4(local->sfxsourceIdx);
}//L8038C9B8
if(next_state == 2){
@@ -243,7 +243,7 @@ void func_8038CC98(Actor *this){
else{
f12 = 1.0f;
}
func_8030DB04(local->unk4, f12*24000.0f, this->position, 200.0f, 1500.0f);
func_8030DB04(local->sfxsourceIdx, f12*24000.0f, this->position, 200.0f, 1500.0f);
if(!func_8038D388()){
func_8038C8A0(this, 3);
}