summaryrefslogtreecommitdiff
path: root/src/menu_helpers.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-04-09 11:50:23 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-04-09 11:50:23 -0400
commit8626240b54d87449e5db70345840ccf20717d8c7 (patch)
treef5c61f88a09230245a760e4f01813bcecbd250f5 /src/menu_helpers.c
parenta42e4134af3a8da0cabe18d846ad34469a0ae1e3 (diff)
Finish naming item_pc routines
Diffstat (limited to 'src/menu_helpers.c')
-rw-r--r--src/menu_helpers.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/menu_helpers.c b/src/menu_helpers.c
index 8e63ea99d..c099df383 100644
--- a/src/menu_helpers.c
+++ b/src/menu_helpers.c
@@ -174,17 +174,17 @@ void ResetAllBgsCoordinatesAndBgCntRegs(void)
ChangeBgY(3, 0, 0);
}
-bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1)
+bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax)
{
- s16 valBefore = (*arg0);
+ s16 valBefore = (*quantity_p);
if (JOY_REPT(DPAD_ANY) == DPAD_UP)
{
- (*arg0)++;
- if ((*arg0) > arg1)
- (*arg0) = 1;
+ (*quantity_p)++;
+ if ((*quantity_p) > qmax)
+ (*quantity_p) = 1;
- if ((*arg0) == valBefore)
+ if ((*quantity_p) == valBefore)
{
return FALSE;
}
@@ -196,10 +196,10 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1)
}
else if (JOY_REPT(DPAD_ANY) == DPAD_DOWN)
{
- (*arg0)--;
- if ((*arg0) <= 0)
- (*arg0) = arg1;
- if ((*arg0) == valBefore)
+ (*quantity_p)--;
+ if ((*quantity_p) <= 0)
+ (*quantity_p) = qmax;
+ if ((*quantity_p) == valBefore)
{
return FALSE;
}
@@ -211,10 +211,10 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1)
}
else if (JOY_REPT(DPAD_ANY) == DPAD_RIGHT)
{
- (*arg0) += 10;
- if ((*arg0) > arg1)
- (*arg0) = arg1;
- if ((*arg0) == valBefore)
+ (*quantity_p) += 10;
+ if ((*quantity_p) > qmax)
+ (*quantity_p) = qmax;
+ if ((*quantity_p) == valBefore)
{
return FALSE;
}
@@ -226,10 +226,10 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1)
}
else if (JOY_REPT(DPAD_ANY) == DPAD_LEFT)
{
- (*arg0) -= 10;
- if ((*arg0) <= 0)
- (*arg0) = 1;
- if ((*arg0) == valBefore)
+ (*quantity_p) -= 10;
+ if ((*quantity_p) <= 0)
+ (*quantity_p) = 1;
+ if ((*quantity_p) == valBefore)
{
return FALSE;
}