core1/code_7F60.c progress

This commit is contained in:
Banjo Kazooie
2022-10-15 19:02:21 -05:00
parent c516e73adc
commit b926f7317d
5 changed files with 88 additions and 13 deletions

View File

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

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/> <path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#51e000" d="M44 0h67v20H44z"/> <path fill="#4fe000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/> <path fill="url(#b)" d="M0 0h111v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="22.0" y="14">core1</text> <text x="22.0" y="14">core1</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <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">81.9915%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">82.3611%</text>
<text x="77.5" y="14">81.9915%</text> <text x="77.5" y="14">82.3611%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/> <path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#2ae000" d="M150 0h67v20H150z"/> <path fill="#29e000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/> <path fill="url(#b)" d="M0 0h217v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text> <text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <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">90.7255%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">90.7792%</text>
<text x="183.5" y="14">90.7255%</text> <text x="183.5" y="14">90.7792%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -9,6 +9,40 @@ s32 func_80245980(f32 arg0){
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_802459A0.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_802459A0.s")
// void func_802459A0(void *arg0, s32 *arg1) {
// s32 *var_s3;
// s32 *var_s4;
// s32 temp_s2;
// s32 temp_v0;
// s32 var_s1;
// s32 var_s7;
// void *var_fp;
// void *var_s0;
// var_s3 = arg1;
// var_s4 = arg1 + 0x20;
// var_s7 = 0;
// var_fp = arg0;
// do {
// var_s1 = 0;
// var_s0 = var_fp;
// loop_2:
// temp_s2 = func_80245980(var_s0->unk0);
// temp_v0 = func_80245980(var_s0->unk4);
// var_s1 += 8;
// *var_s3 = (temp_s2 & 0xFFFF0000) | ((temp_v0 >> 0x10) & 0xFFFF);
// var_s0 += 8;
// var_s3 += 4;
// *var_s4 = ((temp_s2 << 0x10) & 0xFFFF0000) | (temp_v0 & 0xFFFF);
// var_s4 += 4;
// if (var_s1 != 0x10) {
// goto loop_2;
// }
// var_s7 += 1;
// var_fp += 0x10;
// } while (var_s7 != 4);
// }
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245A7C.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245A7C.s")
// void func_80245A7C(Mtx *m0, Mtx *m1){ // void func_80245A7C(Mtx *m0, Mtx *m1){
@@ -23,12 +57,29 @@ s32 func_80245980(f32 arg0){
// a0 = a2[2*i]*65536.0f; // a0 = a2[2*i]*65536.0f;
// a1 = a2[2*i+1]*65536.0f; // a1 = a2[2*i+1]*65536.0f;
// v0[i] = (a0 & 0xffff0000) | ((a1 >> 16) & 0xffff); // v0[i] = ((a0 << 0) & 0xffff0000) | ((a1 >> 16) & 0xffff);
// v1[i] = ((a0 << 16) & 0xffff0000) | (a1 & 0xffff); // v1[i] = ((a0 << 16) & 0xffff0000) | ((a1 >> 0) & 0xffff);
// } // }
// } // }
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245BE4.s") void func_80245BE4(f32 mf[4][4], f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
s32 i, j;
_guMtxIdentF_80245D44(mf);
mf[0][0] = (2 * arg5) / (arg2 - arg1);
mf[1][1] = (2 * arg5) / (arg4 - arg3);
mf[2][0] = (arg2 + arg1) / (arg2 - arg1);
mf[2][1] = (arg4 + arg3) / (arg4 - arg3);
mf[2][2] = -(arg6 + arg5) / (arg6 - arg5);
mf[2][3] = -1.0f;
mf[3][2] = (-2 * arg6 * arg5) / (arg6 - arg5);
mf[3][3] = 0.0f;
for(i = 0; i < 4; i++){
for(j = 0; j < 4; j++){
mf[i][j] *= arg7;
}
}
}
void _guMtxIdentF_80245D44(float mf[4][4]) //static void _guMtxIdentF_80245D44(float mf[4][4]) //static
{ {
@@ -40,9 +91,33 @@ void _guMtxIdentF_80245D44(float mf[4][4]) //static
else mf[i][j] = 0.0; else mf[i][j] = 0.0;
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245DCC.s") void func_80245DCC(f32 lmf[4][4], f32 rmf[4][4], f32 dst[4][4]) {
s32 i, j, k;
f32 sp1C[4][4];
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245F34.s") for(i = 0; i < 4; i++){
for(j = 0; j < 4; j++){
sp1C[i][j] = 0.0f;
for(k = 0; k < 4; k++){
sp1C[i][j] += lmf[i][k]*rmf[k][j];
}
}
}
for(i = 0; i < 4; i++){
for(j = 0; j < 4; j++){
dst[i][j] = sp1C[i][j];
}
}
}
void func_80245F34(f32 *arg0, f32 *arg1, f32 *arg2) {
f32 inv_len;
inv_len = 1.0f / gu_sqrtf((*arg0 * *arg0) + (*arg1 * *arg1) + (*arg2 * *arg2));
*arg0 *= inv_len;
*arg1 *= inv_len;
*arg2 *= inv_len;
}
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245FB8.s") #pragma GLOBAL_ASM("asm/nonmatchings/core1/code_7F60/func_80245FB8.s")

View File

@@ -285,7 +285,7 @@ segments:
- [0x39C40, .rodata, code_5650] - [0x39C40, .rodata, code_5650]
- [0x39CA0, .rodata, code_72B0] - [0x39CA0, .rodata, code_72B0]
- [0x39CC0, bin, data_39CC0] - [0x39CC0, bin, data_39CC0]
- [0x39CD0, bin, data_39CD0] # .rodata, code_7F60] - [0x39CD0, .rodata, code_7F60]
- [0x39CE0, bin, data_39CE0] # .rodata, code_9D30] - [0x39CE0, bin, data_39CE0] # .rodata, code_9D30]
- [0x39D00, .rodata, done/code_CE60] - [0x39D00, .rodata, done/code_CE60]
- [0x39FD0, .rodata, code_EAF0] - [0x39FD0, .rodata, code_EAF0]