mirror of
https://github.com/cc65/cc65.git
synced 2024-09-27 19:55:09 +00:00
Allowed the TGI API to support 256 colors.
This commit is contained in:
parent
f9204e5b6f
commit
14c62f1368
@ -134,7 +134,7 @@ void __fastcall__ tgi_setdrawpage (unsigned char page);
|
|||||||
/* Set the drawable page. Will set an error if the page is not available. */
|
/* Set the drawable page. Will set an error if the page is not available. */
|
||||||
|
|
||||||
unsigned char tgi_getcolorcount (void);
|
unsigned char tgi_getcolorcount (void);
|
||||||
/* Get the number of available colors. */
|
/* Get the number of available colors. Zero means 256 colors. */
|
||||||
|
|
||||||
unsigned char tgi_getmaxcolor (void);
|
unsigned char tgi_getmaxcolor (void);
|
||||||
/* Return the maximum supported color number (the number of colors would
|
/* Return the maximum supported color number (the number of colors would
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
;
|
;
|
||||||
; Ullrich von Bassewitz, 21.06.2002
|
; 2002-06-21, Ullrich von Bassewitz
|
||||||
|
; 2020-06-04, Greg King
|
||||||
;
|
;
|
||||||
; void __fastcall__ tgi_setcolor (unsigned char color);
|
; void __fastcall__ tgi_setcolor (unsigned char color);
|
||||||
; /* Set the current drawing color */
|
; /* Set the current drawing color */
|
||||||
@ -11,9 +12,11 @@
|
|||||||
|
|
||||||
cmp _tgi_colorcount ; Compare to available colors
|
cmp _tgi_colorcount ; Compare to available colors
|
||||||
bcs @L1
|
bcs @L1
|
||||||
sta _tgi_color ; Remember the drawing color
|
@L0: sta _tgi_color ; Remember the drawing color
|
||||||
jmp tgi_setcolor ; Call the driver
|
jmp tgi_setcolor ; Call the driver
|
||||||
@L1: jmp tgi_inv_arg ; Invalid argument
|
|
||||||
|
@L1: ldx _tgi_colorcount
|
||||||
|
beq @L0 ; Zero means 256 colors
|
||||||
|
jmp tgi_inv_arg ; Invalid argument
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user