This commit is contained in:
DizzyEggg
2018-12-16 21:10:01 +01:00
parent f1421d94c3
commit aae36b5653
18 changed files with 2967 additions and 3871 deletions

View File

@@ -131,8 +131,6 @@ struct FactorySwapMonsStruct
bool8 unk30;
};
extern u8 gUnknown_0203CF20;
extern const u16 gBattleFrontierHeldItems[];
extern const struct FacilityMon gBattleFrontierMons[];
extern const struct FacilityMon gSlateportBattleTentMons[];

View File

@@ -964,7 +964,7 @@ static void HandleMenuActionInput(u8 taskId)
{
if (sub_81221EC() != TRUE)
{
s8 id = GetMenuCursorPos();
s8 id = Menu_GetCursorPos();
if (gMain.newKeys & DPAD_UP)
{
if (id > 0 && IsValidMenuAction(id - 2))

View File

@@ -519,7 +519,7 @@ void sub_8126B80(u8 taskId)
if (!gPaletteFade.active)
{
menuPos = GetMenuCursorPos();
menuPos = Menu_GetCursorPos();
switch (Menu_ProcessInput())
{
default:
@@ -527,7 +527,7 @@ void sub_8126B80(u8 taskId)
sSecretBasePCMenuActions[sSecretBasePCMenuCursorPos].func.void_u8(taskId);
break;
case -2:
sSecretBasePCMenuCursorPos = GetMenuCursorPos();
sSecretBasePCMenuCursorPos = Menu_GetCursorPos();
if ((s8)menuPos != sSecretBasePCMenuCursorPos)
{
sub_8126C08();

View File

@@ -1564,7 +1564,7 @@ void Task_HandleOutOfBattleItemMenuInput(u8 taskId)
{
if (sub_81221EC() != TRUE)
{
s8 cursorPos = GetMenuCursorPos();
s8 cursorPos = Menu_GetCursorPos();
if (gMain.newKeys & DPAD_UP)
{
if (cursorPos > 0 && sub_81ACDFC(cursorPos - 2))

View File

@@ -1394,7 +1394,7 @@ static void Task_NewGameBirchSpeech_ChooseGender(u8 taskId)
gTasks[taskId].func = Task_NewGameBirchSpeech_WhatsYourName;
break;
}
gender2 = GetMenuCursorPos();
gender2 = Menu_GetCursorPos();
if (gender2 != gTasks[taskId].tPlayerGender)
{
gTasks[taskId].tPlayerGender = gender2;

View File

@@ -132,7 +132,7 @@ extern void sub_8197BB4(u8, u8, u8, u8, u8, u8);
extern void sub_8197E30(u8, u8, u8, u8, u8, u8);
extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8);
extern void sub_81980A8(u8, u8, u8, u8, u8, u8);
extern u8 MoveMenuCursor(s8);
extern u8 Menu_MoveCursor(s8);
extern u8 sub_8199134(s8, s8);
extern void sub_8198C78(void);
extern void task_free_buf_after_copying_tile_data_to_vram(u8 taskId);
@@ -910,7 +910,7 @@ u8 sub_8198348(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numC
else
gUnknown_0203CD90.cursorPos = pos;
MoveMenuCursor(0);
Menu_MoveCursor(0);
return gUnknown_0203CD90.cursorPos;
}
@@ -935,7 +935,7 @@ void RedrawMenuCursor(u8 oldPos, u8 newPos)
AddTextPrinterParameterized(gUnknown_0203CD90.windowId, gUnknown_0203CD90.fontId, gText_SelectorArrow3, gUnknown_0203CD90.left, gUnknown_0203CD90.optionHeight * newPos + gUnknown_0203CD90.top, 0, 0);
}
u8 MoveMenuCursor(s8 cursorDelta)
u8 Menu_MoveCursor(s8 cursorDelta)
{
u8 oldPos = gUnknown_0203CD90.cursorPos;
int newPos = gUnknown_0203CD90.cursorPos + cursorDelta;
@@ -951,7 +951,7 @@ u8 MoveMenuCursor(s8 cursorDelta)
return gUnknown_0203CD90.cursorPos;
}
u8 MoveMenuCursorNoWrapAround(s8 cursorDelta)
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta)
{
u8 oldPos = gUnknown_0203CD90.cursorPos;
int newPos = gUnknown_0203CD90.cursorPos + cursorDelta;
@@ -967,7 +967,7 @@ u8 MoveMenuCursorNoWrapAround(s8 cursorDelta)
return gUnknown_0203CD90.cursorPos;
}
u8 GetMenuCursorPos(void)
u8 Menu_GetCursorPos(void)
{
return gUnknown_0203CD90.cursorPos;
}
@@ -987,13 +987,13 @@ s8 Menu_ProcessInput(void)
else if (gMain.newKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
MoveMenuCursor(-1);
Menu_MoveCursor(-1);
return MENU_NOTHING_CHOSEN;
}
else if (gMain.newKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
MoveMenuCursor(1);
Menu_MoveCursor(1);
return MENU_NOTHING_CHOSEN;
}
@@ -1016,13 +1016,13 @@ s8 Menu_ProcessInputNoWrap(void)
}
else if (gMain.newKeys & DPAD_UP)
{
if (oldPos != MoveMenuCursorNoWrapAround(-1))
if (oldPos != Menu_MoveCursorNoWrapAround(-1))
PlaySE(SE_SELECT);
return MENU_NOTHING_CHOSEN;
}
else if (gMain.newKeys & DPAD_DOWN)
{
if (oldPos != MoveMenuCursorNoWrapAround(1))
if (oldPos != Menu_MoveCursorNoWrapAround(1))
PlaySE(SE_SELECT);
return MENU_NOTHING_CHOSEN;
}
@@ -1045,13 +1045,13 @@ s8 ProcessMenuInput_other(void)
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP)
{
PlaySE(SE_SELECT);
MoveMenuCursor(-1);
Menu_MoveCursor(-1);
return MENU_NOTHING_CHOSEN;
}
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN)
{
PlaySE(SE_SELECT);
MoveMenuCursor(1);
Menu_MoveCursor(1);
return MENU_NOTHING_CHOSEN;
}
@@ -1074,13 +1074,13 @@ s8 Menu_ProcessInputNoWrapAround_other(void)
}
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP)
{
if (oldPos != MoveMenuCursorNoWrapAround(-1))
if (oldPos != Menu_MoveCursorNoWrapAround(-1))
PlaySE(SE_SELECT);
return MENU_NOTHING_CHOSEN;
}
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN)
{
if (oldPos != MoveMenuCursorNoWrapAround(1))
if (oldPos != Menu_MoveCursorNoWrapAround(1))
PlaySE(SE_SELECT);
return MENU_NOTHING_CHOSEN;
}
@@ -1588,7 +1588,7 @@ u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, boo
else
gUnknown_0203CD90.cursorPos = pos;
return MoveMenuCursor(0);
return Menu_MoveCursor(0);
}
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 itemCount, u8 initialCursorPos)

View File

@@ -462,9 +462,9 @@ static void ItemStorageMenuProcessInput(u8 taskId)
s8 r2;
s8 inputOptionId;
r5 = GetMenuCursorPos();
r5 = Menu_GetCursorPos();
inputOptionId = Menu_ProcessInput();
r2 = GetMenuCursorPos();
r2 = Menu_GetCursorPos();
switch(inputOptionId)
{
case -2:

File diff suppressed because it is too large Load Diff

View File

@@ -1640,27 +1640,27 @@ static void sub_80E2A94(u8 multichoiceId)
{
case 77:
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 76:
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 78:
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 79:
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 75:
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 74:
FillWindowPixelBuffer(0, 0x11);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[GetMenuCursorPos()], 0, NULL, 2, 1, 3);
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
}
}

View File

@@ -574,13 +574,13 @@ static bool8 HandleStartMenuInput(void)
if (gMain.newKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
sStartMenuCursorPos = MoveMenuCursor(-1);
sStartMenuCursorPos = Menu_MoveCursor(-1);
}
if (gMain.newKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
sStartMenuCursorPos = MoveMenuCursor(1);
sStartMenuCursorPos = Menu_MoveCursor(1);
}
if (gMain.newKeys & A_BUTTON)