core2/code_B9700.c progress

This commit is contained in:
Banjo Kazooie
2022-11-04 17:31:35 -05:00
parent 79dde0c1c5
commit c2aea1bd5e
9 changed files with 130 additions and 34 deletions

View File

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

View File

@@ -26,7 +26,8 @@ typedef struct struct_B1400_1_s{
typedef union typedef union
{ {
struct{ struct{
u16 unk0_15: 2; u16 unk0_15: 1;
u16 unk0_14: 1;
u16 unk0_13: 14; u16 unk0_13: 14;
s16 unk2; s16 unk2;
}; };

View File

@@ -687,7 +687,7 @@ typedef struct {
} Struct6Bs; } Struct6Bs;
typedef struct{ typedef struct{
s32 (* unk0)(struct actor_marker_s *, f32[3], f32, f32[3], s32); s32 (* unk0)(struct actor_marker_s *, f32[3], f32[3], f32[3], s32);
s32 (* unk4)(struct actor_marker_s *, f32[3], f32[3], f32, f32[3], s32, u32); s32 (* unk4)(struct actor_marker_s *, f32[3], f32[3], f32, f32[3], s32, u32);
s32 (* unk8)(struct actor_marker_s *, f32[3], f32, f32[3], s32); s32 (* unk8)(struct actor_marker_s *, f32[3], f32, f32[3], s32);
s32 (* unkC)(struct actor_marker_s *, f32[3], f32, f32[3], s32); s32 (* unkC)(struct actor_marker_s *, f32[3], f32, f32[3], s32);

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="#28e000" d="M44 0h67v20H44z"/> <path fill="#27e000" 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">91.1209%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">91.2064%</text>
<text x="77.5" y="14">91.1209%</text> <text x="77.5" y="14">91.2064%</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="#21e000" d="M150 0h67v20H150z"/> <path fill="#20e000" 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">92.7402%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">92.7893%</text>
<text x="183.5" y="14">92.7402%</text> <text x="183.5" y="14">92.7893%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1570,10 +1570,13 @@ s32 func_80330F94(NodeProp *arg0, s32 arg1[3]){
return arg0->unk6.bit15; return arg0->unk6.bit15;
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_A5BC0/func_80330FBC.s") void func_80330FBC(UNK_TYPE(void *)arg0, s32 arg1){
*(s32*)((s32)arg0 + 0xC) = arg1;
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_A5BC0/func_80330FC4.s") }
s32 func_80330FC4(UNK_TYPE(void *)arg0){
return *(s32*)((s32)arg0 + 0xC);
}
void func_80330FCC(ActorMarker *marker, s32 arg1[3]){ void func_80330FCC(ActorMarker *marker, s32 arg1[3]){
arg1[0] = marker->propPtr->x; arg1[0] = marker->propPtr->x;

View File

@@ -1078,7 +1078,9 @@ BKEffectsList *func_8033A0B0(BKModelBin *arg0){
return (BKEffectsList *)((s32)arg0 + arg0->effects_list_setup_24); return (BKEffectsList *)((s32)arg0 + arg0->effects_list_setup_24);
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_B1400/func_8033A0CC.s") f32 func_8033A0CC(UNK_TYPE(void *) arg0){
return *(f32 *)((s32)arg0 + 0x34);
}
BKAnimationList *func_8033A0D4(BKModelBin *arg0){ BKAnimationList *func_8033A0D4(BKModelBin *arg0){
if(arg0->animation_list_offset_18 == 0) if(arg0->animation_list_offset_18 == 0)

View File

@@ -33,6 +33,7 @@ extern s32 assetcache_release(void * arg0);
f32 func_8033ABA0(AnimationFile *anim_file, f32 arg1); f32 func_8033ABA0(AnimationFile *anim_file, f32 arg1);
f32 func_8033AC38(AnimationFile *anim_file, AnimationFileElement *arg1, f32 arg2); f32 func_8033AC38(AnimationFile *anim_file, AnimationFileElement *arg1, f32 arg2);
s32 func_8033AC0C(AnimationFile *this); s32 func_8033AC0C(AnimationFile *this);
void func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]);
void func_8033BAB0(enum asset_e asset_id, s32 offset, s32 size, void *dst_ptr); void func_8033BAB0(enum asset_e asset_id, s32 offset, s32 size, void *dst_ptr);
/* .core2 */ /* .core2 */
@@ -93,29 +94,61 @@ s32 func_8033AC30(AnimationFile *this){
return this->elem_cnt; return this->elem_cnt;
} }
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_B3A80/func_8033AC38.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_B3A80/func_8033AC38.s")
// f32 func_8033AC38(AnimationFile *this, AnimationFileElement *elem, f32 arg2){ #else
// f32 sp38[4]; f32 func_8033AC38(AnimationFile *this, AnimationFileElement *elem, f32 arg2){
// AnimationFileData *tmp_a0; AnimationFileData *var_a0;
// int i; AnimationFileData *var_a2;
AnimationFileData *var_v0;
f32 temp_f12;
f32 sp38[4];
u32 temp_t2;
// if((s32)arg2 < elem->data[0].unk0_13){ var_a2 = &elem->data[0];
// sp38[0] = sp38[1] = D_803709E0[elem->unk0_3]; if ((s32)arg2 < var_a2->unk0_13) {
// sp38[2] = (f32)elem->data[0].unk2/64; sp38[0] = sp38[1] = D_803709E0[elem->unk0_3];
// sp38[3] = (elem->data[0].unk0_15 == 1 && elem->unk2 >= 2) ? (f32)elem->data[1].unk2/64 : sp38[2]; sp38[2] = (f32) var_a2->unk2 / 64;
// return func_80340A4C((arg2 - this->unk0)/(elem->data[0].unk0_13 - this->unk0), 4, sp38); sp38[3] = (var_a2->unk0_15 == 1 && elem->data_cnt >= 2) ? (f32)(var_a2 + 1)->unk2/64 : sp38[2];
// }////L8033AD30 return func_80340A4C((arg2 - this->unk0)/(var_a2->unk0_13 - this->unk0), 4, sp38);
}
var_a0 = &elem->data[elem->data_cnt-1];
var_a0--;
if ((s32) arg2 >= (var_a0->unk0_13)) {
sp38[1] = (f32) var_a0->unk2 / 64;
sp38[0] = ((var_a0->unk0_14 == 1) && (elem->data_cnt >= 2)) ? (f32) (var_a0 - 1)->unk2 / 64 : sp38[1];
sp38[2] = sp38[3] = sp38[1];
// tmp_a0 = &elem->data[elem->unk2]; return func_80340A4C(arg2 - var_a0->unk0_13, 4, sp38);
// if(!((s32)arg2 < tmp_a0[-1].unk0_13)){ }
// sp38[1] = (f32)tmp_a0->unk2/ 64;
// sp38[0] = (tmp_a0->unk0_15 == 1 && tmp_a0->unk2 >= 2) ? (f32)elem->data[-1].unk2/64 : sp38[1];
// sp38[2] = sp38[3] = sp38[1];
// return func_80340A4C(64.0f - (f32)tmp_a0->unk0_13, 4, sp38);
// }//L8033AE0C
// }
func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]){
var_v0 = var_a2 + 1;
while (var_v0 < var_a0){
var_v0 = &var_a2[(var_a0 - var_a2)/2];
if (var_v0->unk0_13 <= (s32)arg2) {
var_a2 = var_v0;
var_v0 = var_v0 + 1;
} else {
var_a0 = var_v0;
var_v0 = var_a2 + 1;
}
}
sp38[1] = (f32) var_a2->unk2 / 64;
sp38[2] = (f32) var_a0->unk2 / 64;
temp_f12 = (arg2 - var_a2->unk0_13) / (var_a0->unk0_13 - var_a2->unk0_13);
if ((var_a2->unk0_14 == 0) && (var_a0->unk0_15 == 0)) {
return ((sp38[2] - sp38[1]) * temp_f12) + sp38[1];
}
sp38[0] = (var_a2->unk0_14 == 1 && (var_a2 - 1) >= &elem->data[0]) ? (f32)(var_a2 - 1)->unk2/64 : sp38[1];
sp38[3] = (var_a0->unk0_15 == 1 && (var_a0 + 1) < &elem->data[elem->data_cnt]) ? (f32)(var_a0 + 1)->unk2/64 : sp38[2];
return func_80340A4C(temp_f12, 4, sp38);
}
#endif
void func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]){
f32 sp18[4]; f32 sp18[4];
func_80345CD4(sp18, arg2[0]); func_80345CD4(sp18, arg2[0]);
func_8033A8F0(arg0, arg1, sp18); func_8033A8F0(arg0, arg1, sp18);

View File

@@ -149,7 +149,7 @@ typedef struct{
u32 bit15: 9; u32 bit15: 9;
u32 bit6: 3; u32 bit6: 3;
u32 bit3: 3; u32 bit3: 3;
u32 pad_bit0: 1; u32 bit0: 1;
}unk4; }unk4;
struct{ struct{
u32 bit31: 10; u32 bit31: 10;
@@ -230,6 +230,9 @@ extern f32 D_8037901C;
/* .bss */ /* .bss */
s16 *D_803858A0; s16 *D_803858A0;
/* .h */
struct56s *func_80342038(s32 indx);
/* .code */ /* .code */
//glspline_clamp //glspline_clamp
f32 func_80340700(f32 value, f32 min, f32 max) { f32 func_80340700(f32 value, f32 min, f32 max) {
@@ -242,7 +245,61 @@ bool func_80340748(s32 arg0, s32 arg1, s32 arg2, f32 arg3[3], s32 arg4, s32 arg5
return FALSE; return FALSE;
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_B9770/func_80340760.s") s32 func_80340760(s32 arg0, s32 *arg1, f32 *arg2, s32 arg3, s32 arg4, f32 *arg5, f32 *arg6) {
glspline_list **temp_t0 = D_80371E74;
glspline_list *temp_a0;
Union_glspline *temp_v0;
Union_glspline *var_v1;
s32 var_a2;
*arg5 = -9999.0f;
*arg6 = -9999.0f;
if (arg4 != -1) {
temp_a0 = temp_t0[arg4];
var_v1 = (temp_a0 + 1);
temp_v0 = var_v1 + temp_a0->unk0;
for(var_v1 = var_v1; (arg0 != var_v1->t1.unk10.bit31) && (var_v1 < temp_v0); var_v1++){
continue;
}
if (var_v1 < temp_v0) {
if (var_v1->t1.unk4.bit0 == 1) {
if (!var_v1->t1.unkC.bit0 && (var_v1->t1.unk4.bit6 == 7)) {
*arg5 = (f32)var_v1->t1.unkC.bit31;
*arg6 = (f32)var_v1->t1.unk4.bit15;
}
}
*arg1 = arg4;
*arg2 = var_v1->t1.unk0;
func_80323240(func_80342038(arg4), var_v1->t1.unk0, arg3);
return 1;
}
}
for(var_a2 = 0; var_a2 < D_80371E78; var_a2++){
if (var_a2 != arg4) {
temp_a0 = temp_t0[var_a2];
var_v1 = (temp_a0 + 1);
temp_v0 = var_v1 + temp_a0->unk0;
for(var_v1 = var_v1; (arg0 != var_v1->t1.unk10.bit31) && (var_v1 < temp_v0); var_v1++){
continue;
}
if (var_v1 < temp_v0) {
if (var_v1->t1.unk4.bit0 == 1) {
if (!var_v1->t1.unkC.bit0 && (var_v1->t1.unk4.bit6 == 7)) {
*arg5 = (f32)var_v1->t1.unkC.bit31;
*arg6 = (f32)var_v1->t1.unk4.bit15;
}
}
*arg1 = var_a2;
*arg2 = var_v1->t1.unk0;
func_80323240(func_80342038(var_a2), var_v1->t1.unk0, arg3);
return 1;
}
}
}
return 0;
}
f32 func_80340A4C(f32 arg0, s32 arg1, f32 *arg2) { f32 func_80340A4C(f32 arg0, s32 arg1, f32 *arg2) {
s32 tmp_v1; s32 tmp_v1;