6k left
This commit is contained in:
28
src/menu.c
28
src/menu.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user