Re-apply joypad macros (minus merge conflicts)

This commit is contained in:
aaaaaa123456789
2020-11-02 22:02:39 -03:00
parent 6545745e59
commit bacc831aa9
71 changed files with 651 additions and 648 deletions
+25 -25
View File
@@ -1496,23 +1496,23 @@ static void Task_HandleInput(u8 taskId)
{
if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active)
{
if (gMain.newKeys & DPAD_UP)
if (JOY_NEW(DPAD_UP))
{
ChangeSummaryPokemon(taskId, -1);
}
else if (gMain.newKeys & DPAD_DOWN)
else if (JOY_NEW(DPAD_DOWN))
{
ChangeSummaryPokemon(taskId, 1);
}
else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
else if ((JOY_NEW(DPAD_LEFT)) || GetLRKeysPressed() == MENU_L_PRESSED)
{
ChangePage(taskId, -1);
}
else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
else if ((JOY_NEW(DPAD_RIGHT)) || GetLRKeysPressed() == MENU_R_PRESSED)
{
ChangePage(taskId, 1);
}
else if (gMain.newKeys & A_BUTTON)
else if (JOY_NEW(A_BUTTON))
{
if (sMonSummaryScreen->currPageIndex != PSS_PAGE_SKILLS)
{
@@ -1529,7 +1529,7 @@ static void Task_HandleInput(u8 taskId)
}
}
}
else if (gMain.newKeys & B_BUTTON)
else if (JOY_NEW(B_BUTTON))
{
StopPokemonAnimations();
PlaySE(SE_SELECT);
@@ -1877,17 +1877,17 @@ static void Task_HandleInput_MoveSelect(u8 taskId)
if (MenuHelpers_CallLinkSomething() != 1)
{
if (gMain.newKeys & DPAD_UP)
if (JOY_NEW(DPAD_UP))
{
data[0] = 4;
ChangeSelectedMove(data, -1, &sMonSummaryScreen->firstMoveIndex);
}
else if (gMain.newKeys & DPAD_DOWN)
else if (JOY_NEW(DPAD_DOWN))
{
data[0] = 4;
ChangeSelectedMove(data, 1, &sMonSummaryScreen->firstMoveIndex);
}
else if (gMain.newKeys & A_BUTTON)
else if (JOY_NEW(A_BUTTON))
{
if (sMonSummaryScreen->lockMovesFlag == TRUE
|| (sMonSummaryScreen->newMove == MOVE_NONE && sMonSummaryScreen->firstMoveIndex == MAX_MON_MOVES))
@@ -1905,7 +1905,7 @@ static void Task_HandleInput_MoveSelect(u8 taskId)
PlaySE(SE_FAILURE);
}
}
else if (gMain.newKeys & B_BUTTON)
else if (JOY_NEW(B_BUTTON))
{
PlaySE(SE_SELECT);
CloseMoveSelectMode(taskId);
@@ -2017,24 +2017,24 @@ static void Task_HandleInput_MovePositionSwitch(u8 taskId)
if (MenuHelpers_CallLinkSomething() != TRUE)
{
if (gMain.newKeys & DPAD_UP)
if (JOY_NEW(DPAD_UP))
{
data[0] = 3;
ChangeSelectedMove(&data[0], -1, &sMonSummaryScreen->secondMoveIndex);
}
else if (gMain.newKeys & DPAD_DOWN)
else if (JOY_NEW(DPAD_DOWN))
{
data[0] = 3;
ChangeSelectedMove(&data[0], 1, &sMonSummaryScreen->secondMoveIndex);
}
else if (gMain.newKeys & A_BUTTON)
else if (JOY_NEW(A_BUTTON))
{
if (sMonSummaryScreen->firstMoveIndex == sMonSummaryScreen->secondMoveIndex)
ExitMovePositionSwitchMode(taskId, FALSE);
else
ExitMovePositionSwitchMode(taskId, TRUE);
}
else if (gMain.newKeys & B_BUTTON)
else if (JOY_NEW(B_BUTTON))
{
ExitMovePositionSwitchMode(taskId, FALSE);
}
@@ -2160,25 +2160,25 @@ static void Task_HandleReplaceMoveInput(u8 taskId)
{
if (gPaletteFade.active != TRUE)
{
if (gMain.newKeys & DPAD_UP)
if (JOY_NEW(DPAD_UP))
{
data[0] = 4;
ChangeSelectedMove(data, -1, &sMonSummaryScreen->firstMoveIndex);
}
else if (gMain.newKeys & DPAD_DOWN)
else if (JOY_NEW(DPAD_DOWN))
{
data[0] = 4;
ChangeSelectedMove(data, 1, &sMonSummaryScreen->firstMoveIndex);
}
else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED)
else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
{
ChangePage(taskId, -1);
}
else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED)
else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
{
ChangePage(taskId, 1);
}
else if (gMain.newKeys & A_BUTTON)
else if (JOY_NEW(A_BUTTON))
{
if (CanReplaceMove() == TRUE)
{
@@ -2194,7 +2194,7 @@ static void Task_HandleReplaceMoveInput(u8 taskId)
ShowCantForgetHMsWindow(taskId);
}
}
else if (gMain.newKeys & B_BUTTON)
else if (JOY_NEW(B_BUTTON))
{
StopPokemonAnimations();
PlaySE(SE_SELECT);
@@ -2234,7 +2234,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
u16 move;
if (FuncIsActiveTask(Task_ShowPowerAccWindow) != 1)
{
if (gMain.newKeys & DPAD_UP)
if (JOY_NEW(DPAD_UP))
{
data[1] = 1;
data[0] = 4;
@@ -2242,7 +2242,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
data[1] = 0;
gTasks[taskId].func = Task_HandleReplaceMoveInput;
}
else if (gMain.newKeys & DPAD_DOWN)
else if (JOY_NEW(DPAD_DOWN))
{
data[1] = 1;
data[0] = 4;
@@ -2250,7 +2250,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
data[1] = 0;
gTasks[taskId].func = Task_HandleReplaceMoveInput;
}
else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED)
else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
{
if (sMonSummaryScreen->currPageIndex != PSS_PAGE_BATTLE_MOVES)
{
@@ -2264,7 +2264,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
HandleAppealJamTilemap(9, -2, move);
}
}
else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED)
else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
{
if (sMonSummaryScreen->currPageIndex != PSS_PAGE_CONTEST_MOVES)
{
@@ -2278,7 +2278,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
HandleAppealJamTilemap(9, -2, move);
}
}
else if (gMain.newKeys & (A_BUTTON | B_BUTTON))
else if (JOY_NEW(A_BUTTON | B_BUTTON))
{
ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
if (!gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_STATUS]].invisible)