summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-07 10:18:40 +0200
committerGitHub <noreply@github.com>2020-08-07 10:18:40 +0200
commit0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b (patch)
treeeccc96f08136cdc1d73c6b6e84a7669e42ef7a19 /src/core/common.h
parentEnable PS2 Alpha test Emu in debug menu on RW (diff)
parentVU0 collision (diff)
downloadre3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.tar
re3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.tar.gz
re3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.tar.bz2
re3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.tar.lz
re3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.tar.xz
re3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.tar.zst
re3-0d7fa6df3c0e8ef53f06e8aa98d73ebc58f8929b.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