1#ifndef ALCHEMY_PALBUF_H
2#define ALCHEMY_PALBUF_H
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
u16 gPalette_ChannelCurve[32]
Maps a channel (0..31) to a component (0..31 << 10).
u16 gPalette_ChannelCurveLight[32]
A brighter curve.
u16 gPalette_ChannelCurveContrast[32]
A high-contrast curve (25 and above are full).
PaletteTransform
A colour buffer's build mode: below 0x8000 one RGB555 colour for all.
@ PALETTE_TRANSFORM_GREY
grey of brightness (2R + 4G + B) / 7
@ PALETTE_TRANSFORM_MUTED
@ PALETTE_TRANSFORM_BLEND
The brightness R + G + B shared out in the proportions of the colour carried.
@ PALETTE_TRANSFORM_PLAIN
each colour unchanged
@ PALETTE_TRANSFORM_FROM_SOURCE
The backdrop colour (palette RAM's first colour) for all.
@ PALETTE_TRANSFORM_SEPIA
@ PALETTE_TRANSFORM_SPLIT
each colour unchanged
@ PALETTE_TRANSFORM_WARM2
half R + 6, two thirds G + 4, B - 6
@ PALETTE_TRANSFORM_FLAGS
From here the TINT, BLEND and SPLIT bits are tested, TINT and BLEND carrying an RGB555 colour in the ...
@ PALETTE_TRANSFORM_TINT
The brightness (2R + 4G + B) times the colour carried.
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
The colour buffer (heap block 32) that fades the BG and OBJ palettes: the source palette,...
u16 current[0x540]
The shown colours, as B, G and R channels shifted up 10 bits, three a colour.
u16 target[0x540]
the colours current moves toward, as current
u8 padding2a03
never named
u16 packed[2][0x1c0]
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
u16 palette[0x1c0]
The source palette, RGB555: 224 BG colours, then 224 OBJ colours; palette[0] is the backdrop.
u16 delta[0x540]
added to each current channel each frame
A colour buffer for all 512 palette colours: the source palette, the shown and target colour channels...
u8 padding3003
never named
u16 delta[0x600]
added to each current channel each frame
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.
s8 duration
frames; 0 when the colours are not moving
u16 target[0x600]
the colours current moves toward, as current
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
The integer types, TRUE, UNUSED and the fixed-address macros.