From 2c6849bee81f2c05cbf0df1f88c6d5460e7b1e2d Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 13 Dec 2018 21:33:54 -0600 Subject: Decompile battle_anim_8170478.c (#445) --- include/global.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 33a31bf4d..58b338f9e 100644 --- a/include/global.h +++ b/include/global.h @@ -61,6 +61,12 @@ #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) +// Extracts the upper 16 bits of a 32-bit number +#define HIHALF(n) (((n) & 0xFFFF0000) >> 16) + +// Extracts the lower 16 bits of a 32-bit number +#define LOHALF(n) ((n) & 0xFFFF) + // There are many quirks in the source code which have overarching behavioral differences from // a number of other files. For example, diploma.c seems to declare rodata before each use while // other files declare out of order and must be at the beginning. There are also a number of -- cgit v1.2.3