diff --git a/src/gfx.c b/src/gfx.c index 4a8e636..94465eb 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -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 */ #include "bomberclone.h" @@ -158,6 +158,7 @@ void gfx_loaddata () { int i, j; + int r,g,b; char filename[255]; SDL_Surface *tmpimage, *tmpimage1; @@ -190,7 +191,9 @@ gfx_loaddata () printf ("Can't load image: %s\n", SDL_GetError ()); 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); SDL_FreeSurface (tmpimage); }