summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2018-07-24 21:18:36 -0700
committerDiegoisawesome <diego@domoreaweso.me>2018-07-24 21:18:36 -0700
commite92e2cb0aa31adf9872b147a1b6deb9d9844b7e8 (patch)
treeb3e357be8cec0c64a84773a7b63f54f97825cbaf /include/global.h
parent156fb472e10c10751268d2339b2526c8bd07e34f (diff)
parent5883f867f00b8cc3f3630a8ab4aa2e9d21406949 (diff)
Merge branch 'master' of github.com:pret/pokeemerald
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