refactor SDL out of core files

This commit is contained in:
asrael 2025-10-17 17:54:33 -05:00
parent 82ed6b4ea9
commit 9d183341ae
21 changed files with 1419 additions and 1028 deletions

View file

@ -1,7 +1,6 @@
#include <stdlib.h>
#include <string.h>
#include <SDL3/SDL.h>
#include "pxl8_bsp.h"
#include "pxl8_macros.h"
#include "pxl8_world.h"
@ -13,7 +12,7 @@ struct pxl8_world {
};
pxl8_world* pxl8_world_create(void) {
pxl8_world* world = (pxl8_world*)SDL_calloc(1, sizeof(pxl8_world));
pxl8_world* world = (pxl8_world*)calloc(1, sizeof(pxl8_world));
if (!world) {
pxl8_error("Failed to allocate world");
return NULL;
@ -32,7 +31,7 @@ void pxl8_world_destroy(pxl8_world* world) {
pxl8_bsp_destroy(&world->bsp);
}
SDL_free(world);
free(world);
}
pxl8_result pxl8_world_load(pxl8_world* world, const char* path) {