core2/code_78100.c progress
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# banjo (92.2342%)
|
# banjo (92.3375%)
|
||||||
|
|
||||||
<img src="./progress/progress_total.svg">
|
<img src="./progress/progress_total.svg">
|
||||||
|
|
||||||
|
@@ -192,7 +192,7 @@ void func_802FDDC4(s32, struct8s *);
|
|||||||
|
|
||||||
struct7s *func_802FF090(enum item_e);
|
struct7s *func_802FF090(enum item_e);
|
||||||
void fxjinjoscore_update(enum item_e, struct8s *);
|
void fxjinjoscore_update(enum item_e, struct8s *);
|
||||||
void func_802FF3B8(s32, struct8s *, Gfx**, Mtx**, Vtx **);
|
void fxjinjoscore_draw(s32, struct8s *, Gfx**, Mtx**, Vtx **);
|
||||||
void fxjinjoscore_free(enum item_e, struct8s *);
|
void fxjinjoscore_free(enum item_e, struct8s *);
|
||||||
|
|
||||||
struct7s *func_802FFE4C(s32);
|
struct7s *func_802FFE4C(s32);
|
||||||
|
@@ -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="#2be000" d="M44 0h67v20H44z"/>
|
<path fill="#2ae000" 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.4371%</text>
|
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">90.6170%</text>
|
||||||
<text x="77.5" y="14">90.4371%</text>
|
<text x="77.5" y="14">90.6170%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -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="#23e000" d="M150 0h67v20H150z"/>
|
<path fill="#22e000" 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.2342%</text>
|
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">92.3375%</text>
|
||||||
<text x="183.5" y="14">92.2342%</text>
|
<text x="183.5" y="14">92.3375%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -58,7 +58,7 @@ ItemPrint D_803692F8[0x2C] = {
|
|||||||
{ fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_F_RED_FEATHER
|
{ fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_F_RED_FEATHER
|
||||||
{ fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_10_GOLD_FEATHER
|
{ fxcommon2score_new, fxcommon2score_update, fxcommon2score_draw, fxcommon2score_free, 1, NULL }, //ITEM_10_GOLD_FEATHER
|
||||||
{ fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //17
|
{ fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //17
|
||||||
{ func_802FF090, fxjinjoscore_update, func_802FF3B8, fxjinjoscore_free, 3, NULL }, //ITEM_12_JINJOS
|
{ func_802FF090, fxjinjoscore_update, fxjinjoscore_draw, 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
|
||||||
{ fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_15_HEALTH_TOTAL
|
{ fxcommon1score_new, fxcommon1score_update, fxcommon1score_draw, fxcommon1score_free, 0, NULL }, //ITEM_15_HEALTH_TOTAL
|
||||||
|
@@ -118,75 +118,79 @@ void fxjinjoscore_free(enum item_e item_id, struct8s * arg1){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NONMATCHING
|
|
||||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_78100/func_802FF3B8.s")
|
|
||||||
#else
|
|
||||||
//fxjinjoscore_draw
|
//fxjinjoscore_draw
|
||||||
void func_802FF3B8(s32 arg0, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
void fxjinjoscore_draw(s32 arg0, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||||
s32 sp11C;
|
BKSprite *sprite; // s1
|
||||||
s32 sp118;
|
s32 draw_index; // s5
|
||||||
s32 sp114;
|
s32 texture_width; // sp11C
|
||||||
s32 spF0;
|
s32 texture_height; // sp118
|
||||||
f32 temp_f14;
|
s32 jinjo_id; // sp114
|
||||||
f32 temp_f20;
|
f32 center_y; // f14 (sp110)
|
||||||
f32 var_f28;
|
f32 center_x; // f20 (sp10C)
|
||||||
f32 var_f30;
|
f32 x_offset; // f26 (sp108)
|
||||||
BKSprite *temp_a1;
|
f32 y_offset; // f28 (sp104)
|
||||||
s32 var_s5;
|
f32 pos_x; // f30 (sp100)
|
||||||
s32 var_v0;
|
s32 i; // v1 (spFC)
|
||||||
s32 var_v0_2;
|
s32 j; // v0_2 (spF8)
|
||||||
s32 var_v1;
|
|
||||||
|
|
||||||
gSPDisplayList((*gfx)++, D_8036A228);
|
gSPDisplayList((*gfx)++, D_8036A228);
|
||||||
func_8024C7B8(gfx, mtx);
|
func_8024C7B8(gfx, mtx);
|
||||||
var_f30 = 44.0f;
|
pos_x = 44.0f;
|
||||||
for(sp114 = 0; sp114 < 5; sp114++){
|
// Draw all jinjo heads
|
||||||
temp_a1 = D_80381E40[sp114];
|
for(jinjo_id = 0; jinjo_id < 5; jinjo_id++){
|
||||||
spF0 = (D_80381E58[sp114] != 0) ? 1 : 0;
|
s32 jinjo_collected; // spF0 <----
|
||||||
if (temp_a1 != NULL) {
|
sprite = D_80381E40[jinjo_id];
|
||||||
var_f28 = 0.0f;
|
jinjo_collected = (D_80381E58[jinjo_id] != 0) ? 1 : 0;
|
||||||
func_80347FC0(gfx, temp_a1, (s32) D_80381E60[sp114], 0, 0, 0, 0, 2, 2, &sp11C, &sp118);
|
if (sprite != NULL) {
|
||||||
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, D_80381620[(s32)D_80381E60[sp114]][sp114]);
|
func_80347FC0(gfx, sprite, (s32) D_80381E60[jinjo_id], 0, 0, 0, 0, 2, 2, &texture_width, &texture_height);
|
||||||
// gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, 0);
|
// Load the palette for the corresponding jinjo color
|
||||||
gDPTileSync((*gfx)++);
|
gDPLoadTLUT_pal16((*gfx)++, 0, D_80381620[(s32)D_80381E60[jinjo_id]][jinjo_id]);
|
||||||
gDPSetTile((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
x_offset = 0.0f;
|
||||||
gDPLoadSync((*gfx)++);
|
y_offset = 0.0f;
|
||||||
gDPLoadTLUTCmd((*gfx)++, G_TX_LOADTILE, 15);
|
// Draw the jinjo head, once if uncollected and twice if collected
|
||||||
|
// If the head is drawn twice then the first draw will be the drop shadow
|
||||||
|
for (draw_index = jinjo_collected; draw_index >= 0; draw_index--){
|
||||||
gDPPipeSync((*gfx)++);
|
gDPPipeSync((*gfx)++);
|
||||||
for (var_s5 = spF0; var_s5 >= 0; var_s5--){
|
// Draw 0 is the jinjo's head, anything else is a shadow
|
||||||
gDPPipeSync((*gfx)++);
|
if (draw_index != 0) {
|
||||||
if (var_s5) {
|
// Use only primitive color as the color input in order to make a solid color shadow
|
||||||
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);
|
||||||
|
// Set up a translucent black for primitive color to draw the shadow
|
||||||
gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, 0x8C);
|
gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, 0x8C);
|
||||||
} else {
|
} else {
|
||||||
|
// Use the texture as the color input
|
||||||
gDPSetCombineLERP((*gfx)++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
gDPSetCombineLERP((*gfx)++, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
||||||
gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, spF0 ? 0xFF : 0x6E);
|
// If the jinjo is collected then it's drawn fully opaque, otherwise it's drawn with partial alpha
|
||||||
|
gDPSetPrimColor((*gfx)++, 0, 0, 0x00, 0x00, 0x00, jinjo_collected ? 0xFF : 0x6E);
|
||||||
}
|
}
|
||||||
temp_f20 = (var_f30 - ((f32) D_80276588 / 2)) - var_f28;
|
center_x = pos_x - (f32) D_80276588 / 2 + x_offset;
|
||||||
temp_f14 = ((((f32) D_8027658C / 2) + func_802FB0E4(arg1)) - 266.0f + 40.0f + var_f28) - D_80381E78[sp114];
|
center_y = (f32) D_8027658C / 2 + func_802FB0E4(arg1) - 266.0f + 40.0f + y_offset - D_80381E78[jinjo_id];
|
||||||
gSPVertex((*gfx)++, *vtx, 4, 0);
|
gSPVertex((*gfx)++, *vtx, 4, 0);
|
||||||
for(var_v1 = 0; var_v1 < 2; var_v1++){
|
// Set up the positions of the four vertices
|
||||||
for(var_v0_2 = 0; var_v0_2 < 2; var_v0_2++){
|
for(i = 0; i < 2; i++){
|
||||||
(*vtx)->v.ob[0] = (s16) (s32) (((((sp11C * D_80381E54) * (f32) var_v0_2) - ((sp11C * D_80381E54) / 2)) + temp_f20) * 4);
|
for(j = 0; j < 2; j++){
|
||||||
(*vtx)->v.ob[1] = (s16) (s32) (((((sp118 * D_80381E54) / 2) - ((sp118 * D_80381E54) * var_v1)) + temp_f14) * 4);
|
(*vtx)->v.ob[0] = ((texture_width * D_80381E54 * j) - (texture_width * D_80381E54 / 2) + center_x) * 4;
|
||||||
(*vtx)->v.ob[2] = -0x14;
|
(*vtx)->v.ob[1] = ((texture_height * D_80381E54 / 2) - (texture_height * D_80381E54 * i) + center_y) * 4;
|
||||||
(*vtx)->v.tc[0] = (s16) (((sp11C - 1) * var_v0_2) << 6);
|
(*vtx)->v.ob[2] = -20;
|
||||||
(*vtx)->v.tc[1] = (s16) (((sp118 - 1) * var_v1) << 6);
|
(*vtx)->v.tc[0] = ((texture_width - 1) * j) << 6;
|
||||||
|
(*vtx)->v.tc[1] = ((texture_height - 1) * i) << 6;
|
||||||
(*vtx)++;
|
(*vtx)++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Draw a quad made of the four vertices
|
||||||
gSP1Quadrangle((*gfx)++, 0, 1, 3, 2, 0);
|
gSP1Quadrangle((*gfx)++, 0, 1, 3, 2, 0);
|
||||||
var_f28 += 2.0f;
|
x_offset += -2;
|
||||||
|
y_offset += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var_f30 += 32.0f;
|
// Move the next jinjo head over by 32 pixels
|
||||||
|
pos_x += 32.0f;
|
||||||
}
|
}
|
||||||
gDPPipeSync((*gfx)++);
|
gDPPipeSync((*gfx)++);
|
||||||
gDPSetTextureLUT((*gfx)++, G_TT_NONE);
|
gDPSetTextureLUT((*gfx)++, G_TT_NONE);
|
||||||
gDPPipelineMode((*gfx)++, G_PM_NPRIMITIVE);
|
gDPPipelineMode((*gfx)++, G_PM_NPRIMITIVE);
|
||||||
func_8024C904(gfx, mtx);
|
func_8024C904(gfx, mtx);
|
||||||
}
|
}
|
||||||
#endif;
|
|
||||||
|
|
||||||
bool func_802FFA10(f32 arg0, s32 arg1, s32 arg2){
|
bool func_802FFA10(f32 arg0, s32 arg1, s32 arg2){
|
||||||
if(arg1 == 0){
|
if(arg1 == 0){
|
||||||
|
@@ -280,7 +280,7 @@ segments:
|
|||||||
- [0x763D0, c, code_763D0] #DONE
|
- [0x763D0, c, code_763D0] #DONE
|
||||||
- [0x76D90, c, code_76D90]
|
- [0x76D90, c, code_76D90]
|
||||||
- [0x77E50, c, code_77E50] #DONE
|
- [0x77E50, c, code_77E50] #DONE
|
||||||
- [0x78100, c, code_78100]
|
- [0x78100, c, code_78100] #DONE
|
||||||
- [0x78E50, c, code_78E50]
|
- [0x78E50, c, code_78E50]
|
||||||
- [0x79830, c, fxcommon3score] #DONE
|
- [0x79830, c, fxcommon3score] #DONE
|
||||||
- [0x79C80, c, code_79C80] #DONE
|
- [0x79C80, c, code_79C80] #DONE
|
||||||
|
Reference in New Issue
Block a user