Undo PokeCodec's PRs
This commit undoes most of PokeCodec's PRs after the debate in chat. Some harmless or completely superseded PRs have been left alone, as there is not much benefit in attempting to undo them. Reverts #1104, #1108, #1115, #1118, #1119, #1124, #1126, #1127, #1132, #1136, #1137, #1139, #1140, #1144, #1148, #1149, #1150, #1153, #1155, #1177, #1179, #1180, #1181, #1182 and #1183.
This commit is contained in:
@@ -216,7 +216,7 @@ static u32 HandleMainMenuInput(struct Pokenav1Struct *state)
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sMenuItems[state->menuType][state->cursorPos])
|
||||
{
|
||||
@@ -251,7 +251,7 @@ static u32 HandleMainMenuInput(struct Pokenav1Struct *state)
|
||||
}
|
||||
}
|
||||
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
return -1;
|
||||
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
@@ -263,7 +263,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state)
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
if (sMenuItems[state->menuType][state->cursorPos] == POKENAV_MENUITEM_MATCH_CALL)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ static u32 HandleMainMenuInputTutorial(struct Pokenav1Struct *state)
|
||||
}
|
||||
}
|
||||
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_FAILURE);
|
||||
return POKENAV_MENU_FUNC_NONE;
|
||||
@@ -293,7 +293,7 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state)
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u32 menuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
if (menuItem != POKENAV_MENUITEM_MATCH_CALL && menuItem != POKENAV_MENUITEM_SWITCH_OFF)
|
||||
@@ -312,7 +312,7 @@ static u32 HandleMainMenuInputEndTutorial(struct Pokenav1Struct *state)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ static u32 HandleCantOpenRibbonsInput(struct Pokenav1Struct *state)
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
}
|
||||
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
|
||||
{
|
||||
state->callback = GetMainMenuInputHandler();
|
||||
return POKENAV_MENU_FUNC_RESHOW_DESCRIPTION;
|
||||
@@ -343,7 +343,7 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state)
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
switch (sMenuItems[state->menuType][state->cursorPos])
|
||||
{
|
||||
@@ -363,7 +363,7 @@ static u32 HandleConditionMenuInput(struct Pokenav1Struct *state)
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_MAIN;
|
||||
}
|
||||
}
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
if (state->cursorPos != sLastCursorPositions[state->menuType])
|
||||
{
|
||||
@@ -387,7 +387,7 @@ static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state)
|
||||
if (UpdateMenuCursorPos(state))
|
||||
return POKENAV_MENU_FUNC_MOVE_CURSOR;
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
u8 menuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
if (menuItem != POKENAV_MENUITEM_CONDITION_SEARCH_CANCEL)
|
||||
@@ -404,7 +404,7 @@ static u32 HandleConditionSearchMenuInput(struct Pokenav1Struct *state)
|
||||
return POKENAV_MENU_FUNC_RETURN_TO_CONDITION;
|
||||
}
|
||||
}
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
if (state->cursorPos != sLastCursorPositions[state->menuType])
|
||||
{
|
||||
@@ -463,7 +463,7 @@ static void ReturnToConditionMenu(struct Pokenav1Struct *state)
|
||||
|
||||
static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state)
|
||||
{
|
||||
if (JOY_NEW(DPAD_UP))
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
if (--state->cursorPos < 0)
|
||||
state->cursorPos = sLastCursorPositions[state->menuType];
|
||||
@@ -471,7 +471,7 @@ static bool32 UpdateMenuCursorPos(struct Pokenav1Struct *state)
|
||||
state->currMenuItem = sMenuItems[state->menuType][state->cursorPos];
|
||||
return TRUE;
|
||||
}
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
else if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
state->cursorPos++;
|
||||
if (state->cursorPos > sLastCursorPositions[state->menuType])
|
||||
|
||||
Reference in New Issue
Block a user