Fixed editor bug - need to laod fonts before loading imagesets now
This commit is contained in:
parent
9ad9277585
commit
6b33fbe7de
21
edit.c
21
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;
|
||||
|
|
Loading…
Reference in New Issue