Mercurial > sdl-ios-xcode
diff include/SDL_stdinc.h @ 4492:bff93336121e
Added SDL_FOURCC()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 07 Jul 2010 21:36:09 -0700 |
parents | f7b03b6838cb |
children | 1f7ad083fd3c 436183eb30c8 |
line wrap: on
line diff
--- a/include/SDL_stdinc.h Wed Jul 07 21:35:44 2010 -0700 +++ b/include/SDL_stdinc.h Wed Jul 07 21:36:09 2010 -0700 @@ -101,6 +101,13 @@ #endif /*@}*//*Cast operators*/ +/* Define a four character code as a Uint32 */ +#define SDL_FOURCC(A, B, C, D) \ + ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \ + (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \ + (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \ + (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24)) + /** * \name Basic data types */