summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-10-02 11:50:17 -0400
committerGitHub <noreply@github.com>2019-10-02 11:50:17 -0400
commit99e6a6639efa5d2113fe2787e5be4f0d98f0bf78 (patch)
treeaed3fe304abc22c33c6e4c3e1ca1f233f8b37afc /include/global.h
parentdcd7c8a2412bf389b694b47892085b7684bca15e (diff)
parent1bd678656c735bbeb603ccb80367c7a85f820f61 (diff)
Merge branch 'master' into debug-english
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 9e8d2e115..ba9e20813 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
// For debug menu translations.
@@ -78,6 +79,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) \
({ \