1#ifndef SDL3PP_ENDIAN_H_
2#define SDL3PP_ENDIAN_H_
4#include <SDL3/SDL_endian.h>
5#include "SDL3pp_stdinc.h"
49#define SDL_LIL_ENDIAN 1234
68#define SDL_BIG_ENDIAN 4321
88#define SDL_BYTEORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
108#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
131constexpr float SwapFloat(
float x) {
return SDL_SwapFloat(x); }
258constexpr float SwapFloatLE(
float x) {
return SDL_SwapFloatLE(x); }
322constexpr float SwapFloatBE(
float x) {
return SDL_SwapFloatBE(x); }
constexpr Uint16 Swap16(Uint16 x)
Byte-swap an unsigned 16-bit number.
Definition: SDL3pp_endian.h:152
constexpr Uint16 Swap16BE(Uint16 x)
Swap a 16-bit value from bigendian to native byte order.
Definition: SDL3pp_endian.h:274
constexpr Uint64 Swap64LE(Uint64 x)
Swap a 64-bit value from littleendian to native byte order.
Definition: SDL3pp_endian.h:242
constexpr Uint64 Swap64BE(Uint64 x)
Swap a 64-bit value from bigendian to native byte order.
Definition: SDL3pp_endian.h:306
constexpr float SwapFloatBE(float x)
Swap a floating point value from bigendian to native byte order.
Definition: SDL3pp_endian.h:322
constexpr Uint64 Swap64(Uint64 x)
Byte-swap an unsigned 64-bit number.
Definition: SDL3pp_endian.h:194
constexpr float SwapFloatLE(float x)
Swap a floating point value from littleendian to native byte order.
Definition: SDL3pp_endian.h:258
constexpr Uint32 Swap32(Uint32 x)
Byte-swap an unsigned 32-bit number.
Definition: SDL3pp_endian.h:173
constexpr Uint32 Swap32BE(Uint32 x)
Swap a 32-bit value from bigendian to native byte order.
Definition: SDL3pp_endian.h:290
constexpr float SwapFloat(float x)
Byte-swap a floating point number.
Definition: SDL3pp_endian.h:131
constexpr Uint32 Swap32LE(Uint32 x)
Swap a 32-bit value from littleendian to native byte order.
Definition: SDL3pp_endian.h:226
constexpr Uint16 Swap16LE(Uint16 x)
Swap a 16-bit value from littleendian to native byte order.
Definition: SDL3pp_endian.h:210
Uint16 Uint16
An unsigned 16-bit integer type.
Definition: SDL3pp_stdinc.h:294
Uint32 Uint32
An unsigned 32-bit integer type.
Definition: SDL3pp_stdinc.h:328
Uint64 Uint64
An unsigned 64-bit integer type.
Definition: SDL3pp_stdinc.h:366
Main include header for the SDL3pp library.