summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorDiegoisawesome <Diegoisawesome@users.noreply.github.com>2018-07-16 13:35:17 -0700
committerGitHub <noreply@github.com>2018-07-16 13:35:17 -0700
commit06b3ce408f774c7192202308e783cc22bb8e7643 (patch)
tree68390ab7335854c9c0721192ec4b8d563d0a48fe /include/global.h
parent07ef76277021d5cddf14004e37e785c31fcea69b (diff)
parent118fa3afcee68deb3eeb2bc876a9afd02a45677c (diff)
Merge pull request #272 from DizzyEggg/final_battle_files_touches
Thoroughly document and label battle files
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h
index 7be922aa3..7153ef260 100644
--- a/include/global.h
+++ b/include/global.h
@@ -35,12 +35,18 @@
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
+// Converts a number to Q24.8 fixed-point format
+#define Q_24_8(n) ((s32)((n) * 256))
+
// Converts a Q8.8 fixed-point format number to a regular integer
#define Q_8_8_TO_INT(n) ((int)((n) / 256))
// Converts a Q4.12 fixed-point format number to a regular integer
#define Q_4_12_TO_INT(n) ((int)((n) / 4096))
+// Converts a Q24.8 fixed-point format number to a regular integer
+#define Q_24_8_TO_INT(n) ((int)((n) >> 8))
+
#define PARTY_SIZE 6
#define POKEMON_SLOTS_NUMBER 412