Added SDL_FOURCC()

This commit is contained in:
Sam Lantinga 2010-07-07 21:36:09 -07:00
parent 987085b1ee
commit f9904e2bc9
2 changed files with 8 additions and 2 deletions

View file

@ -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
*/