Mattias' patch
authorSam Lantinga <slouken@lokigames.com>
Thu, 07 Jun 2001 14:53:18 +0000
changeset 48 f97decee03a9
parent 47 45b1c4303f87
child 49 6f3c474f9abd
Mattias' patch
src/video/SDL_pixels.c
--- a/src/video/SDL_pixels.c	Thu Jun 07 14:28:11 2001 +0000
+++ b/src/video/SDL_pixels.c	Thu Jun 07 14:53:18 2001 +0000
@@ -464,7 +464,6 @@
 	Uint8 *map;
 	int i;
 	int  bpp;
-	unsigned alpha;
 
 	bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel);
 	map = (Uint8 *)malloc(src->ncolors*bpp);
@@ -473,12 +472,11 @@
 		return(NULL);
 	}
 
-	alpha = dst->Amask ? SDL_ALPHA_OPAQUE : 0;
 	/* We memory copy to the pixel map so the endianness is preserved */
 	for ( i=0; i<src->ncolors; ++i ) {
 		ASSEMBLE_RGBA(&map[i*bpp], dst->BytesPerPixel, dst,
 			      src->colors[i].r, src->colors[i].g,
-			      src->colors[i].b, alpha);
+			      src->colors[i].b, SDL_ALPHA_OPAQUE);
 	}
 	return(map);
 }