core2/code_637D0.c done

This commit is contained in:
Banjo Kazooie
2022-11-07 17:28:08 -06:00
parent 0c465b58b2
commit aad361e91c
6 changed files with 131 additions and 125 deletions

View File

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

View File

@@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#39e000" d="M44 0h67v20H44z"/>
<path fill="#38e000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/>
</g>
<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>
</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">87.1908%</text>
<text x="77.5" y="14">87.1908%</text>
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">87.4431%</text>
<text x="77.5" y="14">87.4431%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#26e000" d="M44 0h67v20H44z"/>
<path fill="#24e000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/>
</g>
<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">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">91.5082%</text>
<text x="77.5" y="14">91.5082%</text>
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">91.9376%</text>
<text x="77.5" y="14">91.9376%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#1fe000" d="M150 0h67v20H150z"/>
<path fill="#1de000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/>
</g>
<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>
</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">93.1411%</text>
<text x="183.5" y="14">93.1411%</text>
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">93.4289%</text>
<text x="183.5" y="14">93.4289%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -79,16 +79,12 @@ s32 func_802EA864(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
return 0;
}
#ifndef NONMATCHING
s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], f32 arg6);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EAB34.s")
#else
s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], f32 arg6){
BKModelUnk14_1 *iPtr;
f32 spA0[3];
f32 sp94[3];
BKModelUnk14_0 *tmp;
s32 start_ptr;
BKModelUnk14_1 *start_ptr;
BKModelUnk14_1 *end_ptr;
f32 temp_f20;
f32 sp78[3];
@@ -96,11 +92,10 @@ s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
f32 temp_f24;
// tmp = ;
start_ptr = (s32)(arg0 + 1);
// start_ptr += sizeof(BKModelUnk14List);
start_ptr += arg0->cnt0*sizeof(BKModelUnk14_0);
end_ptr = start_ptr + arg0->cnt2*sizeof(BKModelUnk14_1);
for(iPtr = start_ptr; iPtr < end_ptr; iPtr++){
tmp = (BKModelUnk14_0 *)(arg0 + 1);
iPtr = tmp + arg0->cnt0;
end_ptr = iPtr + arg0->cnt2;
for(iPtr = iPtr; iPtr < end_ptr; iPtr++){
spA0[0] = (f32) iPtr->unk4[0];
spA0[1] = (f32) iPtr->unk4[1];
spA0[2] = (f32) iPtr->unk4[2];
@@ -118,11 +113,11 @@ s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
if (!(((arg6 / scale + temp_f24) * (arg6 / scale + temp_f24)) <= ((sp78[0] * sp78[0]) + (sp78[1] * sp78[1])))) {
return iPtr->unkD;
}
if (1);
}
}
return 0;
}
#endif
s32 func_802EAD5C(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, f32 arg5[3], f32 arg6) {
BKModelUnk14_0 *t0_ptr;
@@ -247,14 +242,14 @@ s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
return 0;
}
#ifndef NONMATCHING
s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EB458.s")
#else
s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7) {
s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7)
{
BKModelUnk14_0 *ptr_t0;
f32 spB8[3];
f32 spAC[3];
BKModelUnk14_1 *temp_s2;
BKModelUnk14_1 *var_s0;
f32 sp98[3];
f32 sp8C[3];
f32 sp80[3];
@@ -262,13 +257,13 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
f32 sp68[3];
f32 temp_f0;
f32 temp_f20;
BKModelUnk14_1 *temp_s2;
BKModelUnk14_1 *var_s0;
ptr_t0 = (BKModelUnk14_0 *)(arg0 + 1);
var_s0 = (BKModelUnk14_1 *)(ptr_t0 + arg0->cnt0);
f32 temp_f6;
ptr_t0 = (BKModelUnk14_0 *) (arg0 + 1);
var_s0 = (BKModelUnk14_1 *) (ptr_t0 + arg0->cnt0);
temp_s2 = var_s0 + arg0->cnt2;
for(var_s0 = var_s0; var_s0 < temp_s2; var_s0++){
for (var_s0 = var_s0; var_s0 < temp_s2; var_s0++)
{
spB8[0] = (f32) var_s0->unk4[0];
spB8[1] = (f32) var_s0->unk4[1];
spB8[2] = (f32) var_s0->unk4[2];
@@ -277,39 +272,46 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
spAC[2] = (f32) (var_s0->unkA[2] * 2);
func_802519C8(&D_80380880, func_802EA110(arg5, var_s0->unkE));
func_80252D8C(spB8, spAC);
func_802524F0(sp98, 0.0f, 0.0f, (f32) (-var_s0->unk2 / 2));
func_802524F0(sp98, 0.0f, 0.0f, (f32) ((-var_s0->unk2) / 2));
func_802524F0(sp8C, 0.0f, 0.0f, (f32) (var_s0->unk2 / 2));
func_802524F0(sp68, (f32) var_s0->unk0, 0.0f, (f32) (-var_s0->unk2 / 2));
func_802524F0(sp68, (f32) var_s0->unk0, 0.0f, (f32) ((-var_s0->unk2) / 2));
sp68[0] -= sp98[0];
sp68[1] -= sp98[1];
sp68[2] -= sp98[2];
sp80[0] = sp98[0] - sp8C[0];
sp80[1] = sp98[1] - sp8C[1];
sp80[0] = sp98[0] - sp8C[0];\
sp80[1] = sp98[1] - sp8C[1];\
sp80[2] = sp98[2] - sp8C[2];
ml_vec3f_normalize(sp80);
sp74[0] = arg6[0] - sp98[0];
sp74[1] = arg6[1] - sp98[1];
sp74[2] = arg6[2] - sp98[2];
temp_f0 = sp80[0]*sp74[0] + sp80[1]*sp74[1] + sp80[2]*sp74[2];
if (!(arg7 < temp_f0)) {
temp_f0 = ((sp80[0] * sp74[0]) + (sp80[1] * sp74[1])) + (sp80[2] * sp74[2]);
if (!(arg7 < temp_f0))
{
if (1){}
sp74[0] = arg6[0] - sp8C[0];
sp74[1] = arg6[1] - sp8C[1];
sp74[2] = arg6[2] - sp8C[2];
if (!(arg7 < -(sp80[0]*sp74[0] + sp80[1]*sp74[1] + sp80[2]*sp74[2]))) {
sp74[0] = arg6[0] - (sp98[0] + (sp80[0]*temp_f0));
sp74[1] = arg6[1] - (sp98[1] + (sp80[1]*temp_f0));
sp74[2] = arg6[2] - (sp98[2] + (sp80[2]*temp_f0));
temp_f20 = gu_sqrtf(sp74[0]*sp74[0] + sp74[1]*sp74[1] + sp74[2]*sp74[2]);
if (!((temp_f20 - arg7) > gu_sqrtf(sp68[0]*sp68[0] + sp68[1]*sp68[1] + sp68[2]*sp68[2]))) {
if (!(arg7 < (-(((sp80[0] * sp74[0]) + (sp80[1] * sp74[1])) + (sp80[2] * sp74[2])))))
{
if(1){}
sp74[0] = arg6[0] - (sp98[0] + (sp80[0] * temp_f0));
sp74[1] = arg6[1] - (sp98[1] + (sp80[1] * temp_f0));
sp74[2] = arg6[2] - (sp98[2] + (sp80[2] * temp_f0));
temp_f20 = gu_sqrtf(((sp74[0] * sp74[0]) + (sp74[1] * sp74[1])) + (sp74[2] * sp74[2]));
if (!((temp_f20 - arg7) > gu_sqrtf(((sp68[0] * sp68[0]) + (sp68[1] * sp68[1])) + (sp68[2] * sp68[2]))))
{
return var_s0->unkD;
}
}
}
mlMtxPop();
}
return 0;
}
#endif
s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scale, s32 arg4, s32 arg5, f32 *arg6, f32 arg7) {
BKModelUnk14_0 *t0_ptr;
@@ -355,57 +357,58 @@ bool func_802EBA98(BKModelUnk14List *arg0, f32 arg1[3], s32 arg2, f32 arg3, s32
return func_802EBAE0(arg0, arg1, arg2, arg3, arg4, NULL, arg5, arg6, arg7);
}
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBAE0.s")
#else
s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3]) {
f32 sp3C[3];
f32 temp_f0;
s32 phi_v0;
sp3C[0] = arg6[0] - position[0];
sp3C[1] = arg6[1] - position[1];
sp3C[2] = arg6[2] - position[2];
temp_f0 = (arg7 + (arg0->unk6 * scale));
if( (arg0->unk6 > 0)
&& ((temp_f0 * temp_f0) < (sp3C[0] * sp3C[0]) + (sp3C[1] * sp3C[1]) + (sp3C[2] * sp3C[2]))
) {
return 0;
s32 func_802EBAE0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7, f32 arg8[3])
{
f32 sp3C[3];
f32 temp_f0;
s32 phi_v0;
sp3C[0] = arg6[0] - position[0];
sp3C[1] = arg6[1] - position[1];
sp3C[2] = arg6[2] - position[2];
temp_f0 = arg7 + (arg0->unk6 * scale);
if ((arg0->unk6 > 0) && ((temp_f0 * temp_f0) < (((sp3C[0] * sp3C[0]) + (sp3C[1] * sp3C[1])) + (sp3C[2] * sp3C[2]))))
{
return 0;
}
if (arg5 != 0)
{
mlMtxIdent();
func_80252C08(position, rotation, scale, arg4);
func_802513B0(&D_80380880);
phi_v0 = func_802EB8A0(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
if (phi_v0 == 0)
{
phi_v0 = func_802EAED4(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
}
if (arg5 != NULL) {
mlMtxIdent();
func_80252C08(position, rotation, scale, arg4);
func_802513B0(&D_80380880);
phi_v0 = func_802EB8A0(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
if (phi_v0 == 0) {
phi_v0 = func_802EAED4(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
}
if (phi_v0 == 0) {
phi_v0 = func_802EB458(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
}
} else {
phi_v0 = func_802EAD5C(arg0, position, rotation, scale, arg4, arg6, arg7);
if(phi_v0 == 0){
phi_v0 = func_802EA864(arg0, position, rotation, scale, arg4, arg6, arg7);
}
if(phi_v0 == 0){
phi_v0 = func_802EAB34(arg0, position, rotation, scale, arg4, arg6, arg7);
}
if (phi_v0 == 0)
{
if(1);
phi_v0 = func_802EB458(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
}
if (phi_v0 != 0) {
arg8[0] = 0.0f;
arg8[1] = 1.0f;
arg8[2] = 0.0f;
}
else
{
phi_v0 = func_802EAD5C(arg0, position, rotation, scale, arg4, arg6, arg7);
if (phi_v0 == 0)
{
phi_v0 = func_802EA864(arg0, position, rotation, scale, arg4, arg6, arg7);
}
return phi_v0;
if (phi_v0 == 0)
{
phi_v0 = func_802EAB34(arg0, position, rotation, scale, arg4, arg6, arg7);
}
}
if (phi_v0 != 0)
{
arg8[0] = 0.0f;
arg8[1] = 1.0f;
arg8[2] = 0.0f;
}
return phi_v0;
}
#endif
#ifndef NONMATCHING
s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBD3C.s")
#else
s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, s32 arg5, s32 arg6) {
s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, s32 arg5, s32 arg6)
{
s32 i;
f32 spA0[3];
f32 sp94[3];
@@ -415,11 +418,12 @@ s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s3
BKModelUnk14_0 *temp_s4;
f32 sp68[3];
BKModelUnk14_0 *temp_s0;
temp_s0 = (BKModelUnk14_0 *)(arg0 + 1);
temp_s4 = temp_s0 + (arg0->cnt0);
for(phi_s0 = temp_s0; phi_s0 < temp_s4; phi_s0++){
if ((phi_s0->unk15 != 0) && ((arg6 == 0) || (arg6 == phi_s0->unk15))) {
temp_s0 = (BKModelUnk14_0 *) (arg0 + 1);
temp_s4 = temp_s0 + arg0->cnt0;
for (phi_s0 = temp_s0; phi_s0 < temp_s4; phi_s0++)
{
if ((phi_s0->unk15 != 0) && ((arg6 == 0) || (arg6 == phi_s0->unk15)))
{
spA0[0] = (f32) phi_s0->unkC[0];
spA0[1] = (f32) phi_s0->unkC[1];
spA0[2] = (f32) phi_s0->unkC[2];
@@ -429,10 +433,9 @@ s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s3
sp88[0] = (f32) phi_s0->unk6[0];
sp88[1] = (f32) phi_s0->unk6[1];
sp88[2] = (f32) phi_s0->unk6[2];
sp7C[0] = (f32)phi_s0->unk12[0];
sp7C[1] = (f32)phi_s0->unk12[1];
sp7C[2] = (f32)phi_s0->unk12[2];
sp7C[0] = (f32) phi_s0->unk12[0];
sp7C[1] = (f32) phi_s0->unk12[1];
sp7C[2] = (f32) phi_s0->unk12[2];
sp7C[0] *= 2;
sp7C[1] *= 2;
sp7C[2] *= 2;
@@ -440,37 +443,40 @@ s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s3
func_80252EC8(spA0, sp7C);
func_80252CC4(arg1, arg2, arg3, arg4);
func_8025235C(sp68, arg5);
for(i = 0; i < 3; i++){
if((sp68[i] <= sp94[i]) || (sp88[i] <= sp68[i])){
for (i = 0; i < 3; i++)
{
if (1);
if ((sp68[i] <= sp94[i]) || (sp88[i] <= sp68[i]))
{
break;
}
}
if(i == 3){
if (i == 3)
{
return phi_s0->unk15;
}
}
}
return 0;
}
#endif
#ifndef NONMATCHING
s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EC000.s")
#else
s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6){
BKModelUnk14_1 *temp_s2;
BKModelUnk14_1 *phi_s0;
f32 sp90[3];
f32 sp84[3];
BKModelUnk14_1 *phi_s0;
BKModelUnk14_0 *t0_ptr;
BKModelUnk14_1 *temp_s2;
f32 temp_f20;
f32 temp_f22;
f32 temp_f0;
f32 sp68[3];
f32 temp_f0;
phi_s0 = (BKModelUnk14_1 *)(sizeof(BKModelUnk14List) + arg0->cnt0*sizeof(BKModelUnk14_0) + (s32)arg0);
temp_s2 = phi_s0 + arg0->cnt2;
for( ; phi_s0 < temp_s2; phi_s0++){
t0_ptr = (BKModelUnk14_0 *)(arg0 + 1);
phi_s0 = (BKModelUnk14_1 *)(t0_ptr + arg0->cnt0);
temp_s2 = &phi_s0[arg0->cnt2];
for(phi_s0 = phi_s0; phi_s0 < temp_s2; phi_s0++){
if ((phi_s0->unkD != 0) && ((arg6 == 0) || (arg6 == phi_s0->unkD))) {
sp90[0] = (f32) phi_s0->unk4[0];
sp90[1] = (f32) phi_s0->unk4[1];
@@ -484,20 +490,17 @@ s32 func_802EC000(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s3
func_80252DDC(&sp90, &sp84);
func_80252CC4(arg1, arg2, arg3, arg4);
func_8025235C(&sp68, arg5);
temp_f0 = (f32) (temp_f22 * 0.5);
temp_f0 = (f32) (temp_f22 / 2.0);
if (!(temp_f0 <= sp68[2]) && !(sp68[2] <= -temp_f0) && !((temp_f20 * temp_f20) <= (sp68[0] * sp68[0] + sp68[1]*sp68[1]))) {
return phi_s0->unkD;
}
if(1);
if(1);
}
}
return 0;
}
#endif
#ifndef NONMATCHING
s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s32 arg5, s32 arg6);
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EC238.s")
#else
s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s32 arg5, s32 arg6){
BKModelUnk14_0 *t0_ptr;
BKModelUnk14_1 *t1_ptr;
@@ -514,20 +517,23 @@ s32 func_802EC238(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, f3
mlMtxIdent();
func_80252CC4(arg1, arg2, arg3, arg4);
func_8025235C(sp54, arg5);
for(var_s0 = var_s0; var_s0 < temp_s4; var_s0++) {
if ((var_s0->unk8 != 0) && ((arg6 == 0) || (arg6 == var_s0->unk8))) {
for (var_s0 = var_s0; var_s0 < temp_s4; var_s0++)
{
if ((var_s0->unk8 != 0) && ((arg6 == 0) || (arg6 == var_s0->unk8)))
{
sp40[0] = var_s0->unk2[0];
sp40[1] = var_s0->unk2[1];
sp40[2] = var_s0->unk2[2];
arg3 = var_s0->unk0;
if (ml_vec3f_distance(sp40, sp54) < arg3) {
if (ml_vec3f_distance(sp40, sp54) < arg3)
return var_s0->unk8;
if (!var_s0->unk0){
}
}
}
return 0U;
}
#endif
s32 func_802EC394(BKModelUnk14List *arg0, s32 arg1, s32 arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6) {
s32 phi_v0;

View File

@@ -241,7 +241,7 @@ segments:
- [0x630D0, c, code_630D0] #DONE
- [0x63410, c, code_63410] #DONE
- [0x63690, c, code_63690] #DONE
- [0x637D0, c, code_637D0]
- [0x637D0, c, code_637D0] #DONE
- [0x654C0, c, code_654C0] #DONE
- [0x66490, c, code_66490] #DONE
- [0x66690, c, vla] #DONE