diff --git a/include/tgi.h b/include/tgi.h index 2ef65b856..ecd98e6e8 100644 --- a/include/tgi.h +++ b/include/tgi.h @@ -141,15 +141,16 @@ unsigned char tgi_getmaxcolor (void); ** then be getmaxcolor()+1). */ -void __fastcall__ tgi_setcolor (unsigned char color); -/* Set the current drawing color. */ +void __fastcall__ tgi_setcolor (unsigned char color_index); +/* Set the current drawing color (palette index). */ unsigned char tgi_getcolor (void); -/* Return the current drawing color. */ +/* Return the current drawing color (palette index). */ void __fastcall__ tgi_setpalette (const unsigned char* palette); /* Set the palette (not available with all drivers/hardware). palette is -** a pointer to as many entries as there are colors. +** a pointer to as many entries as there are colors required for the drivers +** palette. This palette is the (only) place where to use the TGI_COLOR values. */ const unsigned char* tgi_getpalette (void); diff --git a/libsrc/apple2/tgi_colors.s b/libsrc/apple2/tgi_colors.s index 53505b33d..936d89b76 100644 --- a/libsrc/apple2/tgi_colors.s +++ b/libsrc/apple2/tgi_colors.s @@ -1,6 +1,7 @@ ; ; Target-specific black & white values for use by the target-shared TGI kernel ; +; NOTE: These are indices into the default palette .include "tgi-kernel.inc" diff --git a/libsrc/common/tgi_colors.s b/libsrc/common/tgi_colors.s index 6ef3729b4..ba14ffa09 100644 --- a/libsrc/common/tgi_colors.s +++ b/libsrc/common/tgi_colors.s @@ -1,6 +1,7 @@ ; ; Target-specific black & white values for use by the target-shared TGI kernel ; +; NOTE: These are indices into the default palette .include "tgi-kernel.inc" diff --git a/libsrc/lynx/tgi_colors.s b/libsrc/lynx/tgi_colors.s index ebc8c2889..6d0ea442a 100644 --- a/libsrc/lynx/tgi_colors.s +++ b/libsrc/lynx/tgi_colors.s @@ -1,6 +1,7 @@ ; ; Target-specific black & white values for use by the target-shared TGI kernel ; +; NOTE: These are indices into the default palette .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi-kernel.s b/libsrc/tgi/tgi-kernel.s index cbd655279..c2d87b002 100644 --- a/libsrc/tgi/tgi-kernel.s +++ b/libsrc/tgi/tgi-kernel.s @@ -23,7 +23,7 @@ _tgi_error: .res 1 ; Last error code _tgi_gmode: .res 1 ; Flag: Graphics mode active _tgi_curx: .res 2 ; Current drawing cursor X _tgi_cury: .res 2 ; Current drawing cursor Y -_tgi_color: .res 1 ; Current drawing color +_tgi_color: .res 1 ; Current drawing color (palette index) _tgi_font: .res 1 ; Which font to use _tgi_textdir: .res 1 ; Current text direction _tgi_vectorfont: .res 2 ; Pointer to vector font diff --git a/libsrc/tgi/tgi_getcolor.s b/libsrc/tgi/tgi_getcolor.s index c1c0022d0..95cf7d553 100644 --- a/libsrc/tgi/tgi_getcolor.s +++ b/libsrc/tgi/tgi_getcolor.s @@ -2,7 +2,7 @@ ; Ullrich von Bassewitz, 22.06.2002 ; ; unsigned char tgi_getcolor (void); -; /* Return the current drawing color */ +; /* Return the current drawing color (palette index) */ .include "tgi-kernel.inc" diff --git a/libsrc/tgi/tgi_setcolor.s b/libsrc/tgi/tgi_setcolor.s index 16f075767..6f3bb1871 100644 --- a/libsrc/tgi/tgi_setcolor.s +++ b/libsrc/tgi/tgi_setcolor.s @@ -2,8 +2,8 @@ ; 2002-06-21, Ullrich von Bassewitz ; 2020-06-04, Greg King ; -; void __fastcall__ tgi_setcolor (unsigned char color); -; /* Set the current drawing color */ +; void __fastcall__ tgi_setcolor (unsigned char color_index); +; /* Set the current drawing color (palette index) */ .include "tgi-kernel.inc"