summaryrefslogtreecommitdiff
path: root/src/pokemon_summary_screen.c
diff options
context:
space:
mode:
authoraaaaaa123456789 <aaaaaa123456789@acidch.at>2020-09-13 04:22:50 -0300
committeraaaaaa123456789 <aaaaaa123456789@acidch.at>2020-09-13 06:30:55 -0300
commit7dc95a0103af08c95c9093b6efa6c77af77a2538 (patch)
tree663537916626ab264bbdef4ea3606415457c36a3 /src/pokemon_summary_screen.c
parent58a2b62bae1406d2c768698ed13efcd6a5ffbeec (diff)
Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some harmless or completely superseded PRs have been left alone, as there is not much benefit in attempting to undo them. Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136, #1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179, #1180, #1181, #1182 and #1183.
Diffstat (limited to 'src/pokemon_summary_screen.c')
-rw-r--r--src/pokemon_summary_screen.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index bfd849229..d016c455c 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -1497,23 +1497,23 @@ static void Task_HandleInput(u8 taskId)
{
if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active)
{
- if (JOY_NEW(DPAD_UP))
+ if (gMain.newKeys & DPAD_UP)
{
ChangeSummaryPokemon(taskId, -1);
}
- else if (JOY_NEW(DPAD_DOWN))
+ else if (gMain.newKeys & DPAD_DOWN)
{
ChangeSummaryPokemon(taskId, 1);
}
- else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
+ else if ((gMain.newKeys & DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
{
ChangePage(taskId, -1);
}
- else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
+ else if ((gMain.newKeys & DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
{
ChangePage(taskId, 1);
}
- else if (JOY_NEW(A_BUTTON))
+ else if (gMain.newKeys & A_BUTTON)
{
if (sMonSummaryScreen->currPageIndex != PSS_PAGE_SKILLS)
{
@@ -1530,7 +1530,7 @@ static void Task_HandleInput(u8 taskId)
}
}
}
- else if (JOY_NEW(B_BUTTON))
+ else if (gMain.newKeys & B_BUTTON)
{
StopPokemonAnimations();
PlaySE(SE_SELECT);
@@ -1878,17 +1878,17 @@ static void Task_HandleInput_MoveSelect(u8 taskId)
if (MenuHelpers_CallLinkSomething() != 1)
{
- if (JOY_NEW(DPAD_UP))
+ if (gMain.newKeys & DPAD_UP)
{
data[0] = 4;
ChangeSelectedMove(data, -1, &sMonSummaryScreen->firstMoveIndex);
}
- else if (JOY_NEW(DPAD_DOWN))
+ else if (gMain.newKeys & DPAD_DOWN)
{
data[0] = 4;
ChangeSelectedMove(data, 1, &sMonSummaryScreen->firstMoveIndex);
}
- else if (JOY_NEW(A_BUTTON))
+ else if (gMain.newKeys & A_BUTTON)
{
if (sMonSummaryScreen->lockMovesFlag == TRUE
|| (sMonSummaryScreen->newMove == MOVE_NONE && sMonSummaryScreen->firstMoveIndex == MAX_MON_MOVES))
@@ -1906,7 +1906,7 @@ static void Task_HandleInput_MoveSelect(u8 taskId)
PlaySE(SE_FAILURE);
}
}
- else if (JOY_NEW(B_BUTTON))
+ else if (gMain.newKeys & B_BUTTON)
{
PlaySE(SE_SELECT);
CloseMoveSelectMode(taskId);
@@ -2018,24 +2018,24 @@ static void Task_HandleInput_MovePositionSwitch(u8 taskId)
if (MenuHelpers_CallLinkSomething() != TRUE)
{
- if (JOY_NEW(DPAD_UP))
+ if (gMain.newKeys & DPAD_UP)
{
data[0] = 3;
ChangeSelectedMove(&data[0], -1, &sMonSummaryScreen->secondMoveIndex);
}
- else if (JOY_NEW(DPAD_DOWN))
+ else if (gMain.newKeys & DPAD_DOWN)
{
data[0] = 3;
ChangeSelectedMove(&data[0], 1, &sMonSummaryScreen->secondMoveIndex);
}
- else if (JOY_NEW(A_BUTTON))
+ else if (gMain.newKeys & A_BUTTON)
{
if (sMonSummaryScreen->firstMoveIndex == sMonSummaryScreen->secondMoveIndex)
ExitMovePositionSwitchMode(taskId, FALSE);
else
ExitMovePositionSwitchMode(taskId, TRUE);
}
- else if (JOY_NEW(B_BUTTON))
+ else if (gMain.newKeys & B_BUTTON)
{
ExitMovePositionSwitchMode(taskId, FALSE);
}
@@ -2161,25 +2161,25 @@ static void Task_HandleReplaceMoveInput(u8 taskId)
{
if (gPaletteFade.active != TRUE)
{
- if (JOY_NEW(DPAD_UP))
+ if (gMain.newKeys & DPAD_UP)
{
data[0] = 4;
ChangeSelectedMove(data, -1, &sMonSummaryScreen->firstMoveIndex);
}
- else if (JOY_NEW(DPAD_DOWN))
+ else if (gMain.newKeys & DPAD_DOWN)
{
data[0] = 4;
ChangeSelectedMove(data, 1, &sMonSummaryScreen->firstMoveIndex);
}
- else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
+ else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED)
{
ChangePage(taskId, -1);
}
- else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
+ else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED)
{
ChangePage(taskId, 1);
}
- else if (JOY_NEW(A_BUTTON))
+ else if (gMain.newKeys & A_BUTTON)
{
if (CanReplaceMove() == TRUE)
{
@@ -2195,7 +2195,7 @@ static void Task_HandleReplaceMoveInput(u8 taskId)
ShowCantForgetHMsWindow(taskId);
}
}
- else if (JOY_NEW(B_BUTTON))
+ else if (gMain.newKeys & B_BUTTON)
{
StopPokemonAnimations();
PlaySE(SE_SELECT);
@@ -2235,7 +2235,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
u16 move;
if (FuncIsActiveTask(Task_ShowPowerAccWindow) != 1)
{
- if (JOY_NEW(DPAD_UP))
+ if (gMain.newKeys & DPAD_UP)
{
data[1] = 1;
data[0] = 4;
@@ -2243,7 +2243,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
data[1] = 0;
gTasks[taskId].func = Task_HandleReplaceMoveInput;
}
- else if (JOY_NEW(DPAD_DOWN))
+ else if (gMain.newKeys & DPAD_DOWN)
{
data[1] = 1;
data[0] = 4;
@@ -2251,7 +2251,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
data[1] = 0;
gTasks[taskId].func = Task_HandleReplaceMoveInput;
}
- else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED)
+ else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED)
{
if (sMonSummaryScreen->currPageIndex != PSS_PAGE_BATTLE_MOVES)
{
@@ -2265,7 +2265,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
HandleAppealJamTilemap(9, -2, move);
}
}
- else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED)
+ else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED)
{
if (sMonSummaryScreen->currPageIndex != PSS_PAGE_CONTEST_MOVES)
{
@@ -2279,7 +2279,7 @@ static void Task_HandleInputCantForgetHMsMoves(u8 taskId)
HandleAppealJamTilemap(9, -2, move);
}
}
- else if (JOY_NEW(A_BUTTON | B_BUTTON))
+ else if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
ClearWindowTilemap(PSS_LABEL_WINDOW_PORTRAIT_SPECIES);
if (!gSprites[sMonSummaryScreen->spriteIds[SPRITE_ARR_ID_STATUS]].invisible)