Could somebody just run this? (Michael Benfield)

Uint32 mask1 = 0xff000000; Uint32 mask2 = 0x00ff0000;
Uint32 mask3 = 0x0000ff00; Uint32 mask4 = 0x000000ff;

#if SDL_BYTEORDER == SDL_BIG_ENDIAN
rmask = 0xff000000;
gmask = 0x00ff0000;
bmask = 0x0000ff00;
amask = 0x000000ff;
#else
rmask = 0x000000ff;
gmask = 0x0000ff00;
bmask = 0x00ff0000;
amask = 0xff000000;
#endif

Regards,
Thomas Omilian

#if SDL_BYTEORDER == SDL_BIG_ENDIAN

Did you actually run the code? Did you change it with your fix and run
that? Did you even look at the code? No. This has nothing to do with
byte order. The code tries the masks in both orders and gets incorrect
results both ways, on both a little endian and a big endian system. I
emailed the maintainer of SDL_gfx; he can reproduce the bug and is
working on fixing it now.

Good grief…

Mike BenfieldOn Sep 5, 2005, at 4:55 PM, Thomas Omilian wrote: