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:
@@ -4,7 +4,7 @@
|
||||
#include "fight.h"
|
||||
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
u8 sfxsourceIdx;
|
||||
}ActorLocal_BossJinjoBase;
|
||||
|
||||
enum chBossJinjoBase_states {
|
||||
@@ -90,9 +90,9 @@ void fight_func_8038D510(Actor *arg0) {
|
||||
func_8030DA44(arg0->unk44_31);
|
||||
arg0->unk44_31 = 0;
|
||||
}
|
||||
if (sp18->unk0 != 0) {
|
||||
func_8030DA44(sp18->unk0);
|
||||
sp18->unk0 = 0;
|
||||
if (sp18->sfxsourceIdx != 0) {
|
||||
func_8030DA44(sp18->sfxsourceIdx);
|
||||
sp18->sfxsourceIdx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,17 +115,17 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
this->marker->propPtr->unk8_3 = 1;
|
||||
actor_collisionOn(this);
|
||||
this->unk38_31 = 0;
|
||||
this->unk44_31 = func_8030D90C();
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_3F9_UNKNOWN);
|
||||
func_8030DD14(this->unk44_31, 2);
|
||||
func_8030DBB4(this->unk44_31, 1.4f);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.4f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 32000);
|
||||
|
||||
local->unk0 = func_8030D90C();
|
||||
sfxsource_setSfxId(local->unk0, SFX_405_UNKNOWN);
|
||||
func_8030DD14(local->unk0, 2);
|
||||
func_8030DBB4(local->unk0, 0.7f);
|
||||
sfxsource_setSampleRate(local->unk0, 12000);
|
||||
local->sfxsourceIdx = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(local->sfxsourceIdx, SFX_405_UNKNOWN);
|
||||
func_8030DD14(local->sfxsourceIdx, 2);
|
||||
sfxsource_playSfxAtVolume(local->sfxsourceIdx, 0.7f);
|
||||
sfxsource_setSampleRate(local->sfxsourceIdx, 12000);
|
||||
FUNC_8030E624(SFX_3F6_UNKNOWN, 0.6f, 20000);
|
||||
func_8038D3DC(this, 0x19a, 0.0f, -200.0f, 0.0f);
|
||||
TUPLE_COPY(this->unk1C, this->position);
|
||||
@@ -148,7 +148,7 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
if(this->position_y + y_delta < this->unk1C[1]) {
|
||||
if( !fileProgressFlag_get(FILEPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) || this->unkF4_8 == 1) {
|
||||
func_8030E2C4(this->unk44_31);
|
||||
func_8030E2C4(local->unk0);
|
||||
func_8030E2C4(local->sfxsourceIdx);
|
||||
}
|
||||
|
||||
position_delta[0] = (shake_noise & 1) ? 3.0f : -3.0f;
|
||||
@@ -171,8 +171,8 @@ void chBossJinjoBase_update(Actor *this) {
|
||||
subaddie_set_state(this, CHBOSSJINJOBASE_STATE_2_DEFAULT);
|
||||
func_8030DA44(this->unk44_31);
|
||||
this->unk44_31 = 0;
|
||||
func_8030DA44(local->unk0);
|
||||
local->unk0 = 0;
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
local->sfxsourceIdx = 0;
|
||||
TUPLE_COPY(this->position, this->unk1C);
|
||||
TUPLE_COPY(actor_stone_jinjo->position, this->unk1C);
|
||||
actor_stone_jinjo->position_y += 172.0f;
|
||||
|
||||
@@ -657,10 +657,10 @@ void chfinalboss_setPhase(ActorMarker *this, u32 phase_id)
|
||||
local->unk10 = 0;
|
||||
if (actor->unk44_31 == 0)
|
||||
{
|
||||
actor->unk44_31 = (u8)func_8030D90C();
|
||||
actor->unk44_31 = (u8)sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(actor->unk44_31, SFX_152_MOTOR_BREAKDOWN_01);
|
||||
func_8030DD14(actor->unk44_31, 3);
|
||||
func_8030DBB4(actor->unk44_31, 1.0f);
|
||||
sfxsource_playSfxAtVolume(actor->unk44_31, 1.0f);
|
||||
sfxsource_setSampleRate(actor->unk44_31, 32000);
|
||||
}
|
||||
return;
|
||||
@@ -1559,11 +1559,11 @@ void chfinalboss_phase4_setState(Actor *this, s32 arg1) {
|
||||
func_80311480(randi2(0, 5) + 0x1145, 0x20, NULL, NULL, NULL, NULL);
|
||||
func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000);
|
||||
func_8030E6A4(SFX_133_GRUNTY_OHW, randf2(0.95f, 1.05f), 32000);
|
||||
this->unk44_31 = func_8030D90C();
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
D_803927C0 = 1.0f;
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_2C_PULLING_NOISE);
|
||||
func_8030DD14(this->unk44_31, 2);
|
||||
func_8030DBB4(this->unk44_31, D_803927C0);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, D_803927C0);
|
||||
sfxsource_setSampleRate(this->unk44_31, 26000);
|
||||
for(iter.i = 0; iter.i < 4; iter.i+=1){
|
||||
if(__chFinalBossJinjoStatueMarker[iter.i] != NULL){
|
||||
@@ -1726,7 +1726,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) {
|
||||
func_8030E6A4(SFX_12A_GRUNTY_AH, randf2(0.95f, 1.05f), 32000);
|
||||
}
|
||||
if ((sp58 >= 0.4) && (sp58 <= 0.65)) {
|
||||
func_8030DBB4(this->unk44_31, ((D_803927C0 += 0.005) > 1.99) ? 1.99 : (D_803927C0 += 0.005));
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, ((D_803927C0 += 0.005) > 1.99) ? 1.99 : (D_803927C0 += 0.005));
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
if (actor_animationIsAt(this, 0.56f)) {
|
||||
@@ -1785,10 +1785,10 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) {
|
||||
case 40:
|
||||
func_802BB41C(0);
|
||||
if (this->unk44_31 == 0) {
|
||||
this->unk44_31 = func_8030D90C();
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_134_FREEZING_SHIVER);
|
||||
func_8030DD14(this->unk44_31, 2);
|
||||
func_8030DBB4(this->unk44_31, 1.0f);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.0f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 0x4268);
|
||||
}
|
||||
break;
|
||||
@@ -1796,10 +1796,10 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) {
|
||||
case 41:
|
||||
this->unk7C[2] = 0;
|
||||
if (this->unk44_31 == 0) {
|
||||
this->unk44_31 = func_8030D90C();
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, SFX_134_FREEZING_SHIVER);
|
||||
func_8030DD14(this->unk44_31, 3);
|
||||
func_8030DBB4(this->unk44_31, 1.0f);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.0f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 0x4268);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void chjinjonator_8039040C(Actor *this){
|
||||
f32 tick = time_getDelta();
|
||||
|
||||
local->unk14 = MIN(1.99, local->unk14 + local->unk18*tick);
|
||||
func_8030DBB4(this->unk44_31, local->unk14);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->unk14);
|
||||
if(func_8030E3FC(this->unk44_31) == 0)
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void chjinjonator_update(Actor *this){
|
||||
func_8025A58C(0, 0x7fff);
|
||||
this->unk44_31 = func_8030ED2C(SFX_17A_SHIPHORN, 3);
|
||||
sfxsource_setSampleRate(this->unk44_31, 25000);
|
||||
func_8030DBB4(this->unk44_31, local->unk14);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->unk14);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
local->unk28 = 0xC;
|
||||
}//L80390574
|
||||
@@ -240,7 +240,7 @@ void chjinjonator_update(Actor *this){
|
||||
local->unk14 = 0.4f;
|
||||
this->unk44_31 = func_8030ED2C(0x416, 3);
|
||||
sfxsource_setSampleRate(this->unk44_31, 26000);
|
||||
func_8030DBB4(this->unk44_31, local->unk14);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, local->unk14);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
}//L803908AC
|
||||
local->unk1C = 0.5f;
|
||||
|
||||
@@ -127,10 +127,10 @@ void chjinjonatorbase_update(Actor *this){
|
||||
local->unk0[i] = 5;
|
||||
func_8038E0D4(this, 0x19a + i, 0.0f, -300.0f, 0.0f);
|
||||
}
|
||||
this->unk44_31 = func_8030D90C();
|
||||
this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex();
|
||||
sfxsource_setSfxId(this->unk44_31, 0x3f9);
|
||||
func_8030DD14(this->unk44_31, 3);
|
||||
func_8030DBB4(this->unk44_31, 1.0f);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.0f);
|
||||
sfxsource_setSampleRate(this->unk44_31, 26000);
|
||||
func_8030E2C4(this->unk44_31);
|
||||
temp_s0 = func_802F9AA8(0x3EC);
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct {
|
||||
u8 unkD;
|
||||
u8 unkE;
|
||||
u8 unkF;
|
||||
u8 unk10;
|
||||
u8 sfxsourceIdx;
|
||||
} ActorLocal_fight_8390;
|
||||
|
||||
void chspellbarrier_update(Actor *this);
|
||||
@@ -42,8 +42,8 @@ void func_8038E780(ActorMarker *arg0, ActorMarker *arg1) {
|
||||
sp18 = (ActorLocal_fight_8390 *) &sp1C->local;
|
||||
sp18->unk0 = 0xFF;
|
||||
sp18->unk4 = 0;
|
||||
if (func_8030E3FC(sp18->unk10) == 0) {
|
||||
func_8030E2C4(sp18->unk10);
|
||||
if (func_8030E3FC(sp18->sfxsourceIdx) == 0) {
|
||||
func_8030E2C4(sp18->sfxsourceIdx);
|
||||
}
|
||||
if (func_8030E3FC(sp1C->unk44_31) == 0) {
|
||||
func_8030E2C4(sp1C->unk44_31);
|
||||
@@ -57,9 +57,9 @@ void func_8038E7EC(Actor *arg0) {
|
||||
func_8030DA44(arg0->unk44_31);
|
||||
arg0->unk44_31 = 0;
|
||||
}
|
||||
if (local->unk10 != 0) {
|
||||
func_8030DA44(local->unk10);
|
||||
local->unk10 = (u8)0;
|
||||
if (local->sfxsourceIdx != 0) {
|
||||
func_8030DA44(local->sfxsourceIdx);
|
||||
local->sfxsourceIdx = (u8)0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,10 +80,10 @@ void chspellbarrier_update(Actor *this){
|
||||
this->scale = 0.0f;
|
||||
this->unk44_31 = func_8030ED2C(SFX_142_GRUNTY_LAUGH_3, 3);
|
||||
func_8030DB04(this->unk44_31, 32000, this->position, 4000.0f, 12000.0f);
|
||||
func_8030DBB4(this->unk44_31, 1.0f);
|
||||
local->unk10 = func_8030ED2C(0x415, 3);
|
||||
func_8030DB04(local->unk10, 32000, this->position, 4000.0f, 12000.0f);
|
||||
func_8030DBB4(local->unk10, 1.0f);
|
||||
sfxsource_playSfxAtVolume(this->unk44_31, 1.0f);
|
||||
local->sfxsourceIdx = func_8030ED2C(0x415, 3);
|
||||
func_8030DB04(local->sfxsourceIdx, 32000, this->position, 4000.0f, 12000.0f);
|
||||
sfxsource_playSfxAtVolume(local->sfxsourceIdx, 1.0f);
|
||||
FUNC_8030E8B4(SFX_416, 0.8f, 32000, this->position, 10000, 25000);
|
||||
}//L8038E97C
|
||||
jinjo_marker = chfinalboss_findCollidingJinjo(this, 600.0f);
|
||||
|
||||
Reference in New Issue
Block a user