|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: gfx.c,v 1.28 2003/12/24 02:38:15 stpohle Exp $ */
|
|
|
|
/* $Id: gfx.c,v 1.29 2003/12/31 01:00:11 stpohle Exp $ */
|
|
|
|
/* gfx.c */
|
|
|
|
/* gfx.c */
|
|
|
|
|
|
|
|
|
|
|
|
#include "bomberclone.h"
|
|
|
|
#include "bomberclone.h"
|
|
|
@ -158,6 +158,7 @@ void
|
|
|
|
gfx_loaddata ()
|
|
|
|
gfx_loaddata ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
int r,g,b;
|
|
|
|
char filename[255];
|
|
|
|
char filename[255];
|
|
|
|
SDL_Surface *tmpimage,
|
|
|
|
SDL_Surface *tmpimage,
|
|
|
|
*tmpimage1;
|
|
|
|
*tmpimage1;
|
|
|
@ -190,7 +191,9 @@ gfx_loaddata ()
|
|
|
|
printf ("Can't load image: %s\n", SDL_GetError ());
|
|
|
|
printf ("Can't load image: %s\n", SDL_GetError ());
|
|
|
|
exit (1);
|
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SDL_SetColorKey (tmpimage, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage->format, 255, 255, 255));
|
|
|
|
if (i == 0)
|
|
|
|
|
|
|
|
getRGBpixel (tmpimage, 0, 0, &r, &g, &b);
|
|
|
|
|
|
|
|
SDL_SetColorKey (tmpimage, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage->format, r,g,b));
|
|
|
|
menu.images[i] = SDL_DisplayFormat (tmpimage);
|
|
|
|
menu.images[i] = SDL_DisplayFormat (tmpimage);
|
|
|
|
SDL_FreeSurface (tmpimage);
|
|
|
|
SDL_FreeSurface (tmpimage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|