From bbadd23eef62f7b4fd94b6a499b64ebd824b796c Mon Sep 17 00:00:00 2001 From: Banjo Kazooie Date: Sat, 15 Oct 2022 19:13:06 -0500 Subject: [PATCH] core1/code_7F60.c progress --- README.md | 2 +- progress/progress_core1.svg | 6 +++--- progress/progress_total.svg | 4 ++-- src/core1/code_7F60.c | 28 +++++++++++++++++++++++++++- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4a556f8e..d39bb36b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# banjo (90.7792%) +# banjo (90.8038%) diff --git a/progress/progress_core1.svg b/progress/progress_core1.svg index b4460341..9ac9962d 100644 --- a/progress/progress_core1.svg +++ b/progress/progress_core1.svg @@ -9,7 +9,7 @@ - + @@ -17,7 +17,7 @@ core1 - 82.3611% - 82.3611% + 82.5310% + 82.5310% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index ad11661b..5a3de375 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 90.7792% - 90.7792% + 90.8038% + 90.8038% \ No newline at end of file diff --git a/src/core1/code_7F60.c b/src/core1/code_7F60.c index 4552b4a5..a76d5ad1 100644 --- a/src/core1/code_7F60.c +++ b/src/core1/code_7F60.c @@ -123,7 +123,33 @@ void func_80245F34(f32 *arg0, f32 *arg1, f32 *arg2) { #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/guPerspective.s") -#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_8024632C.s") +void func_8024632C(f32 mf[4][4], f32 arg1, f32 arg2, f32 arg3, f32 arg4) { + f32 sp34; + f32 sp30; + f32 sp2C; + f32 sp28; + volatile f32 sp24; + + func_80245F34(&arg2, &arg3, &arg4); + arg1 *= D_80275908; + sp34 = sinf(arg1); + sp30 = cosf(arg1); + sp2C = arg2 * arg3 * (1.0f - sp30); + sp28 = arg3 * arg4 * (1.0f - sp30); + sp24 = (arg4 * arg2 * (1.0f - sp30)); + _guMtxIdentF_80245D44(mf); + mf[0][0] = ((1.0f - (arg2 * arg2)) * sp30) + (arg2 * arg2); + mf[2][1] = (sp28 - (arg2 * sp34)); + mf[1][2] = ((arg2 * sp34) + sp28); + + mf[1][1] = (((1.0f - (arg3 * arg3)) * sp30) + (arg3 * arg3)); + mf[2][0] = ((arg3 * sp34) + sp24); + mf[0][2] = (sp24 - (arg3 * sp34)); + + mf[2][2] = (((1.0f - (arg4 * arg4)) * sp30) + (arg4 * arg4)); + mf[1][0] = (sp2C - (arg4 * sp34)); + mf[0][1] = (arg4 * sp34) + sp2C; +} void func_802464B0(f32 mf[4][4], f32 arg1){ f32 c, s;