Switch to button macros
This commit is contained in:
@@ -651,31 +651,31 @@ static u8 ProcessRegionMapInput_Full(void)
|
||||
input = MAP_INPUT_NONE;
|
||||
gRegionMap->cursorDeltaX = 0;
|
||||
gRegionMap->cursorDeltaY = 0;
|
||||
if (gMain.heldKeys & DPAD_UP && gRegionMap->cursorPosY > MAPCURSOR_Y_MIN)
|
||||
if (JOY_HELD(DPAD_UP) && gRegionMap->cursorPosY > MAPCURSOR_Y_MIN)
|
||||
{
|
||||
gRegionMap->cursorDeltaY = -1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.heldKeys & DPAD_DOWN && gRegionMap->cursorPosY < MAPCURSOR_Y_MAX)
|
||||
if (JOY_HELD(DPAD_DOWN) && gRegionMap->cursorPosY < MAPCURSOR_Y_MAX)
|
||||
{
|
||||
gRegionMap->cursorDeltaY = +1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.heldKeys & DPAD_LEFT && gRegionMap->cursorPosX > MAPCURSOR_X_MIN)
|
||||
if (JOY_HELD(DPAD_LEFT) && gRegionMap->cursorPosX > MAPCURSOR_X_MIN)
|
||||
{
|
||||
gRegionMap->cursorDeltaX = -1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.heldKeys & DPAD_RIGHT && gRegionMap->cursorPosX < MAPCURSOR_X_MAX)
|
||||
if (JOY_HELD(DPAD_RIGHT) && gRegionMap->cursorPosX < MAPCURSOR_X_MAX)
|
||||
{
|
||||
gRegionMap->cursorDeltaX = +1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
input = MAP_INPUT_A_BUTTON;
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
input = MAP_INPUT_B_BUTTON;
|
||||
}
|
||||
@@ -730,31 +730,31 @@ static u8 ProcessRegionMapInput_Zoomed(void)
|
||||
input = MAP_INPUT_NONE;
|
||||
gRegionMap->zoomedCursorDeltaX = 0;
|
||||
gRegionMap->zoomedCursorDeltaY = 0;
|
||||
if (gMain.heldKeys & DPAD_UP && gRegionMap->scrollY > -0x34)
|
||||
if (JOY_HELD(DPAD_UP) && gRegionMap->scrollY > -0x34)
|
||||
{
|
||||
gRegionMap->zoomedCursorDeltaY = -1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.heldKeys & DPAD_DOWN && gRegionMap->scrollY < 0x3c)
|
||||
if (JOY_HELD(DPAD_DOWN) && gRegionMap->scrollY < 0x3c)
|
||||
{
|
||||
gRegionMap->zoomedCursorDeltaY = +1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.heldKeys & DPAD_LEFT && gRegionMap->scrollX > -0x2c)
|
||||
if (JOY_HELD(DPAD_LEFT) && gRegionMap->scrollX > -0x2c)
|
||||
{
|
||||
gRegionMap->zoomedCursorDeltaX = -1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.heldKeys & DPAD_RIGHT && gRegionMap->scrollX < 0xac)
|
||||
if (JOY_HELD(DPAD_RIGHT) && gRegionMap->scrollX < 0xac)
|
||||
{
|
||||
gRegionMap->zoomedCursorDeltaX = +1;
|
||||
input = MAP_INPUT_MOVE_START;
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
input = MAP_INPUT_A_BUTTON;
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
input = MAP_INPUT_B_BUTTON;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user