summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-08-05 08:46:52 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-08-05 08:46:52 -0400
commit329670e16e18b1ca53195e02c6bc72c0e68af8fa (patch)
tree03875df96abe939332bd4c42d293b6d86ff84413 /include/global.h
parenta42e5c24e6ed91c44eeb615101a182218b237987 (diff)
Minor fixes
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h
index 16f08c895..14377d8bb 100644
--- a/include/global.h
+++ b/include/global.h
@@ -32,6 +32,10 @@
#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; \