Respawn GFX is now transparent

origin
stpohle 22 years ago
parent 81ccc527ea
commit b6b4a67395

@ -1,4 +1,4 @@
/* $Id: gfx.c,v 1.32 2004/01/30 22:32:51 stpohle Exp $ */
/* $Id: gfx.c,v 1.33 2004/02/01 03:39:02 stpohle Exp $ */
/* gfx.c */
#include "bomberclone.h"
@ -116,16 +116,10 @@ gfx_load_players (int sx, int sy)
exit (1);
}
gfx.respawn.frames = tmpimage->h / (2 * GFX_IMGSIZE);
tmpimage1 =
gfx.respawn.image =
scale_image (tmpimage, (2 * sx * tmpimage->w) / (2 * GFX_IMGSIZE),
gfx.respawn.frames * (2 * sy));
// getRGBpixel (tmpimage1, 0, 0, &r, &g, &b);
// SDL_SetColorKey (tmpimage1, SDL_SRCCOLORKEY, SDL_MapRGB (tmpimage1->format, r, g, b));
gfx.respawn.image = SDL_DisplayFormat (tmpimage1);
// SDL_SetAlpha(gfx.respawn.image, SDL_SRCALPHA, 0);
SDL_FreeSurface (tmpimage);
SDL_FreeSurface (tmpimage1);
};

@ -1,4 +1,4 @@
/* $Id: gfxpixelimage.c,v 1.9 2004/01/30 22:32:51 stpohle Exp $ */
/* $Id: gfxpixelimage.c,v 1.10 2004/02/01 03:39:02 stpohle Exp $ */
/* gfx pixel manipulation and image manipulation */
#include "bomberclone.h"
@ -224,7 +224,7 @@ scale_image (SDL_Surface *orginal, int newx, int newy)
amask = 0xff000000;
#endif /* */
surface = SDL_CreateRGBSurface (SDL_SWSURFACE, newx, newy, 32, rmask, gmask, bmask, amask);
surface = SDL_CreateRGBSurface (SDL_HWSURFACE, newx, newy, 32, rmask, gmask, bmask, amask);
if (surface == NULL) {
fprintf (stderr, "CreateRGBSurface failed: %s\n", SDL_GetError ());
return NULL;

Loading…
Cancel
Save