core2/code_72060.c func_802F962C done

This commit is contained in:
Banjo Kazooie
2022-10-28 17:35:44 -05:00
parent 1d711aae75
commit 9744a6fa0d
12 changed files with 211 additions and 149 deletions

View File

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

View File

@@ -175,15 +175,15 @@ void jiggySpawn(enum jiggy_e jiggy_id, f32 pos[3]);
struct3s *func_802F8264(s32 arg0); struct3s *func_802F8264(s32 arg0);
struct6s *func_802F8BE0(s32 arg0); struct6s *func_802F8BE0(s32 arg0);
struct7s *func_802FD320(enum asset_e item_id); struct7s *fxcommon1score_new(enum asset_e item_id);
void func_802FD330(enum item_e, struct8s *); void fxcommon1score_update(enum item_e, struct8s *);
void func_802FD33C(enum item_e arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4); void fxcommon1score_draw(enum item_e arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4);
void func_802FD350(enum item_e item_id, struct8s *); void fxcommon1score_free(enum item_e item_id, struct8s *);
struct8s *func_802FD7B0(enum item_e); struct8s *fxcommon2score_new(enum item_e);
void func_802FD80C(s32, struct8s *); void fxcommon2score_update(s32, struct8s *);
void func_802FDAF4(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **); void fxcommon2score_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **);
void func_802FDC80(enum item_e, struct8s *); void fxcommon2score_free(enum item_e, struct8s *);
struct7s *func_802FDE2C(s32); struct7s *func_802FDE2C(s32);
void func_802FE844(s32, struct8s *); void func_802FE844(s32, struct8s *);
@@ -191,9 +191,9 @@ void func_802FDEE0(s32, struct8s *, Gfx**, Mtx**, s32*);
void func_802FDDC4(s32, struct8s *); void func_802FDDC4(s32, struct8s *);
struct7s *func_802FF090(enum item_e); struct7s *func_802FF090(enum item_e);
void func_802FFA50(enum item_e, struct8s *); void fxjinjoscore_update(enum item_e, struct8s *);
void func_802FF3B8(s32, struct8s *, Gfx**, Mtx**, Vtx **); void func_802FF3B8(s32, struct8s *, Gfx**, Mtx**, Vtx **);
void func_802FF358(enum item_e, struct8s *); void fxjinjoscore_free(enum item_e, struct8s *);
struct7s *func_802FFE4C(s32); struct7s *func_802FFE4C(s32);
void func_803005BC(enum item_e, struct8s *); void func_803005BC(enum item_e, struct8s *);

View File

@@ -126,7 +126,8 @@ typedef struct {
s16 unk0; s16 unk0;
s16 unk2[3]; s16 unk2[3];
u8 unk8; u8 unk8;
u8 pad9[3]; s8 unk9;
u8 padA[2];
}BKModelUnk14_2; }BKModelUnk14_2;
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="#2ce000" d="M44 0h67v20H44z"/> <path fill="#2be000" 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">90.2709%</text> <text x="78.5" y="15" fill="#010101" fill-opacity=".3">90.4371%</text>
<text x="77.5" y="14">90.2709%</text> <text x="77.5" y="14">90.4371%</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="#24e000" d="M150 0h67v20H150z"/> <path fill="#23e000" 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.0219%</text> <text x="184.5" y="15" fill="#010101" fill-opacity=".3">92.1173%</text>
<text x="183.5" y="14">92.0219%</text> <text x="183.5" y="14">92.1173%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -80,6 +80,7 @@ s32 func_802EA864(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
} }
#ifndef NONMATCHING #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") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EAB34.s")
#else #else
s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], f32 arg6){ s32 func_802EAB34(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, f32 arg4[3], f32 arg5[3], f32 arg6){
@@ -312,55 +313,95 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32
} }
#endif #endif
s32 func_802EB8A0(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, s32 arg5, f32 arg6[3], f32 arg7); s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scale, s32 arg4, s32 arg5, f32 *arg6, f32 arg7) {
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EB8A0.s") BKModelUnk14_0 *t0_ptr;
BKModelUnk14_1 *t1_ptr;
f32 sp74[3];
f32 sp68[3];
f32 sp5C[3];
BKModelUnk14_2 *temp_s4;
BKModelUnk14_2 *var_s0;
f32 temp_f0;
f32 sp44[3];
mlMtxIdent();
func_80252CC4(position, rotation, scale, arg4);
func_8025235C(&sp74, arg6);
t0_ptr = (BKModelUnk14_0 *)(arg0 + 1);
t1_ptr = (BKModelUnk14_1 *)(t0_ptr + arg0->cnt0);
var_s0 = (BKModelUnk14_2 *)(t1_ptr + arg0->cnt2);
temp_s4 = var_s0 + arg0->unk4;
arg7 /= scale;
for(var_s0 = var_s0; var_s0 < temp_s4; var_s0++){
sp68[0] = (f32) var_s0->unk2[0];
sp68[1] = (f32) var_s0->unk2[1];
sp68[2] = (f32) var_s0->unk2[2];
sp5C[0] = sp68[0] + (f32) var_s0->unk0;
sp5C[1] = sp68[1];
sp5C[2] = sp68[2];
func_80251BCC(func_802EA110(arg5, var_s0->unk9));
func_8025235C(sp68, sp68);
func_8025235C(sp5C, sp5C);
sp44[0] = sp5C[0] - sp68[0];
sp44[1] = sp5C[1] - sp68[1];
sp44[2] = sp5C[2] - sp68[2];
temp_f0 = gu_sqrtf(sp44[0]*sp44[0] + sp44[1]*sp44[1] + sp44[2]*sp44[2]);
if ((arg7 + temp_f0 >= ml_vec3f_distance(sp68, sp74))) {
return (s32) var_s0->unk8;
}
}
return 0;
}
bool func_802EBA98(BKModelUnk14List *arg0, f32 arg1[3], s32 arg2, f32 arg3, s32 arg4, f32 arg5[3], f32 arg6, f32 arg7[3]){ bool func_802EBA98(BKModelUnk14List *arg0, f32 arg1[3], s32 arg2, f32 arg3, s32 arg4, f32 arg5[3], f32 arg6, f32 arg7[3]){
return func_802EBAE0(arg0, arg1, arg2, arg3, arg4, NULL, arg5, arg6, arg7); 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") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_637D0/func_802EBAE0.s")
// 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]) { #else
// f32 sp3C[3]; 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 temp_f0; f32 sp3C[3];
// s32 phi_v0; f32 temp_f0;
s32 phi_v0;
// sp3C[0] = arg6[0] - position[0]; sp3C[0] = arg6[0] - position[0];
// sp3C[1] = arg6[1] - position[1]; sp3C[1] = arg6[1] - position[1];
// sp3C[2] = arg6[2] - position[2]; sp3C[2] = arg6[2] - position[2];
// temp_f0 = (arg7 + (arg0->unk6 * scale)); temp_f0 = (arg7 + (arg0->unk6 * scale));
// if( (arg0->unk6 > 0) if( (arg0->unk6 > 0)
// && ((temp_f0 * temp_f0) < (sp3C[0] * sp3C[0]) + (sp3C[1] * sp3C[1]) + (sp3C[2] * sp3C[2])) && ((temp_f0 * temp_f0) < (sp3C[0] * sp3C[0]) + (sp3C[1] * sp3C[1]) + (sp3C[2] * sp3C[2]))
// ) { ) {
// return 0; return 0;
// } }
// if (arg5 != NULL) { if (arg5 != NULL) {
// mlMtxIdent(); mlMtxIdent();
// func_80252C08(position, rotation, scale, arg4); func_80252C08(position, rotation, scale, arg4);
// func_802513B0(&D_80380880); func_802513B0(&D_80380880);
// phi_v0 = func_802EB8A0(arg0, position, rotation, scale, arg4, arg5, arg6, arg7); phi_v0 = func_802EB8A0(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
// if (phi_v0 == 0) { if (phi_v0 == 0) {
// phi_v0 = func_802EAED4(arg0, position, rotation, scale, arg4, arg5, arg6, arg7); phi_v0 = func_802EAED4(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
// } }
// if (phi_v0 == 0) { if (phi_v0 == 0) {
// phi_v0 = func_802EB458(arg0, position, rotation, scale, arg4, arg5, arg6, arg7); phi_v0 = func_802EB458(arg0, position, rotation, scale, arg4, arg5, arg6, arg7);
// } }
// } else { } else {
// phi_v0 = func_802EAD5C(arg0, position, rotation, scale, arg4, arg6, arg7); phi_v0 = func_802EAD5C(arg0, position, rotation, scale, arg4, arg6, arg7);
// if(phi_v0 == 0){ if(phi_v0 == 0){
// phi_v0 = func_802EA864(arg0, position, rotation, scale, arg4, arg6, arg7); phi_v0 = func_802EA864(arg0, position, rotation, scale, arg4, arg6, arg7);
// } }
// if(phi_v0 == 0){ if(phi_v0 == 0){
// phi_v0 = func_802EAB34(arg0, position, rotation, scale, arg4, arg6, arg7); phi_v0 = func_802EAB34(arg0, position, rotation, scale, arg4, arg6, arg7);
// } }
// } }
// if (phi_v0 != 0) { if (phi_v0 != 0) {
// arg8[0] = 0.0f; arg8[0] = 0.0f;
// arg8[1] = 1.0f; arg8[1] = 1.0f;
// arg8[2] = 0.0f; arg8[2] = 0.0f;
// } }
// return phi_v0; return phi_v0;
// } }
#endif
#ifndef NONMATCHING #ifndef NONMATCHING
s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6); s32 func_802EBD3C(BKModelUnk14List *arg0, f32 arg1[3], f32 arg2[3], f32 arg3, s32 arg4, f32 arg5[3], s32 arg6);

View File

@@ -14,12 +14,15 @@ extern void func_80251F8C(f32);
extern void func_8025208C(f32); extern void func_8025208C(f32);
extern void func_80252A38(f32, f32, f32); extern void func_80252A38(f32, f32, f32);
extern void mlMtxApply(Mtx *); extern void mlMtxApply(Mtx *);
extern f32 func_802EC920(BKVertexList *);
extern bool func_8024DB50(f32[3], f32);
extern struct4Cs * D_80369280; extern struct4Cs * D_80369280;
extern s32 D_80369284; extern s32 D_80369284;
extern void * D_80369288; extern BKModelBin * D_80369288;
extern s32 D_8036928C; extern s32 D_8036928C;
extern Gfx D_80369290[]; extern Gfx D_80369290[];
extern Gfx D_803692B0[];
extern f32 D_80377350; extern f32 D_80377350;
extern f32 D_80377354; extern f32 D_80377354;
@@ -31,7 +34,7 @@ f32 D_80381050[3];
f32 D_80381060[3]; f32 D_80381060[3];
f32 D_80381070[3]; f32 D_80381070[3];
f32 D_80381080[3]; f32 D_80381080[3];
s32 D_8038108C; f32 D_8038108C;
Gfx *D_80381090; Gfx *D_80381090;
Struct_core2_72060_0 *D_80381094; Struct_core2_72060_0 *D_80381094;
@@ -161,54 +164,42 @@ void func_802F919C(void) {
} }
#endif #endif
void func_802F962C(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
u32 temp_s0_3;
u32 temp_s0_4;
void *temp_s0;
void *temp_s0_2;
BKVertexList *temp_s3;
void *temp_s3_2;
void *temp_s4;
void *temp_s4_2;
BKGfxList *gfx_list;
struct4Ds *phi_s0;
void *phi_s0_2;
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_72060/func_802F962C.s") if ((D_80369280 != NULL) && (D_80369284 != 0)) {
// void func_802F962C(Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8024C5CC(D_80381050);
// u32 temp_s0_3; func_8024C764(D_80381060);
// u32 temp_s0_4; D_80381090 = (s32)D_80369288 + D_80369288->gfx_list_offset_C + sizeof(BKGfxList);
// void *temp_s0; temp_s3 = (BKVertexList *)((s32)D_80369288 + D_80369288->vtx_list_offset_10);
// void *temp_s0_2; D_8038108C = func_802EC920(temp_s3);
// void *temp_s3; func_80349AD0();
// void *temp_s3_2; gSPSegment((*gfx)++, 0x01, osVirtualToPhysical(temp_s3 + 1));
// void *temp_s4; gSPSegment((*gfx)++, 0x02, osVirtualToPhysical((s32)D_80369288 + D_80369288->texture_list_offset_8 + sizeof(BKTextureList) + sizeof(BKTextureHeader)));
// void *temp_s4_2; gSPSetGeometryMode((*gfx)++, G_ZBUFFER);
// void *temp_v1; gSPDisplayList((*gfx)++, D_80369290);
// void *temp_v1_2; gSPSegment((*gfx)++, 0x03, osVirtualToPhysical(&D_803692B0));
// void *temp_v1_3;
// void *phi_s0;
// void *phi_s0_2;
// if ((D_80369280 != NULL) && (D_80369284 != 0)) { D_80381094 = (BKGeoList *)((s32)D_80369288 + D_80369288->geo_list_offset_4);
// func_8024C5CC(D_80381050);
// func_8024C764(D_80381060);
// temp_v1 = D_80369288;
// D_80381090 = temp_v1 + temp_v1->unkC + 8;
// temp_s3 = temp_v1 + temp_v1->unk10;
// D_8038108C = func_802EC920(temp_s3);
// func_80349AD0();
// gSPSegment((*gfx)++, 0x01, osVirtualToPhysical(temp_s3 + 0x18));
// gSPSegment((*gfx)++, 0x02, osVirtualToPhysical(temp_v1_2 + temp_v1_2->unk8 + 0x18));
// gSPSetGeometryMode((*gfx)++, G_ZBUFFER);
// gSPDisplayList((*gfx)++, D_80369290);
// gSPSegment((*gfx)++, 0x03, osVirtualToPhysical(&D_803692B0));
// temp_v1_3 = D_80369288; for(phi_s0 = D_80369280->unk1C; phi_s0 < D_80369280->unk1C + D_80369284; phi_s0++) {
// D_80381094 = temp_v1_3 + temp_v1_3->unk4; if ((func_802F989C(gfx, mtx, phi_s0) == 0) && (phi_s0->unk0[1] < D_8038104C)) {
// temp_s0_3 = D_80369280->unk1C; func_802F9134(phi_s0 - D_80369280->unk1C);
// phi_s0 = (void *) temp_s0_3; phi_s0--;
// if (temp_s0_3 < (u32) (temp_s0_3 + (D_80369284 * 0x18))) { }
// do { }
// phi_s0_2 = phi_s0; }
// if ((func_802F989C(gfx, mtx, phi_s0) == 0) && (phi_s0->unk4 < D_8038104C)) { }
// func_802F9134((s32) (phi_s0 - D_80369280->unk1C) / 24);
// phi_s0_2 = phi_s0 - 0x18;
// }
// temp_s0_4 = phi_s0_2 + 0x18;
// phi_s0 = (void *) temp_s0_4;
// } while (temp_s0_4 < (u32) (D_80369280->unk1C + (D_80369284 * 0x18)));
// }
// }
// }
bool func_802F989C(Gfx **gfx, Mtx **mtx, f32 arg2[3]) { bool func_802F989C(Gfx **gfx, Mtx **mtx, f32 arg2[3]) {

View File

@@ -40,35 +40,35 @@ s16 D_803692EC[6] = {
}; };
ItemPrint D_803692F8[0x2C] = { ItemPrint D_803692F8[0x2C] = {
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 5, NULL }, //ITEM_0_HOURGLASS_TIMER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 5, NULL }, //ITEM_0_HOURGLASS_TIMER
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 0, NULL }, // ITEM_1_SKULL_HOURGLASS_TIMER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 0, NULL }, // ITEM_1_SKULL_HOURGLASS_TIMER
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //2 { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //2
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 5, NULL }, //ITEM_3_PROPELLOR_TIMER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 5, NULL }, //ITEM_3_PROPELLOR_TIMER
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, // { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 0, NULL }, //ITEM_5_XMAS_TREE_TIMER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 0, NULL }, //ITEM_5_XMAS_TREE_TIMER
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //ITEM_6_HOURGLASS { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_6_HOURGLASS
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //ITEM_7_SKULL_HOURGLASS { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_7_SKULL_HOURGLASS
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //8 { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //8
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //ITEM_9_PROPELLOR { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_9_PROPELLOR
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //10 { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //10
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //ITEM_B_XMAS_TREE { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_B_XMAS_TREE
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 1, NULL }, //ITEM_C_NOTE { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_C_NOTE
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 1, NULL }, //ITEM_D_EGGS { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_D_EGGS
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 3, NULL }, //ITEM_14_HEALTH { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 3, NULL }, //ITEM_14_HEALTH
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 1, NULL }, //ITEM_F_RED_FEATHER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_F_RED_FEATHER
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 1, NULL }, //ITEM_10_GOLD_FEATHER { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_10_GOLD_FEATHER
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //17 { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //17
{ func_802FF090, func_802FFA50, func_802FF3B8, func_802FF358, 3, NULL }, //ITEM_12_JINJOS { func_802FF090, fxjinjoscore_update, func_802FF3B8, fxjinjoscore_free, 3, NULL }, //ITEM_12_JINJOS
{ func_802FDE2C, func_802FE844, func_802FDEE0, func_802FDDC4, 0, NULL }, //ITEM_13_EMPTY_HONEYCOMB { func_802FDE2C, func_802FE844, func_802FDEE0, func_802FDDC4, 0, NULL }, //ITEM_13_EMPTY_HONEYCOMB
{ func_80300CD8, func_80301348, func_80300D0C, func_80300C70, 0, NULL }, //ITEM_14_HEALTH { func_80300CD8, func_80301348, func_80300D0C, func_80300C70, 0, NULL }, //ITEM_14_HEALTH
{ func_802FD320, func_802FD330, func_802FD33C, func_802FD350, 0, NULL }, //ITEM_15_HEALTH_TOTAL { fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_15_HEALTH_TOTAL
{ func_802FFE4C, func_803005BC, func_802FFF34, func_802FFED4, 6, NULL }, //ITEM_16_LIFE { func_802FFE4C, func_803005BC, func_802FFF34, func_802FFED4, 6, NULL }, //ITEM_16_LIFE
{ func_8030179C, func_80301DE4, func_803017D0, func_80301754, 0, NULL }, //ITEM_17_AIR { func_8030179C, func_80301DE4, func_803017D0, func_80301754, 0, NULL }, //ITEM_17_AIR
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_18_GOLD_BULLIONS { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_18_GOLD_BULLIONS
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_19_ORANGE { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_19_ORANGE
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 6, NULL }, //ITEM_1A_PLAYER_VILE_SCORE { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 6, NULL }, //ITEM_1A_PLAYER_VILE_SCORE
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 0, NULL }, //ITEM_1B_VILE_VILE_SCORE { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 0, NULL }, //ITEM_1B_VILE_VILE_SCORE
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 2, NULL }, //ITEM_1C_MUMBO_TOKEN { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 2, NULL }, //ITEM_1C_MUMBO_TOKEN
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 0, NULL }, //ITEM_1D_GRUMBLIE { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 0, NULL }, //ITEM_1D_GRUMBLIE
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 0, NULL }, //ITEM_1E_YUMBLIE { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 0, NULL }, //ITEM_1E_YUMBLIE
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_1F_GREEN_PRESENT { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_1F_GREEN_PRESENT
@@ -77,12 +77,12 @@ ItemPrint D_803692F8[0x2C] = {
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_22_CATERPILLAR { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_22_CATERPILLAR
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_23_ACORNS { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL }, //ITEM_23_ACORNS
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 0, NULL }, //ITEM_24_TWINKLY_SCORE { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 0, NULL }, //ITEM_24_TWINKLY_SCORE
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 4, NULL }, //ITEM_25_MUMBO_TOKEN_TOTAL { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 4, NULL }, //ITEM_25_MUMBO_TOKEN_TOTAL
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 4, NULL }, //ITEM_26_JIGGY_TOTAL { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 4, NULL }, //ITEM_26_JIGGY_TOTAL
{ func_802FD7B0, func_802FD80C, func_802FDAF4, func_802FDC80, 2, NULL }, //ITEM_27_JOKER_CARD { fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 2, NULL }, //ITEM_27_JOKER_CARD
{ func_802FD7B0, func_802FD80C, func_802FD33C, func_802FDC80, 5, NULL }, //40 { fxcommon2score_new, fxcommon2score_update, fxcommon1score_draw, fxcommon2score_free, 5, NULL }, //40
{ func_802FD7B0, func_802FD80C, func_802FD33C, func_802FDC80, 3, NULL }, //41 { fxcommon2score_new, fxcommon2score_update, fxcommon1score_draw, fxcommon2score_free, 3, NULL }, //41
{ func_802FD7B0, func_802FD80C, func_802FD33C, func_802FDC80, 2, NULL }, //42 { fxcommon2score_new, fxcommon2score_update, fxcommon1score_draw, fxcommon2score_free, 2, NULL }, //42
{ fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL } //43 { fxcommon3score_new, fxcommon3score_update, fxcommon3score_draw, fxcommon3score_free, 2, NULL } //43
}; };

View File

@@ -6,12 +6,12 @@
struct7s D_803815A0; struct7s D_803815A0;
/* .code */ /* .code */
struct7s *func_802FD320(enum asset_e item_id){ struct7s *fxcommon1score_new(enum asset_e item_id){
return &D_803815A0; return &D_803815A0;
} }
void func_802FD330(enum item_e item_id, struct8s *arg1){} void fxcommon1score_update(enum item_e item_id, struct8s *arg1){}
void func_802FD33C(enum item_e item_id, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4){} void fxcommon1score_draw(enum item_e item_id, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4){}
void func_802FD350(enum item_e item_id, struct8s *arg1){} void fxcommon1score_free(enum item_e item_id, struct8s *arg1){}

View File

@@ -191,7 +191,7 @@ void func_802FD360(struct8s *arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8024C904(gfx, mtx); func_8024C904(gfx, mtx);
} }
struct8s *func_802FD7B0(enum item_e item_id) { struct8s *fxcommon2score_new(enum item_e item_id) {
s32 i; s32 i;
struct8s *v1; struct8s *v1;
@@ -204,7 +204,7 @@ struct8s *func_802FD7B0(enum item_e item_id) {
return NULL; return NULL;
} }
void func_802FD80C(s32 arg0, struct8s * arg1){ void fxcommon2score_update(s32 arg0, struct8s * arg1){
s32 tmp; s32 tmp;
f32 two = 2.0f; f32 two = 2.0f;
f32 phi_f16; f32 phi_f16;
@@ -213,7 +213,7 @@ void func_802FD80C(s32 arg0, struct8s * arg1){
tmp = func_802FB0D4(arg1); tmp = func_802FB0D4(arg1);
phi_f16 = 1.0f; phi_f16 = 1.0f;
if(!tmp) { if(!tmp) {
func_802FDC80(arg0, arg1); fxcommon2score_free(arg0, arg1);
} }
else{ else{
if(arg1->unk50 == NULL && arg1->unk24){ if(arg1->unk50 == NULL && arg1->unk24){
@@ -271,7 +271,7 @@ void func_802FD80C(s32 arg0, struct8s * arg1){
} }
} }
void func_802FDAF4(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx){ void fxcommon2score_draw(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx){
f32 pad; f32 pad;
s32 sp38; s32 sp38;
f32 sp34; f32 sp34;
@@ -308,7 +308,7 @@ void func_802FDAF4(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vt
func_802FD360(arg1, gfx, mtx, vtx); func_802FD360(arg1, gfx, mtx, vtx);
} }
void func_802FDC80(enum item_e item_id, struct8s *arg1){ void fxcommon2score_free(enum item_e item_id, struct8s *arg1){
if(arg1->unk50){ if(arg1->unk50){
func_8033BD4C(arg1->unk50); //assetCache_free func_8033BD4C(arg1->unk50); //assetCache_free
arg1->unk50 = NULL; arg1->unk50 = NULL;

View File

@@ -106,7 +106,7 @@ struct7s *func_802FF090(s32 arg0) {
} }
#endif #endif
void func_802FF358(enum item_e item_id, struct8s * arg1){ void fxjinjoscore_free(enum item_e item_id, struct8s * arg1){
s32 i; s32 i;
for(i = 0; i < 5; i++){ for(i = 0; i < 5; i++){
@@ -121,6 +121,7 @@ void func_802FF358(enum item_e item_id, struct8s * arg1){
#ifndef NONMATCHING #ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_78100/func_802FF3B8.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/code_78100/func_802FF3B8.s")
#else #else
//fxjinjoscore_draw
void func_802FF3B8(s32 arg0, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) { void func_802FF3B8(s32 arg0, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
s32 sp11C; s32 sp11C;
s32 sp118; s32 sp118;
@@ -154,7 +155,7 @@ void func_802FF3B8(s32 arg0, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
gDPPipeSync((*gfx)++); gDPPipeSync((*gfx)++);
for (var_s5 = spF0; var_s5 >= 0; var_s5--){ for (var_s5 = spF0; var_s5 >= 0; var_s5--){
gDPPipeSync((*gfx)++); gDPPipeSync((*gfx)++);
if (spF0) { if (var_s5) {
gDPSetCombineLERP((*gfx)++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); gDPSetCombineLERP((*gfx)++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, 0x8C); gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, 0x8C);
} else { } else {
@@ -195,7 +196,7 @@ bool func_802FFA10(f32 arg0, s32 arg1, s32 arg2){
return (D_80381E78[arg1 - 1] < arg0); return (D_80381E78[arg1 - 1] < arg0);
} }
void func_802FFA50(enum item_e item_id, struct8s *arg1) { void fxjinjoscore_update(enum item_e item_id, struct8s *arg1) {
f32 var_f24; f32 var_f24;
s32 temp_s3; s32 temp_s3;
s32 jinjo_id; s32 jinjo_id;
@@ -215,7 +216,7 @@ void func_802FFA50(enum item_e item_id, struct8s *arg1) {
break; break;
case 0: case 0:
func_802FF358(item_id, arg1); fxjinjoscore_free(item_id, arg1);
break; break;
default: default:

View File

@@ -27,7 +27,35 @@ void *array_begin(SLA *this){
return (void*)(this + 1); return (void*)(this + 1);
} }
#pragma GLOBAL_ASM("asm/nonmatchings/core2/sla/func_802EDAA4.s") void *func_802EDAA4(SLA **this, s32 *arg1) {
s32 new_cnt;
SLA *var_s0;
s16 *first_ptr;
s16 *i_ptr;
s32 prev_cnt;
s32 i;
var_s0 = *this;
first_ptr = (s16*)var_s0->unk4;
if (*first_ptr == 0) {
prev_cnt = var_s0->elem_cnt;
new_cnt = prev_cnt + 10;
var_s0 = realloc(var_s0, (var_s0->elem_size * new_cnt) + sizeof(SLA));
first_ptr = (s16*)var_s0->unk4;
var_s0->elem_cnt = new_cnt;
*this = var_s0;
for(i = new_cnt - 1, i_ptr = &var_s0->unk4[i * var_s0->elem_size]; i >= prev_cnt; i--){
*i_ptr = *first_ptr;
*first_ptr = i;
i_ptr = (s32)i_ptr - var_s0->elem_size;
}
}
i = *first_ptr;
i_ptr = (s32)first_ptr + (i * var_s0->elem_size);
*arg1 = i;
*first_ptr = *i_ptr;
return (s32) i_ptr;
}
#ifndef NONMATCHING #ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/sla/func_802EDC18.s") #pragma GLOBAL_ASM("asm/nonmatchings/core2/sla/func_802EDC18.s")