summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorgolem galvanize <golemgalvanize@github.com>2018-03-30 16:49:08 -0400
committergolem galvanize <golemgalvanize@github.com>2018-03-30 16:49:08 -0400
commit069a7e71fc8bd0886fe2d5c39bb96d8fee0d798b (patch)
tree191d39f28270fb43feaca1d128274ef317968869 /include/global.h
parent3006ff177b1020c0270ff33f48b3216c9d5381b1 (diff)
parenta5cd6e8ef4717aad4a055d5acb6ef250e359fc45 (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_pokedex
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 8ffa16cb7..37c064e79 100644
--- a/include/global.h
+++ b/include/global.h
@@ -35,6 +35,12 @@
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
+// 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))
+
#define PARTY_SIZE 6
#define POKEMON_SLOTS_NUMBER 412