summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-10-02 11:44:50 -0400
committerGitHub <noreply@github.com>2019-10-02 11:44:50 -0400
commit8c86b656d2fa97fc5eb113e9807d49f48c715f8b (patch)
tree01e14b4dec7ef184ca50b9f0815a662590520045 /include/global.h
parent32693e94d844cb401aed91d066b9f5ad1eb440a7 (diff)
parent1bd678656c735bbeb603ccb80367c7a85f820f61 (diff)
Merge branch 'master' into modern_gcc
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/global.h b/include/global.h
index 64abf8724..1ccc92bb1 100644
--- a/include/global.h
+++ b/include/global.h
@@ -11,12 +11,13 @@
#if defined(__APPLE__) || defined(__CYGWIN__)
#define _(x) x
#define __(x) x
-#define INCBIN_U8 {0}
-#define INCBIN_U16 {0}
-#define INCBIN_U32 {0}
-#define INCBIN_S8 {0}
-#define INCBIN_S16 {0}
-#define INCBIN_S32 {0}
+#define INCBIN(x) {0}
+#define INCBIN_U8 INCBIN
+#define INCBIN_U16 INCBIN
+#define INCBIN_U32 INCBIN
+#define INCBIN_S8 INCBIN
+#define INCBIN_S16 INCBIN
+#define INCBIN_S32 INCBIN
#endif
// Prevent cross-jump optimization.
@@ -65,6 +66,13 @@ enum
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
+#define T2_WRITE_32(ptr, value) ({\
+ (ptr)[0] = ((value) >> 0) & 0xFF;\
+ (ptr)[1] = ((value) >> 8) & 0xFF;\
+ (ptr)[2] = ((value) >> 16) & 0xFF;\
+ (ptr)[3] = ((value) >> 24) & 0xFF;\
+})
+
// Credits to Made (dolphin emoji)
#define S16TOPOSFLOAT(val) \
({ \