SDL 3.0
|
Go to the source code of this file.
The two types of endianness | |
CategoryEndianFunctions for reading and writing endian-specific values. | |
#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 |
#define | SDL_Swap16LE(x) (x) |
#define | SDL_Swap32LE(x) (x) |
#define | SDL_Swap64LE(x) (x) |
#define | SDL_SwapFloatLE(x) (x) |
#define | SDL_Swap16BE(x) SDL_Swap16(x) |
#define | SDL_Swap32BE(x) SDL_Swap32(x) |
#define | SDL_Swap64BE(x) SDL_Swap64(x) |
#define | SDL_SwapFloatBE(x) SDL_SwapFloat(x) |
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) |
#define HAS_BROKEN_BSWAP 0 |
Definition at line 147 of file SDL_endian.h.
#define HAS_BUILTIN_BSWAP16 0 |
Definition at line 144 of file SDL_endian.h.
#define HAS_BUILTIN_BSWAP32 0 |
Definition at line 145 of file SDL_endian.h.
#define HAS_BUILTIN_BSWAP64 0 |
Definition at line 146 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 94 of file SDL_endian.h.
#define SDL_FLOATWORDORDER SDL_BYTEORDER |
Definition at line 117 of file SDL_endian.h.
#define SDL_LIL_ENDIAN 1234 |
Definition at line 54 of file SDL_endian.h.
#define SDL_Swap16BE | ( | x | ) | SDL_Swap16(x) |
Definition at line 530 of file SDL_endian.h.
#define SDL_Swap16LE | ( | x | ) | (x) |
Definition at line 526 of file SDL_endian.h.
#define SDL_Swap32BE | ( | x | ) | SDL_Swap32(x) |
Definition at line 531 of file SDL_endian.h.
#define SDL_Swap32LE | ( | x | ) | (x) |
Definition at line 527 of file SDL_endian.h.
#define SDL_Swap64BE | ( | x | ) | SDL_Swap64(x) |
Definition at line 532 of file SDL_endian.h.
#define SDL_Swap64LE | ( | x | ) | (x) |
Definition at line 528 of file SDL_endian.h.
#define SDL_SwapFloatBE | ( | x | ) | SDL_SwapFloat(x) |
Definition at line 533 of file SDL_endian.h.
#define SDL_SwapFloatLE | ( | x | ) | (x) |
Definition at line 529 of file SDL_endian.h.
SDL_FORCE_INLINE Uint16 SDL_Swap16 | ( | Uint16 | x | ) |
SDL_FORCE_INLINE Uint32 SDL_Swap32 | ( | Uint32 | x | ) |
Definition at line 236 of file SDL_endian.h.
References SDL_static_cast.
Referenced by SDL_Swap64(), and SDL_SwapFloat().
SDL_FORCE_INLINE Uint64 SDL_Swap64 | ( | Uint64 | x | ) |
Definition at line 279 of file SDL_endian.h.
References SDL_static_cast, and SDL_Swap32().
SDL_FORCE_INLINE float SDL_SwapFloat | ( | float | x | ) |
Byte-swap a floating point number.
This will always byte-swap the value, whether it's currently in the native byteorder of the system or not. You should use SDL_SwapFloatLE or SDL_SwapFloatBE instead, in most cases.
Note that this is a forced-inline function in a header, and not a public API function available in the SDL library (which is to say, the code is embedded in the calling program and the linker and dynamic loader will not be able to find this function inside SDL itself).
x | the value to byte-swap. |
\threadsafety It is safe to call this function from any thread.
Definition at line 314 of file SDL_endian.h.
References SDL_Swap32().