mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-20 03:03:35 +01:00
Merge pull request #1788 from AsparagusEduardo/pret/pr/newKeys
Added missing uses of JOY_xx macros
This commit is contained in:
commit
ad9247439c
@ -1039,7 +1039,7 @@ static void MainCB2_Intro(void)
|
|||||||
AnimateSprites();
|
AnimateSprites();
|
||||||
BuildOamBuffer();
|
BuildOamBuffer();
|
||||||
UpdatePaletteFade();
|
UpdatePaletteFade();
|
||||||
if (gMain.newKeys && !gPaletteFade.active)
|
if (gMain.newKeys != 0 && !gPaletteFade.active)
|
||||||
SetMainCallback2(MainCB2_EndIntro);
|
SetMainCallback2(MainCB2_EndIntro);
|
||||||
else if (gIntroFrameCounter != -1)
|
else if (gIntroFrameCounter != -1)
|
||||||
gIntroFrameCounter++;
|
gIntroFrameCounter++;
|
||||||
|
@ -440,13 +440,13 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
|
|||||||
break;
|
break;
|
||||||
case LIST_MULTIPLE_SCROLL_DPAD:
|
case LIST_MULTIPLE_SCROLL_DPAD:
|
||||||
// note: JOY_REPEAT won't match here
|
// note: JOY_REPEAT won't match here
|
||||||
leftButton = gMain.newAndRepeatedKeys & DPAD_LEFT;
|
leftButton = JOY_REPEAT(DPAD_LEFT);
|
||||||
rightButton = gMain.newAndRepeatedKeys & DPAD_RIGHT;
|
rightButton = JOY_REPEAT(DPAD_RIGHT);
|
||||||
break;
|
break;
|
||||||
case LIST_MULTIPLE_SCROLL_L_R:
|
case LIST_MULTIPLE_SCROLL_L_R:
|
||||||
// same as above
|
// same as above
|
||||||
leftButton = gMain.newAndRepeatedKeys & L_BUTTON;
|
leftButton = JOY_REPEAT(L_BUTTON);
|
||||||
rightButton = gMain.newAndRepeatedKeys & R_BUTTON;
|
rightButton = JOY_REPEAT(R_BUTTON);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,8 +124,8 @@ void AgbMain()
|
|||||||
ReadKeys();
|
ReadKeys();
|
||||||
|
|
||||||
if (gSoftResetDisabled == FALSE
|
if (gSoftResetDisabled == FALSE
|
||||||
&& (gMain.heldKeysRaw & A_BUTTON)
|
&& JOY_HELD_RAW(A_BUTTON)
|
||||||
&& (gMain.heldKeysRaw & B_START_SELECT) == B_START_SELECT)
|
&& JOY_HELD_RAW(B_START_SELECT) == B_START_SELECT)
|
||||||
{
|
{
|
||||||
rfu_REQ_stopMode();
|
rfu_REQ_stopMode();
|
||||||
rfu_waitREQComplete();
|
rfu_waitREQComplete();
|
||||||
@ -278,7 +278,7 @@ static void ReadKeys(void)
|
|||||||
gMain.heldKeys |= A_BUTTON;
|
gMain.heldKeys |= A_BUTTON;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gMain.newKeys & gMain.watchedKeysMask)
|
if (JOY_NEW(gMain.watchedKeysMask))
|
||||||
gMain.watchedKeysPressed = TRUE;
|
gMain.watchedKeysPressed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ static void MainCB2(void)
|
|||||||
static void Task_TitleScreenPhase1(u8 taskId)
|
static void Task_TitleScreenPhase1(u8 taskId)
|
||||||
{
|
{
|
||||||
// Skip to next phase when A, B, Start, or Select is pressed
|
// Skip to next phase when A, B, Start, or Select is pressed
|
||||||
if ((gMain.newKeys & A_B_START_SELECT) || gTasks[taskId].data[1] != 0)
|
if (JOY_NEW(A_B_START_SELECT) || gTasks[taskId].data[1] != 0)
|
||||||
{
|
{
|
||||||
gTasks[taskId].tSkipToNext = TRUE;
|
gTasks[taskId].tSkipToNext = TRUE;
|
||||||
gTasks[taskId].tCounter = 0;
|
gTasks[taskId].tCounter = 0;
|
||||||
@ -681,7 +681,7 @@ static void Task_TitleScreenPhase2(u8 taskId)
|
|||||||
u32 yPos;
|
u32 yPos;
|
||||||
|
|
||||||
// Skip to next phase when A, B, Start, or Select is pressed
|
// Skip to next phase when A, B, Start, or Select is pressed
|
||||||
if ((gMain.newKeys & A_B_START_SELECT) || gTasks[taskId].tSkipToNext)
|
if (JOY_NEW(A_B_START_SELECT) || gTasks[taskId].tSkipToNext)
|
||||||
{
|
{
|
||||||
gTasks[taskId].tSkipToNext = TRUE;
|
gTasks[taskId].tSkipToNext = TRUE;
|
||||||
gTasks[taskId].tCounter = 0;
|
gTasks[taskId].tCounter = 0;
|
||||||
|
@ -1044,7 +1044,7 @@ static void Chat_HandleInput(void)
|
|||||||
{
|
{
|
||||||
SetChatFunction(CHAT_FUNC_SWITCH);
|
SetChatFunction(CHAT_FUNC_SWITCH);
|
||||||
}
|
}
|
||||||
else if (gMain.newAndRepeatedKeys & B_BUTTON)
|
else if (JOY_REPEAT(B_BUTTON))
|
||||||
{
|
{
|
||||||
if (sChat->bufferCursorPos)
|
if (sChat->bufferCursorPos)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user