core2/code_B5E00.c progress
This commit is contained in:
@@ -111,29 +111,32 @@ 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);
|
||||
|
||||
temp_t0 = ((u16 *) (arg0 + 1))[_x + _y * arg0->w];
|
||||
// using the texture @ pixel (x,y)
|
||||
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);
|
||||
|
||||
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;
|
||||
var_v0 = ((u16*)(texture + 1)) + x + y * texture->w;
|
||||
|
||||
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){
|
||||
|
@@ -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];\
|
||||
@@ -269,10 +268,10 @@ void func_80333D48(BKVertexList *arg0, f32 position[3], f32 rotation[3], f32 sca
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
i_ptr->v.cn[0] = (s8)((ref_ptr->v.cn[0]*sp68[0])/256.0);
|
||||
i_ptr->v.cn[1] = (s8)((ref_ptr->v.cn[1]*sp68[1])/256.0);
|
||||
i_ptr->v.cn[2] = (s8)((ref_ptr->v.cn[2]*sp68[2])/256.0);
|
||||
}
|
||||
}
|
||||
#endif;
|
||||
#endif
|
||||
|
@@ -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];
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user