core2/code_75930.c
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
|
||||
/* .data */
|
||||
extern f32 D_803698C0[];
|
||||
extern s32 D_803698E4;
|
||||
|
||||
/* .bss */
|
||||
@@ -34,7 +35,28 @@ void func_802FC918(void){
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FC95C.s")
|
||||
void func_802FC95C(struct8s *arg0) {
|
||||
s32 var_v0;
|
||||
struct8s *sp20;
|
||||
|
||||
for(var_v0 = 0; var_v0 < D_803698E4; var_v0++){
|
||||
if (arg0 == D_80381580[var_v0]) {
|
||||
sp20 = D_80381580[0];
|
||||
func_802FB020(D_80381580[var_v0], 1);
|
||||
sp20->unk10 = 3.0f;
|
||||
|
||||
if (sp20->unk18 == 0) {
|
||||
sp20->unk1C = 0.0f;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
for(var_v0 = D_803698E4; var_v0> 0; var_v0--) {
|
||||
D_80381580[var_v0] = D_80381580[var_v0-1];
|
||||
}
|
||||
D_80381580[0] = arg0;
|
||||
D_803698E4++;
|
||||
}
|
||||
|
||||
void func_802FCA30(s32 arg0, struct8s *arg1){
|
||||
func_802FC95C(arg1);
|
||||
@@ -62,7 +84,60 @@ void func_802FCAE0(s32 arg0, struct8s *arg1){
|
||||
D_803698E4 = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FCAF4.s")
|
||||
void func_802FCAF4(void) {
|
||||
f32 temp_f0;
|
||||
struct8s *temp_s2;
|
||||
s32 var_s1;
|
||||
|
||||
temp_s2 = D_80381580[0];
|
||||
if (D_803698E4) {
|
||||
switch (temp_s2->unk0) {
|
||||
default:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
temp_f0 = D_803698C0[temp_s2->unk18];
|
||||
temp_s2->unk1C += temp_s2->unk14 * temp_f0;
|
||||
if (temp_f0 == 0.0) {
|
||||
temp_s2->unk10 = 3.0f;
|
||||
temp_s2->unk0 = 2;
|
||||
} else {
|
||||
temp_s2->unk18++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (getGameMode() != GAME_MODE_4_PAUSED) {
|
||||
temp_s2->unk10 -= time_getDelta();
|
||||
if (temp_s2->unk10 < 0.0f) {
|
||||
temp_s2->unk0 = 3;
|
||||
for(var_s1 = 1; var_s1 < D_803698E4; var_s1++){
|
||||
func_802FCA78(5, D_80381580[var_s1]);
|
||||
func_802FB020(D_80381580[var_s1], temp_s2->unk0);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (temp_s2->unk18 == 0) {
|
||||
func_802FB020(temp_s2, 0);
|
||||
break;
|
||||
} else {
|
||||
temp_s2->unk18 = MAX(0, temp_s2->unk18 - 1);
|
||||
temp_f0 = D_803698C0[temp_s2->unk18];
|
||||
temp_s2->unk1C -= temp_s2->unk14 * temp_f0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for(var_s1 = 1; var_s1 < D_803698E4; var_s1++){
|
||||
if (temp_s2->unk0 == 2) {
|
||||
D_80381580[var_s1]->unk0 = temp_s2->unk0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_802FCD4C(void){}
|
||||
|
||||
@@ -74,4 +149,15 @@ bool func_802FCD54(void){
|
||||
return (var_v1->unk0 == 1 || var_v1->unk0 == 2);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FCD98.s")
|
||||
bool func_802FCD98(struct8s *arg0) {
|
||||
s32 temp_v0;
|
||||
|
||||
if (arg0->unk0 == 2) {
|
||||
return TRUE;
|
||||
}
|
||||
if (arg0->unk0 == 1) {
|
||||
temp_v0 = D_803698C0[arg0->unk18];
|
||||
return (temp_v0 == 0.0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user