func_80336924() match
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# banjo (97.4527%)
|
# banjo (97.7499%)
|
||||||
|
|
||||||
<img src="./progress/progress_total.svg">
|
<img src="./progress/progress_total.svg">
|
||||||
|
|
||||||
|
@@ -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="#10e000" d="M44 0h67v20H44z"/>
|
<path fill="#0ee000" 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">96.4296%</text>
|
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">96.9477%</text>
|
||||||
<text x="77.5" y="14">96.4296%</text>
|
<text x="77.5" y="14">96.9477%</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="#0be000" d="M150 0h67v20H150z"/>
|
<path fill="#0ae000" 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">97.4527%</text>
|
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">97.7499%</text>
|
||||||
<text x="183.5" y="14">97.4527%</text>
|
<text x="183.5" y="14">97.7499%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -2168,9 +2168,9 @@ void func_80308230(s32 arg0) {
|
|||||||
Cube *iCube;
|
Cube *iCube;
|
||||||
for(iCube = D_80381FA0.cube_list; iCube < D_80381FA0.cube_list + D_80381FA0.cubeCnt; iCube++){
|
for(iCube = D_80381FA0.cube_list; iCube < D_80381FA0.cube_list + D_80381FA0.cubeCnt; iCube++){
|
||||||
if (arg0 == 0) {
|
if (arg0 == 0) {
|
||||||
func_8032D158(iCube);
|
func_8032D158(iCube); //sort cube props (dist from viewport)
|
||||||
} else {
|
} else {
|
||||||
func_8032D120(iCube);
|
func_8032D120(iCube); //sort cube props (dist from origin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -72,6 +72,7 @@ s32 D_8038363C;
|
|||||||
s32 D_80383640;
|
s32 D_80383640;
|
||||||
s32 D_80383644;
|
s32 D_80383644;
|
||||||
|
|
||||||
|
void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 frame, u32 segment);
|
||||||
void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]);
|
void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]);
|
||||||
void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]);
|
void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]);
|
||||||
|
|
||||||
@@ -210,243 +211,172 @@ void func_8033687C( Gfx **gfx )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80336904(Gfx **gfx, Vtx **vtx, BKSprite *sp, u32 frame){
|
void spriteRender_draw(Gfx **gfx, Vtx **vtx, BKSprite *sp, u32 frame){
|
||||||
func_80336924(gfx, vtx, sp, frame, 0);
|
spriteRender_drawWithSegment(gfx, vtx, sp, frame, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80336924.s")
|
void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 frame, u32 segment) {
|
||||||
/*func_80336924(Gfx **gfx, Vtx **vtx, BKSprite *sp, u32 frame, u32 segment){
|
s32 ix;
|
||||||
u32 chkDataSize_1C0;
|
s32 pixel_size_nibbles; //sp1C0
|
||||||
s32 i_1BC;
|
s32 sp1BC;
|
||||||
|
Vtx *var_a3;
|
||||||
Gfx *sp1B4;
|
Gfx *sp1B4;
|
||||||
Vtx *sp1B0;
|
Vtx *sp1B0;
|
||||||
void *sp1A8;
|
u32 palette_mem;
|
||||||
BKSpriteFrame *framePtr_18c;
|
u8 *tmem;
|
||||||
Vtx *sp184;
|
BKSpriteTextureBlock *var_t2;
|
||||||
|
f32 temp_f0;
|
||||||
s32 sp48;
|
f32 temp_f2;
|
||||||
s32 sp44;
|
Gfx *var_a2;
|
||||||
|
s32 temp_a2_2;
|
||||||
s32 sp_type;
|
s32 i_vtx;
|
||||||
BKSpriteTextureBlock *chunkPtr;
|
BKSpriteFrame *frame_ptr; //sp18c
|
||||||
u32 chunk_block;
|
s32 var_t1_8;
|
||||||
u32 chunkSize;
|
Vtx *vtx_start; //sp184
|
||||||
u16* palPtr;
|
s32 temp_ra;
|
||||||
s32 s2;
|
s32 iy;
|
||||||
sp184 = *vtx;
|
|
||||||
|
vtx_start = *vtx;
|
||||||
|
|
||||||
|
//get pize size in nibs
|
||||||
func_80349AD0();
|
func_80349AD0();
|
||||||
|
if (sprite->type & SPRITE_TYPE_CI4) {
|
||||||
if (sp->type & SPRITE_TYPE_CI4) {
|
pixel_size_nibbles = 1;
|
||||||
chkDataSize_1C0 = 1;
|
} else if (sprite->type & SPRITE_TYPE_CI8) {
|
||||||
} else if (sp->type & SPRITE_TYPE_CI8) {
|
pixel_size_nibbles = 2;
|
||||||
chkDataSize_1C0 = 2;
|
} else if (sprite->type & 0x40){
|
||||||
} else if (sp->type & 0x40){
|
pixel_size_nibbles = 2;
|
||||||
chkDataSize_1C0 = 2;
|
} else if (sprite->type & 0x100){
|
||||||
} else if (sp->type & 0x100){
|
pixel_size_nibbles = 2;
|
||||||
chkDataSize_1C0 = 2;
|
} else if (sprite->type & SPRITE_TYPE_RGBA16) {
|
||||||
} else if (sp->type & SPRITE_TYPE_RGBA16) {
|
pixel_size_nibbles = 4;
|
||||||
chkDataSize_1C0 = 4;
|
} else if (sprite->type & SPRITE_TYPE_RGBA32){
|
||||||
} else if (sp->type & SPRITE_TYPE_RGBA32){
|
pixel_size_nibbles = 8;
|
||||||
chkDataSize_1C0 = 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func_80335D30(gfx);
|
func_80335D30(gfx);
|
||||||
if(D_80383638 || (sp->type & SPRITE_TYPE_CI8)){
|
|
||||||
|
//set to 1Prim if using
|
||||||
|
if(D_80383638 || (sprite->type & SPRITE_TYPE_CI8)){
|
||||||
gDPPipelineMode((*gfx)++, G_PM_1PRIMITIVE);
|
gDPPipelineMode((*gfx)++, G_PM_1PRIMITIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
framePtr_18c = spriteGetFramePtr(sp, frame);
|
frame_ptr = spriteGetFramePtr(sprite, frame);
|
||||||
|
|
||||||
// //load Palettes for CI4 and CI8
|
//load palette in indexed pixels
|
||||||
chunkPtr = ((u32) (framePtr_18c + 1));
|
var_t2 = frame_ptr + 1;
|
||||||
if (sp->type & SPRITE_TYPE_CI4) { //CI4
|
if (sprite->type & SPRITE_TYPE_CI4) {
|
||||||
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
||||||
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, chunkPtr = (u32)chunkPtr & -8);
|
palette_mem = ALIGN(frame_ptr + 1, 8);
|
||||||
gDPTileSync((*gfx)++);
|
gDPLoadTLUT_pal16((*gfx)++, 0, palette_mem);
|
||||||
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);
|
var_t2 = palette_mem + 0x20;
|
||||||
// sp1d0 = sp;
|
} else if (sprite->type & SPRITE_TYPE_CI8) {
|
||||||
gDPLoadSync((*gfx)++);
|
|
||||||
gDPLoadTLUTCmd((*gfx)++, G_TX_LOADTILE, 15);
|
|
||||||
gDPPipeSync((*gfx)++);
|
|
||||||
chunkPtr = (u32) chunkPtr + 0x10 * sizeof(u16);
|
|
||||||
} else if (sp->type & SPRITE_TYPE_CI8) {//CI8
|
|
||||||
// //L80336B28
|
|
||||||
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
gDPSetTextureLUT((*gfx)++, G_TT_RGBA16);
|
||||||
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, chunkPtr = (u32)chunkPtr & -8);
|
palette_mem = ALIGN(frame_ptr + 1, 8);
|
||||||
gDPTileSync((*gfx)++);
|
gDPLoadTLUT_pal256((*gfx)++, palette_mem);
|
||||||
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);
|
var_t2 = palette_mem + 0x200;
|
||||||
gDPLoadSync((*gfx)++);
|
}
|
||||||
gDPLoadTLUTCmd((*gfx)++, G_TX_LOADTILE, 255);
|
|
||||||
gDPPipeSync((*gfx)++);
|
//start new vtx seg
|
||||||
chunkPtr = (u32) chunkPtr + 0x100 * sizeof(u16);
|
i_vtx = 0;
|
||||||
}//L80336C0C
|
var_a3 = *vtx;
|
||||||
|
|
||||||
s2 = 0;
|
|
||||||
sp1B0 = *vtx;
|
|
||||||
sp1B4 = *gfx;
|
sp1B4 = *gfx;
|
||||||
if(segment){
|
sp1B0 = var_a3;
|
||||||
gSPVertex((*gfx)++, SEGMENT_ADDR(segment, (s32)sp1B0 - (s32)sp184), 0, 0);
|
if(segment != 0){
|
||||||
|
gSPVertex((*gfx)++, SEGMENT_ADDR(segment, (s32)sp1B0 - (s32)vtx_start), 0, 0);
|
||||||
}else{
|
}else{
|
||||||
gSPVertex((*gfx)++, sp1B0, 0, 0);
|
gSPVertex((*gfx)++, sp1B0, 0, 0);
|
||||||
}
|
}
|
||||||
|
//for each texture (chunk) in frame
|
||||||
|
// sp1B4 = sp1B4;
|
||||||
|
for(sp1BC = 0; sp1BC < frame_ptr->chunkCnt; sp1BC++){
|
||||||
|
temp_ra = var_t2->h;
|
||||||
|
tmem = ALIGN(var_t2 + 1, 8); //align
|
||||||
|
|
||||||
for(i_1BC = 0; i_1BC < framePtr_18c->chunkCnt; i_1BC++){
|
//load texture block
|
||||||
//L80336CA0
|
if (sprite->type & SPRITE_TYPE_RGBA16) {
|
||||||
//temp_ra = phi_t2->unk6;
|
gDPLoadTextureBlock((*gfx)++, tmem, G_IM_FMT_RGBA, G_IM_SIZ_16b, var_t2->w, temp_ra, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
sp1A8 = ((s32)chunkPtr + 0xF) & ~7;
|
} else if (sprite->type & SPRITE_TYPE_RGBA32) {
|
||||||
// // // temp_a0_3 = arg2->unk2;
|
gDPLoadTextureBlock((*gfx)++, tmem, G_IM_FMT_RGBA, G_IM_SIZ_32b, var_t2->w, temp_ra, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
// // // temp_s3 = phi_s2 * 2;
|
} else if (sprite->type & SPRITE_TYPE_CI4) {
|
||||||
|
gDPLoadTextureBlock_4b((*gfx)++, tmem, G_IM_FMT_CI, var_t2->w, temp_ra, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
|
} else if (sprite->type & SPRITE_TYPE_CI8) {
|
||||||
|
gDPLoadTextureBlock((*gfx)++, tmem, G_IM_FMT_CI, G_IM_SIZ_8b, var_t2->w, temp_ra, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
|
}else if (sprite->type & SPRITE_TYPE_IA8) {
|
||||||
|
gDPLoadTextureBlock((*gfx)++, tmem, G_IM_FMT_CI, G_IM_SIZ_8b, var_t2->w, temp_ra, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
|
} else if (sprite->type & SPRITE_TYPE_I8) {
|
||||||
|
gDPLoadTextureBlock((*gfx)++, tmem, G_IM_FMT_I, G_IM_SIZ_8b, var_t2->w, temp_ra, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// / temp_fp = temp_s3 + 2;
|
//generate vtx coords for texture
|
||||||
sp1A8 = (((u32) (chunkPtr + 1) + 0xF) & 0xFFFFFFF8);
|
gSP2Triangles((*gfx)++, i_vtx, i_vtx + 1, i_vtx + 3, i_vtx, i_vtx, i_vtx + 3, i_vtx + 2, i_vtx);
|
||||||
if(sp->type & SPRITE_TYPE_RGBA16) { //RGBA16
|
temp_f0 = ((f32) D_80383640 / (f32) frame_ptr->w);
|
||||||
gDPLoadTextureBlock((*gfx)++, sp1A8, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
temp_f2 = ((f32) D_80383644 / (f32) frame_ptr->h);
|
||||||
chunkPtr->w, chunkPtr->h, 0, 0, 0, 0, 0, 0, 0);
|
temp_a2_2 = var_t2->x - frame_ptr->unk0;
|
||||||
} else if (sp->type & SPRITE_TYPE_RGBA32) { //RGBA32 //L80336E78
|
var_t1_8 = (frame_ptr->unk2 - var_t2->y);
|
||||||
gDPLoadTextureBlock((*gfx)++, sp1A8, G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
for(iy = 0; iy < 2; iy++){
|
||||||
chunkPtr->w, chunkPtr->h, 0, 0, 0, 0, 0, 0, 0);
|
for(ix = 0; ix < 2; ix++){
|
||||||
} else if (sp->type & 1) { //CI4 //L80337020
|
var_a3->v.ob[0] = (s32)((temp_a2_2 + (var_t2->w - 1) * ix) * temp_f0);
|
||||||
gDPLoadTextureBlock((*gfx)++, chunk_block, G_IM_FMT_CI, G_IM_SIZ_16b,
|
var_a3->v.ob[1] = (s32)((var_t1_8 + -(temp_ra - 1) * iy) * temp_f2);
|
||||||
chunkPtr->w, chunkPtr->h, 0, 0, 0, 0, 0, 0, 0);
|
var_a3->v.ob[2] = 0;
|
||||||
} else if (sp->type & 4) { //CI8 //L803371C4
|
var_a3->v.tc[0] = 0x20*(2*var_t2->w * ix - 1);
|
||||||
gDPLoadTextureBlock((*gfx)++, chunk_block, G_IM_FMT_CI, G_IM_SIZ_16b,
|
var_a3->v.tc[1] = 0x20*(2*temp_ra * (iy^0) - 1);
|
||||||
chunkPtr->w, chunkPtr->h, 0, 0, 0, 0, 0, 0, 0);
|
*(u32*)&var_a3->v.cn = 0x7F80;
|
||||||
} else if (sp->type & 0x100) {
|
var_a3++;
|
||||||
gDPLoadTextureBlock((*gfx)++, chunk_block, G_IM_FMT_I, G_IM_SIZ_16b,
|
|
||||||
chunkPtr->w, chunkPtr->h, 0, 0, 0, 0, 0, 0, 0);
|
|
||||||
} else if (sp->type & 0x40) {
|
|
||||||
gDPLoadTextureBlock((*gfx)++, chunk_block, G_IM_FMT_I, G_IM_SIZ_8b,
|
|
||||||
chunkPtr->w, chunkPtr->h, 0, 0, 0, 0, 0, 0, 0);
|
|
||||||
}//L803376A8
|
|
||||||
gSP2Triangles((*gfx)++, 0, 1, 2, 0, 2, 1, 0, 0);
|
|
||||||
//L803376E4
|
|
||||||
// // // // temp_a2 = *arg0;
|
|
||||||
// // // // temp_v1_69 = temp_s3 & 0xFF;
|
|
||||||
// // // // *arg0 = (void *) (temp_a2 + 8);
|
|
||||||
// // // // if (phi_s2 == 0) {
|
|
||||||
// // // // temp_t9 = sp48 & 0xFF;
|
|
||||||
// // // // phi_a0_7 = (temp_v1_69 << 0x10) | ((temp_fp & 0xFF) << 8) | temp_t9;
|
|
||||||
// // // // phi_v1_3 = temp_v1_69;
|
|
||||||
// // // // phi_a1 = temp_t9;
|
|
||||||
// // // // } else {
|
|
||||||
// // // // if (phi_s2 == 1) {
|
|
||||||
// // // // temp_t6 = sp48 & 0xFF;
|
|
||||||
// // // // temp_v1_70 = temp_s3 & 0xFF;
|
|
||||||
// // // // phi_t1_8 = ((temp_fp & 0xFF) << 0x10) | (temp_t6 << 8) | temp_v1_70;
|
|
||||||
// // // // phi_v1_3 = temp_v1_70;
|
|
||||||
// // // // phi_a1 = temp_t6;
|
|
||||||
// // // // } else {
|
|
||||||
// // // // temp_t8_5 = sp48 & 0xFF;
|
|
||||||
// // // // temp_v1_71 = temp_s3 & 0xFF;
|
|
||||||
// // // // phi_t1_8 = (temp_t8_5 << 0x10) | (temp_v1_71 << 8) | (temp_fp & 0xFF);
|
|
||||||
// // // // phi_v1_3 = temp_v1_71;
|
|
||||||
// // // // phi_a1 = temp_t8_5;
|
|
||||||
// // // // }
|
|
||||||
// // // // phi_a0_7 = phi_t1_8;
|
|
||||||
// // // // }
|
|
||||||
// // // // temp_a2->unk0 = (s32) (phi_a0_7 | 0xB1000000);
|
|
||||||
// // // // if (phi_s2 == 0) {
|
|
||||||
// // // // temp_a2->unk4 = (s32) ((phi_v1_3 << 0x10) | (phi_a1 << 8) | (sp44 & 0xFF));
|
|
||||||
// // // // } else {
|
|
||||||
// // // // if (phi_s2 == 1) {
|
|
||||||
// // // // phi_a0_8 = (phi_a1 << 0x10) | ((sp44 & 0xFF) << 8) | phi_v1_3;
|
|
||||||
// // // // } else {
|
|
||||||
// // // // phi_a0_8 = ((sp44 & 0xFF) << 0x10) | (phi_v1_3 << 8) | phi_a1;
|
|
||||||
// // // // }
|
|
||||||
// // // // temp_a2->unk4 = phi_a0_8;
|
|
||||||
// // // // }
|
|
||||||
// // // // temp_a2_2 = phi_t2->unk0 - temp_v0->unk0;
|
|
||||||
// // // // temp_f0 = (f32) D_80383640 / (f32) temp_v0->unk4;
|
|
||||||
// // // // phi_t1_7 = temp_v0->unk2 - phi_t2->unk2;
|
|
||||||
// // // // phi_t0 = 0;
|
|
||||||
// // // // loop_95:
|
|
||||||
// // // // temp_a1 = ((temp_ra << 6) * phi_t0) - 0x20;
|
|
||||||
// // // // temp_f4 = (s32) ((f32) phi_t1_7 * ((f32) D_80383644 / (f32) temp_v0->unk6));
|
|
||||||
// // // // temp_t3 = phi_t3 - 1;
|
|
||||||
// // // // temp_lo = (phi_t2->unk4 - 1) * 0;
|
|
||||||
// // // // phi_a3 = phi_a3_4;
|
|
||||||
// // // // phi_lo = temp_lo;
|
|
||||||
// // // // phi_v1_4 = 0;
|
|
||||||
// // // // phi_a3_2 = phi_a3_4;
|
|
||||||
// // // // phi_lo_2 = temp_lo;
|
|
||||||
// // // // phi_v1_5 = 0;
|
|
||||||
// // // // if (temp_t3 != 0) {
|
|
||||||
// // // // loop_96:
|
|
||||||
// // // // phi_a3->unk2 = (s16) temp_f4;
|
|
||||||
// // // // phi_a3->unk4 = (u16)0;
|
|
||||||
// // // // temp_a3_2 = phi_a3 + 0x10;
|
|
||||||
// // // // temp_a3_2->unk-10 = (s16) (s32) ((f32) (phi_lo + temp_a2_2) * temp_f0);
|
|
||||||
// // // // temp_a3_2->unk-6 = temp_a1;
|
|
||||||
// // // // temp_a3_2->unk-4 = 0x7F80;
|
|
||||||
// // // // temp_v1_72 = phi_v1_4 + 1;
|
|
||||||
// // // // temp_a3_2->unk-8 = (s16) (((phi_t2->unk4 << 6) * phi_v1_4) - 0x20);
|
|
||||||
// // // // temp_lo_2 = (phi_t2->unk4 - 1) * temp_v1_72;
|
|
||||||
// // // // phi_a3 = temp_a3_2;
|
|
||||||
// // // // phi_lo = temp_lo_2;
|
|
||||||
// // // // phi_v1_4 = temp_v1_72;
|
|
||||||
// // // // phi_a3_2 = temp_a3_2;
|
|
||||||
// // // // phi_lo_2 = temp_lo_2;
|
|
||||||
// // // // phi_v1_5 = temp_v1_72;
|
|
||||||
// // // // if (temp_v1_72 != temp_t3) {
|
|
||||||
// // // // goto loop_96;
|
|
||||||
// // // // }
|
|
||||||
// // // // }
|
|
||||||
// // // // phi_a3_2->unk2 = (s16) temp_f4;
|
|
||||||
// // // // phi_a3_2->unk4 = (u16)0;
|
|
||||||
// // // // temp_t3_2 = temp_t3 + 1;
|
|
||||||
// // // // temp_a3_3 = phi_a3_2 + 0x10;
|
|
||||||
// // // // temp_a3_3->unk-10 = (s16) (s32) ((f32) (phi_lo_2 + temp_a2_2) * temp_f0);
|
|
||||||
// // // // temp_a3_3->unk-6 = temp_a1;
|
|
||||||
// // // // temp_a3_3->unk-4 = 0x7F80;
|
|
||||||
// // // // temp_a3_3->unk-8 = (s16) (((phi_t2->unk4 << 6) * phi_v1_5) - 0x20);
|
|
||||||
// // // // temp_t0 = phi_t0 + 1;
|
|
||||||
// // // // phi_t3 = temp_t3_2;
|
|
||||||
// // // // phi_t1_7 = (phi_t1_7 - temp_ra) + 1;
|
|
||||||
// // // // phi_t0 = temp_t0;
|
|
||||||
// // // // phi_a3_4 = temp_a3_3;
|
|
||||||
// // // // if (temp_t0 != temp_t3_2) {
|
|
||||||
// // // // goto loop_95;
|
|
||||||
// // // // }
|
|
||||||
// // // // temp_s2_2 = phi_s2 + 4;
|
|
||||||
// // // // phi_s2_3 = temp_s2_2;
|
|
||||||
// // // // if (temp_s2_2 == 0x10) {
|
|
||||||
if (segment != 0) {
|
|
||||||
gSPVertex((*gfx)++, SEGMENT_ADDR(segment, *vtx - sp184, 16, 0);
|
|
||||||
} else {
|
|
||||||
gSPVertex((*gfx)++, 0x80001234, 16, 0);
|
|
||||||
}
|
}
|
||||||
// // // // temp_v1_73 = *arg0;
|
}
|
||||||
// // // // sp1B0 = temp_a3_3;
|
i_vtx += 4;
|
||||||
// // // // sp1B4 = temp_v1_73;
|
//rewrite vtx seg start with correct vtx count
|
||||||
// // // if (arg4 != 0) {
|
if (i_vtx == 0x10) {
|
||||||
// // // // *arg0 = (void *) (temp_v1_73 + 8);
|
i_vtx = 0;
|
||||||
// // // // temp_v1_73->unk0 = 0x400FFFF;
|
if(segment != 0){
|
||||||
// // // // temp_v1_73->unk4 = (void *) ((arg4 << 0x18) + (temp_a3_3 - sp184));
|
gSPVertex(sp1B4, SEGMENT_ADDR(segment, (s32)sp1B0 - (s32)vtx_start), 16, 0);
|
||||||
// // // // phi_s2_3 = 0;
|
}else{
|
||||||
// // // } else {
|
gSPVertex(sp1B4, sp1B0, 16, 0);
|
||||||
// // // // *arg0 = (void *) (temp_v1_73 + 8);
|
}
|
||||||
// // // // temp_v1_73->unk0 = 0x400FFFF;
|
//start new vtx seg
|
||||||
// // // // temp_v1_73->unk4 = temp_a3_3;
|
sp1B4 = *gfx;
|
||||||
// // // // phi_s2_3 = 0;
|
sp1B0 = var_a3;
|
||||||
// // // }
|
if (segment) {
|
||||||
// // // // }
|
gSPVertex((*gfx)++, SEGMENT_ADDR(segment, (s32)sp1B0 - (s32)vtx_start), 0, 0);
|
||||||
chunkSize = chunkPtr->w * chunkPtr->h * chkDataSize_1C0;
|
} else {
|
||||||
chunkPtr = (s32)sp1A8 + chunkSize/2;
|
gSPVertex((*gfx)++, sp1B0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var_t2 = tmem + ((s32) (var_t2->w * var_t2->h) * pixel_size_nibbles / 2);
|
||||||
|
}
|
||||||
|
// sp1B4 = reinterpret_cast(Gfx *,sp1B4);
|
||||||
|
*vtx = var_a3;
|
||||||
|
|
||||||
|
|
||||||
|
//rewrite vtx seg start with correct vtx count
|
||||||
|
if (i_vtx > 0) {
|
||||||
|
if(segment != 0){
|
||||||
|
gSPVertex(sp1B4, SEGMENT_ADDR(segment, (s32)sp1B0 - (s32)vtx_start), i_vtx, 0);
|
||||||
|
}else{
|
||||||
|
if(1);
|
||||||
|
gSPVertex(sp1B4, sp1B0, i_vtx, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//no vtx, overwrite gSPVertex() command;
|
||||||
|
*gfx = sp1B4;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync((*gfx)++);
|
gDPPipeSync((*gfx)++);
|
||||||
// if((sp->type & SPRITE_TYPE_CI4) || (sp->type & SPRITE_TYPE_CI8)){ //CI4 or CI8 //L80337AD8
|
|
||||||
// gDPSetTextureLUT((*gfx)++, G_TT_NONE);
|
|
||||||
// }
|
|
||||||
// if( D_80383638 || sp->type & SPRITE_TYPE_CI8){
|
|
||||||
// //L80337B18
|
|
||||||
// gDPPipelineMode((*gfx)++, G_PM_NPRIMITIVE);
|
|
||||||
// }//L80337B30
|
|
||||||
// func_8033687C(gfx);
|
|
||||||
|
|
||||||
if(chkDataSize_1C0);
|
//clear palette if used
|
||||||
}//*/
|
if (( sprite->type & SPRITE_TYPE_CI4) || ( sprite->type & SPRITE_TYPE_CI8)) {
|
||||||
|
gDPSetTextureLUT((*gfx)++, G_TT_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//restore pipeline to NPrim mode if set to 1Prim
|
||||||
|
if ((D_80383638 != 0) || (sprite->type & SPRITE_TYPE_CI8)) {
|
||||||
|
gDPPipelineMode((*gfx)++, G_PM_NPRIMITIVE);
|
||||||
|
}
|
||||||
|
if(sp1B4);
|
||||||
|
func_8033687C(gfx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef NONMATCHING
|
#ifndef NONMATCHING
|
||||||
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80337B68.s")
|
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_AEDA0/func_80337B68.s")
|
||||||
|
@@ -58,7 +58,7 @@ void func_8033F7F0(u8 arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
|||||||
func_80338308(sp54->unk20[0], sp54->unk20[1]);
|
func_80338308(sp54->unk20[0], sp54->unk20[1]);
|
||||||
func_8033837C(1);
|
func_8033837C(1);
|
||||||
func_80338370();
|
func_80338370();
|
||||||
func_80336904(gfx, vtx, sp54->sprite_0, sp54->frame_28_31);
|
spriteRender_draw(gfx, vtx, sp54->sprite_0, sp54->frame_28_31);
|
||||||
gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
|
gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
||||||
extern void func_80336924(Gfx**, Vtx**, BKSprite *, s32, s32);
|
extern void spriteRender_drawWithSegment(Gfx**, Vtx**, BKSprite *, s32, s32);
|
||||||
extern void func_80252330(f32, f32, f32);
|
extern void func_80252330(f32, f32, f32);
|
||||||
extern void mlMtxRotate(f32, f32, f32);
|
extern void mlMtxRotate(f32, f32, f32);
|
||||||
extern void mlMtxApply(Mtx *);
|
extern void mlMtxApply(Mtx *);
|
||||||
@@ -236,7 +236,7 @@ BKSpriteDisplayData * func_80344A1C(BKSprite *arg0){
|
|||||||
gfx_start = (Gfx *)(vtx_start + 200);
|
gfx_start = (Gfx *)(vtx_start + 200);
|
||||||
vtx_end = vtx_start;
|
vtx_end = vtx_start;
|
||||||
gfx_end = gfx_start;
|
gfx_end = gfx_start;
|
||||||
func_80336924(&gfx_end, &vtx_end, arg0, i, 1);
|
spriteRender_drawWithSegment(&gfx_end, &vtx_end, arg0, i, 1);
|
||||||
gSPEndDisplayList(gfx_end++);
|
gSPEndDisplayList(gfx_end++);
|
||||||
frame_vtx_size[i] = ALIGN(sizeof(Vtx)*(vtx_end - vtx_start), 0x10);
|
frame_vtx_size[i] = ALIGN(sizeof(Vtx)*(vtx_end - vtx_start), 0x10);
|
||||||
frame_gfx_size[i] = sizeof(Gfx)*(gfx_end - gfx_start);
|
frame_gfx_size[i] = sizeof(Gfx)*(gfx_end - gfx_start);
|
||||||
|
@@ -1233,7 +1233,7 @@ void __gcpausemenu_drawSprite(Gfx** gdl, Mtx** mptr, Vtx** vptr, BKSprite* sprit
|
|||||||
mlMtxApply(*mptr); //add matrix;
|
mlMtxApply(*mptr); //add matrix;
|
||||||
gSPMatrix((*gdl)++, (*mptr)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
gSPMatrix((*gdl)++, (*mptr)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
func_80338308((s32)sp2C, (s32)sp28);
|
func_80338308((s32)sp2C, (s32)sp28);
|
||||||
func_80336904(gdl, vptr, sprite, frame);
|
spriteRender_draw(gdl, vptr, sprite, frame);
|
||||||
gSPPopMatrix((*gdl)++, G_MTX_MODELVIEW);
|
gSPPopMatrix((*gdl)++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user