add an overdraw buffer to allow for layered rendering
This commit is contained in:
@@ -81,6 +81,7 @@ static const uint8_t font[128][FONT_ROWS] = {
|
||||
*/
|
||||
void
|
||||
put_char(
|
||||
framebuffer_e framebuffer,
|
||||
char c,
|
||||
uint32_t x,
|
||||
uint32_t y,
|
||||
@@ -107,6 +108,7 @@ put_char(
|
||||
? fg_color : bg_color;
|
||||
|
||||
put_rect(
|
||||
framebuffer,
|
||||
x + col * size,
|
||||
y + row * size,
|
||||
size,
|
||||
@@ -121,6 +123,7 @@ put_char(
|
||||
|
||||
void
|
||||
put_string(
|
||||
framebuffer_e framebuffer,
|
||||
const char *text,
|
||||
uint32_t x,
|
||||
uint32_t y,
|
||||
@@ -137,7 +140,7 @@ put_string(
|
||||
x = start_x;
|
||||
y += (FONT_ROWS + line_spacing) * size;
|
||||
} else {
|
||||
put_char(*text, x, y, size, fg_color, bg_color);
|
||||
put_char(framebuffer, *text, x, y, size, fg_color, bg_color);
|
||||
x += (FONT_COLS + spacing) * size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user