diff options
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h index 9fb7703cd..2b9b00d5c 100644 --- a/include/global.h +++ b/include/global.h @@ -67,7 +67,9 @@ // We suspect it was used globally. // GameFreak never ceases to amaze. // TODO: Propagate use of this macro -#define PRESSED(button) ({gMain.newKeys & (button);}) +#define TEST_BUTTON(field, button) ({(field) & (button);}) +#define PRESSED(button) TEST_BUTTON(gMain.newKeys, button) +#define PUSHED(button) TEST_BUTTON(gMain.heldKeys, button) extern u8 gStringVar1[]; extern u8 gStringVar2[]; |