From 90b50721fc6cdc6a8ca3266529d6d58fbddc6c11 Mon Sep 17 00:00:00 2001 From: stpohle Date: Sat, 3 Jan 2004 23:57:13 +0000 Subject: [PATCH] the gray image was shown in 16bit only as blue image.. forgot to set the gray image to the right screen settings. --- src/gfxpixelimage.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;