/* single compilation unit for every stb implementation */ #define STB_DS_IMPLEMENTATION #define STBDS_ASSERT SDL_assert #define STBDS_REALLOC(context,ptr,size) ((void)(context), SDL_realloc(ptr, size)) #define STBDS_FREE(context,ptr) ((void)(context), SDL_free(ptr)) #include #define STB_RECT_PACK_IMPLEMENTATION #define STBRP_SORT SDL_qsort #define STBRP_ASSERT SDL_assert #include #define STB_TRUETYPE_IMPLEMENTATION #define STBTT_malloc(x,u) ((void)(u), SDL_malloc(x)) #define STBTT_free(x,u) ((void)(u), SDL_free(x)) #define STBTT_assert(x) SDL_assert(x) #define STBTT_strlen(x) SDL_strlen(x) #define STBTT_memcpy SDL_memcpy #define STBTT_memset SDL_memset #include #define STB_IMAGE_IMPLEMENTATION #include