SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit b72c2ea2255d989338fa8c6f17cfa954c5d5bec8 parent 769aac93c04d4bc8a395170c64d2c69e2998f6c8 Author: Lior Halphon <LIJI32@gmail.com> Date: Wed, 29 Dec 2021 13:08:46 +0200 DMG palette getter Diffstat:
| M | Core/gb.c | 5 | +++++ |
| M | Core/gb.h | 1 | + |
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Core/gb.c b/Core/gb.c @@ -1249,6 +1249,11 @@ void GB_set_palette(GB_gameboy_t *gb, const GB_palette_t *palette) update_dmg_palette(gb); } +const GB_palette_t *GB_get_palette(GB_gameboy_t *gb) +{ + return gb->dmg_palette; +} + void GB_set_rgb_encode_callback(GB_gameboy_t *gb, GB_rgb_encode_callback_t callback) { diff --git a/Core/gb.h b/Core/gb.h @@ -878,6 +878,7 @@ void GB_set_execution_callback(GB_gameboy_t *gb, GB_execution_callback_t callbac void GB_set_lcd_line_callback(GB_gameboy_t *gb, GB_lcd_line_callback_t callback); void GB_set_palette(GB_gameboy_t *gb, const GB_palette_t *palette); +const GB_palette_t *GB_get_palette(GB_gameboy_t *gb); /* These APIs are used when using internal clock */ void GB_set_serial_transfer_bit_start_callback(GB_gameboy_t *gb, GB_serial_transfer_bit_start_callback_t callback);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.