From bae58ae419d369a140e275009fe991b11a978f4d Mon Sep 17 00:00:00 2001 From: Bob Andrews Date: Tue, 17 Jun 2025 20:29:01 +0200 Subject: [PATCH] Update cbm264.h - fix misunderstanding about TGI colors --- include/cbm264.h | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/include/cbm264.h b/include/cbm264.h index 82ecdc4d8..c220bf407 100644 --- a/include/cbm264.h +++ b/include/cbm264.h @@ -110,25 +110,23 @@ #define COLOR_LIGHTBLUE (BCOLOR_LIGHTBLUE | CATTR_LUMA7) #define COLOR_GRAY3 (BCOLOR_WHITE | CATTR_LUMA5) -/* TGI color defines (these are indices into the default palette) */ -#define TGI_COLOR_BLACK 0 -#define TGI_COLOR_WHITE 1 -/* -#define TGI_COLOR_RED 2 -#define TGI_COLOR_CYAN 3 -#define TGI_COLOR_PURPLE 4 -#define TGI_COLOR_GREEN 5 -#define TGI_COLOR_BLUE 6 -#define TGI_COLOR_YELLOW 7 -#define TGI_COLOR_ORANGE 8 -#define TGI_COLOR_BROWN 9 -#define TGI_COLOR_LIGHTRED 10 -#define TGI_COLOR_GRAY1 11 -#define TGI_COLOR_GRAY2 12 -#define TGI_COLOR_LIGHTGREEN 13 -#define TGI_COLOR_LIGHTBLUE 14 -#define TGI_COLOR_GRAY3 15 -*/ +/* TGI color defines */ +#define TGI_COLOR_BLACK (BCOLOR_BLACK) +#define TGI_COLOR_WHITE (BCOLOR_WHITE | CATTR_LUMA7) +#define TGI_COLOR_RED (BCOLOR_RED | CATTR_LUMA4) +#define TGI_COLOR_CYAN (BCOLOR_CYAN | CATTR_LUMA7) +#define TGI_COLOR_PURPLE (BCOLOR_LIGHTVIOLET | CATTR_LUMA7) +#define TGI_COLOR_GREEN (BCOLOR_GREEN | CATTR_LUMA7) +#define TGI_COLOR_BLUE (BCOLOR_BLUE | CATTR_LUMA7) +#define TGI_COLOR_YELLOW (BCOLOR_YELLOW | CATTR_LUMA7) +#define TGI_COLOR_ORANGE (BCOLOR_ORANGE | CATTR_LUMA7) +#define TGI_COLOR_BROWN (BCOLOR_BROWN | CATTR_LUMA7) +#define TGI_COLOR_LIGHTRED (BCOLOR_RED | CATTR_LUMA7) +#define TGI_COLOR_GRAY1 (BCOLOR_WHITE | CATTR_LUMA1) +#define TGI_COLOR_GRAY2 (BCOLOR_WHITE | CATTR_LUMA3) +#define TGI_COLOR_LIGHTGREEN (BCOLOR_LIGHTGREEN | CATTR_LUMA7) +#define TGI_COLOR_LIGHTBLUE (BCOLOR_LIGHTBLUE | CATTR_LUMA7) +#define TGI_COLOR_GRAY3 (BCOLOR_WHITE | CATTR_LUMA5) /* Masks for joy_read */ #define JOY_UP_MASK 0x01