diff --git a/README.md b/README.md index f314d34e..814dce8e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# banjo (91.0749%) +# banjo (91.0792%) diff --git a/progress/progress_core2.svg b/progress/progress_core2.svg index e4c05de8..8d0ca20c 100644 --- a/progress/progress_core2.svg +++ b/progress/progress_core2.svg @@ -9,7 +9,7 @@ - + @@ -17,7 +17,7 @@ core2 - 88.6752% - 88.6752% + 88.7824% + 88.7824% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index 100e808e..e8903f66 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 91.0749% - 91.0749% + 91.0792% + 91.0792% \ No newline at end of file diff --git a/src/core2/code_74420.c b/src/core2/code_74420.c index 8a375d3a..a7a724a4 100644 --- a/src/core2/code_74420.c +++ b/src/core2/code_74420.c @@ -2,6 +2,7 @@ #include "functions.h" #include "variables.h" +extern f32 D_80369800[9]; extern s32 D_80369824; /* .bss */ @@ -29,7 +30,29 @@ void func_802FB414(void){ } } -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB458.s") +void func_802FB458(struct8s *arg0) { + s32 var_v0; + struct8s *sp20; + + for(var_v0 = 0; var_v0 < D_80369824; var_v0++){ + if (arg0 == D_80381530[var_v0]) { + sp20 = D_80381530[0]; + func_802FB020(D_80381530[var_v0], 1); + if ((var_v0 == 0) || ((func_8028ECAC() != BSGROUP_A_FLYING)) || (func_802FDD0C(D_80381530[var_v0]) != ITEM_F_RED_FEATHER)) { + sp20->unk10 = 3.0f; + } + if (sp20->unk18 == 0) { + sp20->unk1C = 0.0f; + } + return; + } + } + for(var_v0 = D_80369824; var_v0> 0; var_v0--) { + D_80381530[var_v0] = D_80381530[var_v0-1]; + } + D_80381530[0] = arg0; + D_80369824++; +} void func_802FB56C(s32 arg0, struct8s *arg1){ func_802FB458(arg1); @@ -56,4 +79,53 @@ void func_802FB61C(s32 arg0, struct8s *arg1){ D_80369824 = 0; } -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_74420/func_802FB630.s") +void func_802FB630(void) { + f32 temp_f0; + struct8s *temp_s2; + s32 var_s1; + + temp_s2 = D_80381530[0]; + if (D_80369824 != 0) { + switch (temp_s2->unk0) { + default: + break; + case 1: + temp_f0 = D_80369800[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_80369824; var_s1++){ + func_802FB5B4(1, D_80381530[var_s1]); + func_802FB020(D_80381530[var_s1], temp_s2->unk0); + } + } + } + break; + case 3: + if (temp_s2->unk1C < -20.0f) { + func_802FB020(temp_s2, 0); + break; + } else { + temp_s2->unk18 = MAX(0, temp_s2->unk18 - 1); + temp_f0 = D_80369800[temp_s2->unk18]; + temp_s2->unk1C -= temp_s2->unk14 * temp_f0; + } + break; + } + for(var_s1 = 1; var_s1 < D_80369824; var_s1++){ + if (temp_s2->unk0 == 2) { + D_80381530[var_s1]->unk0 = temp_s2->unk0; + } + } + } +} diff --git a/src/core2/code_75930.c b/src/core2/code_75930.c index 0ee9e653..45402a1a 100644 --- a/src/core2/code_75930.c +++ b/src/core2/code_75930.c @@ -66,6 +66,12 @@ void func_802FCAE0(s32 arg0, struct8s *arg1){ void func_802FCD4C(void){} -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FCD54.s") +bool func_802FCD54(void){ + struct8s *var_v1 = D_80381580[0]; + if(D_803698E4 == 0) + return 0; + + return (var_v1->unk0 == 1 || var_v1->unk0 == 2); +} #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_75930/func_802FCD98.s") diff --git a/subyaml/core2.us.v10.yaml b/subyaml/core2.us.v10.yaml index 20d8bdd2..b57b2dbb 100644 --- a/subyaml/core2.us.v10.yaml +++ b/subyaml/core2.us.v10.yaml @@ -270,7 +270,7 @@ segments: - [0x73640, c, code_73640] #DONE - [0x74090, c, code_74090] #DONE - [0x74290, c, code_74290] #DONE - - [0x74420, c, code_74420] + - [0x74420, c, code_74420] #DONE - [0x74910, c, code_74910] - [0x74ED0, c, code_74ED0] - [0x75480, c, code_75480]