Font loading fix.
This commit is contained in:
parent
af99ec8f3d
commit
5d2077395e
|
@ -63,14 +63,14 @@ static void initFont(char *name, char *filename)
|
||||||
f = malloc(sizeof(Font));
|
f = malloc(sizeof(Font));
|
||||||
memset(f, 0, sizeof(Font));
|
memset(f, 0, sizeof(Font));
|
||||||
|
|
||||||
|
font = TTF_OpenFont(filename, FONT_SIZE);
|
||||||
|
|
||||||
initChars(f);
|
initChars(f);
|
||||||
|
|
||||||
surface = SDL_CreateRGBSurface(0, FONT_TEXTURE_SIZE, FONT_TEXTURE_SIZE, 32, 0, 0, 0, 0xff);
|
surface = SDL_CreateRGBSurface(0, FONT_TEXTURE_SIZE, FONT_TEXTURE_SIZE, 32, 0, 0, 0, 0xff);
|
||||||
|
|
||||||
SDL_SetColorKey(surface, SDL_TRUE, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
|
SDL_SetColorKey(surface, SDL_TRUE, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
|
||||||
|
|
||||||
font = TTF_OpenFont(filename, FONT_SIZE);
|
|
||||||
|
|
||||||
dest.x = dest.y = 0;
|
dest.x = dest.y = 0;
|
||||||
|
|
||||||
for (i = 0 ; i < NUM_GLYPH_BUCKETS ; i++)
|
for (i = 0 ; i < NUM_GLYPH_BUCKETS ; i++)
|
||||||
|
|
Loading…
Reference in New Issue