include/graphics/palette_cycles.h
Palette cycles: runs of background palette colours that rotate one place every few ticks, up to four at once.
Included by field_tile_animation.c and islets.c.
Structures
| Name | Description | |
|---|---|---|
struct | PALETTE_CYCLE | A palette cycle: a run of up to 16 background palette colours, saved and rotated by one colour every delay + 1 ticks. |
struct | PALETTE_CYCLE_STATE | The palette cycling queue (HEAP_SLOT_PALETTE_CYCLES): four cycles and how many are in use. |
Macros
| Name | Description | |
|---|---|---|
#define | PaletteState ((PALETTE_CYCLE_STATE *)RamHeapSlots->paletteCycles) | The palette cycling queue, in its heap slot (HEAP_SLOT_PALETTE_CYCLES). |
Functions
| Name | Description | |
|---|---|---|
void | fdPaletteCycleInit (void) | Allocates the palette cycling queue (HEAP_SLOT_PALETTE_CYCLES) with its four entries cleared. |
Sint32 | fdPaletteCycleAdd (Sint16 paletteNumber, Sint16 firstColor, Sint16 delay, Sint16 colorCount) | Unused: starts rotating colorCount colours of background palette paletteNumber, from colour firstColor, by one place every delay + 1 ticks (fdPaletteCycleStep). |
void | fdPaletteQueueStop (void) | Unused: stops the palette cycles and frees their queue (HEAP_SLOT_PALETTE_CYCLES). |
void | fdPaletteCycleStep (void) | Each tick: advances each palette cycle whose timer has run out by one colour, writing the rotated colours back to the palette. |
Description
Palette cycles: runs of background palette colours that rotate one place every few ticks, up to four at once.
Macros in detail
PaletteState
#define PaletteState ((PALETTE_CYCLE_STATE *)RamHeapSlots->paletteCycles)
The palette cycling queue, in its heap slot (HEAP_SLOT_PALETTE_CYCLES).
Referenced by fdPaletteCycleStep().
Definition at line 41 of file palette_cycles.h.