copy_32 function in SDL_RLEaccel.c has below tow statement:--------------------------------------
PIXEL_FROM_RGB(pixel, dfmt, r, g, b);
*d++ = pixel | a << 24;
PIXEL_FROM_RGB is macro, it is defined in SDL_blit.h.
#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \
{ \
Pixel = ((r>>fmt->Rloss)<Rshift)| \
((g>>fmt->Gloss)<<fmt->Gshift)| \
((b>>fmt->Bloss)<<fmt->Bshift)| \
fmt->Amask; \
}
Basing PIXEL_FROM_RGB definition, when fmt->Amask is 0xff000000, then:
PIXEL_FROM_RGB(pixel, dfmt, r, g, b) will make bit[31, 24] of pixel variable
always 0xff!
pixel | a << 24, this operation does nothing!
On caller view, all translucent pixels change to opaque after RLE!
Code change to:
PIXEL_FROM_RGB(pixel, dfmt, r, g, b);
*d++ = (pixel & 0xffffff) | a << 24;