summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorGarak <thomastaps194@comcast.net>2018-07-07 20:50:41 -0400
committerGitHub <noreply@github.com>2018-07-07 20:50:41 -0400
commit6c5d1c4a3de2f1a2d1855a542a6a5d53e4daf936 (patch)
treee9a140e919d72891ea825b64fc72a9cfa175ce88 /include/util.h
parentc4cc1522c86ec240c53c75455b650b1c69b2d5a4 (diff)
parent9238533346fd97c67e48fee33a204d1e8e2dd0a7 (diff)
Merge pull request #9 from pret/master
sync with source repo
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 02c503f75..1a3bd5f1a 100644
--- a/include/util.h
+++ b/include/util.h
@@ -3,6 +3,12 @@
#include "sprite.h"
+//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)
+
extern const u8 gMiscBlank_Gfx[];
extern const u32 gBitTable[];