aboutsummaryrefslogtreecommitdiff
path: root/common/endian.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/endian.h')
-rw-r--r--common/endian.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/common/endian.h b/common/endian.h
index 32f92fd02c..02b986d10b 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -141,27 +141,13 @@
/**
* A wrapper macro used around four character constants, like 'DATA', to
- * ensure portability. Typical usage: MKID_BE('DATA').
+ * ensure portability. Typical usage: MKTAG('D','A','T','A').
*
* Why is this necessary? The C/C++ standard does not define the endianess to
* be used for character constants. Hence if one uses multi-byte character
* constants, a potential portability problem opens up.
- *
- * Fortunately, a semi-standard has been established: On almost all systems
- * and compilers, multi-byte character constants are encoded using the big
- * endian convention (probably in analogy to the encoding of string constants).
- * Still some systems differ. This is why we provide the MKID_BE macro. If
- * you wrap your four character constants with it, the result will always be
- * BE encoded, even on systems which differ from the default BE encoding.
- *
- * For the latter systems we provide the INVERSE_MKID override.
*/
-#if defined(INVERSE_MKID)
-#define MKID_BE(a) SWAP_CONSTANT_32(a)
-
-#else
-# define MKID_BE(a) ((uint32)(a))
-#endif
+#define MKTAG(a0,a1,a2,a3) ((a0) | ((a1) << 8) | ((a2) << 16) | ((a3) << 24))
// Functions for reading/writing native Integers,
// this transparently handles the need for alignment
@@ -331,8 +317,6 @@
#elif defined(SCUMM_BIG_ENDIAN)
- #define MKID_BE(a) ((uint32)(a))
-
#define READ_BE_UINT16(a) READ_UINT16(a)
#define READ_BE_UINT32(a) READ_UINT32(a)