From 378294b50294322cfd6f79d91156f5c83d4db23e Mon Sep 17 00:00:00 2001 From: stpohle Date: Sat, 24 May 2003 23:25:39 +0000 Subject: [PATCH] Fixed datapath, for develouping on bc without having it installed --- src/gfx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gfx.c b/src/gfx.c index ca73433..64d59ec 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -512,8 +512,13 @@ gfx_loaddata () 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); + sprintf (bman.datapath, "data"); + 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)); gfx.font.image = SDL_DisplayFormat (tmpimage);