Skip to Content
The Alchemy Project

struct TITLE_PALETTE_FADE

A colour buffer for all 512 palette colours: the source palette, the shown and target colour channels, their steps, and two pages of packed colours.

Declared in palette_buffers.h.

Fields

NameDescription
Uint16palette [512]The source palette, RGB555: 256 BG colours, then 256 OBJ colours.
Uint16current [TITLE_PALETTE_FADE_CHANNELS]The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
Uint16target [TITLE_PALETTE_FADE_CHANNELS]The colours current moves toward, as current.
Uint16delta [TITLE_PALETTE_FADE_CHANNELS]Added to each current channel each tick.
Uint16packed [2][512]Two pages of RGB555 colours: one is built while the other is queued.
Uint8pageThe packed page queued this tick.
Sint8durationTicks; 0 when the colours are not moving.
Uint8stepTicks.
Uint8padding

Description

A colour buffer for all 512 palette colours: the source palette, the shown and target colour channels, their steps, and two pages of packed colours.

struct TITLE_PALETTE_FADE

Referenced by mnTitlePaletteFadeInit(), mnTitlePaletteFadeSetBackdrop(), mnTitlePaletteFadeSetCurrent(), mnTitlePaletteFadeSetTarget(), mnTitlePaletteFadeStart() and mnTitlePaletteFadeUpdate().

Definition at line 29 of file palette_buffers.h.

Fields in detail

palette

Uint16 palette[512]

The source palette, RGB555: 256 BG colours, then 256 OBJ colours.

current

Uint16 current[TITLE_PALETTE_FADE_CHANNELS]

The shown colours, as B, G and R channels shifted up 10 bits, three a colour.

target

Uint16 target[TITLE_PALETTE_FADE_CHANNELS]

The colours current moves toward, as current.

delta

Uint16 delta[TITLE_PALETTE_FADE_CHANNELS]

Added to each current channel each tick.

packed

Uint16 packed[2][512]

Two pages of RGB555 colours: one is built while the other is queued.

page

Uint8 page

The packed page queued this tick.

duration

Sint8 duration

Ticks; 0 when the colours are not moving.

step

Uint8 step

Ticks.

padding

Uint8 padding