diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-13 23:32:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-13 23:32:10 -0500 |
commit | 70577e844ddcb8092ab9e55dd0dd7993f68f4122 (patch) | |
tree | 7a09999f6ac2fc2d1b36ece5ec484ec6527a201f /include/global.h | |
parent | 8d18d03c791c40bad532c62f217b0f82aadec6d2 (diff) | |
parent | f42eafc85b007cd27e90bc9a1350d589e31bda43 (diff) |
Merge pull request #1548 from GriffinRichards/doc-banim
Document battle_anim_mons
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/global.h b/include/global.h index dd02a1790..53e9ba134 100644 --- a/include/global.h +++ b/include/global.h @@ -120,10 +120,12 @@ f; \ }) -#define ROUND_BITS_TO_BYTES(numBits)(((numBits) / 8) + (((numBits) % 8) ? 1 : 0)) +#define DIV_ROUND_UP(val, roundBy)(((val) / (roundBy)) + (((val) % (roundBy)) ? 1 : 0)) -#define DEX_FLAGS_NO (ROUND_BITS_TO_BYTES(NUM_SPECIES)) -#define NUM_FLAG_BYTES (ROUND_BITS_TO_BYTES(FLAGS_COUNT)) +#define ROUND_BITS_TO_BYTES(numBits) DIV_ROUND_UP(numBits, 8) + +#define DEX_FLAGS_NO ROUND_BITS_TO_BYTES(NUM_SPECIES) +#define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT) struct Coords8 { |