mirror of
https://github.com/pret/pokefirered.git
synced 2026-09-14 12:25:34 -05:00
sync a few functions/macros
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
|
||||
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
|
||||
#define JOY_HELD_RAW(button) TEST_BUTTON(gMain.heldKeysRaw, button)
|
||||
#define JOY_REPT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button)
|
||||
#define JOY_REPEAT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button)
|
||||
|
||||
extern u8 gStringVar1[];
|
||||
extern u8 gStringVar2[];
|
||||
|
||||
@@ -81,7 +81,7 @@ void SetBagPocketsPointers(void);
|
||||
|
||||
void ItemPcCompaction(void);
|
||||
void RemovePCItem(u16 itemId, u16 quantity);
|
||||
void SortAndCompactBagPocket(struct BagPocket * pocket);
|
||||
void CompactItemsInBagPocket(struct BagPocket * pocket);
|
||||
u8 CountItemsInPC(void);
|
||||
bool8 HasAtLeastOneBerry(void);
|
||||
bool8 HasAtLeastOnePokeBall(void);
|
||||
|
||||
@@ -210,7 +210,7 @@ static u16 GetPrevBall(u16 ballId)
|
||||
{
|
||||
u16 ballPrev;
|
||||
s32 i, j;
|
||||
SortAndCompactBagPocket(&gBagPockets[BALLS_POCKET]);
|
||||
CompactItemsInBagPocket(&gBagPockets[BALLS_POCKET]);
|
||||
for (i = 0; i < gBagPockets[BALLS_POCKET].capacity; i++)
|
||||
{
|
||||
if (ballId == gBagPockets[BALLS_POCKET].itemSlots[i].itemId)
|
||||
@@ -235,7 +235,7 @@ static u32 GetNextBall(u32 ballId)
|
||||
{
|
||||
u32 ballNext = ITEM_NONE;
|
||||
s32 i;
|
||||
SortAndCompactBagPocket(&gBagPockets[BALLS_POCKET]);
|
||||
CompactItemsInBagPocket(&gBagPockets[BALLS_POCKET]);
|
||||
for (i = 1; i < gBagPockets[BALLS_POCKET].capacity; i++)
|
||||
{
|
||||
if (ballId == gBagPockets[BALLS_POCKET].itemSlots[i-1].itemId)
|
||||
@@ -257,7 +257,7 @@ static void HandleInputChooseAction(u32 battler)
|
||||
DoBounceEffect(battler, BOUNCE_HEALTHBOX, 7, 1);
|
||||
DoBounceEffect(battler, BOUNCE_MON, 7, 1);
|
||||
|
||||
if (JOY_REPT(DPAD_ANY) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
|
||||
if (JOY_REPEAT(DPAD_ANY) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
|
||||
gPlayerDpadHoldFrames++;
|
||||
else
|
||||
gPlayerDpadHoldFrames = 0;
|
||||
|
||||
@@ -2774,7 +2774,7 @@ void TryAddLastUsedBallItemSprites(void)
|
||||
u16 firstBall;
|
||||
|
||||
// we have to compact the bag first bc it is typically only compacted when you open it
|
||||
SortAndCompactBagPocket(&gBagPockets[BALLS_POCKET]);
|
||||
CompactItemsInBagPocket(&gBagPockets[BALLS_POCKET]);
|
||||
|
||||
firstBall = gBagPockets[BALLS_POCKET].itemSlots[0].itemId;
|
||||
if (firstBall > ITEM_NONE)
|
||||
|
||||
@@ -1360,13 +1360,7 @@ static void SetMultiPartnerMenuParty(u8 offset)
|
||||
gMultiPartnerParty[i].gender = GetMonGender(&gPlayerParty[offset + i]);
|
||||
StripExtCtrlCodes(gMultiPartnerParty[i].nickname);
|
||||
if (GetMonData(&gPlayerParty[offset + i], MON_DATA_LANGUAGE) != LANGUAGE_JAPANESE)
|
||||
{
|
||||
for (cur = gMultiPartnerParty[i].nickname, j = 0; cur[j] != EOS; j++)
|
||||
;
|
||||
while (j < 6)
|
||||
cur[j++] = 0;
|
||||
cur[j] = EOS;
|
||||
}
|
||||
PadNameString(gMultiPartnerParty[i].nickname, CHAR_SPACE);
|
||||
}
|
||||
memcpy(sMultiPartnerPartyBuffer, gMultiPartnerParty, sizeof(gMultiPartnerParty));
|
||||
}
|
||||
|
||||
@@ -893,7 +893,7 @@ static void SortAndCountBerries(void)
|
||||
u16 i;
|
||||
u32 r2;
|
||||
struct BagPocket *pocket = &gBagPockets[POCKET_BERRIES - 1];
|
||||
SortAndCompactBagPocket(pocket);
|
||||
CompactItemsInBagPocket(pocket);
|
||||
sResources->listMenuNumItems = 0;
|
||||
for (i = 0; i < pocket->capacity; i++)
|
||||
{
|
||||
|
||||
@@ -628,16 +628,16 @@ static u16 HandleJoypad_SelectGroup(void)
|
||||
if (JOY_NEW(SELECT_BUTTON))
|
||||
return ToggleGroupAlphaMode();
|
||||
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
return SelectGroupCursorAction(2);
|
||||
|
||||
if (JOY_REPT(DPAD_DOWN))
|
||||
if (JOY_REPEAT(DPAD_DOWN))
|
||||
return SelectGroupCursorAction(3);
|
||||
|
||||
if (JOY_REPT(DPAD_LEFT))
|
||||
if (JOY_REPEAT(DPAD_LEFT))
|
||||
return SelectGroupCursorAction(1);
|
||||
|
||||
if (JOY_REPT(DPAD_RIGHT))
|
||||
if (JOY_REPEAT(DPAD_RIGHT))
|
||||
return SelectGroupCursorAction(0);
|
||||
|
||||
return 0;
|
||||
@@ -660,16 +660,16 @@ static u16 HandleJoypad_SelectWord(void)
|
||||
if (JOY_NEW(SELECT_BUTTON))
|
||||
return SelectWordCursorAction(5);
|
||||
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
return SelectWordCursorAction(2);
|
||||
|
||||
if (JOY_REPT(DPAD_DOWN))
|
||||
if (JOY_REPEAT(DPAD_DOWN))
|
||||
return SelectWordCursorAction(3);
|
||||
|
||||
if (JOY_REPT(DPAD_LEFT))
|
||||
if (JOY_REPEAT(DPAD_LEFT))
|
||||
return SelectWordCursorAction(1);
|
||||
|
||||
if (JOY_REPT(DPAD_RIGHT))
|
||||
if (JOY_REPEAT(DPAD_RIGHT))
|
||||
return SelectWordCursorAction(0);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -668,25 +668,25 @@ s32 HelpSystem_GetMenuInput(void)
|
||||
{
|
||||
return -6;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_UP))
|
||||
else if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (!MoveCursor(1, 0))
|
||||
PlaySE(SE_SELECT);
|
||||
return -4;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (!MoveCursor(1, 1))
|
||||
PlaySE(SE_SELECT);
|
||||
return -5;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_LEFT))
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (!MoveCursor(7, 0))
|
||||
PlaySE(SE_SELECT);
|
||||
return -4;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (!MoveCursor(7, 1))
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
@@ -517,7 +517,7 @@ void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket)
|
||||
u16 k;
|
||||
struct ItemSlot * buff;
|
||||
|
||||
SortAndCompactBagPocket(pocket);
|
||||
CompactItemsInBagPocket(pocket);
|
||||
|
||||
for (i = 0; i < pocket->capacity; i++)
|
||||
{
|
||||
@@ -545,7 +545,7 @@ void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket)
|
||||
Free(buff);
|
||||
}
|
||||
|
||||
void SortAndCompactBagPocket(struct BagPocket * pocket)
|
||||
void CompactItemsInBagPocket(struct BagPocket * pocket)
|
||||
{
|
||||
u16 i, j;
|
||||
|
||||
|
||||
@@ -798,13 +798,13 @@ s8 ProcessMenuInput_other(void)
|
||||
{
|
||||
return MENU_B_PRESSED;
|
||||
}
|
||||
if (JOY_REPT(DPAD_ANY) == DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_ANY) == DPAD_UP)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
Menu_MoveCursor(-1);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
if (JOY_REPT(DPAD_ANY) == DPAD_DOWN)
|
||||
if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
Menu_MoveCursor(1);
|
||||
@@ -827,13 +827,13 @@ s8 Menu_ProcessInputNoWrapAround_other(void)
|
||||
{
|
||||
return MENU_B_PRESSED;
|
||||
}
|
||||
if (JOY_REPT(DPAD_ANY) == DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_ANY) == DPAD_UP)
|
||||
{
|
||||
if (oldPos != Menu_MoveCursorNoWrapAround(-1))
|
||||
PlaySE(SE_SELECT);
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
if (JOY_REPT(DPAD_ANY) == DPAD_DOWN)
|
||||
if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN)
|
||||
{
|
||||
if (oldPos != Menu_MoveCursorNoWrapAround(1))
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
@@ -82,9 +82,9 @@ u8 GetLRKeysPressedAndHeld(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR)
|
||||
{
|
||||
if (JOY_REPT(L_BUTTON))
|
||||
if (JOY_REPEAT(L_BUTTON))
|
||||
return MENU_L_PRESSED;
|
||||
if (JOY_REPT(R_BUTTON))
|
||||
if (JOY_REPEAT(R_BUTTON))
|
||||
return MENU_R_PRESSED;
|
||||
}
|
||||
return 0;
|
||||
@@ -174,7 +174,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax)
|
||||
{
|
||||
s16 valBefore = (*quantity_p);
|
||||
|
||||
if (JOY_REPT(DPAD_ANY) == DPAD_UP)
|
||||
if (JOY_REPEAT(DPAD_ANY) == DPAD_UP)
|
||||
{
|
||||
(*quantity_p)++;
|
||||
if ((*quantity_p) > qmax)
|
||||
@@ -190,7 +190,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (JOY_REPT(DPAD_ANY) == DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_ANY) == DPAD_DOWN)
|
||||
{
|
||||
(*quantity_p)--;
|
||||
if ((*quantity_p) <= 0)
|
||||
@@ -205,7 +205,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (JOY_REPT(DPAD_ANY) == DPAD_RIGHT)
|
||||
else if (JOY_REPEAT(DPAD_ANY) == DPAD_RIGHT)
|
||||
{
|
||||
(*quantity_p) += 10;
|
||||
if ((*quantity_p) > qmax)
|
||||
@@ -220,7 +220,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (JOY_REPT(DPAD_ANY) == DPAD_LEFT)
|
||||
else if (JOY_REPEAT(DPAD_ANY) == DPAD_LEFT)
|
||||
{
|
||||
(*quantity_p) -= 10;
|
||||
if ((*quantity_p) <= 0)
|
||||
|
||||
@@ -1640,13 +1640,13 @@ static void HandleDpadMovement(struct Task *task)
|
||||
|
||||
GetCursorPos(&cursorX, &cursorY);
|
||||
input = INPUT_NONE;
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
input = INPUT_DPAD_UP;
|
||||
if (JOY_REPT(DPAD_DOWN))
|
||||
if (JOY_REPEAT(DPAD_DOWN))
|
||||
input = INPUT_DPAD_DOWN;
|
||||
if (JOY_REPT(DPAD_LEFT))
|
||||
if (JOY_REPEAT(DPAD_LEFT))
|
||||
input = INPUT_DPAD_LEFT;
|
||||
if (JOY_REPT(DPAD_RIGHT))
|
||||
if (JOY_REPEAT(DPAD_RIGHT))
|
||||
input = INPUT_DPAD_RIGHT;
|
||||
|
||||
// Get new cursor position
|
||||
|
||||
@@ -411,7 +411,7 @@ static u8 OptionMenu_ProcessInput(void)
|
||||
{
|
||||
u16 current;
|
||||
u16 *curr;
|
||||
if (JOY_REPT(DPAD_RIGHT))
|
||||
if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
current = sOptionMenuPtr->option[(sOptionMenuPtr->cursorPos)];
|
||||
if (current == (sOptionMenuItemCounts[sOptionMenuPtr->cursorPos] - 1))
|
||||
@@ -423,7 +423,7 @@ static u8 OptionMenu_ProcessInput(void)
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_LEFT))
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
curr = &sOptionMenuPtr->option[sOptionMenuPtr->cursorPos];
|
||||
if (*curr == 0)
|
||||
@@ -436,7 +436,7 @@ static u8 OptionMenu_ProcessInput(void)
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_UP))
|
||||
else if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (sOptionMenuPtr->cursorPos == MENUITEM_TEXTSPEED)
|
||||
sOptionMenuPtr->cursorPos = MENUITEM_CANCEL;
|
||||
@@ -444,7 +444,7 @@ static u8 OptionMenu_ProcessInput(void)
|
||||
sOptionMenuPtr->cursorPos = sOptionMenuPtr->cursorPos - 1;
|
||||
return 3;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (sOptionMenuPtr->cursorPos == MENUITEM_CANCEL)
|
||||
sOptionMenuPtr->cursorPos = MENUITEM_TEXTSPEED;
|
||||
|
||||
@@ -285,7 +285,7 @@ static void PrintStringOnWindow0WithDialogueFrame(const u8 *str)
|
||||
|
||||
static void Task_TopMenu_ItemStorageSubmenu_HandleInput(u8 taskId)
|
||||
{
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (Menu_GetCursorPos() != 0)
|
||||
{
|
||||
@@ -294,7 +294,7 @@ static void Task_TopMenu_ItemStorageSubmenu_HandleInput(u8 taskId)
|
||||
PrintStringOnWindow0WithDialogueFrame(sItemStorageActionDescriptionPtrs[Menu_GetCursorPos()]);
|
||||
}
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (Menu_GetCursorPos() != 2)
|
||||
{
|
||||
|
||||
@@ -1661,7 +1661,7 @@ static void Task_DexScreen_CategorySubmenu(u8 taskId)
|
||||
sPokedexScreenData->state = 12;
|
||||
break;
|
||||
}
|
||||
if (!JOY_HELD(R_BUTTON) && JOY_REPT(DPAD_LEFT))
|
||||
if (!JOY_HELD(R_BUTTON) && JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (sPokedexScreenData->categoryCursorPosInPage != 0)
|
||||
{
|
||||
@@ -1672,7 +1672,7 @@ static void Task_DexScreen_CategorySubmenu(u8 taskId)
|
||||
else
|
||||
pageFlipCmd = 1;
|
||||
}
|
||||
if (!JOY_HELD(R_BUTTON) && JOY_REPT(DPAD_RIGHT))
|
||||
if (!JOY_HELD(R_BUTTON) && JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (sPokedexScreenData->categoryCursorPosInPage < sPokedexScreenData->numMonsOnPage - 1)
|
||||
{
|
||||
|
||||
@@ -6666,7 +6666,7 @@ static u8 HandleInput_InBox_Normal(void)
|
||||
gStorage->cursorVerticalWrap = 0;
|
||||
gStorage->cursorHorizontalWrap = 0;
|
||||
gStorage->cursorFlipTimer = 0;
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
if (sCursorPosition >= IN_BOX_COLUMNS)
|
||||
@@ -6678,7 +6678,7 @@ static u8 HandleInput_InBox_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
cursorPosition += IN_BOX_COLUMNS;
|
||||
@@ -6692,7 +6692,7 @@ static u8 HandleInput_InBox_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_LEFT))
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
if (sCursorPosition % IN_BOX_COLUMNS != 0)
|
||||
@@ -6704,7 +6704,7 @@ static u8 HandleInput_InBox_Normal(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
if ((sCursorPosition + 1) % IN_BOX_COLUMNS != 0)
|
||||
@@ -6789,7 +6789,7 @@ static u8 HandleInput_InBox_GrabbingMultiple(void)
|
||||
{
|
||||
if (JOY_HELD(A_BUTTON))
|
||||
{
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (sCursorPosition / IN_BOX_COLUMNS != 0)
|
||||
{
|
||||
@@ -6799,7 +6799,7 @@ static u8 HandleInput_InBox_GrabbingMultiple(void)
|
||||
else
|
||||
return INPUT_MULTIMOVE_UNABLE;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (sCursorPosition + IN_BOX_COLUMNS < IN_BOX_COUNT)
|
||||
{
|
||||
@@ -6809,7 +6809,7 @@ static u8 HandleInput_InBox_GrabbingMultiple(void)
|
||||
else
|
||||
return INPUT_MULTIMOVE_UNABLE;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_LEFT))
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (sCursorPosition % IN_BOX_COLUMNS != 0)
|
||||
{
|
||||
@@ -6819,7 +6819,7 @@ static u8 HandleInput_InBox_GrabbingMultiple(void)
|
||||
else
|
||||
return INPUT_MULTIMOVE_UNABLE;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if ((sCursorPosition + 1) % IN_BOX_COLUMNS != 0)
|
||||
{
|
||||
@@ -6852,7 +6852,7 @@ static u8 HandleInput_InBox_GrabbingMultiple(void)
|
||||
|
||||
static u8 HandleInput_InBox_MovingMultiple(void)
|
||||
{
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (MultiMove_TryMoveGroup(0))
|
||||
{
|
||||
@@ -6862,7 +6862,7 @@ static u8 HandleInput_InBox_MovingMultiple(void)
|
||||
else
|
||||
return INPUT_MULTIMOVE_UNABLE;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (MultiMove_TryMoveGroup(1))
|
||||
{
|
||||
@@ -6872,7 +6872,7 @@ static u8 HandleInput_InBox_MovingMultiple(void)
|
||||
else
|
||||
return INPUT_MULTIMOVE_UNABLE;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_LEFT))
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (MultiMove_TryMoveGroup(2))
|
||||
{
|
||||
@@ -6882,7 +6882,7 @@ static u8 HandleInput_InBox_MovingMultiple(void)
|
||||
else
|
||||
return INPUT_SCROLL_LEFT;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (MultiMove_TryMoveGroup(3))
|
||||
{
|
||||
@@ -6937,7 +6937,7 @@ static u8 HandleInput_InParty(void)
|
||||
gotoBox = FALSE;
|
||||
input = INPUT_NONE;
|
||||
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (--cursorPosition < 0)
|
||||
cursorPosition = PARTY_SIZE;
|
||||
@@ -6945,7 +6945,7 @@ static u8 HandleInput_InParty(void)
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (++cursorPosition > PARTY_SIZE)
|
||||
cursorPosition = 0;
|
||||
@@ -6953,14 +6953,14 @@ static u8 HandleInput_InParty(void)
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_LEFT) && sCursorPosition != 0)
|
||||
else if (JOY_REPEAT(DPAD_LEFT) && sCursorPosition != 0)
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
gStorage->cursorPrevPartyPos = sCursorPosition;
|
||||
cursorPosition = 0;
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (sCursorPosition == 0)
|
||||
{
|
||||
@@ -7052,7 +7052,7 @@ static u8 HandleInput_BoxTitle(void)
|
||||
gStorage->cursorVerticalWrap = 0;
|
||||
gStorage->cursorFlipTimer = 0;
|
||||
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
cursorArea = CURSOR_AREA_BUTTONS;
|
||||
@@ -7060,7 +7060,7 @@ static u8 HandleInput_BoxTitle(void)
|
||||
gStorage->cursorFlipTimer = 1;
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
cursorArea = CURSOR_AREA_IN_BOX;
|
||||
@@ -7125,7 +7125,7 @@ static u8 HandleInput_OnButtons(void)
|
||||
gStorage->cursorVerticalWrap = 0;
|
||||
gStorage->cursorFlipTimer = 0;
|
||||
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
cursorArea = CURSOR_AREA_IN_BOX;
|
||||
@@ -7137,7 +7137,7 @@ static u8 HandleInput_OnButtons(void)
|
||||
gStorage->cursorFlipTimer = 1;
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_DOWN | START_BUTTON))
|
||||
else if (JOY_REPEAT(DPAD_DOWN | START_BUTTON))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
cursorArea = CURSOR_AREA_BOX_TITLE;
|
||||
@@ -7146,14 +7146,14 @@ static u8 HandleInput_OnButtons(void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (JOY_REPT(DPAD_LEFT))
|
||||
if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
if (--cursorPosition < 0)
|
||||
cursorPosition = 1;
|
||||
break;
|
||||
}
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
input = INPUT_MOVE_CURSOR;
|
||||
if (++cursorPosition > 1)
|
||||
|
||||
@@ -2794,7 +2794,7 @@ static u8 HandleRegionMapInput(void)
|
||||
}
|
||||
else if (!JOY_NEW(B_BUTTON))
|
||||
{
|
||||
if (JOY_REPT(START_BUTTON))
|
||||
if (JOY_REPEAT(START_BUTTON))
|
||||
{
|
||||
SnapToIconOrButton();
|
||||
sMapCursor->selectedMapsec = GetSelectedMapSection(GetSelectedRegionMap(), LAYER_MAP, sMapCursor->y, sMapCursor->x);
|
||||
|
||||
@@ -577,7 +577,7 @@ static void Task_ResetRtc_HandleInput(u8 taskId)
|
||||
tSelection = SELECTION_NONE;
|
||||
}
|
||||
}
|
||||
else if (MoveTimeUpDown(&data[selectionInfo->dataIndex], selectionInfo->minVal, selectionInfo->maxVal, selectionInfo->increment, JOY_REPT(DPAD_UP | DPAD_DOWN)))
|
||||
else if (MoveTimeUpDown(&data[selectionInfo->dataIndex], selectionInfo->minVal, selectionInfo->maxVal, selectionInfo->increment, JOY_REPEAT(DPAD_UP | DPAD_DOWN)))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
PrintTime(tWindowId, 0, 1, tDays, tHours, tMinutes, tSeconds);
|
||||
|
||||
@@ -1811,13 +1811,13 @@ static void CB_ProcessMenuInput(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
TradeMenuMoveCursor(&sTradeMenu->cursorPosition, DIR_UP);
|
||||
else if (JOY_REPT(DPAD_DOWN))
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
TradeMenuMoveCursor(&sTradeMenu->cursorPosition, DIR_DOWN);
|
||||
else if (JOY_REPT(DPAD_LEFT))
|
||||
else if (JOY_REPEAT(DPAD_LEFT))
|
||||
TradeMenuMoveCursor(&sTradeMenu->cursorPosition, DIR_LEFT);
|
||||
else if (JOY_REPT(DPAD_RIGHT))
|
||||
else if (JOY_REPEAT(DPAD_RIGHT))
|
||||
TradeMenuMoveCursor(&sTradeMenu->cursorPosition, DIR_RIGHT);
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
|
||||
@@ -469,7 +469,7 @@ static void ChatEntryRoutine_HandleInput(void)
|
||||
{
|
||||
GoToRoutine(CHATENTRYROUTINE_SWITCH);
|
||||
}
|
||||
else if (JOY_REPT(B_BUTTON))
|
||||
else if (JOY_REPEAT(B_BUTTON))
|
||||
{
|
||||
if (sWork->bufferCursorPos)
|
||||
{
|
||||
@@ -1028,7 +1028,7 @@ static bool32 TypeChatMessage_HandleDPad(void)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (JOY_REPT(DPAD_UP))
|
||||
if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
if (sWork->currentRow > 0)
|
||||
sWork->currentRow--;
|
||||
@@ -1037,7 +1037,7 @@ static bool32 TypeChatMessage_HandleDPad(void)
|
||||
|
||||
break;
|
||||
}
|
||||
if (JOY_REPT(DPAD_DOWN))
|
||||
if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
if (sWork->currentRow < sKeyboardPageMaxRow[sWork->currentPage])
|
||||
{
|
||||
@@ -1052,7 +1052,7 @@ static bool32 TypeChatMessage_HandleDPad(void)
|
||||
}
|
||||
if (sWork->currentPage != UNION_ROOM_KB_PAGE_COUNT)
|
||||
{
|
||||
if (JOY_REPT(DPAD_LEFT))
|
||||
if (JOY_REPEAT(DPAD_LEFT))
|
||||
{
|
||||
if (sWork->currentCol > 0)
|
||||
sWork->currentCol--;
|
||||
@@ -1060,7 +1060,7 @@ static bool32 TypeChatMessage_HandleDPad(void)
|
||||
sWork->currentCol = 4;
|
||||
break;
|
||||
}
|
||||
if (JOY_REPT(DPAD_RIGHT))
|
||||
if (JOY_REPEAT(DPAD_RIGHT))
|
||||
{
|
||||
if (sWork->currentCol < 4)
|
||||
sWork->currentCol++;
|
||||
|
||||
Reference in New Issue
Block a user