aboutsummaryrefslogtreecommitdiff
path: root/common/endian.h
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-08-31 13:11:31 +0200
committerEinar Johan Trøan Sømåen2012-08-31 13:11:31 +0200
commit3fe7f2cbe2b70eaa824b7159d94d40c2280006a3 (patch)
treeea592da00ad567c75008137f79eeba16c3ba40c4 /common/endian.h
parent246109839b9c196e9181a6f619c15694456b9aec (diff)
parent10a947a0be80ea8c5c88bd3493a5057b1223ce45 (diff)
downloadscummvm-rg350-3fe7f2cbe2b70eaa824b7159d94d40c2280006a3.tar.gz
scummvm-rg350-3fe7f2cbe2b70eaa824b7159d94d40c2280006a3.tar.bz2
scummvm-rg350-3fe7f2cbe2b70eaa824b7159d94d40c2280006a3.zip
Merge remote-tracking branch 'origin/master' into wintermute
Diffstat (limited to 'common/endian.h')
-rw-r--r--common/endian.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/endian.h b/common/endian.h
index 394437ec67..759513efef 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -146,6 +146,12 @@
*/
#define MKTAG(a0,a1,a2,a3) ((uint32)((a3) | ((a2) << 8) | ((a1) << 16) | ((a0) << 24)))
+/**
+ * A wrapper macro used around two character constants, like 'wb', to
+ * ensure portability. Typical usage: MKTAG16('w','b').
+ */
+#define MKTAG16(a0,a1) ((uint16)((a1) | ((a0) << 8)))
+
// Functions for reading/writing native integers.
// They also transparently handle the need for alignment.