refactor SDL out of core files
This commit is contained in:
parent
82ed6b4ea9
commit
9d183341ae
21 changed files with 1419 additions and 1028 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue