Mercurial > sdl-ios-xcode
changeset 50:eda2f15ffb70
Oops, back it out...
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Thu, 07 Jun 2001 15:04:04 +0000 |
parents | 6f3c474f9abd |
children | fba28d77901f |
files | src/video/SDL_pixels.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_pixels.c Thu Jun 07 14:57:07 2001 +0000 +++ b/src/video/SDL_pixels.c Thu Jun 07 15:04:04 2001 +0000 @@ -464,6 +464,7 @@ Uint8 *map; int i; int bpp; + unsigned alpha; bpp = ((dst->BytesPerPixel == 3) ? 4 : dst->BytesPerPixel); map = (Uint8 *)malloc(src->ncolors*bpp); @@ -472,11 +473,12 @@ 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, SDL_ALPHA_OPAQUE); + src->colors[i].b, alpha); } return(map); }