diff --git a/src/gfxpixelimage.c b/src/gfxpixelimage.c index 480c42e..4623735 100644 --- a/src/gfxpixelimage.c +++ b/src/gfxpixelimage.c @@ -1,4 +1,4 @@ -/* $Id: gfxpixelimage.c,v 1.5 2004/01/03 22:32:18 stpohle Exp $ */ +/* $Id: gfxpixelimage.c,v 1.6 2004/01/03 23:57:13 stpohle Exp $ */ /* gfx pixel manipulation and image manipulation */ #include "bomberclone.h" @@ -312,7 +312,9 @@ makegray_image (SDL_Surface * org) bmask = 0x000000ff; amask = 0xff000000; #endif - dest = SDL_CreateRGBSurface (SDL_SWSURFACE, org->w, org->h, 32, rmask, gmask, bmask, amask); + dest = SDL_CreateRGBSurface (SDL_SWSURFACE, org->w, org->h, org->format->BitsPerPixel, + org->format->Rmask, org->format->Gmask, + org->format->Bmask, org->format->Amask); if (dest == NULL) { fprintf (stderr, "CreateRGBSurface failed: %s\n", SDL_GetError ()); return NULL;