diff options
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/include/global.h b/include/global.h index a76d6e4e3..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; \ @@ -163,18 +170,17 @@ struct Pokedex /*0x44*/ u8 seen[DEX_FLAGS_NO]; }; -struct PokemonJumpResults // possibly used in the game itself? +struct PokemonJumpResults { u16 jumpsInRow; u16 field2; u16 excellentsInRow; u16 field6; - u16 field8; - u16 fieldA; + u32 field8; u32 bestJumpScore; }; -struct BerryPickingResults // possibly used in the game itself? Size may be wrong as well +struct BerryPickingResults { u32 bestScore; u16 berriesPicked; |