Optimise screen scroll a bit, Edit display of filesizes

This commit is contained in:
Such Meme, Many Skill
2020-04-23 14:40:55 +02:00
parent 4c4a6511f3
commit bd99e2a138
7 changed files with 28 additions and 7 deletions

View File

@@ -269,6 +269,12 @@ void gfx_putc(char c)
if (gfx_con.y > gfx_ctxt.height - 8)
gfx_con.y = 0;
}
else if (c == '\e')
gfx_con.x = 672;
else if (c == '\a')
gfx_con.x = 608;
else if (c == '\r')
gfx_con.x = 0;
break;
}
@@ -513,6 +519,12 @@ void gfx_set_rect_grey(const u8 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos
}
}
void gfx_boxGrey(int x0, int y0, int x1, int y1, u8 shade){
for (int y = y0; y <= y1; y++){
memset(gfx_ctxt.fb + y * gfx_ctxt.stride + x0, shade, (x1 - x0) * 4);
}
}
void gfx_box(int x0, int y0, int x1, int y1, u32 color){
for (int x = x0; x < x1 + 1; x++){
for (int y = y0; y < y1 + 1; y++){

View File

@@ -50,6 +50,7 @@ void gfx_set_rect_rgb(const u8 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos_
void gfx_set_rect_argb(const u32 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos_y);
void gfx_render_bmp_argb(const u32 *buf, u32 size_x, u32 size_y, u32 pos_x, u32 pos_y);
void gfx_box(int x0, int y0, int x1, int y1, u32 color);
void gfx_boxGrey(int x0, int y0, int x1, int y1, u8 shade);
// Global gfx console and context.
gfx_ctxt_t gfx_ctxt;