diff options
author | Garak <thomastaps194@comcast.net> | 2018-07-17 09:24:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 09:24:30 -0400 |
commit | 5e46a0fcc57d421879c1f65b40b4692bbe65a813 (patch) | |
tree | 398b53f56158397a04e0e8de8159e00eeba9acc3 /include/global.h | |
parent | e06b63efc9ea39875b17f00e5ff20c2e0fcb0415 (diff) | |
parent | 06b3ce408f774c7192202308e783cc22bb8e7643 (diff) |
Merge pull request #2 from pret/master
sync with source repo
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h index 49d0370f1..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 @@ -867,7 +873,7 @@ struct MapPosition { s16 x; s16 y; - u8 height; + s8 height; }; struct UnkStruct_8054FF8 |