through sub_8024F38

This commit is contained in:
PikalaxALT
2019-03-24 22:56:16 -04:00
parent d49d3b6858
commit d4cca4ffa2
3 changed files with 72 additions and 118 deletions

View File

@@ -86,6 +86,11 @@
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
// Macros for checking the joypad
#define TEST_BUTTON(field, button) ({(field) & (button);})
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
#define S16TOPOSFLOAT(val) \
({ \
s16 v = (val); \