4 GB_set_palette and GB_get_palette
Lior Halphon edited this page 2024-12-01 01:09:32 +02:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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