comparison src/video/SDL_blit.h @ 535:917cc5c56176

Fixed alpha blending bug (thanks Glenn!)
author Sam Lantinga <slouken@libsdl.org>
date Tue, 22 Oct 2002 21:41:21 +0000
parents f6ffac90895c
children 417f8709e648
comparison
equal deleted inserted replaced
534:1ea658a3dd52 535:917cc5c56176
328 #define PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a) \ 328 #define PIXEL_FROM_RGBA(pixel, fmt, r, g, b, a) \
329 { \ 329 { \
330 pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \ 330 pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \
331 ((g>>fmt->Gloss)<<fmt->Gshift)| \ 331 ((g>>fmt->Gloss)<<fmt->Gshift)| \
332 ((b>>fmt->Bloss)<<fmt->Bshift)| \ 332 ((b>>fmt->Bloss)<<fmt->Bshift)| \
333 ((a<<fmt->Aloss)<<fmt->Ashift); \ 333 ((a>>fmt->Aloss)<<fmt->Ashift); \
334 } 334 }
335 #define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a) \ 335 #define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a) \
336 { \ 336 { \
337 switch (bpp) { \ 337 switch (bpp) { \
338 case 2: { \ 338 case 2: { \