diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-06-26 08:13:38 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-06-26 12:12:10 -0400 |
commit | fb06e4a3c94ae17b73df6d3aecf2d18213aa183e (patch) | |
tree | 550586e95b1d117f9552213d94861c2ff8c318d4 /include/global.h | |
parent | 3f43523352b279fc4498ee4bfde2213504e3ece8 (diff) |
Modernize code
Can compile with arm-none-eabi-gcc 8.3.0
gbafix correctly handles ELF input
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h index 969680dd7..712a40866 100644 --- a/include/global.h +++ b/include/global.h @@ -62,6 +62,10 @@ #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) +#if MODERN +#define abs(x) (((x) < 0) ? -(x) : (x)) +#endif + // Extracts the upper 16 bits of a 32-bit number #define HIHALF(n) (((n) & 0xFFFF0000) >> 16) |