1#ifndef SDL3PP_ENDIAN_H_
2#define SDL3PP_ENDIAN_H_
4#include <SDL3/SDL_endian.h>
5#include "SDL3pp_stdinc.h"
47#define SDL_LIL_ENDIAN 1234
66#define SDL_BIG_ENDIAN 4321
86#define SDL_BYTEORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
106#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
192constexpr float SwapFloat(
float x) {
return SDL_SwapFloat(x); }
256constexpr float SwapFloatLE(
float x) {
return SDL_SwapFloatLE(x); }
320constexpr float SwapFloatBE(
float x) {
return SDL_SwapFloatBE(x); }
constexpr Uint16 Swap16(Uint16 x)
Byte-swap an unsigned 16-bit number.
Definition: SDL3pp_endian.h:129
constexpr Uint16 Swap16BE(Uint16 x)
Swap a 16-bit value from bigendian to native byte order.
Definition: SDL3pp_endian.h:272
constexpr Uint64 Swap64LE(Uint64 x)
Swap a 64-bit value from littleendian to native byte order.
Definition: SDL3pp_endian.h:240
constexpr Uint64 Swap64BE(Uint64 x)
Swap a 64-bit value from bigendian to native byte order.
Definition: SDL3pp_endian.h:304
constexpr float SwapFloatBE(float x)
Swap a floating point value from bigendian to native byte order.
Definition: SDL3pp_endian.h:320
constexpr Uint64 Swap64(Uint64 x)
Byte-swap an unsigned 64-bit number.
Definition: SDL3pp_endian.h:171
constexpr float SwapFloatLE(float x)
Swap a floating point value from littleendian to native byte order.
Definition: SDL3pp_endian.h:256
constexpr Uint32 Swap32(Uint32 x)
Byte-swap an unsigned 32-bit number.
Definition: SDL3pp_endian.h:150
constexpr Uint32 Swap32BE(Uint32 x)
Swap a 32-bit value from bigendian to native byte order.
Definition: SDL3pp_endian.h:288
constexpr float SwapFloat(float x)
Byte-swap a floating point number.
Definition: SDL3pp_endian.h:192
constexpr Uint32 Swap32LE(Uint32 x)
Swap a 32-bit value from littleendian to native byte order.
Definition: SDL3pp_endian.h:224
constexpr Uint16 Swap16LE(Uint16 x)
Swap a 16-bit value from littleendian to native byte order.
Definition: SDL3pp_endian.h:208
::Uint32 Uint32
An unsigned 32-bit integer type.
Definition: SDL3pp_stdinc.h:341
::Uint64 Uint64
An unsigned 64-bit integer type.
Definition: SDL3pp_stdinc.h:371
::Uint16 Uint16
An unsigned 16-bit integer type.
Definition: SDL3pp_stdinc.h:315
Main include header for the SDL3pp library.