comparison src/video/SDL_blit_N.c @ 431:41cadcba32e8

Fixed SDL_DisplayFormatAlpha() on RGB surfaces with alpha
author Sam Lantinga <slouken@libsdl.org>
date Thu, 01 Aug 2002 23:06:39 +0000
parents c94b390687d2
children 22dbf364c017
comparison
equal deleted inserted replaced
430:60effdbf14ee 431:41cadcba32e8
1200 int dstskip = info->d_skip; 1200 int dstskip = info->d_skip;
1201 SDL_PixelFormat *srcfmt = info->src; 1201 SDL_PixelFormat *srcfmt = info->src;
1202 int srcbpp = srcfmt->BytesPerPixel; 1202 int srcbpp = srcfmt->BytesPerPixel;
1203 SDL_PixelFormat *dstfmt = info->dst; 1203 SDL_PixelFormat *dstfmt = info->dst;
1204 int dstbpp = dstfmt->BytesPerPixel; 1204 int dstbpp = dstfmt->BytesPerPixel;
1205 unsigned alpha = dstfmt->Amask ? SDL_ALPHA_OPAQUE : 0; 1205 unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
1206 1206
1207 while ( height-- ) { 1207 while ( height-- ) {
1208 DUFFS_LOOP( 1208 DUFFS_LOOP(
1209 { 1209 {
1210 Uint32 pixel; 1210 Uint32 pixel;
1356 Uint32 ckey = info->src->colorkey; 1356 Uint32 ckey = info->src->colorkey;
1357 SDL_PixelFormat *srcfmt = info->src; 1357 SDL_PixelFormat *srcfmt = info->src;
1358 SDL_PixelFormat *dstfmt = info->dst; 1358 SDL_PixelFormat *dstfmt = info->dst;
1359 int srcbpp = srcfmt->BytesPerPixel; 1359 int srcbpp = srcfmt->BytesPerPixel;
1360 int dstbpp = dstfmt->BytesPerPixel; 1360 int dstbpp = dstfmt->BytesPerPixel;
1361 unsigned alpha = dstfmt->Amask ? SDL_ALPHA_OPAQUE : 0; 1361 unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
1362 1362
1363 while ( height-- ) { 1363 while ( height-- ) {
1364 DUFFS_LOOP( 1364 DUFFS_LOOP(
1365 { 1365 {
1366 Uint32 pixel; 1366 Uint32 pixel;