Animated Death scene :o)

origin
stpohle 23 years ago
parent c1ef50c8dd
commit 9a75a5bde2

@ -63,10 +63,10 @@ getpixel (SDL_Surface * surface, int x, int y)
void
putpixel (SDL_Surface * surface, int x, int y, Uint32 pixel)
{
int bpp = surface->format->BytesPerPixel;
/* Here p is the address to the pixel we want to set */
int bpp = surface->format->BytesPerPixel;
Uint8 *p = (Uint8 *) surface->pixels + y * surface->pitch + x * bpp;
switch (bpp) {
case 1:
*p = pixel;
@ -163,6 +163,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);
if (surface == NULL) {
fprintf (stderr, "CreateRGBSurface failed: %s\n", SDL_GetError ());

Loading…
Cancel
Save