Skip to Content
The Alchemy Project

struct PALETTE_FADE

The palette fade (HEAP_SLOT_PALETTE_FADE) that fades the BG and sprite palettes: the source palette, the shown and target colour channels, their per-tick steps, and two pages of packed RGB555 colours queued each tick.

Declared in palette_buffers.h.

Fields

NameDescription
Uint16palette [2 * PALETTE_FADE_BG_COLORS]The source palette, RGB555: the BG colours, then as many sprite colours; palette[0] is the backdrop.
Uint16current [PALETTE_FADE_CHANNELS]The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
Uint16target [PALETTE_FADE_CHANNELS]the colours current moves toward, as current
Uint16delta [PALETTE_FADE_CHANNELS]added to each current channel each tick
Uint16packed [2][2 * PALETTE_FADE_BG_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.
Sint8stepTicks.
Uint8unusedAfterStepNever read; two scenes set it to 1 with step.

Description

The palette fade (HEAP_SLOT_PALETTE_FADE) that fades the BG and sprite palettes: the source palette, the shown and target colour channels, their per-tick steps, and two pages of packed RGB555 colours queued each tick.

struct PALETTE_FADE

Referenced by fdPaletteFadeInit(), fdPaletteFadeSetBackdrop(), fdPaletteFadeSetSource(), fdPaletteFadeSetTarget(), fdPaletteFadeStartInterpolation(), fdPaletteFadeUpdate(), fdPsynergyFadeToCastColor(), fdWeatherStartLightning(), fdWeatherStartLightningFlash(), fdWeatherUpdateLightning(), mnShopSaveAndTintFieldPalette(), scSanctumLeaveAfterRefusing(), scSolSanctumLunaSolRoomsArriveAfterWiseOnesRescue() and scTretPaletteUpdateMapTint().

Definition at line 59 of file palette_buffers.h.

Fields in detail

palette

Uint16 palette[2 * PALETTE_FADE_BG_COLORS]

The source palette, RGB555: the BG colours, then as many sprite colours; palette[0] is the backdrop.

current

Uint16 current[PALETTE_FADE_CHANNELS]

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

target

Uint16 target[PALETTE_FADE_CHANNELS]

the colours current moves toward, as current

delta

Uint16 delta[PALETTE_FADE_CHANNELS]

added to each current channel each tick

packed

Uint16 packed[2][2 * PALETTE_FADE_BG_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

Sint8 step

Ticks.

unusedAfterStep

Uint8 unusedAfterStep

Never read; two scenes set it to 1 with step.