Use button constants in Task_HandleChooseMonInput

This commit is contained in:
GriffinR 2022-08-10 15:14:35 -04:00
parent f534e8e44a
commit e06ba39751

View File

@ -1260,13 +1260,13 @@ void Task_HandleChooseMonInput(u8 taskId)
switch (PartyMenuButtonHandler(slotPtr))
{
case 1: // Selected mon
case A_BUTTON: // Selected mon
HandleChooseMonSelection(taskId, slotPtr);
break;
case 2: // Selected Cancel
case B_BUTTON: // Selected Cancel / pressed B
HandleChooseMonCancel(taskId, slotPtr);
break;
case 8: // Start button
case START_BUTTON:
if (sPartyMenuInternal->chooseHalf)
{
PlaySE(SE_SELECT);
@ -1483,7 +1483,7 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr)
}
if (JOY_NEW(START_BUTTON))
return 8;
return START_BUTTON;
if (movementDir)
{
@ -1492,8 +1492,8 @@ static u16 PartyMenuButtonHandler(s8 *slotPtr)
}
// Pressed Cancel
if ((JOY_NEW(A_BUTTON)) && *slotPtr == PARTY_SIZE + 1)
return 2;
if (JOY_NEW(A_BUTTON) && *slotPtr == PARTY_SIZE + 1)
return B_BUTTON;
return JOY_NEW(A_BUTTON | B_BUTTON);
}