From 810e05d6150b338cc0d0fcc9d338f4fec75568e4 Mon Sep 17 00:00:00 2001 From: bx Date: Fri, 29 Dec 2023 16:22:46 +0000 Subject: Add tentative monochrome mode --- ui.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'ui.c') diff --git a/ui.c b/ui.c index 7728402..04a5631 100644 --- a/ui.c +++ b/ui.c @@ -163,6 +163,36 @@ void uiDraw(void) { fflush(stdout); } + +#define NOA_NO_COLOR +#ifdef NOA_NO_COLOR +static const short Colors[ColorCap] = { + [Default] = -1, + [White] = -1, + [Black] = -1, + [Blue] = -1, + [Green] = -1, + [Red] = -1, + [Brown] = -1, + [Magenta] = -1, + [Orange] = -1, + [Yellow] = -1, + [LightGreen] = -1, + [Cyan] = -1, + [LightCyan] = -1, + [LightBlue] = -1, + [Pink] = -1, + [Gray] = -1, + [LightGray] = -1, + 52, 94, 100, 58, 22, 29, 23, 24, 17, 54, 53, 89, + 88, 130, 142, 64, 28, 35, 30, 25, 18, 91, 90, 125, + 124, 166, 184, 106, 34, 49, 37, 33, 19, 129, 127, 161, + 196, 208, 226, 154, 46, 86, 51, 75, 21, 171, 201, 198, + 203, 215, 227, 191, 83, 122, 87, 111, 63, 177, 207, 205, + 217, 223, 229, 193, 157, 158, 159, 153, 147, 183, 219, 212, + 16, 233, 235, 237, 239, 241, 244, 247, 250, 254, 231, +}; +#else static const short Colors[ColorCap] = { [Default] = -1, [White] = 8 + COLOR_WHITE, @@ -189,6 +219,7 @@ static const short Colors[ColorCap] = { 217, 223, 229, 193, 157, 158, 159, 153, 147, 183, 219, 212, 16, 233, 235, 237, 239, 241, 244, 247, 250, 254, 231, }; +#endif uint uiAttr(struct Style style) { attr_t attr = A_NORMAL; -- cgit 1.4.1-2-gfad0