start menu
This commit is contained in:
+3
-2
@@ -13,14 +13,15 @@ typedef struct FontCacheObject {
|
||||
TTF_Font* font;
|
||||
} FontCacheObject_t;
|
||||
|
||||
FontCacheObject_t fontCache[FONT_CACHE_SIZE];
|
||||
unsigned fontCacheSize = 0;
|
||||
static FontCacheObject_t fontCache[FONT_CACHE_SIZE];
|
||||
static unsigned fontCacheSize = 0;
|
||||
|
||||
void text_freeFontCache(void){
|
||||
for(unsigned i = 0; i < fontCacheSize; ++i){
|
||||
free(fontCache[i].file);
|
||||
TTF_CloseFont(fontCache[i].font);
|
||||
}
|
||||
fontCacheSize = 0;
|
||||
}
|
||||
|
||||
int text_renderText(RenderObject_t* renderObject, float x, float y, int z, float scale, SDL_Color color, const char* fontFilename, int fontSize, char* format, ...){
|
||||
|
||||
Reference in New Issue
Block a user