diff options
Diffstat (limited to 'sources/TZR_DirectResourceLoad.c')
-rw-r--r-- | sources/TZR_DirectResourceLoad.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/sources/TZR_DirectResourceLoad.c b/sources/TZR_DirectResourceLoad.c index e3579b1..7b53a5e 100644 --- a/sources/TZR_DirectResourceLoad.c +++ b/sources/TZR_DirectResourceLoad.c @@ -6,10 +6,6 @@ #include <SDL2/SDL_rwops.h> #include <string.h> -#ifdef TZR_TTF -#include <SDL2/SDL_ttf.h> -#endif - #ifdef TZR_STB_IMAGE #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" @@ -127,24 +123,6 @@ TZR_DirectResourceLoad(TZR_Resource *res, const void *data, int size) res->sound.ptr = chunk; #endif } break; - case TZR_RES_FONT: -#ifdef TZR_TTF - { - const int ptsize = 20; - SDL_RWops *const rw = SDL_RWFromConstMem(data, size); - if (rw == NULL) - return sdl_error(-1); - TTF_Font *font = TTF_OpenFontRW(rw, 0, ptsize); - SDL_RWclose(rw); - if (font == NULL) - return sdl_error(-1); - res->ttf.ptr = font; - res->ttf.ptsize = ptsize; - } break; -#else - SDL_Log("add -DTZR_TTF= to your compile flags"); - return -1; -#endif default: fprintf(stderr, "invalid type\n"); return -1; |