core2/code_C7CC0.c done

This commit is contained in:
Banjo Kazooie
2022-08-28 18:14:59 -05:00
parent 73c9b1be42
commit 216e1c132b
6 changed files with 66 additions and 27 deletions

View File

@@ -793,6 +793,20 @@ typedef struct {
f32 unk14; f32 unk14;
}Struct76s; }Struct76s;
typedef struct {
f32 unk0;
f32 unk4;
f32 unk8;
f32 unkC;
f32 unk10;
f32 unk14;
u8 unk18[0x8];
f32 unk20;
f32 unk24;
s16 unk28[2];
f32 unk2C;
}Struct77s;
typedef union { typedef union {
Struct6Ds type_6D; Struct6Ds type_6D;
Struct6Fs type_6F; Struct6Fs type_6F;
@@ -800,6 +814,7 @@ typedef union {
Struct72s type_72; Struct72s type_72;
Struct73s type_73; Struct73s type_73;
Struct74s type_74; Struct74s type_74;
Struct77s type_77;
}Struct70s; }Struct70s;
typedef struct { typedef struct {

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="#50e000" 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">core2</text> <text x="22.0" y="14">core2</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">82.2258%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">82.3791%</text>
<text x="77.5" y="14">82.2258%</text> <text x="77.5" y="14">82.3791%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -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">84.7842%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">84.8722%</text>
<text x="183.5" y="14">84.7842%</text> <text x="183.5" y="14">84.8722%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -2,26 +2,17 @@
#include "functions.h" #include "functions.h"
#include "variables.h" #include "variables.h"
#ifndef NONMATCHING void func_8034EC50(s32 arg0, BKVtxRef *ref, Vtx *dst, Struct77s *arg3) {
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C7CC0/func_8034EC50.s")
#else
void func_8034EC50(s32 arg0, BKVtxRef *ref, Vtx *dst, Struct74s *arg3) {
f32 cos;
f32 sin;
f32 temp_f2;
s32 temp_f16;
f32 tmp0; f32 tmp0;
f32 tmp1; f32 tmp1;
f32 d0; f32 temp_f2;
f32 d1; s32 temp_f16;
tmp0 = (dst->v.ob[0] - arg3->unk10)*200.0f; tmp0 = arg3->unk4;
tmp1 = (dst->v.ob[2] - arg3->unk14)*200.0f; tmp1 = arg3->unk8;
tmp0 += arg3->unk4; tmp0 += (dst->v.ob[0] - arg3->unk10)*200.0f;
tmp1 += arg3->unk8; tmp1 += (dst->v.ob[2] - arg3->unk14)*200.0f;
sin = sinf(tmp0); temp_f2 = (sinf(tmp0) + cosf(tmp1)) * arg3->unk20;
cos = cosf(tmp1);
temp_f2 = (cos + sin) * arg3->unk20;
dst->v.ob[1] = arg3->unkC + temp_f2; dst->v.ob[1] = arg3->unkC + temp_f2;
temp_f16 = (s32) (((temp_f2 / arg3->unk24) * 50.0f) + 205.0f); temp_f16 = (s32) (((temp_f2 / arg3->unk24) * 50.0f) + 205.0f);
dst->v.cn[0] = (s32)(ref->v.v.cn[0] * temp_f16) / 255; dst->v.cn[0] = (s32)(ref->v.v.cn[0] * temp_f16) / 255;
@@ -30,10 +21,41 @@ void func_8034EC50(s32 arg0, BKVtxRef *ref, Vtx *dst, Struct74s *arg3) {
dst->v.tc[0] = ref->v.v.tc[0] + arg3->unk28[0]; dst->v.tc[0] = ref->v.v.tc[0] + arg3->unk28[0];
dst->v.tc[1] = ref->v.v.tc[1] + arg3->unk28[1]; dst->v.tc[1] = ref->v.v.tc[1] + arg3->unk28[1];
} }
#endif
void func_8034EE24(s32 arg0){} void func_8034EE24(s32 arg0){}
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C7CC0/func_8034EE2C.s") void func_8034EE2C(Struct77s *arg0, s32 arg1, BKModel *arg2, s32 arg3) {
s16 sp28[3];
s16 sp20[3];
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C7CC0/func_8034EF60.s") func_8033F2B4(arg2, arg3, sp28, sp20);
arg0->unk0 = 1.0f;
arg0->unk4 = 0.0f;
arg0->unk8 = 0.0f;
arg0->unkC = sp28[1] + ((sp20[1] - sp28[1]) * 0.5);
arg0->unk10 = (f32) sp28[0];
arg0->unk14 = (f32) sp28[2];
arg0->unk20 = ((sp20[1] - sp28[1]) * 0.5) / 2;
arg0->unk24 = arg0->unk20 * 2;
arg0->unk28[0] = 0;
arg0->unk28[1] = 0;
arg0->unk2C = 0.0f;
if ((arg1 >= 0) && (arg1 < 0xB)) {
arg0->unk0 = arg1 / 10.0f;
}
}
void func_8034EF60(Struct77s *arg0, BKModel *arg1, s32 arg2) {
f32 temp_f0;
f32 sp2C[2];
temp_f0 = time_getDelta();
arg0->unk2C += temp_f0;
arg0->unk4 += temp_f0 * arg0->unk0 * 3;
arg0->unk8 += temp_f0 * (arg0->unk0 + 0.01) * 3;
sp2C[0] = ((150.0f * cosf(arg0->unk2C * 0.2 * BAD_PI)) + (sinf(arg0->unk2C * 0.08 * BAD_PI) * 100.0f)) * 0.8;
sp2C[1] = ((50.0f * sinf(arg0->unk2C * 0.5 * BAD_PI)) + (cosf(arg0->unk2C * 0.22 * BAD_PI) * 100.0f)) * 0.8;
arg0->unk28[0] = (sp2C[0] >= 0.0) ? (sp2C[0] + 0.5) : (sp2C[0] - 0.5);
arg0->unk28[1] = (sp2C[1] >= 0.0) ? (sp2C[1] + 0.5) : (sp2C[1] - 0.5);
func_8033F120(arg1, arg2, &func_8034EC50, arg0);
}

View File

@@ -370,7 +370,7 @@ segments:
- [0xC61C0, c, code_C61C0] #DONE - [0xC61C0, c, code_C61C0] #DONE
- [0xC62B0, c, code_C62B0] - [0xC62B0, c, code_C62B0]
- [0xC76D0, c, code_C76D0] - [0xC76D0, c, code_C76D0]
- [0xC7CC0, c, code_C7CC0] - [0xC7CC0, c, code_C7CC0] #DONE
- [0xC8230, c, code_C8230] #DONE - [0xC8230, c, code_C8230] #DONE
- [0xC8360, c, code_C8360] #DONE - [0xC8360, c, code_C8360] #DONE
- [0xC8490, c, code_C8490] #DONE - [0xC8490, c, code_C8490] #DONE
@@ -811,7 +811,7 @@ segments:
- [0xF2240, .rodata, code_C5F00] - [0xF2240, .rodata, code_C5F00]
- [0xF2270, bin, data_F2230] - [0xF2270, bin, data_F2230]
- [0xF22A0, bin, data_F22A0] # .rodata, code_C76D0] - [0xF22A0, bin, data_F22A0] # .rodata, code_C76D0]
- [0xF22E0, bin, data_F22E0] - [0xF22E0, .rodata, code_C7CC0]
- [0xF2320, .rodata, code_C8230] - [0xF2320, .rodata, code_C8230]
- [0xF2330, .rodata, code_C8360] - [0xF2330, .rodata, code_C8360]
- [0xF2340, .rodata, code_C8490] - [0xF2340, .rodata, code_C8490]

View File

@@ -473,6 +473,8 @@ D_80379094 = 0x80379094;
D_803790C0 = 0x803790C0; D_803790C0 = 0x803790C0;
D_803790C8 = 0x803790C8; D_803790C8 = 0x803790C8;
D_803790D0 = 0x803790D0; D_803790D0 = 0x803790D0;
D_80379278 = 0x80379278;
D_80379280 = 0x80379280;
D_80379308 = 0x80379308; D_80379308 = 0x80379308;
D_80379318 = 0x80379318; D_80379318 = 0x80379318;
D_80379328 = 0x80379328; D_80379328 = 0x80379328;