summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h
index 374701930..d64cf987d 100644
--- a/include/global.h
+++ b/include/global.h
@@ -112,6 +112,11 @@ enum LanguageId
#define BAG_TMHM_COUNT 64
#define BAG_BERRIES_COUNT 46
+#define TEST_BUTTON(value, button) ({(value) & (button);})
+#define JOY_NEW(button) (TEST_BUTTON(gMain.newKeys, button))
+#define JOY_HELD(button) (TEST_BUTTON(gMain.heldKeys, button))
+#define JOY_REPT(button) (TEST_BUTTON(gMain.newAndRepeatedKeys, button))
+
enum
{
MALE,