From 4e6cc85ec4267934c77457332bef5f59352c1315 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 3 Jan 2014 02:21:15 +0100 Subject: Now with blink. --- host/matelight/main.c | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) (limited to 'host/matelight/main.c') diff --git a/host/matelight/main.c b/host/matelight/main.c index 7633507..6a714a8 100644 --- a/host/matelight/main.c +++ b/host/matelight/main.c @@ -9,6 +9,7 @@ #include #include #include +#include /* CAUTION: REQUIRES INPUT TO BE \0-TERMINATED */ int console_render(char *s, glyph_t **glyph_table, unsigned int glyph_table_size){ @@ -121,7 +122,6 @@ int console_render(char *s, glyph_t **glyph_table, unsigned int glyph_table_size goto error; } for(int i=0; iy usually is a negative index of the glyph's baseline measured from the glyph's bottom int uly = gbufheight + g->y; - printf("Generating strikethrough at y=%d, underline at y=%d\n", sty, uly); for(int i=0; iwidth; i++){ if(style.strikethrough) *((color_t *)(gbuf + (sty*gbufwidth + x + i)*3)) = fg; @@ -290,16 +275,6 @@ int console_render(char *s, glyph_t **glyph_table, unsigned int glyph_table_size x += g->width; } - printf("Rendering buffer of size %d*%d\n", gbufwidth, gbufheight); - for(unsigned int y=0; y < gbufheight; y++){ - for(unsigned int x=0; x < gbufwidth; x++){ - color_t c = *((color_t *)(gbuf + (y*gbufwidth + x)*3)); - //printf("\033[0m%02x,%02x,%02x-%02x\033[38;5;%dm█", c.r, c.g, c.b, xterm_color_index(c), xterm_color_index(c)); - printf("\033[38;5;%dm█", xterm_color_index(c)); - } - printf("\n"); - } - return 0; color_t lastfg = {0, 0, 0}, lastbg = {0, 0, 0}; printf("\e[38;5;0;48;5;0m"); for(unsigned int y=0; y < gbufheight; y+=2){ @@ -358,12 +333,16 @@ int main(int argc, char **argv){ fprintf(stderr, "Error reading font file.\n"); return 1; } - for(unsigned int i=1; i