From 679ac915eb7ee18535e183c7e11d4f865eabd76f Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Wed, 27 Nov 2024 23:24:00 +0200 Subject: [PATCH] Updated GB_set_palette and GB_get_palette (markdown) --- GB_set_palette and GB_get_palette.md | 15 --------------- GB_set_palette-and-GB_get_palette.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 15 deletions(-) delete mode 100644 GB_set_palette and GB_get_palette.md create mode 100644 GB_set_palette-and-GB_get_palette.md diff --git a/GB_set_palette and GB_get_palette.md b/GB_set_palette and GB_get_palette.md deleted file mode 100644 index 4381926..0000000 --- a/GB_set_palette and GB_get_palette.md +++ /dev/null @@ -1,15 +0,0 @@ -## Definition - -const [[GB_palette_t]] *GB_get_palette([[GB_gameboy_t]] *gb); - -void GB_set_palette([[GB_gameboy_t]] *gb, const [[GB_palette_t]] *palette); - -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. diff --git a/GB_set_palette-and-GB_get_palette.md b/GB_set_palette-and-GB_get_palette.md new file mode 100644 index 0000000..b6b0cbe --- /dev/null +++ b/GB_set_palette-and-GB_get_palette.md @@ -0,0 +1,25 @@ +## 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|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]] \ No newline at end of file