maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches

Color definitions RetroFlat is aware of, for use with the RetroFlat Drawing API. More...

Collaboration diagram for RetroFlat Colors:

Macros

#define RETROFLAT_COLOR_TABLE(f)
 This macro defines all colors supported by RetroFlat for primative operations, particularly using retroflat_px().
 
#define RETROFLAT_COLOR_NULL   (-1)
 
#define RETROFLAT_COLORS_SZ   16
 
#define RETROFLAT_COLOR_BLACK   0
 
#define RETROFLAT_COLOR_DARKBLUE   1
 
#define RETROFLAT_COLOR_DARKGREEN   2
 
#define RETROFLAT_COLOR_TEAL   3
 
#define RETROFLAT_COLOR_DARKRED   4
 
#define RETROFLAT_COLOR_VIOLET   5
 
#define RETROFLAT_COLOR_BROWN   6
 
#define RETROFLAT_COLOR_GRAY   7
 
#define RETROFLAT_COLOR_DARKGRAY   8
 
#define RETROFLAT_COLOR_BLUE   9
 
#define RETROFLAT_COLOR_GREEN   10
 
#define RETROFLAT_COLOR_CYAN   11
 
#define RETROFLAT_COLOR_RED   12
 
#define RETROFLAT_COLOR_MAGENTA   13
 
#define RETROFLAT_COLOR_YELLOW   14
 
#define RETROFLAT_COLOR_WHITE   15
 

Typedefs

typedef int8_t RETROFLAT_COLOR
 Defines an index in the platform-specific color-table.
 
typedef int RETROFLAT_COLOR_DEF
 

Detailed Description

Color definitions RetroFlat is aware of, for use with the RetroFlat Drawing API.

The precise type and values of these constants vary by platform.

Macro Definition Documentation

◆ RETROFLAT_COLOR_TABLE

#define RETROFLAT_COLOR_TABLE ( f)
Value:
f( 0, black, BLACK, 0, 0, 0, BLACK, BLACK ) \
f( 1, darkblue, DARKBLUE, 0, 0, 170, CYAN, BLACK ) \
f( 2, darkgreen, DARKGREEN, 0, 170, 0, CYAN, BLACK ) \
f( 3, teal, TEAL, 0, 170, 170, CYAN, CYAN ) \
f( 4, darkred, DARKRED, 170, 0, 0, MAGENTA, BLACK ) \
f( 5, violet, VIOLET, 170, 0, 170, MAGENTA, BLACK ) \
f( 6, brown, BROWN, 170, 85, 0, CYAN, MAGENTA ) \
f( 7, gray, GRAY, 170, 170, 170, WHITE, BLACK ) \
f( 8, darkgray, DARKGRAY, 85, 85, 85, WHITE, BLACK ) \
f( 9, blue, BLUE, 85, 85, 255, CYAN, WHITE ) \
f( 10, green, GREEN, 85, 255, 85, CYAN, CYAN ) \
f( 11, cyan, CYAN, 85, 255, 255, CYAN, CYAN ) \
f( 12, red, RED, 255, 85, 85, MAGENTA, WHITE ) \
f( 13, magenta, MAGENTA, 255, 85, 255, MAGENTA, MAGENTA ) \
f( 14, yellow, YELLOW, 255, 255, 85, CYAN, MAGENTA ) \
f( 15, white, WHITE, 255, 255, 255, WHITE, WHITE )

This macro defines all colors supported by RetroFlat for primative operations, particularly using retroflat_px().

The fields are: index, name (lowercase), name (uppercase), red, green, blue, cga on-color, cga off-color

On-color and off-color are used for dithering... odd pixels get one and even pixels get the other.