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