core2/code_B5E00.c progress

This commit is contained in:
Banjo Kazooie
2022-09-29 22:18:49 -05:00
parent a307feabec
commit 87b779d712
8 changed files with 52 additions and 53 deletions

View File

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

View File

@@ -17,7 +17,7 @@
<text x="22.0" y="14">core2</text>
</g>
<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">87.7140%</text>
<text x="77.5" y="14">87.7140%</text>
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">87.7809%</text>
<text x="77.5" y="14">87.7809%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#32e000" d="M150 0h67v20H150z"/>
<path fill="#31e000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/>
</g>
<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>
</g>
<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">88.9275%</text>
<text x="183.5" y="14">88.9275%</text>
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">88.9659%</text>
<text x="183.5" y="14">88.9659%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -112,28 +112,31 @@ enum asset_e func_802F49C0(void){
// this function reassigns the referenced font mask pixel
// using the texture @ pixel (x,y)
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_6DA30/func_802F4A24.s")
/*void func_802F4A24(BKSpriteTextureBlock *arg0, u32 *arg1, s32 arg2, s32 arg3) {
s32 temp_lo;
s32 temp_t0;
u32 red;
u32 blue;
u32 green;
u32 alpha;
s32 _x = MIN(MAX(0, arg2), arg0->w - 1);
s32 _y = MIN(MAX(0, arg3), arg0->h - 1);
void func_802F4A24(BKSpriteTextureBlock *texture, u32 *font, s32 x, s32 y) {
u16 *var_v0;
s32 r5;
s32 g5;
s32 b5;
s32 a8;
s32 i8;
x = MIN(MAX(0, x), texture->w - 1);
y = MIN(MAX(0, y), texture->h - 1);
temp_t0 = ((u16 *) (arg0 + 1))[_x + _y * arg0->w];
var_v0 = ((u16*)(texture + 1)) + x + y * texture->w;
if(temp_t0);
blue = ((temp_t0 >> 1) & ((1<< 5) - 1));
green = ((temp_t0 >> 6) & ((1<< 5) - 1));
red = ((temp_t0 >> 11) & ((1<< 5) - 1));
temp_lo = (s32) ((*arg1 >> 11) & 0xFF) / 0x1F;
r5 = ((*var_v0 >> 11) & 0x1F);
g5 = ((*var_v0 >> 6) & 0x1F);
b5 = ((*var_v0 >> 1) & 0x1F);
a8 = (*font >> 0) & 0xff;
i8 = (*font >> 8) & 0xff;
*arg1 = (( ((red * temp_lo) << 0x18) | ((green * temp_lo) << 0x10)) | ((blue * temp_lo) << 8)) | (*arg1 & 0xff);
}//*/
r5*=(i8/ 0x1F);
g5*=(i8/ 0x1F);
b5*=(i8/ 0x1F);
*font = (r5 << 0x18) | (g5 << 0x10) | (b5 << 8) | (a8 << 0);
}
//this function applies the texture to the font alpha mask.
void func_802F4B58(BKSpriteTextureBlock *alphaMask, BKSpriteTextureBlock *texture){

View File

@@ -237,7 +237,6 @@ void func_80333D48(BKVertexList *arg0, f32 position[3], f32 rotation[3], f32 sca
f32 sp68[3];
Struct_core2_AC520_0 *struct_ptr;
f32 temp_f0;
s8* tmp;
func_803334B0(position, rotation, scale, arg4, func_802EC920(arg0));
if (D_80383570.unk44 == (&D_80383570.unk4[0])) {
@@ -246,7 +245,7 @@ void func_80333D48(BKVertexList *arg0, f32 position[3], f32 rotation[3], f32 sca
}
ref_ptr = vtxList_getVertices(arg5);
func_802EC8FC(arg0, &i_ptr, &end_ptr);
for(; i_ptr < end_ptr; i_ptr++, ref_ptr++){
for(i_ptr = i_ptr; i_ptr < end_ptr; i_ptr++, ref_ptr++){
sp68[0] = sp68[1] = sp68[2] = 0.0f;
sp74[0] = ref_ptr->v.ob[0];\
@@ -275,4 +274,4 @@ void func_80333D48(BKVertexList *arg0, f32 position[3], f32 rotation[3], f32 sca
i_ptr->v.cn[2] = (s8)((ref_ptr->v.cn[2]*sp68[2])/256.0);
}
}
#endif;
#endif

View File

@@ -66,45 +66,42 @@ void func_8033CE40(void) {
}
#endif
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_B5E00/func_8033CFD4.s")
#else
int func_8033CFD4(s32 gamenum){
s32 prev = D_80383F00[gamenum];
s32 next = D_80383F04;
u32 i;
s32 func_8033CFD4(s32 gamenum){
s32 next;
s32 var_s3;
u32 i = 3;
s32 tmp_s1;
SaveData *tmp_s2;
SaveData *var_a1;
D_80383F00[gamenum] = next;
bcopy(&D_80383D20[D_80383F00[prev]], &D_80383D20[next], 0x78);
tmp_s2 = &D_80383D20[D_80383F04];
tmp_s2->unk1 = gamenum + 1;
savedata_update_crc(tmp_s2, 0x78);
for(i = 3; i > 0; i--){//L8033D070
tmp_s1 = func_8033CC98(next, tmp_s2);
var_s3 = D_80383F04;
next = D_80383F00[gamenum];
D_80383F00[gamenum] = D_80383F04;
bcopy(&D_80383D20[next], &D_80383D20[var_s3], 0x78);
var_a1 = D_80383D20 + var_s3;
var_a1->unk1 = gamenum + 1;
savedata_update_crc(var_a1, sizeof(SaveData));
for(tmp_s1 = 1; tmp_s1 && i > 0; i--){//L8033D070
tmp_s1 = func_8033CC98(var_s3, var_a1);
if(!tmp_s1){
func_8033CE14(gamenum);
}
if(!tmp_s1)
break;
}
if(!tmp_s1){
for(i = 3; i > 0; i--){//L8033D070
tmp_s1 = func_8033CCD0(prev);
tmp_s1 = func_8033CCD0(next);
if(!tmp_s1)
break;
}
}
if(tmp_s1){
D_80383F00[gamenum] = prev;
D_80383F00[gamenum] = next;
}
else{
D_80383F04 = prev;
D_80383F04 = next;
}
return tmp_s1;
}
#endif
void func_8033D0FC(s32 gamenum){
s32 filenum = D_80383F00[gamenum];

View File

@@ -291,7 +291,7 @@ f32 func_803603AC(Actor *this, s32 arg1, u8 arg2){
sp2C[2] = (this->position[2] - sp20[2]);
den =(sp2C[0]*sp2C[0] + sp2C[2]*sp2C[2]);
if(den);
// if(den);
num = (sp2C[1] - arg1);
if(num == 0.0 || den == 0.0)
return 0.0f;

View File

@@ -84,7 +84,7 @@ segments:
- [0x13900, c, code_13900] #DONE
- [0x13A00, c, code_13A00] #DONE
- [0x13FC0, c, code_13FC0] #DONE
- [0x13FC0, c, code_14420] #DONE
- [0x14420, c, code_14420] #DONE
- [0x15F20, c, code_15F20] #DONE
- [0x16010, c, code_16010] #DONE
- [0x16C60, c, code_16C60] #DONE