libc8
CHIP-8 utility library
graphics.c File Reference
#include "graphics.h"
#include <stdio.h>

Functions

void __attribute__ ((weak))
 Play sound. More...
 
uint8_t * c8_get_pixel (c8_display_t *display, int x, int y)
 Get the value of (x,y) from display More...
 

Detailed Description

Backend-agnostic graphics-related functions

Function Documentation

◆ __attribute__()

int __attribute__ ( (weak)  )

Play sound.

Grab current keypresses and delay execution to match clockspeed.

Render graphics.

Initialize graphics system.

Deinitialize graphics system.

This definition is overridden in libc8_sdl2 by definition in internal/graphics_sdl.c.

In libc8, this should be overridden by the user if c8_simulate() is called.

◆ c8_get_pixel()

uint8_t * c8_get_pixel ( c8_display_t display,
int  x,
int  y 
)

Get the value of (x,y) from display

Parameters
displaydisplay_t to get pixel from
xthe x value
ythe y value
Returns
pointer to value of (x,y) in display