[SDL] SDL_BYTEORDER and amask
nbs at sonic.net
Sun Aug 11 01:26:01 PDT 2002
In Tux Paint, I have the following piece of code:
/* Create a surface to render into: */
if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
amask = 0x000000FF;
amask = 0xFF000000;
Works great! Except on Sparcs (both Solaris and Linux).
When I tried reversing the 'amask' decision
( e.g., making it: "if (SDL_BYTEORDER != SDL_BIG_ENDIAN)" )
and then run it again on my Linux/Intel box here, I get
similar (incorrect) results as the Sparc users are when the test is as shown
Is that test correct or appropriate? I _assume_ the "SDL_BYTEORDER" is
set correctly for Sparc users, and that either I don't understand
(or was misinformed) as to what to do about deciding what 'amask' should be.
Any ideas? I'm going to have one of the Sparc users try reversing the
'if' on their system, and see if things work right for them.
If that works, should I assume that 'amask' is the same across all
More information about the SDL