-
-
Notifications
You must be signed in to change notification settings - Fork 217
GB_set_palette and GB_get_palette
Lior Halphon edited this page Nov 30, 2024
·
4 revisions
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
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.
GB_set_palette
and GB_get_palette
are thread-safe and can be called from any thread and context.
This value is only used when emulating monochrome models.