refactor SDL out of core files

This commit is contained in:
asrael 2025-10-17 17:54:33 -05:00
parent 82ed6b4ea9
commit c9f5f3b08f
20 changed files with 1425 additions and 1027 deletions

18
src/pxl8_hal.h Normal file
View file

@ -0,0 +1,18 @@
#pragma once
#include "pxl8_types.h"
typedef struct pxl8_hal {
void* (*create)(pxl8_color_mode mode, pxl8_resolution res,
const char* title, i32 win_w, i32 win_h);
void (*destroy)(void* platform_data);
u64 (*get_ticks)(void);
void (*present)(void* platform_data);
void (*upload_framebuffer)(void* platform_data, const u8* fb,
i32 w, i32 h, const u32* palette,
pxl8_color_mode mode);
} pxl8_hal;
extern const pxl8_hal pxl8_hal_sdl3;