64extern const uint16_t
HOUSE[16];
101void setThemes(
const uint16_t (*felts)[3], uint8_t count);
@ NAVY
11: dark blue (0x125).
Definition Palette.h:53
@ WHITE
1: white (0xFFF).
Definition Palette.h:43
@ BLUE
10: blue (0x26E).
Definition Palette.h:52
@ FELT_LT
4: light felt; re-dyed by pal::setTheme().
Definition Palette.h:46
@ FX_B
15: animated by pal::tick() while cycling is on (see pal::Mode).
Definition Palette.h:57
@ WOOD
9: brown (0x741), table rails.
Definition Palette.h:51
@ SILVER
5: light grey (0xBBC).
Definition Palette.h:47
@ FX_A
14: animated by pal::tick() while cycling is on (see pal::Mode).
Definition Palette.h:56
@ GOLD
8: gold (0xFC2).
Definition Palette.h:50
@ CYAN
13: cyan (0x6EF).
Definition Palette.h:55
@ FELT
3: the table felt; re-dyed by pal::setTheme().
Definition Palette.h:45
@ WINE
7: dark red (0x702).
Definition Palette.h:49
@ SKIN
12: skin tone (0xFB8).
Definition Palette.h:54
@ FELT_DK
2: dark felt; re-dyed by pal::setTheme().
Definition Palette.h:44
@ INK
0: black (0x000), outlines and text.
Definition Palette.h:42
@ RED
6: red (0xE12).
Definition Palette.h:48
The palette: themes, fades, flashes and colour cycling.
Definition Palette.h:61
Mode
What FX_A and FX_B do by themselves while cycling is on (setMode()).
Definition Palette.h:78
@ CASINO
FX_A runs through a rainbow (banner outlines, sparkle); FX_B shimmers gold - white - gold.
Definition Palette.h:81
@ TARGETS
FX_A shimmers cyan - white (squares a piece can go to); FX_B pulses red - gold (pieces it can take).
Definition Palette.h:84
@ HOVER
FX_A fades black - white - black about once a second (a cursor outline); FX_B as CASINO.
Definition Palette.h:87
@ FIRE
FX_A flickers red - gold - white (a hot hand); FX_B as CASINO.
Definition Palette.h:89
void tick()
Advance the colour cycling and any flash by one tick.
void flash(uint8_t index, uint16_t rgb444, uint8_t frames)
Show one palette index in another colour for a few frames (a hit, a win).
uint8_t fade()
The current fade level.
const uint16_t FELTS[THEME_COUNT][3]
The built-in felts: FELT_DK, FELT, FELT_LT in RGB444 for each Theme.
void setDesaturate(uint8_t amount)
Wash the colours toward grey (a paused game, a game over).
void setFx(uint8_t index, uint16_t rgb444)
Set a colour by hand.
uint16_t rgb444(uint8_t index)
A staged colour, before fade, flash and desaturation.
void setCycling(bool on)
Whether FX_A/FX_B animate by themselves.
void setTheme(uint8_t theme)
Re-dye the felt (FELT_DK, FELT, FELT_LT).
const uint16_t HOUSE[16]
The house colours above, RGB444, in index order. pal::init()'s default.
void setThemes(const uint16_t(*felts)[3], uint8_t count)
Replace the built-in felt themes with a game's own.
uint8_t theme()
The current felt theme.
Theme
The felt colours: FELT_DK, FELT and FELT_LT can be re-dyed as a whole.
Definition Palette.h:67
@ BLUE_FELT
Blue felt.
Definition Palette.h:69
@ RED_FELT
Red felt.
Definition Palette.h:70
@ THEME_COUNT
The number of built-in themes.
Definition Palette.h:72
@ GREEN
The classic green felt (the default).
Definition Palette.h:68
@ PURPLE
Purple felt.
Definition Palette.h:71
void commit()
Work out the final colours and hand them to CHGfx if any changed.
void init(const uint16_t *base=HOUSE)
Load a set of colours and commit them at once.
void setFade(uint8_t level)
Fade the whole screen toward black.
void setMode(uint8_t mode)
Choose what FX_A and FX_B animate as.
void resetClock()
Restart the FX_A/FX_B cycle from its beginning.