diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-05 16:03:54 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-05 16:03:54 -0700 |
commit | 10a3b8cca2bc7b2d5871577ba260ad75c65672b4 (patch) | |
tree | 7c03594c0f38b180c91c6445b790225138727857 /termbox/termbox.h | |
parent | 70023f592fd18a7497341476789f6e13eb909953 (diff) | |
download | mu-10a3b8cca2bc7b2d5871577ba260ad75c65672b4.tar.gz |
1530 - switch to termbox's 256-color mode
Diffstat (limited to 'termbox/termbox.h')
-rw-r--r-- | termbox/termbox.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/termbox/termbox.h b/termbox/termbox.h index ac31230a..9b7fd772 100644 --- a/termbox/termbox.h +++ b/termbox/termbox.h @@ -11,20 +11,13 @@ extern "C" { /* The screen is a 2D array of cells. */ struct tb_cell { uint32_t ch; /* unicode character */ - uint16_t fg; /* foreground color and attributes */ - uint16_t bg; /* background color and attributes */ + uint16_t fg; /* foreground color (0-255) and attributes */ + uint16_t bg; /* background color (0-255) and attributes */ }; -/* Possible colors in tb_cell.fg and tb_cell.bg. */ -#define TB_DEFAULT 0x00 -#define TB_BLACK 0x01 -#define TB_RED 0x02 -#define TB_GREEN 0x03 -#define TB_YELLOW 0x04 -#define TB_BLUE 0x05 -#define TB_MAGENTA 0x06 -#define TB_CYAN 0x07 -#define TB_WHITE 0x08 +/* Names for some colors in tb_cell.fg and tb_cell.bg. */ +#define TB_BLACK 232 +#define TB_WHITE 255 /* Colors in tb_cell can be combined using bitwise-OR with multiple * of the following attributes. */ |