mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-22 10:43:11 +00:00
24 lines
476 B
C
24 lines
476 B
C
#pragma once
|
|
|
|
#include <input/input.h>
|
|
|
|
typedef enum {
|
|
EventTypeTick,
|
|
EventTypeKey,
|
|
} EventType;
|
|
|
|
typedef struct {
|
|
EventType type;
|
|
InputEvent input;
|
|
} GameEvent;
|
|
|
|
typedef void (*SandboxRenderCallback)(Canvas* canvas);
|
|
typedef void (*SandboxEventHandler)(GameEvent event);
|
|
|
|
void sandbox_init(
|
|
uint8_t fps,
|
|
SandboxRenderCallback render_callback,
|
|
SandboxEventHandler event_handler);
|
|
void sandbox_loop();
|
|
void sandbox_loop_exit();
|
|
void sandbox_free();
|