From 6b33fbe7de49dc7605478eea316b9c981b97a72d Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Wed, 15 Oct 2008 05:20:47 +0000 Subject: [PATCH] Fixed editor bug - need to laod fonts before loading imagesets now --- edit.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/edit.c b/edit.c index 4234308..4a0295d 100644 --- a/edit.c +++ b/edit.c @@ -142,6 +142,17 @@ int main (int argc, char **argv) { screen = SDL_SetVideoMode(EDITORW,EDITORH,16,SDL_SWSURFACE|SDL_DOUBLEBUF|vidargs); #endif + /* load fonts */ + TTF_Init(); + sprintf(filename, "%s/editfont.ttf",datadir); + for (i = 1; i < MAXLETTERHEIGHT; i++) { + font[i] = TTF_OpenFont(filename,i); + if (!font[i]) { + printf("Error opening font: %s\n", TTF_GetError()); + return 1; + } + } + /* init tiles */ if (loadtiletypes("green.tiles")) { printf("Cannot initialise tiles\n"); @@ -179,16 +190,6 @@ int main (int argc, char **argv) { - /* load fonts */ - TTF_Init(); - sprintf(filename, "%s/editfont.ttf",datadir); - for (i = 1; i < MAXLETTERHEIGHT; i++) { - font[i] = TTF_OpenFont(filename,i); - if (!font[i]) { - printf("Error opening font: %s\n", TTF_GetError()); - return 1; - } - } state = LS_EDIT;