2019-09-29 01:59:58 +00:00
|
|
|
/*********************************************
|
|
|
|
* veraclr.h02 - Color Palette functions for *
|
|
|
|
* Commander X16 VERA Chip *
|
|
|
|
*********************************************/
|
2019-09-27 16:08:31 +00:00
|
|
|
|
2019-10-27 18:25:30 +00:00
|
|
|
/* Convert Palette Color Value *
|
|
|
|
* to R, G, and B Values *
|
|
|
|
* Args: int c - Color Value *
|
|
|
|
* Returns: Red Value (0-255) *
|
|
|
|
* Green Value (0-255) *
|
|
|
|
* Blue Value (0-255) */
|
2019-09-27 16:08:31 +00:00
|
|
|
char clrrgb();
|
|
|
|
|
2019-10-27 18:25:30 +00:00
|
|
|
/* Read Next Entry from Palette *
|
|
|
|
* Returns: int c - Color Value */
|
|
|
|
char getcln();
|
|
|
|
|
2019-09-27 16:08:31 +00:00
|
|
|
/* Read Color Value from Palette *
|
|
|
|
* Args: char i - Palette Index *
|
|
|
|
* Returns: int c - Color Value */
|
|
|
|
char getclr();
|
|
|
|
|
|
|
|
/* Read Color Entries from Palette *
|
|
|
|
* Args: i - Index into Palette *
|
|
|
|
* n - Number of Entries *
|
|
|
|
* Requires: setdst(&array) */
|
|
|
|
char getplt();
|
|
|
|
|
2019-10-27 18:25:30 +00:00
|
|
|
/* Read RGB Color from Palette *
|
|
|
|
* Requires: setidx() *
|
|
|
|
* Returns: Red Value (0-255) *
|
|
|
|
* Green Value (0-255) *
|
|
|
|
* Blue Value (0-255) */
|
|
|
|
char getrgb();
|
|
|
|
|
|
|
|
/* Convert R, G, and B Values *
|
|
|
|
* to Palette Color Value *
|
|
|
|
* Args: r - Red Value (0-255) *
|
|
|
|
* g - Green Value (0-255) *
|
|
|
|
* b - Blue Value (0-255) *
|
|
|
|
* Returns: int c - Color Value */
|
2019-09-27 16:08:31 +00:00
|
|
|
char rgbclr();
|
|
|
|
|
2019-10-27 18:25:30 +00:00
|
|
|
/* Set Next Palette Entry to Color *
|
|
|
|
* Requires: setidx() *
|
|
|
|
* Args: int c - Color Value */
|
|
|
|
char setcln();
|
|
|
|
|
2019-09-27 16:08:31 +00:00
|
|
|
/* Write Color Value to Palette *
|
|
|
|
* Args: i - Index into Palette *
|
2019-10-27 18:25:30 +00:00
|
|
|
* int c - Color Value */
|
2019-09-27 16:08:31 +00:00
|
|
|
char setclr();
|
|
|
|
|
|
|
|
/* Set Vera Address to Palette Index *
|
|
|
|
* Args: i - Index into Palette *
|
|
|
|
* int c - Color Value *
|
|
|
|
* Returns: char b = Bank |Auto-Incr *
|
|
|
|
* int d = Entry Address */
|
|
|
|
char setidx();
|
|
|
|
|
|
|
|
/* Write Color Entries to Palette *
|
|
|
|
* Args: i - Index into Palette *
|
|
|
|
* n - Number of Entries *
|
|
|
|
* Requires: setsrc(&entries) */
|
|
|
|
char setplt();
|
|
|
|
|
2019-10-27 18:25:30 +00:00
|
|
|
/* Set Next Palette Entry to RGB *
|
|
|
|
* Requires: setidx() *
|
|
|
|
* Args: r - Red Value (0-255) *
|
|
|
|
* g - Green Value (0-255) *
|
|
|
|
* b - Blue Value (0-255) */
|
|
|
|
char setrgb();
|