summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-10-02 11:48:20 -0400
committerGitHub <noreply@github.com>2019-10-02 11:48:20 -0400
commite97f37077c793a388e3a98c13f09846839e80b22 (patch)
tree821ca6bd8d7db65ecd0f8a092b4acea13e00f7f4 /include/global.h
parentbbd177fa20a3f53a4815061c524a14e959de6783 (diff)
parent1bd678656c735bbeb603ccb80367c7a85f820f61 (diff)
Merge branch 'master' into emerald_diff
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 d64cf987d..7fd7e902a 100644
--- a/include/global.h
+++ b/include/global.h
@@ -10,12 +10,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.
@@ -64,6 +65,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) \
({ \