# CategoryEndian Functions converting endian-specific values to different byte orders. These functions either unconditionally swap byte order ([SDL_Swap16](SDL_Swap16), [SDL_Swap32](SDL_Swap32), [SDL_Swap64](SDL_Swap64), [SDL_SwapFloat](SDL_SwapFloat)), or they swap to/from the system's native byte order ([SDL_Swap16LE](SDL_Swap16LE), [SDL_Swap16BE](SDL_Swap16BE), [SDL_Swap32LE](SDL_Swap32LE), [SDL_Swap32BE](SDL_Swap32BE), [SDL_Swap32LE](SDL_Swap32LE), [SDL_Swap32BE](SDL_Swap32BE), [SDL_SwapFloatLE](SDL_SwapFloatLE), [SDL_SwapFloatBE](SDL_SwapFloatBE)). In the latter case, the functionality is provided by macros that become no-ops if a swap isn't necessary: on an x86 (littleendian) processor, [SDL_Swap32LE](SDL_Swap32LE) does nothing, but [SDL_Swap32BE](SDL_Swap32BE) reverses the bytes of the data. On a PowerPC processor (bigendian), the macros behavior is reversed. The swap routines are inline functions, and attempt to use compiler intrinsics, inline assembly, and other magic to make byteswapping efficient. <!-- END CATEGORY DOCUMENTATION --> ## Functions <!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. --> <!-- BEGIN CATEGORY LIST: CategoryEndian, CategoryAPIFunction --> - [SDL_Swap16](SDL_Swap16) - [SDL_Swap32](SDL_Swap32) - [SDL_Swap64](SDL_Swap64) - [SDL_SwapFloat](SDL_SwapFloat) <!-- END CATEGORY LIST --> ## Datatypes <!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. --> <!-- BEGIN CATEGORY LIST: CategoryEndian, CategoryAPIDatatype --> - (none.) <!-- END CATEGORY LIST --> ## Structs <!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. --> <!-- BEGIN CATEGORY LIST: CategoryEndian, CategoryAPIStruct --> - (none.) <!-- END CATEGORY LIST --> ## Enums <!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. --> <!-- BEGIN CATEGORY LIST: CategoryEndian, CategoryAPIEnum --> - (none.) <!-- END CATEGORY LIST --> ## Macros <!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. --> <!-- BEGIN CATEGORY LIST: CategoryEndian, CategoryAPIMacro --> - [SDL_BIG_ENDIAN](SDL_BIG_ENDIAN) - [SDL_BYTEORDER](SDL_BYTEORDER) - [SDL_FLOATWORDORDER](SDL_FLOATWORDORDER) - [SDL_LIL_ENDIAN](SDL_LIL_ENDIAN) - [SDL_Swap16BE](SDL_Swap16BE) - [SDL_Swap16LE](SDL_Swap16LE) - [SDL_Swap32BE](SDL_Swap32BE) - [SDL_Swap32LE](SDL_Swap32LE) - [SDL_Swap64BE](SDL_Swap64BE) - [SDL_Swap64LE](SDL_Swap64LE) - [SDL_SwapFloatBE](SDL_SwapFloatBE) - [SDL_SwapFloatLE](SDL_SwapFloatLE) <!-- END CATEGORY LIST --> ---- [CategoryAPICategory](CategoryAPICategory)