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_font.h"
pxl8_result pxl8_font_create_atlas(const pxl8_font* font, u8** atlas_data, i32* atlas_width, i32* atlas_height) {
@ -16,7 +15,7 @@ pxl8_result pxl8_font_create_atlas(const pxl8_font* font, u8** atlas_data, i32*
*atlas_height = rows_needed * font->default_height;
i32 atlas_size = (*atlas_width) * (*atlas_height);
*atlas_data = (u8*)SDL_malloc(atlas_size);
*atlas_data = (u8*)malloc(atlas_size);
if (!*atlas_data) {
return PXL8_ERROR_OUT_OF_MEMORY;
}