SDL 3.0
|
Go to the source code of this file.
Macros | |
Swap to native | |
Byteswap item from the specified endianness to the native endianness. | |
#define | SDL_SwapLE16(X) (X) |
#define | SDL_SwapLE32(X) (X) |
#define | SDL_SwapLE64(X) (X) |
#define | SDL_SwapFloatLE(X) (X) |
#define | SDL_SwapBE16(X) SDL_Swap16(X) |
#define | SDL_SwapBE32(X) SDL_Swap32(X) |
#define | SDL_SwapBE64(X) SDL_Swap64(X) |
#define | SDL_SwapFloatBE(X) SDL_SwapFloat(X) |
The two types of endianness | |
#define | SDL_LIL_ENDIAN 1234 |
#define | SDL_BIG_ENDIAN 4321 |
#define | SDL_BYTEORDER SDL_LIL_ENDIAN |
#define | SDL_FLOATWORDORDER SDL_BYTEORDER |
#define | HAS_BUILTIN_BSWAP16 0 |
#define | HAS_BUILTIN_BSWAP32 0 |
#define | HAS_BUILTIN_BSWAP64 0 |
#define | HAS_BROKEN_BSWAP 0 |
SDL_FORCE_INLINE Uint16 | SDL_Swap16 (Uint16 x) |
SDL_FORCE_INLINE Uint32 | SDL_Swap32 (Uint32 x) |
SDL_FORCE_INLINE Uint64 | SDL_Swap64 (Uint64 x) |
SDL_FORCE_INLINE float | SDL_SwapFloat (float x) |
Functions for reading and writing endian-specific values
Definition in file SDL_endian.h.
#define HAS_BROKEN_BSWAP 0 |
Definition at line 138 of file SDL_endian.h.
#define HAS_BUILTIN_BSWAP16 0 |
Definition at line 135 of file SDL_endian.h.
#define HAS_BUILTIN_BSWAP32 0 |
Definition at line 136 of file SDL_endian.h.
#define HAS_BUILTIN_BSWAP64 0 |
Definition at line 137 of file SDL_endian.h.
#define SDL_BIG_ENDIAN 4321 |
Definition at line 55 of file SDL_endian.h.
#define SDL_BYTEORDER SDL_LIL_ENDIAN |
Definition at line 85 of file SDL_endian.h.
#define SDL_FLOATWORDORDER SDL_BYTEORDER |
Definition at line 108 of file SDL_endian.h.
#define SDL_LIL_ENDIAN 1234 |
Definition at line 54 of file SDL_endian.h.
#define SDL_SwapBE16 | ( | X | ) | SDL_Swap16(X) |
Swap 16-bit big endian integer to 16-bit native endian integer.
Definition at line 376 of file SDL_endian.h.
#define SDL_SwapBE32 | ( | X | ) | SDL_Swap32(X) |
Swap 32-bit big endian integer to 32-bit native endian integer.
Definition at line 377 of file SDL_endian.h.
#define SDL_SwapBE64 | ( | X | ) | SDL_Swap64(X) |
Swap 64-bit big endian integer to 64-bit native endian integer.
Definition at line 378 of file SDL_endian.h.
#define SDL_SwapFloatBE | ( | X | ) | SDL_SwapFloat(X) |
Swap endian float to native endian float.
Definition at line 379 of file SDL_endian.h.
#define SDL_SwapFloatLE | ( | X | ) | (X) |
Swap little endian float to native endian float.
Definition at line 375 of file SDL_endian.h.
#define SDL_SwapLE16 | ( | X | ) | (X) |
Swap 16-bit little endian integer to 16-bit native endian integer.
Definition at line 372 of file SDL_endian.h.
#define SDL_SwapLE32 | ( | X | ) | (X) |
Swap 32-bit little endian integer to 32-bit native endian integer.
Definition at line 373 of file SDL_endian.h.
#define SDL_SwapLE64 | ( | X | ) | (X) |
Swap 64-bit little endian integer to 64-bit native endian integer.
Definition at line 374 of file SDL_endian.h.
SDL_FORCE_INLINE Uint16 SDL_Swap16 | ( | Uint16 | x | ) |
Byte swap 16-bit integer.
Definition at line 187 of file SDL_endian.h.
References SDL_static_cast.
SDL_FORCE_INLINE Uint32 SDL_Swap32 | ( | Uint32 | x | ) |
Byte swap 32-bit integer.
Definition at line 241 of file SDL_endian.h.
References SDL_static_cast.
Referenced by SDL_Swap64(), and SDL_SwapFloat().
SDL_FORCE_INLINE Uint64 SDL_Swap64 | ( | Uint64 | x | ) |
Byte swap 64-bit integer.
Definition at line 289 of file SDL_endian.h.
References SDL_static_cast, and SDL_Swap32().
SDL_FORCE_INLINE float SDL_SwapFloat | ( | float | x | ) |
Byte swap floating point number.
Definition at line 309 of file SDL_endian.h.
References SDL_Swap32().