the gray image was shown in 16bit only as blue image..

forgot to set the gray image to the right screen settings.
origin
stpohle 22 years ago
parent b0652a0814
commit 90b50721fc

@ -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;

Loading…
Cancel
Save