|
@@ -326,7 +326,7 @@ SDL_FORCE_INLINE float SDL_SwapFloat(float x)
|
|
|
* Byte-swap an unsigned 16-bit 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_SwapLE16 or SDL_SwapBE16
|
|
|
+ * byteorder of the system or not. You should use SDL_Swap16LE or SDL_Swap16BE
|
|
|
* instead, in most cases.
|
|
|
*
|
|
|
* Note that this is a forced-inline function in a header, and not a public
|
|
@@ -347,7 +347,7 @@ SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) { return x_but_byteswapped; }
|
|
|
* Byte-swap an unsigned 32-bit 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_SwapLE32 or SDL_SwapBE32
|
|
|
+ * byteorder of the system or not. You should use SDL_Swap32LE or SDL_Swap32BE
|
|
|
* instead, in most cases.
|
|
|
*
|
|
|
* Note that this is a forced-inline function in a header, and not a public
|
|
@@ -368,7 +368,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x) { return x_but_byteswapped; }
|
|
|
* Byte-swap an unsigned 64-bit 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_SwapLE64 or SDL_SwapBE64
|
|
|
+ * byteorder of the system or not. You should use SDL_Swap64LE or SDL_Swap64BE
|
|
|
* instead, in most cases.
|
|
|
*
|
|
|
* Note that this is a forced-inline function in a header, and not a public
|
|
@@ -397,7 +397,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-#define SDL_SwapLE16(x) SwapOnlyIfNecessary(x)
|
|
|
+#define SDL_Swap16LE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
/**
|
|
|
* Swap a 32-bit value from littleendian to native byte order.
|
|
@@ -411,7 +411,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-#define SDL_SwapLE32(x) SwapOnlyIfNecessary(x)
|
|
|
+#define SDL_Swap32LE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
/**
|
|
|
* Swap a 64-bit value from littleendian to native byte order.
|
|
@@ -425,7 +425,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-#define SDL_SwapLE64(x) SwapOnlyIfNecessary(x)
|
|
|
+#define SDL_Swap64LE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
/**
|
|
|
* Swap a floating point value from littleendian to native byte order.
|
|
@@ -453,7 +453,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-#define SDL_SwapBE16(x) SwapOnlyIfNecessary(x)
|
|
|
+#define SDL_Swap16BE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
/**
|
|
|
* Swap a 32-bit value from bigendian to native byte order.
|
|
@@ -467,7 +467,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-#define SDL_SwapBE32(x) SwapOnlyIfNecessary(x)
|
|
|
+#define SDL_Swap32BE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
/**
|
|
|
* Swap a 64-bit value from bigendian to native byte order.
|
|
@@ -481,7 +481,7 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
*
|
|
|
* \since This macro is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-#define SDL_SwapBE64(x) SwapOnlyIfNecessary(x)
|
|
|
+#define SDL_Swap64BE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
/**
|
|
|
* Swap a floating point value from bigendian to native byte order.
|
|
@@ -498,22 +498,22 @@ SDL_FORCE_INLINE Uint32 SDL_Swap64(Uint64 x) { return x_but_byteswapped; }
|
|
|
#define SDL_SwapFloatBE(x) SwapOnlyIfNecessary(x)
|
|
|
|
|
|
#elif SDL_BYTEORDER == SDL_LIL_ENDIAN
|
|
|
-#define SDL_SwapLE16(x) (x)
|
|
|
-#define SDL_SwapLE32(x) (x)
|
|
|
-#define SDL_SwapLE64(x) (x)
|
|
|
+#define SDL_Swap16LE(x) (x)
|
|
|
+#define SDL_Swap32LE(x) (x)
|
|
|
+#define SDL_Swap64LE(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_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)
|
|
|
#else
|
|
|
-#define SDL_SwapLE16(x) SDL_Swap16(x)
|
|
|
-#define SDL_SwapLE32(x) SDL_Swap32(x)
|
|
|
-#define SDL_SwapLE64(x) SDL_Swap64(x)
|
|
|
+#define SDL_Swap16LE(x) SDL_Swap16(x)
|
|
|
+#define SDL_Swap32LE(x) SDL_Swap32(x)
|
|
|
+#define SDL_Swap64LE(x) SDL_Swap64(x)
|
|
|
#define SDL_SwapFloatLE(x) SDL_SwapFloat(x)
|
|
|
-#define SDL_SwapBE16(x) (x)
|
|
|
-#define SDL_SwapBE32(x) (x)
|
|
|
-#define SDL_SwapBE64(x) (x)
|
|
|
+#define SDL_Swap16BE(x) (x)
|
|
|
+#define SDL_Swap32BE(x) (x)
|
|
|
+#define SDL_Swap64BE(x) (x)
|
|
|
#define SDL_SwapFloatBE(x) (x)
|
|
|
#endif
|
|
|
|