DMG palette getter

This commit is contained in:
Lior Halphon 2021-12-29 13:08:46 +02:00
parent 769aac93c0
commit b72c2ea225
2 changed files with 6 additions and 0 deletions

View File

@ -1249,6 +1249,11 @@ void GB_set_palette(GB_gameboy_t *gb, const GB_palette_t *palette)
update_dmg_palette(gb); 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) void GB_set_rgb_encode_callback(GB_gameboy_t *gb, GB_rgb_encode_callback_t callback)
{ {

View File

@ -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_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); 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 */ /* 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); void GB_set_serial_transfer_bit_start_callback(GB_gameboy_t *gb, GB_serial_transfer_bit_start_callback_t callback);