summaryrefslogtreecommitdiff
path: root/src/pokenav_match_call_1.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-09-05 10:25:10 -0400
committerGitHub <noreply@github.com>2020-09-05 10:25:10 -0400
commit16ecbc6446f4e8d308e71aa5e649c69acb8a6b3e (patch)
tree309ee7f0dd15192ad2ead860c8a6e2cabe5b9214 /src/pokenav_match_call_1.c
parentbb98e346e537ffa71a529db71688975b9a850cfa (diff)
parent3e25d9e5a2e0346a53b1bfdf9e14f98e14cceb21 (diff)
Merge pull request #1177 from PokeCodec/MatchEmerald
Match All but 2 remaining naked functions
Diffstat (limited to 'src/pokenav_match_call_1.c')
-rwxr-xr-xsrc/pokenav_match_call_1.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/pokenav_match_call_1.c b/src/pokenav_match_call_1.c
index 265259394..d919a4dbf 100755
--- a/src/pokenav_match_call_1.c
+++ b/src/pokenav_match_call_1.c
@@ -79,16 +79,16 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state)
{
int selection;
- if (gMain.newAndRepeatedKeys & DPAD_UP)
+ if (JOY_REPEAT(DPAD_UP))
return POKENAV_MC_FUNC_UP;
- if (gMain.newAndRepeatedKeys & DPAD_DOWN)
+ if (JOY_REPEAT(DPAD_DOWN))
return POKENAV_MC_FUNC_DOWN;
- if (gMain.newAndRepeatedKeys & DPAD_LEFT)
+ if (JOY_REPEAT(DPAD_LEFT))
return POKENAV_MC_FUNC_PG_UP;
- if (gMain.newAndRepeatedKeys & DPAD_RIGHT)
+ if (JOY_REPEAT(DPAD_RIGHT))
return POKENAV_MC_FUNC_PG_DOWN;
- if (gMain.newKeys & A_BUTTON)
+ if (JOY_NEW(A_BUTTON))
{
state->callback = CB2_HandleMatchCallOptionsInput;
state->optionCursorPos = 0;
@@ -108,7 +108,7 @@ static u32 CB2_HandleMatchCallInput(struct Pokenav3Struct *state)
return POKENAV_MC_FUNC_SELECT;
}
- if (gMain.newKeys & B_BUTTON)
+ if (JOY_NEW(B_BUTTON))
{
if (GetPokenavMode() != POKENAV_MODE_FORCE_CALL_READY)
{
@@ -132,19 +132,19 @@ static u32 GetExitMatchCallMenuId(struct Pokenav3Struct *state)
static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state)
{
- if ((gMain.newKeys & DPAD_UP) && state->optionCursorPos)
+ if ((JOY_NEW(DPAD_UP)) && state->optionCursorPos)
{
state->optionCursorPos--;
return POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR;
}
- if ((gMain.newKeys & DPAD_DOWN) && state->optionCursorPos < state->maxOptionId)
+ if ((JOY_NEW(DPAD_DOWN)) && state->optionCursorPos < state->maxOptionId)
{
state->optionCursorPos++;
return POKENAV_MC_FUNC_MOVE_OPTIONS_CURSOR;
}
- if (gMain.newKeys & A_BUTTON)
+ if (JOY_NEW(A_BUTTON))
{
switch (state->matchCallOptions[state->optionCursorPos])
{
@@ -166,7 +166,7 @@ static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state)
}
}
- if (gMain.newKeys & B_BUTTON)
+ if (JOY_NEW(B_BUTTON))
{
state->callback = CB2_HandleMatchCallInput;
return POKENAV_MC_FUNC_CANCEL;
@@ -177,12 +177,12 @@ static u32 CB2_HandleMatchCallOptionsInput(struct Pokenav3Struct *state)
static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state)
{
- if (gMain.newAndRepeatedKeys & DPAD_UP)
+ if (JOY_REPEAT(DPAD_UP))
return POKENAV_MC_FUNC_CHECK_PAGE_UP;
- if (gMain.newAndRepeatedKeys & DPAD_DOWN)
+ if (JOY_REPEAT(DPAD_DOWN))
return POKENAV_MC_FUNC_CHECK_PAGE_DOWN;
- if (gMain.newKeys & B_BUTTON)
+ if (JOY_NEW(B_BUTTON))
{
state->callback = CB2_HandleMatchCallInput;
return POKENAV_MC_FUNC_EXIT_CHECK_PAGE;
@@ -193,7 +193,7 @@ static u32 CB2_HandleCheckPageInput(struct Pokenav3Struct *state)
static u32 CB2_HandleCallInput(struct Pokenav3Struct *state)
{
- if (gMain.newKeys & (A_BUTTON | B_BUTTON))
+ if (JOY_NEW(A_BUTTON | B_BUTTON))
{
state->callback = CB2_HandleMatchCallInput;
return POKENAV_MC_FUNC_10;