2016-03-30 20:07:55 +00:00
|
|
|
#ifndef display_h
|
|
|
|
#define display_h
|
|
|
|
|
|
|
|
#include "gb.h"
|
2017-04-17 17:16:17 +00:00
|
|
|
#ifdef GB_INTERNAL
|
2017-02-19 00:22:50 +00:00
|
|
|
void GB_display_run(GB_gameboy_t *gb, uint8_t cycles);
|
2016-06-18 17:29:11 +00:00
|
|
|
void GB_palette_changed(GB_gameboy_t *gb, bool background_palette, uint8_t index);
|
2017-08-19 22:34:12 +00:00
|
|
|
void GB_window_related_write(GB_gameboy_t *gb, uint8_t addr, uint8_t value);
|
2017-04-17 17:16:17 +00:00
|
|
|
#endif
|
2016-10-26 21:14:02 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GB_PALETTE_NONE,
|
|
|
|
GB_PALETTE_BACKGROUND,
|
|
|
|
GB_PALETTE_OAM,
|
|
|
|
GB_PALETTE_AUTO,
|
|
|
|
} GB_palette_type_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GB_MAP_AUTO,
|
|
|
|
GB_MAP_9800,
|
|
|
|
GB_MAP_9C00,
|
|
|
|
} GB_map_type_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GB_TILESET_AUTO,
|
|
|
|
GB_TILESET_8800,
|
|
|
|
GB_TILESET_8000,
|
|
|
|
} GB_tileset_type_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t image[128];
|
|
|
|
uint8_t x, y, tile, flags;
|
|
|
|
uint16_t oam_addr;
|
|
|
|
bool obscured_by_line_limit;
|
|
|
|
} GB_oam_info_t;
|
|
|
|
|
2017-10-12 14:22:22 +00:00
|
|
|
typedef enum {
|
|
|
|
GB_COLOR_CORRECTION_DISABLED,
|
|
|
|
GB_COLOR_CORRECTION_CORRECT_CURVES,
|
|
|
|
GB_COLOR_CORRECTION_EMULATE_HARDWARE,
|
|
|
|
GB_COLOR_CORRECTION_PRESERVE_BRIGHTNESS,
|
|
|
|
} GB_color_correction_mode_t;
|
|
|
|
|
2016-10-26 21:14:02 +00:00
|
|
|
void GB_draw_tileset(GB_gameboy_t *gb, uint32_t *dest, GB_palette_type_t palette_type, uint8_t palette_index);
|
|
|
|
void GB_draw_tilemap(GB_gameboy_t *gb, uint32_t *dest, GB_palette_type_t palette_type, uint8_t palette_index, GB_map_type_t map_type, GB_tileset_type_t tileset_type);
|
2017-04-19 20:26:39 +00:00
|
|
|
uint8_t GB_get_oam_info(GB_gameboy_t *gb, GB_oam_info_t *dest, uint8_t *sprite_height);
|
2017-10-12 14:22:22 +00:00
|
|
|
uint32_t GB_convert_rgb15(GB_gameboy_t *gb, uint16_t color);
|
|
|
|
void GB_set_color_correction_mode(GB_gameboy_t *gb, GB_color_correction_mode_t mode);
|
2016-03-30 20:07:55 +00:00
|
|
|
#endif /* display_h */
|