Modernize code
Can compile with arm-none-eabi-gcc 8.3.0 gbafix correctly handles ELF input
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user