diff options
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 19 |
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; \ |