Updated GB_set_palette and GB_get_palette (markdown)

Lior Halphon 2024-11-27 23:24:00 +02:00
parent 5133a9177a
commit 679ac915eb
2 changed files with 25 additions and 15 deletions

@ -1,15 +0,0 @@
## Definition
<tt>const [[GB_palette_t]] *GB_get_palette([[GB_gameboy_t]] *gb);</tt>
<tt>void GB_set_palette([[GB_gameboy_t]] *gb, const [[GB_palette_t]] *palette);</tt>
In `display.h`
## Description
TBD
## Thread Safety
`GB_set_palette` and `GB_get_palette` are thread-safe and can be called from any thread and context.

@ -0,0 +1,25 @@
## Definition
<tt>void GB_set_palette([[GB_gameboy_t]] *gb, const [[GB_palette_t]] *palette);</tt>
<tt>const [[GB_palette_t]] *GB_get_palette([[GB_gameboy_t]] *gb);</tt>
In `display.h`
## Description
A monochrome [[model|GB_model_t]] 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|GB_palette_t]]. The palette can be changed and read back using these two functions. The default palette is [[GB_PALETTE_GREY|Built In DMG Palettes]].
## 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
* [[Built In DMG Palettes]]
* [[GB_set_rgb_encode_callback]]
* [[GB_set_color_correction_mode]]