summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-08-05 09:49:21 -0400
committerGitHub <noreply@github.com>2019-08-05 09:49:21 -0400
commitf5e18718d95cd6da312cd8f9bae19d356a54af12 (patch)
treef5095cd68e1ae2b72b9f895c74dd183c229b64d4 /include/global.h
parent1fc64b85824a49345b0fcd9672a65bf4e6acf3db (diff)
parent463e1eb6b836be8f6f1b9465ada1072a4d3d37d6 (diff)
Merge pull request #702 from PikalaxALT/pokenav_unk_2
Pokenav unk 2
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/global.h b/include/global.h
index eb18682e9..14377d8bb 100644
--- a/include/global.h
+++ b/include/global.h
@@ -19,16 +19,23 @@
#if defined (__APPLE__) || defined (__CYGWIN__) || defined (_MSC_VER)
#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}
+
+// Fool CLion IDE
+#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 // IDE support
#define ARRAY_COUNT(array) (size_t)(sizeof(array) / sizeof((array)[0]))
+// GameFreak used a macro called "NELEMS", as evidenced by
+// AgbAssert calls.
+#define NELEMS(arr) (sizeof(arr)/sizeof(*(arr)))
+
#define SWAP(a, b, temp) \
{ \
temp = a; \