Skip to Content
The Alchemy Project

struct TITLE_PALETTE_FADE

The title intro's palette fade, over every BG and sprite colour: 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 [PLTT_COLORS]The source palette, RGB555: the BG colours, then the sprite 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][PLTT_COLORS]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

The title intro's palette fade, over every BG and sprite colour: 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 26 of file palette_buffers.h.

Fields in detail

palette

Uint16 palette[PLTT_COLORS]

The source palette, RGB555: the BG colours, then the sprite 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][PLTT_COLORS]

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