Switch to button macros
This commit is contained in:
@@ -5360,21 +5360,21 @@ static void Cmd_yesnoboxlearnmove(void)
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
if (JOY_NEW(DPAD_UP) && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
if (JOY_NEW(DPAD_DOWN) && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
if (gBattleCommunication[1] == 0)
|
||||
@@ -5388,7 +5388,7 @@ static void Cmd_yesnoboxlearnmove(void)
|
||||
gBattleScripting.learnMoveState = 5;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gBattleScripting.learnMoveState = 5;
|
||||
@@ -5477,21 +5477,21 @@ static void Cmd_yesnoboxstoplearningmove(void)
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
if (JOY_NEW(DPAD_UP) && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
if (JOY_NEW(DPAD_DOWN) && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
@@ -5502,7 +5502,7 @@ static void Cmd_yesnoboxstoplearningmove(void)
|
||||
|
||||
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
@@ -5772,28 +5772,28 @@ static void Cmd_yesnobox(void)
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
if (JOY_NEW(DPAD_UP) && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
if (JOY_NEW(DPAD_DOWN) && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
PlaySE(SE_SELECT);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
else if (gMain.newKeys & A_BUTTON)
|
||||
else if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
@@ -10076,21 +10076,21 @@ static void Cmd_trygivecaughtmonnick(void)
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
if (JOY_NEW(DPAD_UP) && gBattleCommunication[CURSOR_POSITION] != 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 0;
|
||||
BattleCreateYesNoCursorAt(0);
|
||||
}
|
||||
if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
if (JOY_NEW(DPAD_DOWN) && gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
|
||||
gBattleCommunication[CURSOR_POSITION] = 1;
|
||||
BattleCreateYesNoCursorAt(1);
|
||||
}
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
if (gBattleCommunication[CURSOR_POSITION] == 0)
|
||||
@@ -10103,7 +10103,7 @@ static void Cmd_trygivecaughtmonnick(void)
|
||||
gBattleCommunication[MULTIUSE_STATE] = 4;
|
||||
}
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
gBattleCommunication[MULTIUSE_STATE] = 4;
|
||||
|
||||
Reference in New Issue
Block a user