summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-03 12:58:37 +0200
committeraap <aap@papnet.eu>2020-08-03 17:32:06 +0200
commitabb640c6b6b1c4c1b699d18509c8a344e2be2dd5 (patch)
tree58cecb7517dfd70a4ce5e2f646ff23aa4fa4084d /src/core/common.h
parentMove sdk and eax (diff)
downloadre3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.tar
re3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.tar.gz
re3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.tar.bz2
re3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.tar.lz
re3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.tar.xz
re3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.tar.zst
re3-abb640c6b6b1c4c1b699d18509c8a344e2be2dd5.zip
Diffstat (limited to 'src/core/common.h')
-rw-r--r--src/core/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/common.h b/src/core/common.h
index ebb3acb0..e876c4ec 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -89,6 +89,16 @@ typedef uint16_t wchar;
#include <rpskin.h>
#endif
+#ifdef __GNUC__
+#define TYPEALIGN(n) __attribute__ ((aligned (n)))
+#else
+#ifdef _MSC_VER
+#define TYPEALIGN(n) __declspec(align(n))
+#else
+#define TYPEALIGN(n) // unknown compiler...ignore
+#endif
+#endif
+
#define ALIGNPTR(p) (void*)((((uintptr)(void*)p) + sizeof(void*)-1) & ~(sizeof(void*)-1))
// PDP-10 like byte functions