18#define C8_LOW_DISPLAY_WIDTH 64
23#define C8_LOW_DISPLAY_HEIGHT 32
28#define C8_HIGH_DISPLAY_WIDTH 128
33#define C8_HIGH_DISPLAY_HEIGHT 64
38#define C8_DEFAULT_WINDOW_WIDTH 800
43#define C8_DEFAULT_WINDOW_HEIGHT 400
48#define C8_WINDOW_SCALE_X (C8_DEFAULT_WINDOW_WIDTH / C8_LOW_DISPLAY_WIDTH)
53#define C8_WINDOW_SCALE_Y (C8_DEFAULT_WINDOW_HEIGHT / C8_LOW_DISPLAY_HEIGHT)
58#define C8_DISPLAYMODE_LOW 0
63#define C8_DISPLAYMODE_HIGH 1
int c8_tick(int *)
Grab current keypresses and delay execution to match clockspeed.
Definition: graphics.c:61
void c8_deinit_graphics(void)
Deinitialize graphics system.
Definition: graphics.c:27
uint8_t c8_init_graphics(void)
Initialize graphics system.
Definition: graphics.c:38
void c8_render(C8_Display *, int *)
Render graphics.
Definition: graphics.c:50
void c8_beep(void)
Play sound.
Definition: graphics.c:18
uint8_t * c8_get_pixel(C8_Display *, int, int)
Get the value of (x,y) from display
Definition: graphics.c:75
#define C8_HIGH_DISPLAY_HEIGHT
Height of the high-resolution display.
Definition: graphics.h:33
#define C8_HIGH_DISPLAY_WIDTH
Width of the high-resolution display.
Definition: graphics.h:28
Represents a graphics display.
Definition: graphics.h:70
uint8_t x
Offset (for C8_DISPLAYMODE_LOW)
Definition: graphics.h:73
uint8_t y
Offset (for C8_DISPLAYMODE_HIGH)
Definition: graphics.h:74
uint8_t mode
Display mode (C8_DISPLAYMODE_LOW or C8_DISPLAYMODE_HIGH)
Definition: graphics.h:72