diff --git a/README.md b/README.md
index 3cd45f4e..9e77ba18 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# banjo (97.0502%)
+# banjo (97.1239%)
diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml
index 30a849d2..bf4e5a11 100644
--- a/decompressed.us.v10.yaml
+++ b/decompressed.us.v10.yaml
@@ -151,7 +151,7 @@ segments:
- [0xF1C1F0, c, code_2FA0] #DONE
- [0xF1C410, c, code_31C0] #DONE
- [0xF1C4A0, c, code_3250] #DONE
- - [0xF1CCC0, c, code_3A70]
+ - [0xF1CCC0, c, code_3A70] #DONE
- [0xF1E8A0, c, code_5650]
- [0xF202E0, c, code_7090] #DONE
- [0xF20500, c, code_72B0] #DONE
diff --git a/progress/progress_core1.svg b/progress/progress_core1.svg
index feec02bd..58f73fa1 100644
--- a/progress/progress_core1.svg
+++ b/progress/progress_core1.svg
@@ -9,7 +9,7 @@
-
+
@@ -17,7 +17,7 @@
core1
- 96.0549%
- 96.0549%
+ 96.5630%
+ 96.5630%
\ No newline at end of file
diff --git a/progress/progress_total.svg b/progress/progress_total.svg
index e87aa9ec..2f6f932e 100644
--- a/progress/progress_total.svg
+++ b/progress/progress_total.svg
@@ -17,7 +17,7 @@
Banjo-Kazooie (us.v10)
- 97.0502%
- 97.0502%
+ 97.1239%
+ 97.1239%
\ No newline at end of file
diff --git a/src/core1/code_3A70.c b/src/core1/code_3A70.c
index 3060d667..317601ea 100644
--- a/src/core1/code_3A70.c
+++ b/src/core1/code_3A70.c
@@ -202,53 +202,27 @@ void func_802424D4(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 arg3[3], f32 arg4[3], f3
}
}
-#ifndef NONMATCHING
-#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_3A70/func_80242BE8.s")
-#else
-void func_80242BE8(Gfx **gfx, Vtx **arg1, f32 arg2[2][2][2][3], s32 arg3[3], s32 *arg4, s32 arg5) {
+void func_80242BE8(Gfx **gfx, Vtx **arg1, f32 arg2[2][2][2][3], s32 arg3[3], s32 *arg4, s32 arg5)
+{
f32 sp84[3];
- f32 *temp_a0;
- f32 *var_v0;
- f32 temp_f12;
- f32 var_f18;
- s32 temp_a2;
- s32 var_a2;
- s32 var_a3;
- s32 var_t2;
- s32 var_v1;
- void *temp_v0;
- void *temp_v0_10;
- void *temp_v0_11;
- void *temp_v0_12;
- void *temp_v0_13;
- void *temp_v0_14;
- void *temp_v0_15;
- void *temp_v0_16;
- void *temp_v0_2;
- void *temp_v0_3;
- void *temp_v0_4;
- void *temp_v0_5;
- void *temp_v0_6;
- void *temp_v0_7;
- void *temp_v0_8;
- void *temp_v0_9;
-
+ #define var_v0 ((f32*)((u8*)arg2 + (i << 2) * sizeof(f32[3]) + (j << 1) * sizeof(f32[3]) + k * sizeof(f32[3])))
+ s32 i;
+ s32 j;
+ s32 k;
func_8024C5CC(sp84);
gSPDisplayList((*gfx)++, D_80275880);
- var_t2 = 0;
- if(arg5){
+ if (arg5){
gSPSetGeometryMode((*gfx)++, G_CULL_BACK);
- }
- else{
+ } else {
gSPSetGeometryMode((*gfx)++, G_CULL_FRONT);
}
gSPVertex((*gfx)++, *arg1, 8, 0);
- for(var_t2 = 0; var_t2 < 2; var_t2++){
- for(var_a3 = 0; var_a3 < 2; var_a3++){
- for(var_v1 = 0; var_v1 < 2; var_v1++){
- (*arg1)->v.ob[0] = arg2[var_t2][var_a3][var_v1][0] - sp84[0];
- (*arg1)->v.ob[1] = arg2[var_t2][var_a3][var_v1][1] - sp84[1];
- (*arg1)->v.ob[2] = arg2[var_t2][var_a3][var_v1][2] - sp84[2];
+ for(i = 0; i < 2; i++){
+ for(j = 0; j < 2; j++){
+ for(k = 0; k < 2; k++){
+ (*arg1)->v.ob[0] = var_v0[0] - sp84[0];
+ (*arg1)->v.ob[1] = var_v0[1] - sp84[1];
+ (*arg1)->v.ob[2] = var_v0[2] - sp84[2];
(*arg1)->v.flag = 0;
(*arg1)->v.tc[0] = 0;
(*arg1)->v.tc[1] = 0;
@@ -260,19 +234,19 @@ void func_80242BE8(Gfx **gfx, Vtx **arg1, f32 arg2[2][2][2][3], s32 arg3[3], s32
}
}
}
+ #undef var_v0
gDPPipeSync((*gfx)++);
- gDPSetPrimColor((*gfx)++, 0, 0, arg3[0], arg3[1], arg3[2], *arg4);
+ gDPSetPrimColor((*gfx)++, 0, 0, arg3[0], arg3[1], arg3[2], arg4[0]);
gSP2Triangles((*gfx)++, 7, 3, 5, 0, 5, 3, 1, 0);
gSP1Quadrangle((*gfx)++, 6, 4, 0, 2, 0);
-
+
gDPPipeSync((*gfx)++);
- gDPSetPrimColor((*gfx)++, 0, 0, arg3[0], arg3[1], arg3[2], *arg4);
+ gDPSetPrimColor((*gfx)++, 0, 0, arg3[0], arg3[1], arg3[2], arg4[1]);
gSP1Quadrangle((*gfx)++, 7, 6, 2, 3, 0);
gSP2Triangles((*gfx)++, 4, 5, 0, 0, 5, 1, 0, 0);
-
+
gDPPipeSync((*gfx)++);
- gDPSetPrimColor((*gfx)++, 0, 0, arg3[0], arg3[1], arg3[2], *arg4);
+ gDPSetPrimColor((*gfx)++, 0, 0, arg3[0], arg3[1], arg3[2], arg4[2]);
gSP1Quadrangle((*gfx)++, 5, 4, 6, 7, 0);
gSP2Triangles((*gfx)++, 0, 1, 2, 0, 1, 3, 2, 0);
}
-#endif