Skip to content

GB_set_palette and GB_get_palette

Lior Halphon edited this page Nov 30, 2024 · 4 revisions

Definition

void GB_set_palette(GB_gameboy_t *gb, const GB_palette_t *palette);

const GB_palette_t *GB_get_palette(GB_gameboy_t *gb);

In display.h

Description

A monochrome model renders a screen with 4 colors (usually shades of grey) and potentially a different 5th color used when the LCD display is turned off. These 5 colors are stored in a palette struct. The palette can be changed and read back using these two functions. The default palette is GB_PALETTE_GREY.

Thread Safety

GB_set_palette and GB_get_palette are thread-safe and can be called from any thread and context.

Notes

This value is only used when emulating monochrome models.

See Also

Clone this wiki locally