core2/code_75930.c

This commit is contained in:
Banjo Kazooie 2022-10-17 13:57:32 -05:00
parent e84beb8011
commit d6d4b4aebe
5 changed files with 95 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# banjo (91.2661%)
# banjo (91.3263%)
<img src="./progress/progress_total.svg">

View File

@ -17,7 +17,7 @@
<text x="22.0" y="14">core2</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">89.0084%</text>
<text x="77.5" y="14">89.0084%</text>
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">89.1135%</text>
<text x="77.5" y="14">89.1135%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">91.2661%</text>
<text x="183.5" y="14">91.2661%</text>
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">91.3263%</text>
<text x="183.5" y="14">91.3263%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -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;
}

View File

@ -274,7 +274,7 @@ segments:
- [0x74910, c, code_74910] #DONE
- [0x74ED0, c, code_74ED0] #DONE
- [0x75480, c, code_75480] #DONE
- [0x75930, c, code_75930]
- [0x75930, c, code_75930] #DONE
- [0x75E90, c, code_75E90]
- [0x76390, c, code_76390] #DONE
- [0x763D0, c, code_763D0] #DONE