src/core1: various video/screen/framebuffer related documentations

neue Datei:     include/core1/vimgr.h
        umbenannt:      src/core1/code_E360.c -> src/core1/vimgr.c
This commit is contained in:
mariob92
2024-10-09 08:11:35 +02:00
parent 50138293a4
commit 6050ddbbd2
45 changed files with 398 additions and 368 deletions

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, (framebuffer_width-1)<<2, (framebuffer_height-1)<<2, 0, 0, 0, 0x100, 0x100);
gSPTextureRectangle((*dl)++, 0, 0, (gFramebufferWidth-1)<<2, (gFramebufferHeight-1)<<2, 0, 0, 0, 0x100, 0x100);
}
void gcbound_draw(Gfx** dl){

View File

@@ -1373,7 +1373,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)(framebuffer_width - 0x1E), 196.0f, 0, (s32) D_80383010.right_joystick_alpha);
gcpausemenu_drawSprite(gfx, mtx, vtx, D_80383010.joystick_sprite, D_80383010.joystick_frame, (f32)(gFramebufferWidth - 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) {
@@ -1396,7 +1396,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, framebuffer_width * 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, gFramebufferWidth * 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

@@ -75,7 +75,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
viewport_setNearAndFar(5.0f, 15000.0f);
if(gcSky.model_bins[0]){
drawRectangle2D(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height,0, 0, 0); //fill screen with black
drawRectangle2D(gfx, 0, 0, (s32)(f32) gFramebufferWidth, (s32)(f32)gFramebufferHeight,0, 0, 0); //fill screen with black
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
viewport_getPosition_vec3f(position);
for(i = 0; i < 3; i++){
@@ -89,7 +89,7 @@ void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
}
}
else{//L8030B200
drawRectangle2D(gfx, 0, 0, (s32)(f32) framebuffer_width, (s32)(f32)framebuffer_height, 0, 0, 0);
drawRectangle2D(gfx, 0, 0, (s32)(f32) gFramebufferWidth, (s32)(f32)gFramebufferHeight, 0, 0, 0);
}//L8030B254
}

View File

@@ -861,7 +861,7 @@ void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BK
}
sp2C[1] = this->unk172 + ((f32) arg4 * this->unk198);
sp2C[2] = -10.0f;
func_80252330((sp2C[0] * 4.0f) - ((f32)framebuffer_width * 2), ((f32)framebuffer_height * 2) - (sp2C[1] * 4.0f), sp2C[2]);
func_80252330((sp2C[0] * 4.0f) - ((f32)gFramebufferWidth * 2), ((f32)gFramebufferHeight * 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);
@@ -1402,8 +1402,8 @@ GcZoombox *gczoombox_new(s32 y, GcZoomboxSprite portrait_id, s32 arg2, s32 arg3,
this->unk1A4_24 = arg3;
if(this->unk1A4_24){
this->unk16A = 45;
this->unk174 = framebuffer_width - 0x25;
this->unk170 = framebuffer_width + 0x66;
this->unk174 = gFramebufferWidth - 0x25;
this->unk170 = gFramebufferWidth + 0x66;
}else{
this->unk16A = 71;
this->unk174 = 0x25;
@@ -1604,9 +1604,9 @@ void func_80318640(GcZoombox *this, s32 arg1, f32 arg2, f32 arg3, s32 arg4) {
if (this != NULL) {
if (this->unk1A4_24) {
this->unk174 = framebuffer_width - arg1;
this->unk174 = gFramebufferWidth - arg1;
this->unk16A = arg1 + (8.0f * arg2);
this->unk170 = (framebuffer_width - arg1) + 0x8B;
this->unk170 = (gFramebufferWidth - arg1) + 0x8B;
} else {
this->unk174 = arg1;
phi_v0 = arg4 ? 0x28 : 0x22;