Files
dangerzone/include/dangerzone/engine.h
T
2026-10-06 12:07:12 +02:00

31 lines
493 B
C

#pragma once
#include <SDL3/SDL.h>
#include <stdbool.h>
#include <stdint.h>
typedef struct {
SDL_Event event;
bool is_running;
bool framebuffer_dirty;
SDL_Rect dirty_rect;
uint16_t width, height;
uint32_t *framebuffer;
} game_state_t;
extern game_state_t *game_state;
bool
engine_init(
uint32_t window_width,
uint32_t window_height,
const char window_name[],
void (*engine_poll_events)(void),
void (*engine_update_framebuffer)(void)
);
void
engine_start();
void
engine_stop();