From: xolatile Date: Tue, 29 Apr 2025 13:15:48 +0000 (+0200) Subject: Made things even more brutal... X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;ds=inline;p=xolatile-xuxuxu.git Made things even more brutal... --- diff --git a/screenshot.png b/screenshot.png index 1fa6103..a781068 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/xuxuxu.c b/xuxuxu.c index ca136d3..13c036f 100755 --- a/xuxuxu.c +++ b/xuxuxu.c @@ -20,8 +20,8 @@ #include "xyntax.h" #include "xormat.h" -#define foreground (0xffccccccu) -#define background (0xff181818u) +#define foreground (0xffffffffu) +#define background (0xff000000u) #define font_indent ( 8) #define font_width ( 8) @@ -36,7 +36,7 @@ static natural height = 0; static natural x = 0; static natural y = 0; -static procedure render_character (character character) { +static procedure render_character (character code) { natural_64 font_code [font_count] = { 0x0000000000000000, 0x00180018183c3c18, 0x0000000000363636, 0x006c6cfe6cfe6c6c, 0x00187ed07c16fc30, 0x0060660c18306606, 0x00dc66b61c36361c, 0x0000000000181818, @@ -68,7 +68,7 @@ static procedure render_character (character character) { natural u = offset / font_width + y; natural v = offset % font_width + x; - render [u * width + v] = ((font_code [(natural) (character - ' ')] >> offset) % 2) ? colour : background; + render [u * width + v] = ((font_code [(natural) (code - ' ')] >> offset) % 2) ? colour : background; } x += font_width + 1; @@ -88,8 +88,8 @@ static procedure render_string (character * string, natural length) { } integer main (none) { - natural index = 0; - natural length = 0; + natural index = 0; + natural length = 0; character * buffer = null; character separator [] = ".,:;<=>+-*/%!&~^()[]{}'\" \t\r\n"; @@ -103,20 +103,20 @@ integer main (none) { syntax_structure * syntax = syntax_initialize (0); - syntax_define (syntax, false, false, "#", "\n", '\\', 0xff3377aa, 0); + syntax_define (syntax, false, false, "#", "\n", '\\', 0xff00ff00, 0); syntax_define (syntax, false, false, "//", "\n", '\0', 0xff777777, 0); syntax_define (syntax, false, false, "/*", "*/", '\0', 0xff777777, 0); - syntax_define (syntax, false, false, "'", "'", '\\', 0xff9933cc, 0); - syntax_define (syntax, false, false, "\"", "\"", '\\', 0xffcc3399, 0); - syntax_define (syntax, true, false, ".,:;<=>+-*/%!&~^?|", "", '\0', 0xffccaa33, 0); - syntax_define (syntax, true, false, "(){}[]", "", '\0', 0xffcc3333, 0); + syntax_define (syntax, false, false, "'", "'", '\\', 0xff0000ff, 0); + syntax_define (syntax, false, false, "\"", "\"", '\\', 0xff0000ff, 0); + syntax_define (syntax, true, false, ".,:;<=>+-*/%!&~^?|", "", '\0', 0xffffff00, 0); + syntax_define (syntax, true, false, "(){}[]", "", '\0', 0xffff0000, 0); for (natural_64 word = 0; word < array_length (keywords); ++word) { - syntax_define (syntax, false, true, keywords [word], separator, '\0', 0xff33aacc, 0); + syntax_define (syntax, false, true, keywords [word], separator, '\0', 0xff00ffff, 0); } - syntax_define (syntax, true, true, "0123456789", separator, '\0', 0xffcc77cc, 0); - syntax_define (syntax, true, true, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_", separator, '\0', 0xffcccccc, 0); + syntax_define (syntax, true, true, "0123456789", separator, '\0', 0xffff00ff, 0); + syntax_define (syntax, true, true, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_", separator, '\0', 0xffffffff, 0); buffer = record ();