#ifndef GRAPHICS_H #define GRAPHICS_H #include #include struct s_chip8; typedef struct s_chip8 t_chip8; #define SCREEN_WIDTH 64 #define SCREEN_HEIGHT 32 #define SCALE 12 typedef struct s_display { SDL_Window *window; SDL_Renderer *renderer; SDL_Texture *texture; uint32_t pixels[SCREEN_WIDTH * SCREEN_HEIGHT]; } t_display; int graphics_init(t_display *display); void graphics_render(t_chip8 *emu); void graphics_cleanup(t_display *display); void graphics_draw_sprite(t_chip8 *emu, uint8_t x, uint8_t y, uint8_t n); int graphics_display_ready(); #endif