From: chaoskagami Date: Fri, 1 Jul 2016 12:56:43 +0000 (-0400) Subject: Wow. Oversight on background of text. X-Git-Tag: v0.2.0~47 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=5eb6439270bd47b03340cb8cde509466afd84e00;p=corbenik%2Fcorbenik.git Wow. Oversight on background of text. --- diff --git a/source/std/draw.c b/source/std/draw.c index 77110b6..6fd764a 100644 --- a/source/std/draw.c +++ b/source/std/draw.c @@ -35,6 +35,10 @@ static int dim_factor_bottom = 0; uint8_t *top_bg; uint8_t *bottom_bg; +unsigned char color_top = 0xf0; +unsigned char color_bottom = 0xf0; +int kill_output = 0; + void std_init() { top_bg = static_allocate(TOP_SIZE); bottom_bg = static_allocate(BOTTOM_SIZE); @@ -330,9 +334,9 @@ draw_character(uint8_t *screen, const uint32_t character, int ch_x, int ch_y, co unsigned char char_dat = ((char*)FCRAM_FONT_LOC)[(character - ' ') * (c_font_w * font_h) + yy]; for(unsigned int i=0; i < font_w + font_kern; i++) { if (color_bg == 0) { - screen[pos] = 0; - screen[pos + 1] = 0; - screen[pos + 2] = 0; + screen[pos] = buffer_bg[pos]; + screen[pos + 1] = buffer_bg[pos + 1]; + screen[pos + 2] = buffer_bg[pos + 2]; if (buffer_bg[pos] >= dim_factor) screen[pos] = buffer_bg[pos] - dim_factor; if (buffer_bg[pos + 1] >= dim_factor) @@ -347,9 +351,9 @@ draw_character(uint8_t *screen, const uint32_t character, int ch_x, int ch_y, co if (char_dat & 0x80) { if (color_fg == 0) { - screen[pos] = 0; - screen[pos + 1] = 0; - screen[pos + 2] = 0; + screen[pos] = buffer_bg[pos]; + screen[pos + 1] = buffer_bg[pos + 1]; + screen[pos + 2] = buffer_bg[pos + 2]; if (buffer_bg[pos] >= dim_factor) screen[pos] = buffer_bg[pos] - dim_factor; if (buffer_bg[pos + 1] >= dim_factor) @@ -369,10 +373,6 @@ draw_character(uint8_t *screen, const uint32_t character, int ch_x, int ch_y, co } } -unsigned char color_top = 0xf0; -unsigned char color_bottom = 0xf0; -int kill_output = 0; - void shut_up() {