Fixed datapath, for develouping on bc without having it installed

origin
stpohle 23 years ago
parent de593d410a
commit 378294b502

@ -512,8 +512,13 @@ gfx_loaddata ()
sprintf (filename, "%s/gfx/font.bmp", bman.datapath); sprintf (filename, "%s/gfx/font.bmp", bman.datapath);
tmpimage = SDL_LoadBMP (filename); tmpimage = SDL_LoadBMP (filename);
if (tmpimage == NULL) { if (tmpimage == NULL) {
printf ("Can't load image: %s\n", SDL_GetError ()); sprintf (bman.datapath, "data");
exit (1); sprintf (filename, "%s/gfx/font.bmp", bman.datapath);
tmpimage = SDL_LoadBMP (filename);
if (tmpimage == NULL) {
printf ("Can't load image: %s\n", SDL_GetError ());
exit (1);
}
} }
SDL_SetColorKey (tmpimage, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage->format, 0, 0, 0)); SDL_SetColorKey (tmpimage, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage->format, 0, 0, 0));
gfx.font.image = SDL_DisplayFormat (tmpimage); gfx.font.image = SDL_DisplayFormat (tmpimage);

Loading…
Cancel
Save