diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2017-10-02 22:09:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-02 22:09:29 -0400 |
commit | 2701191a769784640d6a4fb819ae48272d01eb75 (patch) | |
tree | 6e6ebcf4bc02c2528e58ddcbe699b1d0601a50e1 /include/global.h | |
parent | 4cf115000289d10de3408e752b37128446dd261c (diff) | |
parent | 0fe97e838eab14723a4a38a773e2bc4d1494241e (diff) |
Merge branch 'master' into unk_text_util_2
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h index fa7856786..4014c6dde 100644 --- a/include/global.h +++ b/include/global.h @@ -18,6 +18,14 @@ void memcpy(void *, const void *, size_t); #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +// useful math macros + +// Converts a number to Q8.8 fixed-point format +#define Q_8_8(n) ((s16)((n) * 256)) + +// Converts a number to Q4.12 fixed-point format +#define Q_4_12(n) ((s16)((n) * 4096)) + #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 @@ -645,7 +653,8 @@ struct DaycareMon struct MailStruct mail; u8 OT_name[OT_NAME_LENGTH + 1]; u8 monName[11]; - u8 language; + u8 language_maybe : 4; + u8 unknown : 4; u32 stepsTaken; }; |