From 329670e16e18b1ca53195e02c6bc72c0e68af8fa Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 5 Aug 2019 08:46:52 -0400 Subject: Minor fixes --- include/global.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/global.h') 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; \ -- cgit v1.2.3