Alchemy
Loading...
Searching...
No Matches

PaletteFade Struct Reference

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. More...

#include <graphics/palbuf.h>

Data Fields

u16 palette [512]
 The source palette, RGB555: 256 BG colours, then 256 OBJ colours.
u16 current [0x600]
 The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
u16 target [0x600]
 the colours current moves toward, as current
u16 delta [0x600]
 added to each current channel each frame
u16 packed [2][512]
 Two pages of RGB555 colours: one is built while the other is queued.
u8 page
 the packed page queued this frame
s8 duration
 frames; 0 when the colours are not moving
u8 step
 frames
u8 padding3003
 never named

Detailed 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.

Definition at line 14 of file palbuf.h.

Field Documentation

◆ palette

u16 PaletteFade::palette[512]

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

Definition at line 16 of file palbuf.h.

Referenced by PaletteFade_Init(), PaletteFade_SetBackdrop(), PaletteFade_SetCurrent(), and PaletteFade_SetTarget().

◆ current

u16 PaletteFade::current[0x600]

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

Definition at line 19 of file palbuf.h.

Referenced by PaletteFade_SetCurrent(), PaletteFade_Start(), and PaletteFade_Update().

◆ target

u16 PaletteFade::target[0x600]

the colours current moves toward, as current

Definition at line 20 of file palbuf.h.

Referenced by PaletteFade_Init(), PaletteFade_SetTarget(), PaletteFade_Start(), and PaletteFade_Update().

◆ delta

u16 PaletteFade::delta[0x600]

added to each current channel each frame

Definition at line 21 of file palbuf.h.

Referenced by PaletteFade_Start(), and PaletteFade_Update().

◆ packed

u16 PaletteFade::packed[2][512]

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

Definition at line 23 of file palbuf.h.

Referenced by PaletteFade_Update().

◆ page

u8 PaletteFade::page

the packed page queued this frame

Definition at line 24 of file palbuf.h.

Referenced by PaletteFade_Update().

◆ duration

s8 PaletteFade::duration

frames; 0 when the colours are not moving

Definition at line 25 of file palbuf.h.

Referenced by PaletteFade_Start(), and PaletteFade_Update().

◆ step

u8 PaletteFade::step

frames

Definition at line 26 of file palbuf.h.

Referenced by PaletteFade_Start(), and PaletteFade_Update().

◆ padding3003

u8 PaletteFade::padding3003

never named

Definition at line 27 of file palbuf.h.