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.
This commit is contained in:
+13
-13
@@ -1411,7 +1411,7 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr)
|
||||
break;
|
||||
}
|
||||
|
||||
if (JOY_NEW(START_BUTTON))
|
||||
if (gMain.newKeys & START_BUTTON)
|
||||
return 8;
|
||||
|
||||
if (movementDir)
|
||||
@@ -1421,10 +1421,10 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr)
|
||||
}
|
||||
|
||||
// Pressed Cancel
|
||||
if ((JOY_NEW(A_BUTTON)) && *slotPtr == PARTY_SIZE + 1)
|
||||
if ((gMain.newKeys & A_BUTTON) && *slotPtr == PARTY_SIZE + 1)
|
||||
return 2;
|
||||
|
||||
return JOY_NEW(A_BUTTON | B_BUTTON);
|
||||
return gMain.newKeys & (A_BUTTON | B_BUTTON);
|
||||
}
|
||||
|
||||
static void UpdateCurrentPartySelection(s8 *slotPtr, s8 movementDir)
|
||||
@@ -1862,7 +1862,7 @@ u8 GetMonAilment(struct Pokemon *mon)
|
||||
|
||||
static void SetPartyMonsAllowedInMinigame(void)
|
||||
{
|
||||
s16 *ptr;
|
||||
u16 *ptr;
|
||||
|
||||
if (gPartyMenu.menuType == PARTY_MENU_TYPE_MINIGAME)
|
||||
{
|
||||
@@ -3765,7 +3765,7 @@ static u16 GetFieldMoveMonSpecies(void)
|
||||
|
||||
static void Task_CancelAfterAorBPress(u8 taskId)
|
||||
{
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
CursorCb_Cancel1(taskId);
|
||||
}
|
||||
|
||||
@@ -4722,7 +4722,7 @@ static void Task_DoLearnedMoveFanfareAfterText(u8 taskId)
|
||||
|
||||
static void Task_LearnNextMoveOrClosePartyMenu(u8 taskId)
|
||||
{
|
||||
if (IsFanfareTaskInactive() && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
|
||||
if (IsFanfareTaskInactive() && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)))
|
||||
{
|
||||
if (gPartyMenu.learnMoveState == 1)
|
||||
Task_TryLearningNextMove(taskId);
|
||||
@@ -4931,7 +4931,7 @@ static void UpdateMonDisplayInfoAfterRareCandy(u8 slot, struct Pokemon *mon)
|
||||
|
||||
static void Task_DisplayLevelUpStatsPg1(u8 taskId)
|
||||
{
|
||||
if (WaitFanfare(FALSE) && IsPartyMenuTextPrinterActive() != TRUE && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
|
||||
if (WaitFanfare(FALSE) && IsPartyMenuTextPrinterActive() != TRUE && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayLevelUpStatsPg1(taskId);
|
||||
@@ -4941,7 +4941,7 @@ static void Task_DisplayLevelUpStatsPg1(u8 taskId)
|
||||
|
||||
static void Task_DisplayLevelUpStatsPg2(u8 taskId)
|
||||
{
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayLevelUpStatsPg2(taskId);
|
||||
@@ -4951,9 +4951,9 @@ static void Task_DisplayLevelUpStatsPg2(u8 taskId)
|
||||
|
||||
static void DisplayLevelUpStatsPg1(u8 taskId)
|
||||
{
|
||||
u16 *arrayPtr = (u16*)sPartyMenuInternal->data;
|
||||
s16 *arrayPtr = sPartyMenuInternal->data;
|
||||
|
||||
arrayPtr[12] = (u16)CreateLevelUpStatsWindow();
|
||||
arrayPtr[12] = CreateLevelUpStatsWindow();
|
||||
DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY);
|
||||
CopyWindowToVram(arrayPtr[12], 2);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
@@ -4961,7 +4961,7 @@ static void DisplayLevelUpStatsPg1(u8 taskId)
|
||||
|
||||
static void DisplayLevelUpStatsPg2(u8 taskId)
|
||||
{
|
||||
u16 *arrayPtr = (u16 *)sPartyMenuInternal->data;
|
||||
s16 *arrayPtr = sPartyMenuInternal->data;
|
||||
|
||||
DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY, TEXT_COLOR_LIGHT_GREY);
|
||||
CopyWindowToVram(arrayPtr[12], 2);
|
||||
@@ -4972,7 +4972,7 @@ static void Task_TryLearnNewMoves(u8 taskId)
|
||||
{
|
||||
u16 learnMove;
|
||||
|
||||
if (WaitFanfare(0) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
|
||||
if (WaitFanfare(0) && ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON)))
|
||||
{
|
||||
RemoveLevelUpStatsWindow();
|
||||
learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE);
|
||||
@@ -5609,7 +5609,7 @@ static void Task_ValidateChosenHalfParty(u8 taskId)
|
||||
|
||||
static void Task_ContinueChoosingHalfParty(u8 taskId)
|
||||
{
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
DisplayPartyMenuStdMessage(PARTY_MSG_CHOOSE_MON);
|
||||
|
||||
Reference in New Issue
Block a user