Skip to Content
The Alchemy Project

src/field/sprite_color_tables.c

The sprite colour tables, 256 bytes each, that recolour a sprite picture by turning each colour of the basic sprite palette into another: five channel swaps, a greyscale, three tints and a negative. More…

Variables

NameDescription
const Uint8SpriteColorTables [5][256]The five channel swaps, in the order SPRITE_COLOR_GRB to SPRITE_COLOR_BRG name them; a sprite loaded in a colour variant, 1 to 5, takes its variant's.
const Uint8SpriteColorGreyTable [256]Greyscale: each colour to the grey of its brightness.
const Uint8SpriteColorTintTables [4][256]The three tints, SPRITE_COLOR_BLUE_TINT to SPRITE_COLOR_GREEN_TINT, each raising one channel to full, then the negative SPRITE_COLOR_DARK draws through, which turns light footprints dark.

Description

The sprite colour tables, 256 bytes each, that recolour a sprite picture by turning each colour of the basic sprite palette into another: five channel swaps, a greyscale, three tints and a negative. The first nine are The Broken Seal's; field_engine_sprite_color_tables.c is a second copy of all ten.

Variables in detail

SpriteColorTables

const Uint8 SpriteColorTables[5][256]

The five channel swaps, in the order SPRITE_COLOR_GRB to SPRITE_COLOR_BRG name them; a sprite loaded in a colour variant, 1 to 5, takes its variant's.

Referenced by fdSpritePictureCacheLoad().

Definition at line 11 of file sprite_color_tables.c.

SpriteColorGreyTable

const Uint8 SpriteColorGreyTable[256]

Greyscale: each colour to the grey of its brightness. mnCommandIconLoad draws a command icon's top three rows of tiles through it when asked.

Referenced by fdSpriteColorRemapPixels().

Definition at line 106 of file sprite_color_tables.c.

SpriteColorTintTables

const Uint8 SpriteColorTintTables[4][256]

The three tints, SPRITE_COLOR_BLUE_TINT to SPRITE_COLOR_GREEN_TINT, each raising one channel to full, then the negative SPRITE_COLOR_DARK draws through, which turns light footprints dark. The bottom rows of a wading sprite (SPRITE_FLAG_SHADED) are drawn through the first, the blue.

Referenced by fdSpriteComposePicture().

Definition at line 128 of file sprite_color_tables.c.