progress definining core1 .data & .rodata sections

This commit is contained in:
Banjo Kazooie
2022-11-29 20:12:31 -06:00
parent 8badd5bb3e
commit 644ce813b0
45 changed files with 289 additions and 206 deletions

View File

@@ -25,7 +25,7 @@ void func_802BE940(void) {
sp3C[1] = -1.0f;
ml_vec3f_pitch_rotate_copy(sp24, sp3C, 68.0f);
sp1C = 0.0f;
sp34 = sp24[1] * ((f32) D_80276588 / (f32) D_8027658C);
sp34 = sp24[1] * ((f32) framebuffer_width / (f32) framebuffer_height);
D_8037DA40[0] = sp24[0];
D_8037DA40[1] = sp24[1];
D_8037DA40[2] = sp24[2];

View File

@@ -10,8 +10,8 @@ extern void func_8033DC18(void);
extern f32 func_8033DC20(void);
extern void func_8033DC9C(f32);
extern s32 D_80276588; //framebuffer_width
extern s32 D_8027658C; //framebuffer_height
extern s32 framebuffer_width; //framebuffer_width
extern s32 framebuffer_height; //framebuffer_height
extern s16 D_803A5D00[2][0xF660]; //framebuffer
/* .bss */
@@ -34,7 +34,7 @@ void func_802E31D0(s32 arg0) {
if ((temp_v0 == 0) || (temp_v0 == 3)) {
func_8024A85C(arg0);
func_80249DE0(0, 0, D_8037E8C0.unkC, 0, 0);
osWritebackDCache(D_803A5D00[arg0], (s32) ((f32) D_80276588 * (f32) D_8027658C * sizeof(s16)));
osWritebackDCache(D_803A5D00[arg0], (s32) ((f32) framebuffer_width * (f32) framebuffer_height * sizeof(s16)));
}
}
@@ -52,14 +52,14 @@ void func_802E329C(s32 arg0, Gfx **gfx_begin, Gfx **gfx_end) {
vtx_start = vtx;
func_802539AC(&gfx, arg0);
if (D_8037E8C0.unk14 == 2) {
func_80254084(&gfx, 0, 0, (s32) (f32) D_80276588, (s32) (f32) D_8027658C, 0, 0, 0);
func_80254084(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0);
}
if ((D_8037E8C0.unk14 == 0) || (D_8037E8C0.unk14 == 3)) {
func_8024C904(&gfx, &mtx);
gcbound_draw(&gfx);
}
if (D_8037E8C0.unk14 == 1) {
func_80254084(&gfx, 0, 0, (s32) (f32) D_80276588, (s32) (f32) D_8027658C, 0, 0, 0);
func_80254084(&gfx, 0, 0, (s32) (f32) framebuffer_width, (s32) (f32) framebuffer_height, 0, 0, 0);
func_8024C904(&gfx, &mtx);
func_802F1858(D_8037E8C0.unk10, &gfx, &mtx, &vtx);
}

View File

@@ -481,7 +481,7 @@ void func_802E6628(s32 arg0, char *arg1) {
sp2C = func_802E4E54(0);
arg0 *= D_8037E900->unk4[sp2C].height;
func_802E502C((s32) (((f32) D_80276588 - (f32) func_802E51A4(arg1, sp2C, 0, D_8037E900->flags)) / 2), arg0, sp2C, arg1, sp28);
func_802E502C((s32) (((f32) framebuffer_width - (f32) func_802E51A4(arg1, sp2C, 0, D_8037E900->flags)) / 2), arg0, sp2C, arg1, sp28);
}
void func_802E66F0(s32 arg0, char *arg1) {
@@ -491,7 +491,7 @@ void func_802E66F0(s32 arg0, char *arg1) {
sp24 = func_802E4E54(0);
arg0 *= D_8037E900->unk4[sp24].height;
func_802E502C((s32) (((f32) D_80276588 - (f32) func_802E51A4(arg1, sp24, 0, D_8037E900->flags)) / 2), arg0, sp24, arg1, D_8037E900->unk1C);
func_802E502C((s32) (((f32) framebuffer_width - (f32) func_802E51A4(arg1, sp24, 0, D_8037E900->flags)) / 2), arg0, sp24, arg1, D_8037E900->unk1C);
}
void func_802E67AC(void){

View File

@@ -100,7 +100,7 @@ void func_802F1440(Struct_Core2_6A4B0_2 *arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx)
gSPVertex((*gfx)++, osVirtualToPhysical(sp9C), 16, 0);
for(sp4C = 0; sp4C < 6; sp4C++){
for(sp50 = 0; sp50 < 9; sp50++){
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical((u16*)arg0->unk8 + (sp4C*0x20 + 0xC) * D_80276588 + (sp50*0x20 + 1)), G_IM_FMT_RGBA, G_IM_SIZ_16b, D_80276588, 0, 0, 0, 33, 33, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical((u16*)arg0->unk8 + (sp4C*0x20 + 0xC) * framebuffer_width + (sp50*0x20 + 1)), G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, 0, 0, 0, 33, 33, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
for(sp54 = 0; sp54 < 2; sp54++){
gSP1Triangle((*gfx)++, var_s3, var_s3 + 1, var_s3 + 2, 0);
var_s3 += 3;
@@ -154,12 +154,12 @@ Struct_Core2_6A4B0_2 *func_802F18F0(void){
void func_802F1934(Struct_Core2_6A4B0_2 * arg0, s32 arg1){
func_802F18B8(arg0);
arg0->unk4 = malloc(D_80276588*D_8027658C*sizeof(u16) + 0x10);
arg0->unk4 = malloc(framebuffer_width*framebuffer_height*sizeof(u16) + 0x10);
arg0->unk8 = arg0->unk4;
while((arg0->unk8 & 0x10) == 0){
(arg0->unk8)++;
}
func_80253010(arg0->unk8, D_803A5D00[arg1], D_80276588*D_8027658C*sizeof(u16));
func_80253010(arg0->unk8, D_803A5D00[arg1], framebuffer_width*framebuffer_height*sizeof(u16));
osWriteBackDCacheAll();
}
@@ -186,8 +186,8 @@ void func_802F1A10(Struct_Core2_6A4B0_2 *arg0, f32 arg1) {
cos = cosf(arg1 * 2 * BAD_PI);
sin = sinf(arg1 * 2 * BAD_PI);
func_8024C5CC(spC0);
spCC[0] = (-(D_80276588 / 2) * 4) + 8;
spCC[1] = ((D_8027658C / 2) * 4) - 0x38;
spCC[0] = (-(framebuffer_width / 2) * 4) + 8;
spCC[1] = ((framebuffer_height / 2) * 4) - 0x38;
spCC[2] = -0xA;
for(var_s6 = 0; var_s6 < 6; var_s6++){
for(var_s4 = 0; var_s4 < 9; var_s4++){

View File

@@ -83,23 +83,23 @@ void func_802F1FC0(Struct65s *self, Gfx **gfx, Mtx **mtx, Vtx **vtx) {
func_8025235C(&spD0, &spD0);
spD0[0] = (-297.0f * spD0[0]) / spD0[2];
spD0[1] = (297.0f * spD0[1]) / spD0[2];
spC4 = (s32) (spD0[0] + (f32) (D_80276588 / 2));
spC0 = (s32) (spD0[1] + (f32) (D_8027658C / 2));
spC4 = (s32) (spD0[0] + (f32) (framebuffer_width / 2));
spC0 = (s32) (spD0[1] + (f32) (framebuffer_height / 2));
if (spC4 < 0) {
spC4 = 0;
} else if (D_80276588 - 0x20 < spC4) {
spC4 = D_80276588 - 0x20;
} else if (framebuffer_width - 0x20 < spC4) {
spC4 = framebuffer_width - 0x20;
}
if (spC0 < 0) {
spC0 = 0;
} else if (D_8027658C - 0x20 < spC0) {
spC0 = D_8027658C - 0x20;
} else if (framebuffer_height - 0x20 < spC0) {
spC0 = framebuffer_height - 0x20;
}
gSPDisplayList((*gfx)++, D_80368AC0);
func_80347FC0(gfx, D_80368AB0[1].unk0, 0, 0, 0, 0, 0, NULL, NULL, &width, &height);
temp_addr = &D_803A5D00[func_8024BD80()][spC0*D_80276588 + (spC4 & 0xFFFC)];
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, D_80276588, temp_addr);
temp_addr = &D_803A5D00[func_8024BD80()][spC0*framebuffer_width + (spC4 & 0xFFFC)];
gDPSetTextureImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, temp_addr);
gDPSetTile((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 9, 0x0080, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD);
gDPLoadSync((*gfx)++);
gDPLoadTile((*gfx)++, G_TX_LOADTILE, 0, 0, 0x008C, 0x007C);

View File

@@ -738,14 +738,14 @@ void _printbuffer_draw_letter(s32 letter, f32* xPtr, f32* yPtr, f32 arg3, Gfx **
f32 temp_f24;
f32 temp_f0_3;
spC0 = f28 - (D_8027658C - 1)*0.5;
spC0 = f28 - (framebuffer_height - 1)*0.5;
temp_f24 = sp214->x - 1.0;
spD0 = sp214->y - 1.0;
gSPVertex((*gfx)++, *vtx, 4, 0);
for(f28 = 0.0f; f28 < 2.0f; f28+= 1.0f){
for(temp_f0_3 = 0.0f; temp_f0_3 < 2.0f; temp_f0_3 += 1.0f){
(*vtx)->v.ob[0] = (s16)(((f64)sp214->x*arg3*temp_f0_3 + ((f64)sp200 - D_80276588 * 0.5)) * 4.0);
(*vtx)->v.ob[1] = (s16)(((f64)spD0*arg3*f28 + ((f64)sp200 - D_80276588 * 0.5)) * 4.0);
(*vtx)->v.ob[0] = (s16)(((f64)sp214->x*arg3*temp_f0_3 + ((f64)sp200 - framebuffer_width * 0.5)) * 4.0);
(*vtx)->v.ob[1] = (s16)(((f64)spD0*arg3*f28 + ((f64)sp200 - framebuffer_width * 0.5)) * 4.0);
(*vtx)->v.ob[2] = -0x14;
(*vtx)->v.tc[0] = (s16)(temp_f0_3*temp_f24*64.0f);
(*vtx)->v.tc[1] = (s16)(f28*spD0*64.0f);

View File

@@ -6,8 +6,8 @@ f32 time_getDelta(void);
f32 func_802FB0DC(struct8s *);
f32 func_802FB0E4(struct8s *);
extern s32 D_80276588; //framebuffer_w
extern s32 D_8027658C; //framebuffer_h
extern s32 framebuffer_width; //framebuffer_w
extern s32 framebuffer_height; //framebuffer_h
Gfx D_80369920[] = {
@@ -152,8 +152,8 @@ void func_802FD360(struct8s *arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx){
tmp_f26 = (arg0->unk20 == ITEM_0_HOURGLASS_TIMER && spAC == 0x10) ? 1.0f : 0.0f;
for(tmp_s4 = 0; tmp_s4 < 2; tmp_s4++){//L802FD528
for(tmp_s2 = 0; tmp_s2 < 2; tmp_s2++){//
(*vtx)->v.ob[0] = ((func_802FB0DC(arg0) + (((spAC*arg0->unk40*tmp_s2 - spAC*arg0->unk40/2) - (f32)D_80276588/2) + arg0->unk38)) + tmp_f26) * 4.0f;
(*vtx)->v.ob[1] = ((((spA8*arg0->unk40/2 - spA8*arg0->unk40*tmp_s4) + (f32)D_8027658C/2) - arg0->unk3C) - func_802FB0E4(arg0)*arg0->unk4C)*4.0f;
(*vtx)->v.ob[0] = ((func_802FB0DC(arg0) + (((spAC*arg0->unk40*tmp_s2 - spAC*arg0->unk40/2) - (f32)framebuffer_width/2) + arg0->unk38)) + tmp_f26) * 4.0f;
(*vtx)->v.ob[1] = ((((spA8*arg0->unk40/2 - spA8*arg0->unk40*tmp_s4) + (f32)framebuffer_height/2) - arg0->unk3C) - func_802FB0E4(arg0)*arg0->unk4C)*4.0f;
(*vtx)->v.ob[2] = -0x14;
(*vtx)->v.tc[0] = ((spAC -1) * tmp_s2) << 6;
(*vtx)->v.tc[1] = ((spA8 -1) * tmp_s4) << 6;

View File

@@ -139,8 +139,8 @@ void func_802FDEE0(s32 arg0, struct8s *arg1, Gfx **arg2, Mtx **arg3, Vtx **arg4)
}
}
}
sp128 = (244.0f - ((f32) D_80276588 / 2));
sp124 = func_802FB0E4(arg1) + ((f32) D_8027658C / 2) - 246.0f;
sp128 = (244.0f - ((f32) framebuffer_width / 2));
sp124 = func_802FB0E4(arg1) + ((f32) framebuffer_height / 2) - 246.0f;
guTranslate(*arg3, sp128 * 4.0f, sp124 * 4.0f, 0.0f);
gSPMatrix((*arg2)++, OS_K0_TO_PHYSICAL((*arg3)++), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guRotate(*arg3, func_802FDE60(D_803815D8 + D_803815DC), 0.0f, 0.0f, 1.0f);

View File

@@ -14,7 +14,7 @@ void func_802FEDE0(BKTextureList *texture_list, s32 indx, s32 x_offset, s32 y_of
frame_buffer_ptr = D_803A5D00[func_8024BDA0()];
for(y = 0; y < 32; y++){//L802FEE60
for(x = 0; x < 32; x++){//L802FEE68
sp24[32*(31 - y) + x] = frame_buffer_ptr[(y_offset + y)*D_80276588 + (x_offset + x)] | 1; //framebuffer to texture???
sp24[32*(31 - y) + x] = frame_buffer_ptr[(y_offset + y)*framebuffer_width + (x_offset + x)] | 1; //framebuffer to texture???
};
};
}
@@ -25,12 +25,12 @@ void func_802FEF48(BKModelBin *model_bin){
s32 x, y;
texture_list = func_8033A104(model_bin);
osInvalDCache((void *)D_803A5D00[func_8024BDA0()], D_80276588 * D_8027658C*2);
osInvalDCache((void *)D_803A5D00[func_8024BDA0()], framebuffer_width * framebuffer_height*2);
for(y = 0; y < 8; y++){//L802FEFEC
for(x = 0; x < 10; x++){
//get textures from framebuffer???
func_802FEDE0(texture_list, 10*y + x, 32*x + (D_80276588 - 10*32)/2, (s32)32*y + (D_8027658C - 8*32)/2);
func_802FEDE0(texture_list, 10*y + x, 32*x + (framebuffer_width - 10*32)/2, (s32)32*y + (framebuffer_height - 8*32)/2);
}
};

View File

@@ -188,8 +188,8 @@ void fxjinjoscore_draw(s32 arg0, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vtx **vtx
// 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);
}
center_x = pos_x - (f32) D_80276588 / 2 + x_offset;
center_y = (f32) D_8027658C / 2 + func_802FB0E4(arg1) - 266.0f + 40.0f + y_offset - D_80381E78[jinjo_id];
center_x = pos_x - (f32) framebuffer_width / 2 + x_offset;
center_y = (f32) framebuffer_height / 2 + func_802FB0E4(arg1) - 266.0f + 40.0f + y_offset - D_80381E78[jinjo_id];
gSPVertex((*gfx)++, *vtx, 4, 0);
// Set up the positions of the four vertices
for(i = 0; i < 2; i++){

View File

@@ -154,9 +154,9 @@ void func_802FFED4(s32 item_id, struct8s *arg1){
// var_fp = var_s4 + 4;
// sp104 = temp_v0_5;
// }
// temp_s5 = (s32) ((40.0f - ((f32) D_80276588 / 2.0f)) + (f32) spE0);
// temp_s5 = (s32) ((40.0f - ((f32) framebuffer_width / 2.0f)) + (f32) spE0);
// temp_f12 = (f32) temp_s5;
// temp_f14 = (f32) (s32) (((((f32) D_8027658C / 2.0f) - func_802FB0E4(arg1)) - -16.0f) - (f32) spDC);
// temp_f14 = (f32) (s32) (((((f32) framebuffer_height / 2.0f) - func_802FB0E4(arg1)) - -16.0f) - (f32) spDC);
// for(var_v1 = 0; var_v1 != var_s2; var_v1++){
// temp_f2 = (f32) var_v1;
// temp_s2 = var_s2 - 1;

View File

@@ -4,8 +4,8 @@
extern f32 func_802FB0E4(struct8s*);
extern s32 D_80276588;
extern s32 D_8027658C;
extern s32 framebuffer_width;
extern s32 framebuffer_height;
/* .data */
BKSprite * D_8036A910 = NULL;
@@ -105,8 +105,8 @@ void func_80300D0C(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vt
else{//L80300F58
gDPSetPrimColor((*gfx)++, 0, 0, 0xFF, 0xFF, 0xFF, 0x78);
}
f20 = 96.0f - (f32)D_80276588/2 + (i*13);
f14 = (f32)D_8027658C/2 - func_802FB0E4(arg1) - D_80381F08[s6] - -48.0f;
f20 = 96.0f - (f32)framebuffer_width/2 + (i*13);
f14 = (f32)framebuffer_height/2 - func_802FB0E4(arg1) - D_80381F08[s6] - -48.0f;
f14 = (i & 1) ? f14 + 5.75 : f14 - 5.75;
gSPVertex((*gfx)++, *vtx, 4, 0);
for(tmp_v1 = 0; tmp_v1 < 2; tmp_v1++){//L8030101C

View File

@@ -80,8 +80,8 @@ void func_803017D0(enum item_e item_id, struct8s *arg1, Gfx **gfx, Mtx **mtx, Vt
}
temp_f16 = func_802FB0E4(arg1);
temp_f16 = (-40.0f + temp_f16);
var_f14 = (temp_f16 + D_80381F68[var_s6]) - ((f32) D_80276588 / 2);
temp_f16 = (((var_s4 * 15.5) + 78.0) - ((f32) D_8027658C / 2));
var_f14 = (temp_f16 + D_80381F68[var_s6]) - ((f32) framebuffer_width / 2);
temp_f16 = (((var_s4 * 15.5) + 78.0) - ((f32) framebuffer_height / 2));
var_f14 = (var_s4 & 1) ? var_f14 + 5.0f : var_f14 - 5.0f;
gSPVertex((*gfx)++, *vtx, 4, 0);
for(var_v1 = 0; var_v1 < 2; var_v1++){

View File

@@ -40,10 +40,10 @@ void func_80314BB0(Gfx **gfx, Mtx **mtx, Vtx **vtx, void * frame_buffer_1, void
s32 y;
gSPDisplayList((*gfx)++, D_8036C630);
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, D_80276588, OS_PHYSICAL_TO_K0(frame_buffer_1));
for(y = 0; y < D_8027658C / 32 + 1; y++){
for(x = 0; x < D_80276588 / 32 + 1; x++){
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical(frame_buffer_2), G_IM_FMT_RGBA, G_IM_SIZ_16b, D_80276588, D_8027658C,
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(frame_buffer_1));
for(y = 0; y < framebuffer_height / 32 + 1; y++){
for(x = 0; x < framebuffer_width / 32 + 1; x++){
gDPLoadTextureTile((*gfx)++, osVirtualToPhysical(frame_buffer_2), G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, framebuffer_height,
0x20*x, 0x20*y, 0x20*(x + 1) - 1, 0x20*(y + 1) - 1,
NULL, G_TX_CLAMP, G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, 0, 0
);
@@ -53,7 +53,7 @@ void func_80314BB0(Gfx **gfx, Mtx **mtx, Vtx **vtx, void * frame_buffer_1, void
}
}
gSPDisplayList((*gfx)++, D_8036C690);
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, D_80276588, OS_PHYSICAL_TO_K0(D_803A5D00[func_8024BDA0()]));
gDPSetColorImage((*gfx)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, framebuffer_width, OS_PHYSICAL_TO_K0(D_803A5D00[func_8024BDA0()]));
}
void func_80315084(Gfx **gfx, Mtx **mtx, Vtx **vtx){

View File

@@ -27,7 +27,7 @@ void func_80334540(Gfx** gdl, Mtx **mptr, Vtx **vptr) {
f32 sp40;
if (D_803835E0 == 0) {
func_80254084(gdl, 0, 0, D_80276588, D_8027658C, 0, 0, 0);
func_80254084(gdl, 0, 0, framebuffer_width, framebuffer_height, 0, 0, 0);
func_802BBD2C(&sp44, &sp40);
func_8024CE60(sp44, sp40);
func_8024C904(gdl, mptr);

View File

@@ -136,14 +136,14 @@ void func_80350818(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
sp9C[2] = temp_s1->unk4[2];
ml_vec3f_yaw_rotate_copy(sp9C, sp9C, -spD0[1]);
ml_vec3f_pitch_rotate_copy(sp9C, sp9C, -spD0[0]);
if (!(((1.2 * (f32)D_80276588) / 2) < sp9C[0]) && !(sp9C[0] < ((-1.2 * (f32)D_80276588) / 2))) {
if (!(((1.2 * (f32)D_8027658C) / 2) < sp9C[1]) && !(sp9C[1] < ((-1.2 * (f32)D_8027658C) / 2))) {
if (!(((1.2 * (f32)framebuffer_width) / 2) < sp9C[0]) && !(sp9C[0] < ((-1.2 * (f32)framebuffer_width) / 2))) {
if (!(((1.2 * (f32)framebuffer_height) / 2) < sp9C[1]) && !(sp9C[1] < ((-1.2 * (f32)framebuffer_height) / 2))) {
sp90[0] = -sp9C[0];
sp90[1] = -sp9C[1];
sp90[2] = sp9C[2];
ml_vec3f_pitch_rotate_copy(sp90, sp90, spD0[0]);
ml_vec3f_yaw_rotate_copy(sp90, sp90, spD0[1]);
var_f22 = 1.0f - (((sp9C[0] * sp9C[0]) + (sp9C[1] * sp9C[1])) / ((f32)D_8027658C * (f32)D_8027658C));
var_f22 = 1.0f - (((sp9C[0] * sp9C[0]) + (sp9C[1] * sp9C[1])) / ((f32)framebuffer_height * (f32)framebuffer_height));
if (var_f22 < 0.0f) {
var_f22 = 0.0f;
}
@@ -181,7 +181,7 @@ void func_80350BFC(void) {
if (D_80386170.unk4 != NULL) {
D_80386170.unk0 = func_80350780(D_80386170.unk4->unk10);
D_80386170.unk8 = assetcache_get(0x882);
ml_vec3f_set_length(D_80386170.unk4->unk4, (2*(f32)D_80276588) / 2);
ml_vec3f_set_length(D_80386170.unk4->unk4, (2*(f32)framebuffer_width) / 2);
D_8038617C.unk0 = 1;
D_8038617C.unk1 = 0;
}

View File

@@ -26,7 +26,7 @@ u8 _gcbound_blue; //D_80380902
void _gcbound_draw(Gfx** dl, s32 a, s32 r, s32 g, s32 b){
gSPDisplayList((*dl)++, &D_803688E8);
gDPSetFogColor((*dl)++, r, g, b, a);
gSPTextureRectangle((*dl)++, 0, 0, (D_80276588-1)<<2, (D_8027658C-1)<<2, 0, 0, 0, 0x100, 0x100);
gSPTextureRectangle((*dl)++, 0, 0, (framebuffer_width-1)<<2, (framebuffer_height-1)<<2, 0, 0, 0, 0x100, 0x100);
}
void gcbound_draw(Gfx** dl){

View File

@@ -1280,7 +1280,7 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
}
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, 30.0f, 196.0f, 1, (s32) D_80383010.left_joystick_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, (f32) (D_80276588 - 0x1E), 196.0f, 0, (s32) D_80383010.right_joystick_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, (f32) (framebuffer_width - 0x1E), 196.0f, 0, (s32) D_80383010.right_joystick_alpha);
var_a0 =((*((u32 *)&D_80383010.state) << 0x1c) >> 0x1f); //left_joystick_visible
if ( var_a0 != 0) {
if (D_80383010.left_joystick_alpha < 0xFF) {
@@ -1303,7 +1303,7 @@ void gcpausemenu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
D_80383010.right_joystick_alpha = (D_80383010.right_joystick_alpha - 0xC > 0) ? D_80383010.right_joystick_alpha - 0xC : 0;
}
}
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.b_button_sprite, (s32) D_80383010.b_button_frame, D_80276588 * 0.5, 196.0f, 0, (s32) D_80383010.b_button_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.b_button_sprite, (s32) D_80383010.b_button_frame, framebuffer_width * 0.5, 196.0f, 0, (s32) D_80383010.b_button_alpha);
var_a0 = ((*((u32 *)&D_80383010.state) << 0x1e) >> 0x1f);//b_button_visible
if (var_a0 != 0) {
if (D_80383010.b_button_alpha < 0xFF) {

View File

@@ -76,7 +76,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
func_8024CE60(5.0f, 15000.0f);
if(gcSky.model_bins[0]){
func_80254084(gfx, 0, 0, (s32)(f32) D_80276588, (s32)(f32)D_8027658C,0, 0, 0); //fill screen with black
func_80254084(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height,0, 0, 0); //fill screen with black
func_8024C904(gfx, mtx);
func_8024C5CC(position);
for(i = 0; i < 3; i++){
@@ -90,7 +90,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
}
}
else{//L8030B200
func_80254084(gfx, 0, 0, (s32)(f32) D_80276588, (s32)(f32)D_8027658C, 0, 0, 0);
func_80254084(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height, 0, 0, 0);
}//L8030B254
}

View File

@@ -869,7 +869,7 @@ void func_803164B0(gczoombox_t *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4,
}
sp2C[1] = this->unk172 + ((f32) arg4 * this->unk198);
sp2C[2] = -10.0f;
func_80252330((sp2C[0] * 4.0f) - ((f32)D_80276588 * 2), ((f32)D_8027658C * 2) - (sp2C[1] * 4.0f), sp2C[2]);
func_80252330((sp2C[0] * 4.0f) - ((f32)framebuffer_width * 2), ((f32)framebuffer_height * 2) - (sp2C[1] * 4.0f), sp2C[2]);
temp_f12 = (f32) ((f64) this->unk198 * 0.8);
mlMtxScale_xyz(temp_f12, temp_f12, 1.0f);
mlMtxApply(*mtx);
@@ -1413,8 +1413,8 @@ gczoombox_t *gczoombox_new(s32 arg0, enum talk_pic_e portrait_id, s32 arg2, s32
this->unk1A4_24 = arg3;
if(this->unk1A4_24){
this->unk16A = 45;
this->unk174 = D_80276588 - 0x25;
this->unk170 = D_80276588 + 0x66;
this->unk174 = framebuffer_width - 0x25;
this->unk170 = framebuffer_width + 0x66;
}else{
this->unk16A = 71;
this->unk174 = 0x25;
@@ -1610,9 +1610,9 @@ void func_80318640(gczoombox_t *this, s32 arg1, f32 arg2, f32 arg3, s32 arg4) {
if (this != NULL) {
if (this->unk1A4_24) {
this->unk174 = D_80276588 - arg1;
this->unk174 = framebuffer_width - arg1;
this->unk16A = arg1 + (8.0f * arg2);
this->unk170 = (D_80276588 - arg1) + 0x8B;
this->unk170 = (framebuffer_width - arg1) + 0x8B;
} else {
this->unk174 = arg1;
phi_v0 = arg4 ? 0x28 : 0x22;