summaryrefslogtreecommitdiff
path: root/src/field
diff options
context:
space:
mode:
Diffstat (limited to 'src/field')
-rw-r--r--src/field/berry_tag_screen.c28
-rw-r--r--src/field/braille_puzzles.c4
-rw-r--r--src/field/choose_party.c36
-rw-r--r--src/field/coins.c6
-rw-r--r--src/field/daycare.c18
-rw-r--r--src/field/decoration.c100
-rw-r--r--src/field/diploma.c10
-rw-r--r--src/field/field_effect.c8
-rw-r--r--src/field/field_message_box.c20
-rw-r--r--src/field/field_player_avatar.c18
-rw-r--r--src/field/field_region_map.c14
-rw-r--r--src/field/field_screen_effect.c30
-rw-r--r--src/field/field_specials.c58
-rw-r--r--src/field/fldeff_softboiled.c4
-rw-r--r--src/field/item_menu.c118
-rw-r--r--src/field/item_use.c18
-rw-r--r--src/field/map_name_popup.c8
-rw-r--r--src/field/mauville_man.c24
-rw-r--r--src/field/menu_helpers.c10
-rw-r--r--src/field/money.c8
-rw-r--r--src/field/overworld.c28
-rw-r--r--src/field/party_menu.c112
-rw-r--r--src/field/player_pc.c158
-rw-r--r--src/field/pokeblock.c76
-rw-r--r--src/field/region_map.c24
-rw-r--r--src/field/scrcmd.c8
-rw-r--r--src/field/script_menu.c68
-rw-r--r--src/field/secret_base.c54
-rw-r--r--src/field/shop.c56
-rw-r--r--src/field/slot_machine.c28
-rw-r--r--src/field/start_menu.c50
-rw-r--r--src/field/starter_choose.c34
-rw-r--r--src/field/trader.c26
-rw-r--r--src/field/tv.c8
-rw-r--r--src/field/use_pokeblock.c40
-rw-r--r--src/field/wallclock.c24
36 files changed, 667 insertions, 667 deletions
diff --git a/src/field/berry_tag_screen.c b/src/field/berry_tag_screen.c
index 960a163c1..a05d9bf87 100644
--- a/src/field/berry_tag_screen.c
+++ b/src/field/berry_tag_screen.c
@@ -109,11 +109,11 @@ static bool8 sub_8146058(void)
gMain.state += 1;
break;
case 3:
- SetUpWindowConfig(&gWindowConfig_81E6E18);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6E18);
gMain.state += 1;
break;
case 4:
- MultistepInitMenuWindowBegin(&gWindowConfig_81E6E18);
+ MultistepInitMenuWindowBegin(&gWindowTemplate_81E6E18);
gMain.state += 1;
break;
case 5:
@@ -280,18 +280,18 @@ static void sub_81464E4(void)
berryInfo = GetBerryInfo(gSpecialVar_ItemId + OFFSET_7B + 1);
ConvertIntToDecimalStringN(gStringVar1, gSpecialVar_ItemId - FIRST_BERRY + 1, STR_CONV_MODE_LEADING_ZEROS, 2);
- MenuPrint(gStringVar1, 12, 4);
+ Menu_PrintText(gStringVar1, 12, 4);
#if ENGLISH
- MenuPrint(berryInfo->name, 14, 4);
+ Menu_PrintText(berryInfo->name, 14, 4);
#elif GERMAN
StringCopy(buffer, berryInfo->name);
StringAppend(buffer, gOtherText_Berry2);
- MenuPrint(buffer, 14, 4);
+ Menu_PrintText(buffer, 14, 4);
#endif
- MenuPrint(berryInfo->description1, 4, 14);
- MenuPrint(berryInfo->description2, 4, 16);
+ Menu_PrintText(berryInfo->description1, 4, 14);
+ Menu_PrintText(berryInfo->description2, 4, 16);
#ifdef UNITS_IMPERIAL
size = (berryInfo->size * 1000) / 254;
@@ -301,7 +301,7 @@ static void sub_81464E4(void)
sizeMajor = size / 100;
#endif
- MenuPrint(gOtherText_Size, 11, 7);
+ Menu_PrintText(gOtherText_Size, 11, 7);
if (berryInfo->size != 0)
{
#ifdef UNITS_IMPERIAL
@@ -311,18 +311,18 @@ static void sub_81464E4(void)
ConvertIntToDecimalStringN(gStringVar1, berryInfo->size / 10, STR_CONV_MODE_LEFT_ALIGN, 2);
ConvertIntToDecimalStringN(gStringVar2, berryInfo->size % 10, STR_CONV_MODE_LEFT_ALIGN, 2);
#endif
- MenuPrint(gContestStatsText_Unknown1, 16, 7);
+ Menu_PrintText(gContestStatsText_Unknown1, 16, 7);
}
else
{
- MenuPrint(gOtherText_ThreeQuestions2, 16, 7);
+ Menu_PrintText(gOtherText_ThreeQuestions2, 16, 7);
}
- MenuPrint(gOtherText_Firm, 11, 9);
+ Menu_PrintText(gOtherText_Firm, 11, 9);
if (berryInfo->firmness != 0)
- MenuPrint(gUnknown_0841192C[berryInfo->firmness - 1], 16, 9);
+ Menu_PrintText(gUnknown_0841192C[berryInfo->firmness - 1], 16, 9);
else
- MenuPrint(gOtherText_ThreeQuestions2, 16, 9);
+ Menu_PrintText(gOtherText_ThreeQuestions2, 16, 9);
}
static void sub_8146600(u8 berry)
@@ -445,7 +445,7 @@ static void sub_8146810(s8 berry)
static void sub_81468BC(void)
{
- MenuZeroFillWindowRect(0, 4, 29, 19);
+ Menu_EraseWindowRect(0, 4, 29, 19);
sub_81464E4();
// center of berry sprite
diff --git a/src/field/braille_puzzles.c b/src/field/braille_puzzles.c
index 0d304714d..f11fb5fb3 100644
--- a/src/field/braille_puzzles.c
+++ b/src/field/braille_puzzles.c
@@ -161,7 +161,7 @@ void Task_BrailleWait(u8 taskId)
case 1:
if (BrailleWait_CheckButtonPress() != FALSE)
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
PlaySE(SE_SELECT);
data[0] = 2;
}
@@ -170,7 +170,7 @@ void Task_BrailleWait(u8 taskId)
data[1] = data[1] - 1;
if (data[1] == 0)
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
data[0] = 3;
data[1] = 30;
}
diff --git a/src/field/choose_party.c b/src/field/choose_party.c
index 52763b911..1d6b6541a 100644
--- a/src/field/choose_party.c
+++ b/src/field/choose_party.c
@@ -319,19 +319,19 @@ static void sub_812238C(u8 taskId)
{
if (gMain.newAndRepeatedKeys & 0x40)
{
- if (GetMenuCursorPos() != 0)
+ if (Menu_GetCursorPos() != 0)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
return;
}
if (gMain.newAndRepeatedKeys & 0x80)
{
- if (GetMenuCursorPos() != 3)
+ if (Menu_GetCursorPos() != 3)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
return;
}
@@ -344,7 +344,7 @@ static void sub_812238C(u8 taskId)
gTasks[taskId].data[4],
sBattleTowerEntryMenu,
sBattleTowerEntryMenuItems,
- GetMenuCursorPos());
+ Menu_GetCursorPos());
popupMenuFunc(taskId);
return;
}
@@ -462,8 +462,8 @@ static void BattleTowerEntryMenuCallback_Enter(u8 taskId)
}
}
PlaySE(SE_HAZURE);
- MenuZeroFillWindowRect(20, 10, 29, 19);
- HandleDestroyMenuCursors();
+ Menu_EraseWindowRect(20, 10, 29, 19);
+ Menu_DestroyCursor();
sub_806D5A4();
sub_806E834(gOtherText_NoMoreThreePoke, 1);
gTasks[taskId].func = sub_8122728;
@@ -476,8 +476,8 @@ static void sub_8122728(u8 taskId)
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
{
- MenuZeroFillWindowRect(0, 14, 29, 19);
- HandleDestroyMenuCursors();
+ Menu_EraseWindowRect(0, 14, 29, 19);
+ Menu_DestroyCursor();
BattleTowerEntryMenuCallback_Exit(taskId);
}
}
@@ -516,8 +516,8 @@ static void BattleTowerEntryMenuCallback_NoEntry(u8 taskId)
static void sub_81227FC(u8 taskId)
{
- MenuZeroFillWindowRect(20, 10, 29, 19);
- HandleDestroyMenuCursors();
+ Menu_EraseWindowRect(20, 10, 29, 19);
+ Menu_DestroyCursor();
PrintPartyMenuPromptText(0, 0);
gTasks[taskId].func = HandleBattleTowerPartyMenu;
}
@@ -807,19 +807,19 @@ static void Task_DaycareStorageMenu8122EAC(u8 taskId)
{
if (gMain.newAndRepeatedKeys & 0x40)
{
- if (GetMenuCursorPos() != 0)
+ if (Menu_GetCursorPos() != 0)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
return;
}
if (gMain.newAndRepeatedKeys & 0x80)
{
- if (GetMenuCursorPos() != 3)
+ if (Menu_GetCursorPos() != 3)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
return;
}
@@ -832,7 +832,7 @@ static void Task_DaycareStorageMenu8122EAC(u8 taskId)
gTasks[taskId].data[4],
sDaycareStorageMenus,
sDaycareStorageMenuItems,
- GetMenuCursorPos());
+ Menu_GetCursorPos());
popupMenuFunc(taskId);
return;
}
@@ -897,8 +897,8 @@ static void DaycareStorageMenuCallback_Summary(u8 taskId)
static void DaycareStorageMenuCallback_Exit(u8 taskId)
{
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(20, 10, 29, 19);
- HandleDestroyMenuCursors();
+ Menu_EraseWindowRect(20, 10, 29, 19);
+ Menu_DestroyCursor();
PrintPartyMenuPromptText(15, 0);
gTasks[taskId].func = HandleDaycarePartyMenu;
}
diff --git a/src/field/coins.c b/src/field/coins.c
index 91a4b508d..2c217e635 100644
--- a/src/field/coins.c
+++ b/src/field/coins.c
@@ -13,13 +13,13 @@ void UpdateCoinsWindow(s32 coins, u8 x, u8 y)
void ShowCoinsWindow(u32 coins, u8 x, u8 y)
{
- MenuDrawTextWindow(x, y, x + 9, y + 3);
+ Menu_DrawStdWindowFrame(x, y, x + 9, y + 3);
UpdateCoinsWindow(coins, x, y);
}
void HideCoinsWindow(u8 x, u8 y)
{
- MenuZeroFillWindowRect(x, y, x + 9, y + 3);
+ Menu_EraseWindowRect(x, y, x + 9, y + 3);
}
void PrintCoins(s32 coins, u8 b, u8 x, u8 y)
@@ -46,7 +46,7 @@ void PrintCoins(s32 coins, u8 b, u8 x, u8 y)
ptr[2] = (b - StringLength(string)) * 6;
ptr += 3;
StringCopy(ptr, string);
- MenuPrint(gOtherText_Coins2, x, y);
+ Menu_PrintText(gOtherText_Coins2, x, y);
}
u16 GetCoins(void)
diff --git a/src/field/daycare.c b/src/field/daycare.c
index c28bc65ca..5811461ae 100644
--- a/src/field/daycare.c
+++ b/src/field/daycare.c
@@ -1741,7 +1741,7 @@ static void HandleDaycareLevelMenuInput(u8 taskId)
if (gTasks[taskId].data[0] != 0)
{
gTasks[taskId].data[0] --;
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
PlaySE(SE_SELECT);
}
}
@@ -1750,25 +1750,25 @@ static void HandleDaycareLevelMenuInput(u8 taskId)
if (gTasks[taskId].data[0] != 2)
{
gTasks[taskId].data[0]++;
- MoveMenuCursor(+1);
+ Menu_MoveCursor(+1);
PlaySE(SE_SELECT);
}
}
else if (gMain.newKeys & A_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
gLastFieldPokeMenuOpened = gSpecialVar_Result = gTasks[taskId].data[0];
DestroyTask(taskId);
- MenuZeroFillWindowRect(15, 6, 29, 13);
+ Menu_EraseWindowRect(15, 6, 29, 13);
EnableBothScriptContexts();
}
else if (gMain.newKeys & B_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
gLastFieldPokeMenuOpened = gSpecialVar_Result = 2;
DestroyTask(taskId);
- MenuZeroFillWindowRect(15, 6, 29, 13);
+ Menu_EraseWindowRect(15, 6, 29, 13);
EnableBothScriptContexts();
}
}
@@ -1776,11 +1776,11 @@ static void HandleDaycareLevelMenuInput(u8 taskId)
void ShowDaycareLevelMenu(void)
{
u8 buffer[100];
- MenuDrawTextWindow(15, 6, 29, 13);
+ Menu_DrawStdWindowFrame(15, 6, 29, 13);
GetDaycareLevelMenuText(&gSaveBlock1.daycare, buffer);
- MenuPrint(buffer, 16, 7);
+ Menu_PrintText(buffer, 16, 7);
GetDaycareLevelMenuLevelText(&gSaveBlock1.daycare, buffer);
- MenuPrint_PixelCoords(buffer, 0xce, 0x38, TRUE);
+ Menu_PrintTextPixelCoords(buffer, 0xce, 0x38, TRUE);
InitMenu(0, 16, 7, 3, 0, 13);
CreateTask(HandleDaycareLevelMenuInput, 3);
}
diff --git a/src/field/decoration.c b/src/field/decoration.c
index 87a9d8028..a6c0bd21f 100644
--- a/src/field/decoration.c
+++ b/src/field/decoration.c
@@ -1433,8 +1433,8 @@ extern u8 gUnknown_0815F399[];
void sub_80FE1DC(void)
{
sub_80FE2B4();
- MenuDrawTextWindow(0, 0, 10, 9);
- PrintMenuItems(1, 1, 4, (const struct MenuAction *)gUnknown_083EC604);
+ Menu_DrawStdWindowFrame(0, 0, 10, 9);
+ Menu_PrintItems(1, 1, 4, (const struct MenuAction *)gUnknown_083EC604);
InitMenu(0, 1, 1, 4, gUnknown_020388D4, 9);
}
@@ -1487,13 +1487,13 @@ void Task_DecorationPCProcessMenuInput(u8 taskId)
if (gMain.newKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- gUnknown_020388D4 = MoveMenuCursor(-1);
+ gUnknown_020388D4 = Menu_MoveCursor(-1);
sub_80FE394();
}
if (gMain.newKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- gUnknown_020388D4 = MoveMenuCursor(1);
+ gUnknown_020388D4 = Menu_MoveCursor(1);
sub_80FE394();
}
if (gMain.newKeys & A_BUTTON)
@@ -1510,15 +1510,15 @@ void Task_DecorationPCProcessMenuInput(u8 taskId)
void sub_80FE394(void)
{
- MenuFillWindowRectWithBlankTile(2, 15, 27, 18);
- MenuPrint(gUnknown_083EC624[gUnknown_020388D4], 2, 15);
+ Menu_BlankWindowRect(2, 15, 27, 18);
+ Menu_PrintText(gUnknown_083EC624[gUnknown_020388D4], 2, 15);
}
void gpu_pal_decompress_alloc_tag_and_upload(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 10, 9);
- MenuFillWindowRectWithBlankTile(2, 15, 27, 18);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 10, 9);
+ Menu_BlankWindowRect(2, 15, 27, 18);
FreeSpritePaletteByTag(6);
if (ewram_1f000.isPlayerRoom == 0)
{
@@ -1546,7 +1546,7 @@ void sub_80FE470(u8 decoCat, u8 left, u8 top, u8 palIdx) // PrintDecorationCateg
{
u8 *strptr;
u8 v0;
- v0 = sub_8072CBC();
+ v0 = Menu_GetTextWindowPaletteNum();
// PALETTE {palIdx}
strptr = gStringVar4;
strptr[0] = EXT_CTRL_CODE_BEGIN;
@@ -1561,13 +1561,13 @@ void sub_80FE470(u8 decoCat, u8 left, u8 top, u8 palIdx) // PrintDecorationCateg
strptr[1] = 5;
strptr[2] = v0;
strptr[3] = EOS;
- MenuPrint(gStringVar4, left, top);
+ Menu_PrintText(gStringVar4, left, top);
}
void sub_80FE528(u8 taskId) // PrintDecorationCategorySelectionMenuStrings
{
u8 decoCat;
- MenuDrawTextWindow(0, 0, 14, 19);
+ Menu_DrawStdWindowFrame(0, 0, 14, 19);
for (decoCat=0; decoCat<8; decoCat++)
{
if (ewram_1f000.isPlayerRoom == 1 && gTasks[taskId].data[11] == 0 && decoCat != DECORCAT_DOLL && decoCat != DECORCAT_CUSHION)
@@ -1578,13 +1578,13 @@ void sub_80FE528(u8 taskId) // PrintDecorationCategorySelectionMenuStrings
sub_80FE470(decoCat, 1, 2 * decoCat + 1, 255); // Unselectable
}
}
- MenuPrint(gUnknownText_Exit, 1, 17);
+ Menu_PrintText(gUnknownText_Exit, 1, 17);
}
void sub_80FE5AC(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80FE528(taskId);
InitMenu(0, 1, 1, 9, gUnknown_020388F6, 13);
gTasks[taskId].func = sub_80FE604;
@@ -1597,15 +1597,15 @@ void sub_80FE604(u8 taskId)
if (gMain.newAndRepeatedKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
} else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
} else if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- gUnknown_020388F6 = GetMenuCursorPos();
+ gUnknown_020388F6 = Menu_GetCursorPos();
if (gUnknown_020388F6 != 8)
{
gUnknown_020388D5 = sub_8134194(gUnknown_020388F6);
@@ -1620,8 +1620,8 @@ void sub_80FE604(u8 taskId)
gTasks[taskId].func = sub_80FE868;
} else
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 14, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 14, 19);
DisplayItemMessageOnField(taskId, gSecretBaseText_NoDecors, sub_80FE418, 0);
}
} else
@@ -1649,12 +1649,12 @@ void sub_80FE728(u8 taskId)
void sub_80FE758(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 14, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 14, 19);
if (gTasks[taskId].data[11] != 2)
{
sub_80FE1DC();
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
sub_80FE394();
gTasks[taskId].func = Task_DecorationPCProcessMenuInput;
} else
@@ -1677,18 +1677,18 @@ void sub_80FE7D4(u8 *dest, u8 decClass)
void sub_80FE7EC(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80FEC94(taskId);
sub_80FECB8(gUnknown_020388F6);
#if ENGLISH
- MenuDrawTextWindow(15, 12, 29, 19);
+ Menu_DrawStdWindowFrame(15, 12, 29, 19);
#elif GERMAN
if ((gUnknown_020388F2 + gUnknown_020388F4) != gUnknown_020388D5)
{
- MenuDrawTextWindow(15, 12, 29, 19);
+ Menu_DrawStdWindowFrame(15, 12, 29, 19);
}
#endif
@@ -1710,7 +1710,7 @@ void sub_80FE894(u8 taskId /*r8*/, s8 cursorVector /*r5*/, s8 bgVector /*r7*/)
PlaySE(SE_SELECT);
if (cursorVector != 0)
{
- gUnknown_020388F2 = MoveMenuCursor(cursorVector);
+ gUnknown_020388F2 = Menu_MoveCursor(cursorVector);
}
if (bgVector != 0)
{
@@ -1722,12 +1722,12 @@ void sub_80FE894(u8 taskId /*r8*/, s8 cursorVector /*r5*/, s8 bgVector /*r7*/)
{
if (v0)
{
- MenuDrawTextWindow(15, 12, 29, 19);
+ Menu_DrawStdWindowFrame(15, 12, 29, 19);
}
sub_80FECE0(gUnknown_020388F2 + gUnknown_020388F4);
} else
{
- MenuZeroFillWindowRect(15, 12, 29, 19);
+ Menu_EraseWindowRect(15, 12, 29, 19);
}
}
@@ -1757,7 +1757,7 @@ void sub_80FE948(u8 taskId)
}
if (gMain.newKeys & A_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
gUnknown_020388F5 = gUnknown_020388F2 + gUnknown_020388F4;
if (gUnknown_020388F5 == gUnknown_020388D5)
@@ -1769,7 +1769,7 @@ void sub_80FE948(u8 taskId)
}
} else if (gMain.newKeys & B_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
gUnknown_083EC634[gTasks[taskId].data[11]].noFunc(taskId);
}
@@ -1839,13 +1839,13 @@ void sub_80FEABC(u8 taskId, u8 dummy1)
void sub_80FEC94(u8 taskId)
{
- MenuDrawTextWindow(0, 0, 14, 19);
+ Menu_DrawStdWindowFrame(0, 0, 14, 19);
sub_80FEABC(taskId, 0);
}
void sub_80FECB8(u8 decoCat)
{
- MenuDrawTextWindow(15, 0, 29, 3);
+ Menu_DrawStdWindowFrame(15, 0, 29, 3);
sub_80FE470(decoCat, 16, 1, 0xff);
}
@@ -1902,8 +1902,8 @@ _080FED26:\n\
void sub_80FED1C(void)
{
- MenuZeroFillWindowRect(15, 0, 29, 3);
- MenuZeroFillWindowRect(15, 12, 29, 19);
+ Menu_EraseWindowRect(15, 0, 29, 3);
+ Menu_EraseWindowRect(15, 12, 29, 19);
}
void sub_80FED3C(u8 taskId)
@@ -2005,8 +2005,8 @@ void sub_80FEF74(void)
sub_80F9520(gUnknown_020388F7, 8);
DestroyVerticalScrollIndicator(0);
DestroyVerticalScrollIndicator(1);
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 14, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 14, 19);
}
bool8 sub_80FEFA4(void)
@@ -2035,8 +2035,8 @@ void sub_80FEFF4(u8 taskId)
void sub_80FF034(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 14, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 14, 19);
sub_80FE5AC(taskId);
}
@@ -3128,7 +3128,7 @@ void sub_81000A0(u8 taskId)
void sub_81000C4(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_8100174(taskId);
if (gDecorations[gUnknown_020388D0[gUnknown_020388F5]].permission != DECORPERM_SOLID_MAT)
{
@@ -3186,7 +3186,7 @@ void sub_8100248(u8 taskId)
void sub_810026C(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_810028C(taskId);
}
@@ -3341,7 +3341,7 @@ void sub_8100494(u8 taskId)
void sub_810065C(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
gSprites[gUnknown_020391A8].data[7] = 0;
gTasks[taskId].data[10] = 0;
gTasks[taskId].func = sub_8100494;
@@ -3723,7 +3723,7 @@ void sub_8100C88(u8 taskId)
{
DrawWholeMapView();
ScriptContext1_SetupScript(gUnknown_081A2F8A);
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
gTasks[taskId].data[2] = 2;
}
break;
@@ -3760,7 +3760,7 @@ bool8 sub_8100D38(u8 taskId)
void SetUpPuttingAwayDecorationPlayerAvatar(void)
{
player_get_direction_lower_nybble();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
gUnknown_020391A8 = gSprites[gUnknown_03004880.unk4].data[0];
sub_81016C8();
gUnknown_03004880.unk4 = CreateSprite(&gSpriteTemplate_83ECA88, 0x78, 0x50, 0);
@@ -3790,7 +3790,7 @@ void sub_8100E70(u8 taskId)
data[2] = 1;
data[6] = 1;
data[5] = 1;
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
}
break;
case 1:
@@ -3810,7 +3810,7 @@ void sub_8100E70(u8 taskId)
void sub_8100EEC(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
gSprites[gUnknown_020391A8].data[7] = 0;
gSprites[gUnknown_020391A8].invisible = 0;
gSprites[gUnknown_020391A8].callback = sub_8101698;
@@ -4150,7 +4150,7 @@ void sub_810156C(u8 taskId)
void sub_8101590(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_81015B0(taskId);
}
@@ -4192,7 +4192,7 @@ void sub_8101648(u8 taskId)
void sub_8101678(void)
{
pal_fill_black();
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
sub_80FE220();
CreateTask(sub_8101648, 8);
}
@@ -4274,7 +4274,7 @@ void sub_8101824(u8 taskId)
void sub_8101848(u8 taskId)
{
- MenuZeroFillWindowRect(20, 8, 26, 14);
+ Menu_EraseWindowRect(20, 8, 26, 14);
sub_8109A30(gUnknown_020388D0[gUnknown_020388F5]);
gUnknown_020388D0[gUnknown_020388F5] = DECOR_NONE;
sub_80FF098(taskId);
diff --git a/src/field/diploma.c b/src/field/diploma.c
index 27601404c..978eca7eb 100644
--- a/src/field/diploma.c
+++ b/src/field/diploma.c
@@ -10,7 +10,7 @@
#include "strings2.h"
#include "task.h"
#include "text.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
static void VBlankCB(void);
static void MainCB2(void);
@@ -62,14 +62,14 @@ void CB2_ShowDiploma(void)
LZ77UnCompVram(gDiplomaTiles, (void *)VRAM);
LZ77UnCompVram(gDiplomaTilemap, (void *)(VRAM + 0x3000));
- remove_some_task();
+ ScanlineEffect_Stop();
ResetTasks();
ResetSpriteData();
ResetPaletteFade();
FreeAllSpritePalettes();
LoadPalette(gDiplomaPalettes, 0, 64);
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
DisplayDiplomaText();
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
@@ -135,5 +135,5 @@ static void DisplayDiplomaText(void)
REG_BG3HOFS = 0;
StringCopy(gStringVar1, gOtherText_HoennDex);
}
- MenuPrint(gOtherText_DiplomaCertificationGameFreak, 6, 2);
+ Menu_PrintText(gOtherText_DiplomaCertificationGameFreak, 6, 2);
} \ No newline at end of file
diff --git a/src/field/field_effect.c b/src/field/field_effect.c
index 1fe238901..435978034 100644
--- a/src/field/field_effect.c
+++ b/src/field/field_effect.c
@@ -2435,8 +2435,8 @@ void sub_8088380(struct Task *task)
IntrCallback callback;
LoadWordFromTwoHalfwords((u16 *)&task->data[13], (u32 *)&callback);
SetVBlankCallback(callback);
- SetUpWindowConfig(&gWindowConfig_81E6CE4);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
FreeResourcesAndDestroySprite(&gSprites[task->data[15]]);
FieldEffectActiveListRemove(FLDEFF_FIELD_MOVE_SHOW_MON);
DestroyTask(FindTaskIdByFunc(sub_8088120));
@@ -2558,8 +2558,8 @@ void sub_808862C(struct Task *task)
CpuFill32(0, (void *)VRAM + bg0cnt, 0x800);
LoadWordFromTwoHalfwords((u16 *)&task->data[13], (u32 *)&intrCallback);
SetVBlankCallback(intrCallback);
- SetUpWindowConfig(&gWindowConfig_81E6CE4);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
FreeResourcesAndDestroySprite(&gSprites[task->data[15]]);
FieldEffectActiveListRemove(FLDEFF_FIELD_MOVE_SHOW_MON);
DestroyTask(FindTaskIdByFunc(sub_808847C));
diff --git a/src/field/field_message_box.c b/src/field/field_message_box.c
index 35aac7ac9..5eec7a14b 100644
--- a/src/field/field_message_box.c
+++ b/src/field/field_message_box.c
@@ -19,8 +19,8 @@ static void PrintFieldMessageFromStringVar4(void);
void InitFieldMessageBox(void)
{
sMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN;
- SetMessageBoxBaseTileNum(gMenuTextWindowContentTileOffset);
- InitWindowFromConfig(&gFieldMessageBoxWindow, &gWindowConfig_81E6CE4);
+ TextWindow_SetDlgFrameBaseTileNum(gMenuTextWindowContentTileOffset);
+ Text_InitWindowWithTemplate(&gFieldMessageBoxWindow, &gWindowTemplate_81E6CE4);
}
static void Task_FieldMessageBox(u8 taskId)
@@ -29,22 +29,22 @@ static void Task_FieldMessageBox(u8 taskId)
switch (task->data[0])
{
case 0:
- LoadMessageBoxTiles(&gFieldMessageBoxWindow);
+ TextWindow_LoadDialogueFrameTiles(&gFieldMessageBoxWindow);
task->data[0]++;
break;
case 1:
- DrawStandardMessageBox(&gFieldMessageBoxWindow);
+ TextWindow_DrawDialogueFrame(&gFieldMessageBoxWindow);
task->data[0]++;
break;
case 2:
switch (sMessageBoxMode)
{
case FIELD_MESSAGE_BOX_NORMAL:
- if (!sub_80035AC(&gFieldMessageBoxWindow))
+ if (!Text_UpdateWindow(&gFieldMessageBoxWindow))
return;
break;
case FIELD_MESSAGE_BOX_AUTO_SCROLL:
- if (!sub_8003778(&gFieldMessageBoxWindow))
+ if (!Text_UpdateWindowAutoscroll(&gFieldMessageBoxWindow))
return;
break;
}
@@ -117,20 +117,20 @@ bool8 unref_sub_8064BD0(const u8 *message)
static void PrintFieldMessage(const u8 *message)
{
StringExpandPlaceholders(gStringVar4, message);
- sub_8002EB0(&gFieldMessageBoxWindow, gStringVar4, gMenuTextTileOffset, 2, 15);
+ Text_InitWindow8002EB0(&gFieldMessageBoxWindow, gStringVar4, gMenuTextTileOffset, 2, 15);
CreateFieldMessageBoxTask();
}
static void PrintFieldMessageFromStringVar4(void)
{
- sub_8002EB0(&gFieldMessageBoxWindow, gStringVar4, gMenuTextTileOffset, 2, 15);
+ Text_InitWindow8002EB0(&gFieldMessageBoxWindow, gStringVar4, gMenuTextTileOffset, 2, 15);
CreateFieldMessageBoxTask();
}
void HideFieldMessageBox(void)
{
DestroyFieldMessageBoxTask();
- ClearStandardMessageBox(&gFieldMessageBoxWindow);
+ TextWindow_EraseDialogueFrame(&gFieldMessageBoxWindow);
sMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN;
}
@@ -150,6 +150,6 @@ bool8 IsFieldMessageBoxHidden(void)
void unref_sub_8064CA0(void)
{
DestroyFieldMessageBoxTask();
- DrawStandardMessageBox(&gFieldMessageBoxWindow);
+ TextWindow_DrawDialogueFrame(&gFieldMessageBoxWindow);
sMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN;
}
diff --git a/src/field/field_player_avatar.c b/src/field/field_player_avatar.c
index d80076be4..9a29e2e92 100644
--- a/src/field/field_player_avatar.c
+++ b/src/field/field_player_avatar.c
@@ -1507,7 +1507,7 @@ u8 Fishing4(struct Task *task)
{
u32 randVal;
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
task->tStep++;
task->tFrameCounter = 0;
task->tNumDots = 0;
@@ -1549,7 +1549,7 @@ u8 Fishing5(struct Task *task)
}
else
{
- MenuPrint(dot, task->tNumDots + 4, 15);
+ Menu_PrintText(dot, task->tNumDots + 4, 15);
task->tNumDots++;
}
}
@@ -1573,7 +1573,7 @@ u8 Fishing6(struct Task *task)
u8 Fishing7(struct Task *task)
{
sub_805A954();
- MenuPrint(gOtherText_OhABite, 4, 17);
+ Menu_PrintText(gOtherText_OhABite, 4, 17);
task->tStep++;
task->tFrameCounter = 0;
return 0;
@@ -1624,7 +1624,7 @@ u8 Fishing10(struct Task *task)
{
sub_805A954();
MenuPrintMessageDefaultCoords(gOtherText_PokeOnHook);
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
task->tStep++;
task->tFrameCounter = 0;
return 0;
@@ -1637,7 +1637,7 @@ u8 Fishing11(struct Task *task)
if (task->tFrameCounter == 0)
{
- if (MenuUpdateWindowText())
+ if (Menu_UpdateWindowText())
{
struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
@@ -1647,7 +1647,7 @@ u8 Fishing11(struct Task *task)
sub_8127F28(gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1A, 0, 0);
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
- MenuZeroFillScreen();
+ Menu_EraseScreen();
task->tFrameCounter++;
return 0;
}
@@ -1688,7 +1688,7 @@ u8 Fishing13(struct Task *task)
u8 Fishing14(struct Task *task)
{
sub_805A954();
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
task->tStep++;
return 0;
}
@@ -1713,12 +1713,12 @@ u8 Fishing15(struct Task *task)
u8 Fishing16(struct Task *task)
{
- if (MenuUpdateWindowText())
+ if (Menu_UpdateWindowText())
{
gPlayerAvatar.preventStep = FALSE;
ScriptContext2_Disable();
UnfreezeMapObjects();
- MenuZeroFillScreen();
+ Menu_EraseScreen();
sub_80BE97C(0);
DestroyTask(FindTaskIdByFunc(Task_Fishing));
}
diff --git a/src/field/field_region_map.c b/src/field/field_region_map.c
index 73e101d8f..54091459f 100644
--- a/src/field/field_region_map.c
+++ b/src/field/field_region_map.c
@@ -50,13 +50,13 @@ void CB2_FieldInitRegionMap(void)
InitRegionMap((void *)&ewram0_5.unk8, 0);
CreateRegionMapPlayerIcon(0, 0);
CreateRegionMapCursor(1, 1);
- SetUpWindowConfig(&gWindowConfig_81E709C);
- InitMenuWindow(&gWindowConfig_81E709C);
- MenuZeroFillScreen();
+ Text_LoadWindowTemplate(&gWindowTemplate_81E709C);
+ InitMenuWindow(&gWindowTemplate_81E709C);
+ Menu_EraseScreen();
REG_BG0CNT = BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(31) | BGCNT_16COLOR | BGCNT_TXT256x256;
- MenuDrawTextWindow(21, 0, 29, 3);
+ Menu_DrawStdWindowFrame(21, 0, 29, 3);
sub_8072BD8(gOtherText_Hoenn, 0x16, 1, 0x38);
- MenuDrawTextWindow(16, 16, 29, 19);
+ Menu_DrawStdWindowFrame(16, 16, 29, 19);
sub_813F0C8();
SetMainCallback2(CB2_FieldRegionMap);
SetVBlankCallback(VBlankCB_FieldRegionMap);
@@ -117,7 +117,7 @@ void sub_813EFDC(void)
void sub_813F0C8(void)
{
- MenuFillWindowRectWithBlankTile(17, 17, 28, 18);
+ Menu_BlankWindowRect(17, 17, 28, 18);
if (ewram0_5.unk8.unk16)
- MenuPrint(ewram0_5.unk8.str, 17, 17);
+ Menu_PrintText(ewram0_5.unk8.str, 17, 17);
}
diff --git a/src/field/field_screen_effect.c b/src/field/field_screen_effect.c
index a472d5a9c..61301c5a9 100644
--- a/src/field/field_screen_effect.c
+++ b/src/field/field_screen_effect.c
@@ -7,13 +7,13 @@
#include "script.h"
#include "task.h"
#include "text.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
const static u16 gUnknown_0839ACDC[] = { 0xC8, 0x48, 0x38, 0x28, 0x18, 0x0 };
const s32 gMaxFlashLevel = 4;
-const static struct UnknownTaskStruct gUnknown_0839ACEC =
+const static struct ScanlineEffectParams gUnknown_0839ACEC =
{
(void *)REG_ADDR_WIN0H,
((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1,
@@ -64,18 +64,18 @@ static void sub_8081424(u8 taskId)
switch (data[0])
{
case 0:
- sub_8081398(&gUnknown_03004DE0[gUnknown_03004DC0.srcBank][0], data[1], data[2], data[3]);
+ sub_8081398(gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], data[1], data[2], data[3]);
data[0] = 1;
break;
case 1:
- sub_8081398(&gUnknown_03004DE0[gUnknown_03004DC0.srcBank][0], data[1], data[2], data[3]);
+ sub_8081398(gScanlineEffectRegBuffers[gScanlineEffect.srcBuffer], data[1], data[2], data[3]);
data[0] = 0;
data[3] += data[5];
if (data[3] > data[4])
{
if (data[6] == 1)
{
- remove_some_task();
+ ScanlineEffect_Stop();
data[0] = 2;
}
else
@@ -85,7 +85,7 @@ static void sub_8081424(u8 taskId)
}
break;
case 2:
- dp12_8087EA4();
+ ScanlineEffect_Clear();
DestroyTask(taskId);
break;
}
@@ -140,8 +140,8 @@ void sub_80815E0(u8 a1)
{
if (a1)
{
- sub_8081398(&gUnknown_03004DE0[0][0], 120, 80, gUnknown_0839ACDC[a1]);
- CpuFastSet(&gUnknown_03004DE0[0], &gUnknown_03004DE0[1], 480);
+ sub_8081398(&gScanlineEffectRegBuffers[0][0], 120, 80, gUnknown_0839ACDC[a1]);
+ CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480);
}
}
@@ -208,14 +208,14 @@ static void sub_80816A8(u8 taskId)
REG_BLDALPHA = 1804;
REG_WININ = 63;
REG_WINOUT = 30;
- sub_8081398(&gUnknown_03004DE0[0][0], data[2], data[3], 1);
- CpuFastSet(&gUnknown_03004DE0[0], &gUnknown_03004DE0[1], 480);
- //sub_80895F8(gUnknown_0839ACEC[0], gUnknown_0839ACEC[1], gUnknown_0839ACEC[2]);
- sub_80895F8(gUnknown_0839ACEC);
+ sub_8081398(&gScanlineEffectRegBuffers[0][0], data[2], data[3], 1);
+ CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480);
+ //ScanlineEffect_SetParams(gUnknown_0839ACEC[0], gUnknown_0839ACEC[1], gUnknown_0839ACEC[2]);
+ ScanlineEffect_SetParams(gUnknown_0839ACEC);
data[0] = 1;
break;
case 1:
- MenuFillWindowRectWithBlankTile(0, 0, 29, 19);
+ Menu_BlankWindowRect(0, 0, 29, 19);
sub_808161C(data[1]);
sub_8081534(data[2], data[3], 1, 160, 1, 2);
data[0] = 2;
@@ -264,8 +264,8 @@ static void sub_80816A8(u8 taskId)
}
break;
case 5:
- MenuZeroFillWindowRect(0, 0, 29, 19);
- LoadFontDefaultPalette(&gWindowConfig_81E6CE4);
+ Menu_EraseWindowRect(0, 0, 29, 19);
+ LoadFontDefaultPalette(&gWindowTemplate_81E6CE4);
REG_WIN0H = 255;
REG_DISPCNT = data[6];
REG_BLDCNT = data[7];
diff --git a/src/field/field_specials.c b/src/field/field_specials.c
index fc6f690a3..aade7cffd 100644
--- a/src/field/field_specials.c
+++ b/src/field/field_specials.c
@@ -1058,7 +1058,7 @@ static void sub_810E874(void)
ScriptContext2_Enable();
if (gUnknown_0203925A > 5)
{
- MenuDrawTextWindow(0, 0, 8, 11);
+ Menu_DrawStdWindowFrame(0, 0, 8, 11);
InitMenu(0, 1, 1, 5, 0, 7);
gUnknown_0203925C = 0;
sub_80F944C();
@@ -1067,12 +1067,12 @@ static void sub_810E874(void)
}
else
{
- MenuDrawTextWindow(0, 0, 8, 2 * gUnknown_0203925A + 1);
+ Menu_DrawStdWindowFrame(0, 0, 8, 2 * gUnknown_0203925A + 1);
InitMenu(0, 1, 1, gUnknown_0203925A, 0, 7);
}
for (i = 0; i < 5 && gUnknown_03000760[i].var0 != 16; i ++)
{
- MenuPrint(gUnknown_083F8380[gUnknown_03000760[i].var0], 1, 2 * i + 1);
+ Menu_PrintText(gUnknown_083F8380[gUnknown_03000760[i].var0], 1, 2 * i + 1);
}
DisplayCurrentElevatorFloor();
CreateTask(sub_810E984, 8);
@@ -1080,7 +1080,7 @@ static void sub_810E874(void)
void DisplayCurrentElevatorFloor(void)
{
- MenuDrawTextWindow(20, 0, 29, 5);
+ Menu_DrawStdWindowFrame(20, 0, 29, 5);
sub_8072BD8(gOtherText_NowOn, 21, 1, 64);
sub_8072BD8(gUnknown_083F8380[gSpecialVar_0x8005], 21, 3, 64);
}
@@ -1091,15 +1091,15 @@ void sub_810E984(u8 taskId)
if (gMain.newKeys == DPAD_UP && gUnknown_0203925B != 0)
{
gUnknown_0203925B--;
- curMenuPos = GetMenuCursorPos();
- MoveMenuCursorNoWrap(-1);
+ curMenuPos = Menu_GetCursorPos();
+ Menu_MoveCursorNoWrap(-1);
sub_810EAC8(curMenuPos, DPAD_UP);
}
if (gMain.newKeys == DPAD_DOWN && gUnknown_0203925B != gUnknown_0203925A - 1)
{
gUnknown_0203925B++;
- curMenuPos = GetMenuCursorPos();
- MoveMenuCursorNoWrap(+1);
+ curMenuPos = Menu_GetCursorPos();
+ Menu_MoveCursorNoWrap(+1);
sub_810EAC8(curMenuPos, DPAD_DOWN);
}
if (gMain.newKeys & A_BUTTON)
@@ -1109,7 +1109,7 @@ void sub_810E984(u8 taskId)
{
gSpecialVar_Result = 0;
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(0, 0, 29, 12);
+ Menu_EraseWindowRect(0, 0, 29, 12);
sub_810EC9C(taskId);
}
else
@@ -1119,7 +1119,7 @@ void sub_810E984(u8 taskId)
ShakeScreenInElevator();
FieldObjectTurnByLocalIdAndMap(gSpecialVar_LastTalked, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup, DIR_SOUTH);
sub_810EEDC();
- MenuZeroFillScreen();
+ Menu_EraseScreen();
DestroyTask(taskId);
}
}
@@ -1128,7 +1128,7 @@ void sub_810E984(u8 taskId)
gSpecialVar_Result = 0;
PlaySE(SE_SELECT);
sub_810EEDC();
- MenuZeroFillWindowRect(0, 0, 29, 12);
+ Menu_EraseWindowRect(0, 0, 29, 12);
sub_810EC9C(taskId);
}
}
@@ -1163,10 +1163,10 @@ bool8 sub_810EAC8(u8 prevMenuPos, u8 dpadInput)
if (flag)
{
sub_810EB90(newPos, 5);
- MenuFillWindowRectWithBlankTile(2, 1, 7, 10);
+ Menu_BlankWindowRect(2, 1, 7, 10);
for (i=0; i<5 && gUnknown_03000760[newPos].var0 != 16; newPos++, i++)
{
- MenuPrint(gUnknown_083F8380[gUnknown_03000760[newPos].var0], 1, i * 2 + 1);
+ Menu_PrintText(gUnknown_083F8380[gUnknown_03000760[newPos].var0], 1, i * 2 + 1);
}
}
return flag;
@@ -1227,7 +1227,7 @@ bool8 sub_810EAC8(u8 prevMenuPos, u8 dpadInput)
"\tmovs r1, 0x1\n"
"\tmovs r2, 0x7\n"
"\tmovs r3, 0xA\n"
- "\tbl MenuFillWindowRectWithBlankTile\n"
+ "\tbl Menu_BlankWindowRect\n"
"\tmovs r5, 0\n"
"\tldr r2, _0810EB88 @ =gUnknown_03000760\n"
"\tlsls r1, r4, 2\n"
@@ -1249,7 +1249,7 @@ bool8 sub_810EAC8(u8 prevMenuPos, u8 dpadInput)
"\tlsls r2, 24\n"
"\tlsrs r2, 24\n"
"\tmovs r1, 0x1\n"
- "\tbl MenuPrint\n"
+ "\tbl Menu_PrintText\n"
"\tadds r0, r4, 0x1\n"
"\tlsls r0, 24\n"
"\tlsrs r4, r0, 24\n"
@@ -1539,7 +1539,7 @@ void ShowGlassWorkshopMenu(void)
{
u8 i;
ScriptContext2_Enable();
- MenuDrawTextWindow(0, 0, 10, 11);
+ Menu_DrawStdWindowFrame(0, 0, 10, 11);
InitMenu(0, 1, 1, 5, 0, 9);
gUnknown_0203925C = 0;
sub_80F944C();
@@ -1547,7 +1547,7 @@ void ShowGlassWorkshopMenu(void)
sub_810F2B4();
for (i=0; i<5; i++)
{
- MenuPrint(gUnknown_083F83C0[i], 1, 2 * i + 1);
+ Menu_PrintText(gUnknown_083F83C0[i], 1, 2 * i + 1);
}
gUnknown_0203925B = 0;
gUnknown_0203925A = ARRAY_COUNT(gUnknown_083F83C0);
@@ -1560,33 +1560,33 @@ void sub_810F118(u8 taskId)
if (gMain.newKeys == DPAD_UP && gUnknown_0203925B != 0)
{
gUnknown_0203925B--;
- prevCursorPos = GetMenuCursorPos();
- MoveMenuCursorNoWrap(-1);
+ prevCursorPos = Menu_GetCursorPos();
+ Menu_MoveCursorNoWrap(-1);
sub_810F1F4(prevCursorPos, DPAD_UP);
}
if (gMain.newKeys == DPAD_DOWN && gUnknown_0203925B != gUnknown_0203925A - 1)
{
gUnknown_0203925B++;
- prevCursorPos = GetMenuCursorPos();
- MoveMenuCursorNoWrap(1);
+ prevCursorPos = Menu_GetCursorPos();
+ Menu_MoveCursorNoWrap(1);
sub_810F1F4(prevCursorPos, DPAD_DOWN);
}
if (gMain.newKeys & A_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
gSpecialVar_Result = gUnknown_0203925B;
PlaySE(SE_SELECT);
sub_810EEDC();
- MenuZeroFillWindowRect(0, 0, 29, 12);
+ Menu_EraseWindowRect(0, 0, 29, 12);
sub_810EC9C(taskId);
}
if (gMain.newKeys & B_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
gSpecialVar_Result = 0x7f;
PlaySE(SE_SELECT);
sub_810EEDC();
- MenuZeroFillWindowRect(0, 0, 29, 12);
+ Menu_EraseWindowRect(0, 0, 29, 12);
sub_810EC9C(taskId);
}
}
@@ -1621,10 +1621,10 @@ bool8 sub_810F1F4(u8 prevCursorPos, u8 dpadInput)
if (flag)
{
GlassWorkshopUpdateScrollIndicators(newPos, 5);
- MenuFillWindowRectWithBlankTile(2, 1, 9, 10);
+ Menu_BlankWindowRect(2, 1, 9, 10);
for (i=0; i<5; newPos++, i++)
{
- MenuPrint(gUnknown_083F83C0[newPos], 1, 2 * i + 1);
+ Menu_PrintText(gUnknown_083F83C0[newPos], 1, 2 * i + 1);
}
}
return flag;
@@ -1683,7 +1683,7 @@ bool8 sub_810F1F4(u8 prevCursorPos, u8 dpadInput)
"\tmovs r1, 0x1\n"
"\tmovs r2, 0x9\n"
"\tmovs r3, 0xA\n"
- "\tbl MenuFillWindowRectWithBlankTile\n"
+ "\tbl Menu_BlankWindowRect\n"
"\tmovs r5, 0\n"
"\tldr r7, _0810F28C @ =gUnknown_083F83C0\n"
"_0810F25C:\n"
@@ -1695,7 +1695,7 @@ bool8 sub_810F1F4(u8 prevCursorPos, u8 dpadInput)
"\tlsls r2, 24\n"
"\tlsrs r2, 24\n"
"\tmovs r1, 0x1\n"
- "\tbl MenuPrint\n"
+ "\tbl Menu_PrintText\n"
"\tadds r0, r4, 0x1\n"
"\tlsls r0, 24\n"
"\tlsrs r4, r0, 24\n"
diff --git a/src/field/fldeff_softboiled.c b/src/field/fldeff_softboiled.c
index a574232a8..3c64ec520 100644
--- a/src/field/fldeff_softboiled.c
+++ b/src/field/fldeff_softboiled.c
@@ -126,7 +126,7 @@ static void sub_8133E74(u8 taskId) {
return;
}
- MenuZeroFillWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
+ Menu_EraseWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
PrintPartyMenuPromptText(3, 0);
gTasks[taskId].func = HandlePartyMenuSwitchPokemonInput;
}
@@ -142,7 +142,7 @@ static void sub_8133EF8(void) {
sub_806CCE4();
EWRAM_1B000_2.unk261 = 2;
DestroySprite(&gSprites[EWRAM_1000.unk1]);
- MenuZeroFillWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
+ Menu_EraseWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
PrintPartyMenuPromptText(0, 0);
SwitchTaskToFollowupFunc(EWRAM_1000.unk0);
}
diff --git a/src/field/item_menu.c b/src/field/item_menu.c
index e9b8b24d3..e0575af4c 100644
--- a/src/field/item_menu.c
+++ b/src/field/item_menu.c
@@ -33,7 +33,7 @@
#include "string_util.h"
#include "task.h"
#include "text.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
#include "ewram.h"
// External stuff
@@ -397,7 +397,7 @@ static bool8 SetupBagMultistep(void)
gMain.state++;
break;
case 1:
- remove_some_task();
+ ScanlineEffect_Stop();
gMain.state++;
break;
case 2:
@@ -424,11 +424,11 @@ static bool8 SetupBagMultistep(void)
gMain.state++;
break;
case 7:
- SetUpWindowConfig(&gWindowConfig_81E6DFC);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6DFC);
gMain.state++;
break;
case 8:
- MultistepInitMenuWindowBegin(&gWindowConfig_81E6DFC);
+ MultistepInitMenuWindowBegin(&gWindowTemplate_81E6DFC);
gMain.state++;
break;
case 9:
@@ -1062,7 +1062,7 @@ void sub_80A4164(u8 *dest, u16 value, enum StringConvertMode mode, u8 digits)
void sub_80A418C(u16 value, enum StringConvertMode mode, u8 c, u8 d, u8 digits)
{
sub_80A4164(gStringVar1, value, mode, digits);
- MenuPrint(gStringVar1, c, d);
+ Menu_PrintText(gStringVar1, c, d);
}
static void sub_80A41D4(u8 taskId)
@@ -1112,7 +1112,7 @@ static bool8 sub_80A42B0(u8 itemPos, int b)
return TRUE;
r5 = itemPos * 2 + 2;
sub_8072C74(gStringVar1, gOtherText_CloseBag, 0x78, 0);
- MenuPrint(gStringVar1, 14, r5);
+ Menu_PrintText(gStringVar1, 14, r5);
ptr = gBGTilemapBuffers[2] + 14 + r5 * 32;
ptr[0] = 0x4F;
ptr[1] = 0x4F;
@@ -1121,9 +1121,9 @@ static bool8 sub_80A42B0(u8 itemPos, int b)
if (itemPos == 7)
return TRUE;
if ((b == 1 && r8->unk2 != 0) || b == 2)
- MenuFillWindowRectWithBlankTile(14, r5 + 2, 29, 13);
+ Menu_BlankWindowRect(14, r5 + 2, 29, 13);
else
- MenuFillWindowRectWithBlankTile(14, r5 + 2, 29, 17);
+ Menu_BlankWindowRect(14, r5 + 2, 29, 17);
return TRUE;
}
return FALSE;
@@ -1148,7 +1148,7 @@ static void sub_80A4380(u16 a, int b, int c, int d)
text = sub_8072C74(text, ItemId_GetItem(gCurrentBagPocketItemSlots[r4].itemId)->name, 0x66, 0);
*text++ = CHAR_MULT_SIGN;
sub_8072C14(text, gCurrentBagPocketItemSlots[r4].quantity, 0x78, 1);
- MenuPrint(gStringVar1, 14, r5);
+ Menu_PrintText(gStringVar1, 14, r5);
}
}
@@ -1173,7 +1173,7 @@ static void sub_80A444C(u16 a, int b, int c, int d)
#else
sub_8072C74(text, ItemId_GetItem(gCurrentBagPocketItemSlots[r4].itemId)->name, 0x63, 0);
#endif
- MenuPrint(gStringVar1, 14, r5);
+ Menu_PrintText(gStringVar1, 14, r5);
if (gUnknown_02038558 != 0)
{
if (gCurrentBagPocketItemSlots[r4].itemId == gSaveBlock1.registeredItem)
@@ -1240,7 +1240,7 @@ static void sub_80A4548(u16 a, int b, int c, int d)
moveName = gMoveNames[ItemIdToBattleMoveId(gCurrentBagPocketItemSlots[r4].itemId)];
sub_8072C74(text, moveName, 0x78, 0);
}
- MenuPrint(gStringVar1, 14, sp10);
+ Menu_PrintText(gStringVar1, 14, sp10);
}
}
#else
@@ -1421,7 +1421,7 @@ _080A46AE:\n\
ldr r0, _080A46F8 @ =gStringVar1\n\
movs r1, 0xE\n\
ldr r2, [sp, 0x10]\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
mov r0, r8\n\
adds r0, 0x1\n\
lsls r0, 24\n\
@@ -1482,7 +1482,7 @@ static void sub_80A46FC(u16 a, int b, int c, int d)
text = sub_80A425C(a, text, i);
CopyItemName(gCurrentBagPocketItemSlots[r4].itemId, gStringVar2);
sub_80A41E0(text, gCurrentBagPocketItemSlots[r4].itemId - 0x84, gStringVar2, gCurrentBagPocketItemSlots[r4].quantity, 3);
- MenuPrint(gStringVar1, 14, r5);
+ Menu_PrintText(gStringVar1, 14, r5);
}
}
@@ -1540,7 +1540,7 @@ static void ItemListMenu_InitDescription(s16 itemId)
}
if (r5 < 3)
- MenuZeroFillWindowRect(0, 13 + r5 * 2, 13, 20);
+ Menu_EraseWindowRect(0, 13 + r5 * 2, 13, 20);
}
static void ItemListMenu_ChangeDescription(s16 itemId, int b)
@@ -1551,20 +1551,20 @@ static void ItemListMenu_ChangeDescription(s16 itemId, int b)
{
if (b == 0)
{
- MenuZeroFillWindowRect(0, 13, 13, 20);
- MenuPrint_PixelCoords(gOtherText_ReturnTo, 4, 0x68, 0);
+ Menu_EraseWindowRect(0, 13, 13, 20);
+ Menu_PrintTextPixelCoords(gOtherText_ReturnTo, 4, 0x68, 0);
}
else if (b == 1)
{
- MenuPrint_PixelCoords(gUnknown_0840E740[sReturnLocation], 4, 0x78, 0);
+ Menu_PrintTextPixelCoords(gUnknown_0840E740[sReturnLocation], 4, 0x78, 0);
}
}
else
{
if (b == 0)
- MenuZeroFillWindowRect(0, 13, 13, 20);
+ Menu_EraseWindowRect(0, 13, 13, 20);
if (ItemId_CopyDescription(description, itemId, b))
- MenuPrint_PixelCoords(description, 4, 104 + b * 16, 0);
+ Menu_PrintTextPixelCoords(description, 4, 104 + b * 16, 0);
}
}
@@ -1602,9 +1602,9 @@ static void sub_80A4A98(const u8 *text, u32 line)
u8 buffer[100];
if (line == 0)
- MenuZeroFillWindowRect(0, 13, 13, 20);
+ Menu_EraseWindowRect(0, 13, 13, 20);
if (CopyTextLine(buffer, text, line))
- MenuPrint_PixelCoords(buffer, 4, 104 + line * 16, 0);
+ Menu_PrintTextPixelCoords(buffer, 4, 104 + line * 16, 0);
}
static void sub_80A4ADC(u8 taskId)
@@ -1618,7 +1618,7 @@ static void sub_80A4ADC(u8 taskId)
static void sub_80A4B14(s8 a, u8 b)
{
gBagPocketScrollStates[sCurrentBagPocket].scrollTop += a;
- MoveMenuCursor(0);
+ Menu_MoveCursor(0);
sub_80A73C0();
sub_80A763C();
sub_80A4ADC(b);
@@ -1626,7 +1626,7 @@ static void sub_80A4B14(s8 a, u8 b)
static void sub_80A4B58(s8 delta, u8 b)
{
- gBagPocketScrollStates[sCurrentBagPocket].cursorPos = MoveMenuCursor(delta);
+ gBagPocketScrollStates[sCurrentBagPocket].cursorPos = Menu_MoveCursor(delta);
sub_80A73C0();
sub_80A4ADC(b);
}
@@ -1649,7 +1649,7 @@ static void sub_80A4BF0(u16 *a)
if (gUnknown_02038564 == 4)
{
- MenuDrawTextWindow(0, 7, 13, 12);
+ Menu_DrawStdWindowFrame(0, 7, 13, 12);
sub_80A4008(a, 1, 8, 12, 4);
if (sub_80F9344() == TRUE && sReturnLocation == RETURN_TO_FIELD_5)
{
@@ -1665,7 +1665,7 @@ static void sub_80A4BF0(u16 *a)
text = sub_80A4B90(gSpecialVar_ItemId);
else
text = sItemPopupMenuActions[sPopupMenuActionList[i]].text;
- MenuPrint(text, 1 + (i / 2) * 6, 8 + (i % 2) * 2);
+ Menu_PrintText(text, 1 + (i / 2) * 6, 8 + (i % 2) * 2);
}
}
if (sReturnLocation == RETURN_TO_FIELD_5)
@@ -1676,10 +1676,10 @@ static void sub_80A4BF0(u16 *a)
}
else
{
- MenuDrawTextWindow(0, 5, 13, 12);
+ Menu_DrawStdWindowFrame(0, 5, 13, 12);
sub_80A4008(a, 1, 6, 12, 6);
for (i = 0; i < gUnknown_02038564; i++)
- MenuPrint(sItemPopupMenuActions[sPopupMenuActionList[i]].text, 1 + (i / 3) * 6, 6 + (i % 3) * 2);
+ Menu_PrintText(sItemPopupMenuActions[sPopupMenuActionList[i]].text, 1 + (i / 3) * 6, 6 + (i % 3) * 2);
InitMenu(0, 1, 6, gUnknown_02038564, 0, 1);
sub_8072DCC(0x2F);
}
@@ -1690,7 +1690,7 @@ static void sub_80A4DA4(u16 *a)
{
sub_80A73FC();
sub_80A36B8(a, 0, 6, 13, 6);
- MenuZeroFillWindowRect(0, 5, 13, 12);
+ Menu_EraseWindowRect(0, 5, 13, 12);
sub_80A7590();
}
@@ -1699,7 +1699,7 @@ static void sub_80A4DD8(u8 taskId, u8 b, u8 c, u8 d, u8 e, u8 digits)
gTasks[taskId].data[1] = 1;
gTasks[taskId].data[2] = b + 2;
gTasks[taskId].data[3] = c + 1;
- MenuDrawTextWindow(b, c, b + d, c + e);
+ Menu_DrawStdWindowFrame(b, c, b + d, c + e);
sub_80A4008(gBGTilemapBuffers[1], b + 1, c + 1, d - 1, e - 1);
sub_80A418C(1, 1, b + 2, c + 1, digits);
}
@@ -2539,7 +2539,7 @@ static void sub_80A57C4(void)
r5 = 7;
}
sub_80A4008(gBGTilemapBuffers[1], 7, r5 + 1, 6, gUnknown_02038564 * 2);
- MenuDrawTextWindow(6, r5, 13, gUnknown_02038564 * 2 + 1 + r5);
+ Menu_DrawStdWindowFrame(6, r5, 13, gUnknown_02038564 * 2 + 1 + r5);
sub_80A7834(0, r5);
InitMenu(0, 7, r5 + 1, gUnknown_02038564, 0, 6);
}
@@ -2553,7 +2553,7 @@ static void sub_80A5888(u8 taskId)
if (sPopupMenuSelection != 0)
{
PlaySE(SE_SELECT);
- sPopupMenuSelection = MoveMenuCursor(-1);
+ sPopupMenuSelection = Menu_MoveCursor(-1);
}
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
@@ -2561,7 +2561,7 @@ static void sub_80A5888(u8 taskId)
if (sPopupMenuSelection != gUnknown_02038564 - 1)
{
PlaySE(SE_SELECT);
- sPopupMenuSelection = MoveMenuCursor(1);
+ sPopupMenuSelection = Menu_MoveCursor(1);
}
}
else if (gMain.newKeys & A_BUTTON)
@@ -2690,14 +2690,14 @@ static void sub_80A5C24(u8 taskId)
void CleanUpItemMenuMessage(u8 taskId)
{
sub_80A36B8(gBGTilemapBuffers[1], 0, 0, 31, 31);
- MenuZeroFillWindowRect(7, 7, 13, 12);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(7, 7, 13, 12);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskId].func = sub_80A5C24;
}
void CleanUpOverworldMessage(u8 taskId)
{
- MenuZeroFillWindowRect(0, 13, 29, 19);
+ Menu_EraseWindowRect(0, 13, 29, 19);
DestroyTask(taskId);
sub_8064E2C();
ScriptContext2_Disable();
@@ -2760,7 +2760,7 @@ static void sub_80A5DA0(u16 itemId, u16 quantity)
static void sub_80A5DF8(void)
{
sub_80A4DA4(gBGTilemapBuffers[1]);
- MenuZeroFillWindowRect(7, 6, 11, 13);
+ Menu_EraseWindowRect(7, 6, 11, 13);
sub_80A7528(4);
}
@@ -2857,7 +2857,7 @@ static void sub_80A6024(u8 taskId)
if (gMain.newKeys & A_BUTTON)
{
sub_80A36B8(gBGTilemapBuffers[1], 0, 0, 31, 31);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskId].func = sub_80A6000;
}
}
@@ -3008,7 +3008,7 @@ static void sub_80A640C(u8 taskId)
static void sub_80A6444(u8 taskId)
{
sub_80A36B8(gBGTilemapBuffers[1], 0, 0, 31, 31);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskId].func = sub_80A640C;
}
@@ -3016,7 +3016,7 @@ static void sub_80A648C(u8 taskId)
{
gTasks[taskId].func = Task_BuyHowManyDialogueHandleInput;
sub_80A4008(gBGTilemapBuffers[1], 1, 11, 12, 2);
- MenuDrawTextWindow(0, 10, 13, 13);
+ Menu_DrawStdWindowFrame(0, 10, 13, 13);
gTasks[taskId].data[1] = 1;
gTasks[taskId].data[2] = 1;
gTasks[taskId].data[3] = 11;
@@ -3053,7 +3053,7 @@ static void sub_80A6574(u8 taskId)
static void sub_80A65AC(u8 taskId)
{
- MenuZeroFillWindowRect(7, 6, 13, 12);
+ Menu_EraseWindowRect(7, 6, 13, 12);
sub_80A36B8(gBGTilemapBuffers[1], 7, 6, 6, 6);
CopyItemName(gSpecialVar_ItemId, gStringVar2);
StringExpandPlaceholders(gStringVar4, gOtherText_SoldItem);
@@ -3063,7 +3063,7 @@ static void sub_80A65AC(u8 taskId)
static void sub_80A6618(u8 taskId)
{
- MenuZeroFillWindowRect(7, 6, 13, 12);
+ Menu_EraseWindowRect(7, 6, 13, 12);
sub_80A36B8(gBGTilemapBuffers[1], 7, 6, 6, 6);
BuyMenuPrintItemQuantityAndPrice(taskId);
}
@@ -3078,13 +3078,13 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
{
if (sub_80A5350(taskId) == TRUE)
{
- MenuZeroFillWindowRect(6, 11, 12, 11);
+ Menu_EraseWindowRect(6, 11, 12, 11);
BuyMenuDisplayMessage(gSpecialVar_ItemId, gTasks[taskId].data[1]);
}
else if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(0, 10, 13, 13);
+ Menu_EraseWindowRect(0, 10, 13, 13);
sub_80A36B8(gBGTilemapBuffers[1], 0, 10, 13, 3);
ConvertIntToDecimalStringN(gStringVar1, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * gTasks[taskId].data[1], STR_CONV_MODE_LEFT_ALIGN, 6);
StringExpandPlaceholders(gStringVar4, gOtherText_CanPay);
@@ -3110,8 +3110,8 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
{
sub_80A36B8(gBGTilemapBuffers[1], 0, 0, 31, 31);
CloseMoneyWindow(0, 0);
- MenuZeroFillWindowRect(0, 4, 13, 13);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 4, 13, 13);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskId].func = sub_80A6760;
}
@@ -3229,7 +3229,7 @@ static void sub_80A6A84(u8 taskId)
sub_80A4DA4(gBGTilemapBuffers[1]);
CopyItemName(gSpecialVar_ItemId, gStringVar1);
ConvertIntToDecimalStringN(gStringVar2, taskData[1], STR_CONV_MODE_LEFT_ALIGN, 3);
- MenuZeroFillWindowRect(7, 6, 11, 13);
+ Menu_EraseWindowRect(7, 6, 11, 13);
sub_80A7528(7);
sub_80A3D5C(taskId);
gTasks[taskId].func = sub_80A5E1C;
@@ -3361,16 +3361,16 @@ static void sub_80A6DF0(u16 *a)
{
u8 r6 = (gUnknown_02038564 - 1) * 2;
- MenuDrawTextWindow(7, 9 - r6, 13, 12);
+ Menu_DrawStdWindowFrame(7, 9 - r6, 13, 12);
sub_80A4008(a, 8, 10 - r6, 5, r6 + 2);
if (gUnknown_02038564 == 1)
{
- MenuPrint(sItemPopupMenuActions[sPopupMenuActionList[0]].text, 8, 10);
+ Menu_PrintText(sItemPopupMenuActions[sPopupMenuActionList[0]].text, 8, 10);
}
else
{
- MenuPrint(sItemPopupMenuActions[sPopupMenuActionList[0]].text, 8, 8);
- MenuPrint(sItemPopupMenuActions[sPopupMenuActionList[1]].text, 8, 10);
+ Menu_PrintText(sItemPopupMenuActions[sPopupMenuActionList[0]].text, 8, 8);
+ Menu_PrintText(sItemPopupMenuActions[sPopupMenuActionList[1]].text, 8, 10);
}
InitMenu(0, 8, 10 - r6, gUnknown_02038564, 0, 5);
sub_80A7528(2);
@@ -3383,7 +3383,7 @@ static void sub_80A6EB8(u8 taskId)
if (sPopupMenuSelection == 1)
{
PlaySE(SE_SELECT);
- sPopupMenuSelection = MoveMenuCursor(-1);
+ sPopupMenuSelection = Menu_MoveCursor(-1);
}
}
else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN)
@@ -3391,7 +3391,7 @@ static void sub_80A6EB8(u8 taskId)
if (sPopupMenuSelection + 1 < gUnknown_02038564)
{
PlaySE(SE_SELECT);
- sPopupMenuSelection = MoveMenuCursor(1);
+ sPopupMenuSelection = Menu_MoveCursor(1);
}
}
else if (gMain.newKeys & A_BUTTON)
@@ -3559,7 +3559,7 @@ static void ItemListMenu_InitMenu(void)
static void sub_80A73C0(void)
{
- sub_814AD7C(0x70, gBagPocketScrollStates[sCurrentBagPocket].cursorPos * 16 + 16);
+ MenuCursor_SetPos814AD7C(0x70, gBagPocketScrollStates[sCurrentBagPocket].cursorPos * 16 + 16);
}
static void sub_80A73F0(void)
@@ -3569,8 +3569,8 @@ static void sub_80A73F0(void)
static void sub_80A73FC(void)
{
- HandleDestroyMenuCursors();
- sub_814AD44();
+ Menu_DestroyCursor();
+ MenuCursor_Destroy814AD44();
}
static void sub_80A740C(void)
@@ -3669,7 +3669,7 @@ static void sub_80A756C(void)
static void sub_80A7590(void)
{
- MenuZeroFillWindowRect(0, 13, 13, 20);
+ Menu_EraseWindowRect(0, 13, 13, 20);
sub_80A756C();
}
@@ -3748,7 +3748,7 @@ static void sub_80A7694(void)
static void sub_80A76A0(void)
{
- MenuZeroFillWindowRect(14, 2, 29, 18);
+ Menu_EraseWindowRect(14, 2, 29, 18);
sub_80A7678();
}
@@ -3816,7 +3816,7 @@ static void sub_80A7768(void)
const u8 *text = sItemPopupMenuActions[sPopupMenuActionList[r4->unk1 - 1]].text;
int var = r4->unk1 - 1;
- MenuPrint(text, 7, var * 2 + 1 + r4->unk3);
+ Menu_PrintText(text, 7, var * 2 + 1 + r4->unk3);
}
else
{
@@ -3828,7 +3828,7 @@ static void sub_80A7768(void)
else
text = sItemPopupMenuActions[sPopupMenuActionList[r4->unk1 - 1]].text;
var = r4->unk1 - 1;
- MenuPrint(text, (var >> 1) * 6 + 1, (var & 1) * 2 + 8);
+ Menu_PrintText(text, (var >> 1) * 6 + 1, (var & 1) * 2 + 8);
}
if (r4->unk1 == gUnknown_02038564)
{
diff --git a/src/field/item_use.c b/src/field/item_use.c
index e1fdddce0..bd76db77e 100644
--- a/src/field/item_use.c
+++ b/src/field/item_use.c
@@ -123,7 +123,7 @@ void HandleDeniedItemUseMessage(u8 var1, u8 playerMenuStatus, const u8 *text)
switch (playerMenuStatus)
{
case 0: // Item Menu
- MenuZeroFillWindowRect(0, 13, 13, 20);
+ Menu_EraseWindowRect(0, 13, 13, 20);
DisplayItemMessageOnField(var1, gStringVar4, CleanUpItemMenuMessage, 1);
break;
default: // Field
@@ -312,7 +312,7 @@ void RunItemfinderResults(u8 taskId)
void ExitItemfinder(u8 taskId)
{
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
sub_8064E2C();
ScriptContext2_Disable();
DestroyTask(taskId);
@@ -744,7 +744,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId)
if (!gTasks[taskId].data[2])
{
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
DisplayItemMessageOnField(taskId, gStringVar4, CleanUpItemMenuMessage, 1);
}
else
@@ -770,7 +770,7 @@ void ItemUseOutOfBattle_SSTicket(u8 taskId)
{
if (gTasks[taskId].data[2] == 0)
{
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
DisplayItemMessageOnField(taskId, gUnknown_083D61DC[ItemId_GetSecondaryId(gSpecialVar_ItemId)], sub_80C9BB8, 1);
}
else
@@ -875,7 +875,7 @@ void ItemUseOutOfBattle_RareCandy(u8 taskId)
void ItemUseOutOfBattle_TMHM(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
if (gSpecialVar_ItemId >= ITEM_HM01)
DisplayItemMessageOnField(taskId, gOtherText_BootedHM, sub_80C9EE4, 1); // HM
@@ -1022,7 +1022,7 @@ void ItemUseInBattle_PokeBall(u8 var)
}
else
{
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
DisplayItemMessageOnField(var, gOtherText_BoxIsFull, CleanUpItemMenuMessage, 1);
}
}
@@ -1047,7 +1047,7 @@ void ItemUseInBattle_StatIncrease(u8 taskId)
{
u16 partyId = gBattlePartyID[gBankInMenu];
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
if (ExecuteTableBasedItemEffect_(&gPlayerParty[partyId], gSpecialVar_ItemId, partyId, 0) != FALSE)
{
@@ -1096,7 +1096,7 @@ void ItemUseInBattle_PPRecovery(u8 var)
void unref_sub_80CA448(u8 var)
{
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
if (ExecuteTableBasedItemEffect__(0, gSpecialVar_ItemId, 0) == FALSE)
{
@@ -1113,7 +1113,7 @@ void unref_sub_80CA448(u8 var)
void ItemUseInBattle_Escape(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0xD, 0xD, 0x14);
+ Menu_EraseWindowRect(0, 0xD, 0xD, 0x14);
if((gBattleTypeFlags & BATTLE_TYPE_TRAINER) == FALSE)
{
diff --git a/src/field/map_name_popup.c b/src/field/map_name_popup.c
index 2e2dfc72e..49a470cc1 100644
--- a/src/field/map_name_popup.c
+++ b/src/field/map_name_popup.c
@@ -89,8 +89,8 @@ void HideMapNamePopup(void)
{
if (FuncIsActiveTask(Task_MapNamePopup))
{
- MenuLoadTextWindowGraphics();
- MenuZeroFillWindowRect(0, 0, 13, 3);
+ Menu_LoadStdFrameGraphics();
+ Menu_EraseWindowRect(0, 0, 13, 3);
REG_BG0VOFS = 0;
DestroyTask(sTaskId);
}
@@ -100,8 +100,8 @@ void DrawMapNamePopup(void)
{
u8 name[20];
- MenuLoadTextWindowGraphics_OverrideFrameType(0);
+ Menu_LoadStdFrameGraphicsOverrideStyle(0);
GetMapSectionName(name, gMapHeader.regionMapSectionId, 0);
- MenuDrawTextWindow(0, 0, 13, 3);
+ Menu_DrawStdWindowFrame(0, 0, 13, 3);
sub_8072BD8(name, 1, 1, 0x60);
}
diff --git a/src/field/mauville_man.c b/src/field/mauville_man.c
index 4db513f65..0a841eed1 100644
--- a/src/field/mauville_man.c
+++ b/src/field/mauville_man.c
@@ -345,7 +345,7 @@ void PrepareSongText(void)
void ScrSpecial_PlayBardSong(void)
{
StartBardSong(gSpecialVar_0x8004);
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
ScriptContext1_Stop();
}
@@ -858,8 +858,8 @@ static void Task_BardSong(u8 taskId)
{
case 0: // Initialize song
PrepareSongText();
- InitWindowFromConfig(gMenuWindowPtr, &gWindowConfig_81E6CE4);
- sub_8002EB0(gMenuWindowPtr, gStringVar4, 2, 4, 15);
+ Text_InitWindowWithTemplate(gMenuWindowPtr, &gWindowTemplate_81E6CE4);
+ Text_InitWindow8002EB0(gMenuWindowPtr, gStringVar4, 2, 4, 15);
task->data[1] = 0;
task->data[2] = 0;
task->tCharIndex = 0;
@@ -921,7 +921,7 @@ static void Task_BardSong(u8 taskId)
}
else if (gStringVar4[task->tCharIndex] == CHAR_SPACE)
{
- sub_8003418(gMenuWindowPtr);
+ Text_PrintWindowSimple(gMenuWindowPtr);
task->tCharIndex++;
task->tState = 2;
task->data[2] = 0;
@@ -941,7 +941,7 @@ static void Task_BardSong(u8 taskId)
else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR)
{
gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space
- sub_8003418(gMenuWindowPtr);
+ Text_PrintWindowSimple(gMenuWindowPtr);
task->tCharIndex++;
task->data[2] = 0;
}
@@ -950,7 +950,7 @@ static void Task_BardSong(u8 taskId)
switch (task->data[1])
{
case 0:
- sub_8003418(gMenuWindowPtr);
+ Text_PrintWindowSimple(gMenuWindowPtr);
task->data[1]++;
break;
case 1:
@@ -1219,7 +1219,7 @@ static void PrintStoryList(void)
{
s32 i;
- MenuDrawTextWindow(0, 0, 25, 4 + GetFreeStorySlot() * 2);
+ Menu_DrawStdWindowFrame(0, 0, 25, 4 + GetFreeStorySlot() * 2);
for (i = 0; i < 4; i++)
{
struct MauvilleManStoryteller *storyteller = &gSaveBlock1.mauvilleMan.storyteller;
@@ -1227,9 +1227,9 @@ static void PrintStoryList(void)
if (stat == 0)
break;
- MenuPrint(GetStoryTitleByStat(stat), 1, 2 + i * 2);
+ Menu_PrintText(GetStoryTitleByStat(stat), 1, 2 + i * 2);
}
- MenuPrint(gPCText_Cancel, 1, 2 + i * 2);
+ Menu_PrintText(gPCText_Cancel, 1, 2 + i * 2);
}
static u8 gUnknown_03000748;
@@ -1247,7 +1247,7 @@ static void Task_StoryListMenu(u8 taskId)
task->data[0]++;
break;
case 1:
- selection = ProcessMenuInput();
+ selection = Menu_ProcessInput();
if (selection == -2)
break;
if (selection == -1 || selection == GetFreeStorySlot())
@@ -1259,8 +1259,8 @@ static void Task_StoryListMenu(u8 taskId)
gSpecialVar_Result = 1;
gUnknown_03000748 = selection;
}
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 25, 12);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 25, 12);
DestroyTask(taskId);
EnableBothScriptContexts();
break;
diff --git a/src/field/menu_helpers.c b/src/field/menu_helpers.c
index e3ef0c790..76f0d367e 100644
--- a/src/field/menu_helpers.c
+++ b/src/field/menu_helpers.c
@@ -135,7 +135,7 @@ void sub_80F9020(void)
// display message box, fill box with tile if tile is not zero, print string
static void PrintMessage(const u8 *str, u16 tile)
{
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
if (tile)
{
sub_80A3FA0(&gBGTilemapBuffers[1][0], 2, 15, 26, 4, tile);
@@ -145,7 +145,7 @@ static void PrintMessage(const u8 *str, u16 tile)
static void sub_80F9090(u8 taskId)
{
- if (MenuUpdateWindowText() == TRUE)
+ if (Menu_UpdateWindowText() == TRUE)
{
gUnknown_0300074C(taskId);
}
@@ -160,7 +160,7 @@ void DisplayItemMessageOnField(u8 taskId, const u8 *str, TaskFunc callback, u16
static void Task_CallYesOrNoCallback(u8 taskId)
{
- switch (ProcessMenuInputNoWrap_())
+ switch (Menu_ProcessInputNoWrap_())
{
case 0:
PlaySE(SE_SELECT);
@@ -196,7 +196,7 @@ static void PrintStringWithPalette(const u8 *str, u8 paletteNum, u8 left, u8 top
StringCopy(gStringVar4, str);
}
- MenuPrint(gStringVar4, left, top);
+ Menu_PrintText(gStringVar4, left, top);
}
// unused
@@ -209,7 +209,7 @@ void PrintNumberWithPalette(s32 value, u8 paletteNum, u8 n, u8 mode, u8 left, u8
}
else
{
- MenuPrint(gStringVar1, left, top);
+ Menu_PrintText(gStringVar1, left, top);
}
}
diff --git a/src/field/money.c b/src/field/money.c
index d0f0ab1f6..b85ed8009 100644
--- a/src/field/money.c
+++ b/src/field/money.c
@@ -143,12 +143,12 @@ void PrintMoneyAmount(u32 amount, u8 size, u8 x, u8 y)
if (stringWidth >= (size + 1) * 8)
{
- MenuPrint(buffer, x, y);
+ Menu_PrintText(buffer, x, y);
}
else
{
int xPlusOne = x + 1;
- MenuPrint_PixelCoords(buffer, (xPlusOne + size) * 8 - stringWidth, y * 8, 1);
+ Menu_PrintTextPixelCoords(buffer, (xPlusOne + size) * 8 - stringWidth, y * 8, 1);
}
}
@@ -275,7 +275,7 @@ void UpdateMoneyWindow(u32 amount, u8 x, u8 y)
void OpenMoneyWindow(u32 amount, u8 x, u8 y)
{
- MenuDrawTextWindow(x, y, x + 13, y + 3);
+ Menu_DrawStdWindowFrame(x, y, x + 13, y + 3);
UpdateMoneyWindow(amount, x, y);
LoadCompressedObjectPic(gUnknown_083CF584);
@@ -288,7 +288,7 @@ void CloseMoneyWindow(u8 x, u8 y)
{
DestroySpriteAndFreeResources(&gSprites[gUnknown_02038734]);
FreeSpritePaletteByTag(SPRITE_TAG_MONEY);
- MenuZeroFillWindowRect(x, y, x + 13, y + 3);
+ Menu_EraseWindowRect(x, y, x + 13, y + 3);
}
bool8 HasEnoughMoneyFor(void)
diff --git a/src/field/overworld.c b/src/field/overworld.c
index e239daec7..86b0a5dac 100644
--- a/src/field/overworld.c
+++ b/src/field/overworld.c
@@ -47,7 +47,7 @@
#include "tileset_anim.h"
#include "time_events.h"
#include "tv.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
#include "wild_encounter.h"
#ifdef SAPPHIRE
@@ -142,7 +142,7 @@ const struct UCoords32 gUnknown_0821664C[] =
{ 1, -1},
};
-const struct UnknownTaskStruct gUnknown_08216694 =
+const struct ScanlineEffectParams gUnknown_08216694 =
{
(void *)REG_ADDR_WIN0H,
((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1,
@@ -1410,7 +1410,7 @@ void VBlankCB_Field(void)
{
LoadOam();
ProcessSpriteCopyRequests();
- sub_8089668();
+ ScanlineEffect_InitHBlankDmaTransfer();
sub_8057A58();
TransferPlttBuffer();
sub_8072E74();
@@ -1422,7 +1422,7 @@ void sub_8054814(void)
if (val)
{
sub_80815E0(val);
- sub_80895F8(gUnknown_08216694);
+ ScanlineEffect_SetParams(gUnknown_08216694);
}
}
@@ -1456,8 +1456,8 @@ bool32 sub_805483C(u8 *a1)
case 4:
sub_8054814();
sub_8054C54();
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
(*a1)++;
break;
case 5:
@@ -1522,8 +1522,8 @@ bool32 sub_805493C(u8 *a1, u32 a2)
case 4:
sub_8054814();
sub_8054C54();
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
(*a1)++;
break;
case 5:
@@ -1612,8 +1612,8 @@ bool32 sub_8054A9C(u8 *a1)
case 3:
sub_8054814();
sub_8054C54();
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
(*a1)++;
break;
case 4:
@@ -1669,7 +1669,7 @@ void sub_8054BA8(void)
REG_DISPCNT = 0;
- remove_some_task();
+ ScanlineEffect_Stop();
DmaClear16(3, PLTT + 2, PLTT_SIZE - 2);
@@ -1695,8 +1695,8 @@ void sub_8054C2C(void)
{
sub_8054814();
sub_8054C54();
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
mapdata_load_assets_to_gpu_and_full_redraw();
}
@@ -1731,7 +1731,7 @@ void sub_8054D4C(u32 a1)
ResetTasks();
ResetSpriteData();
ResetPaletteFade();
- dp12_8087EA4();
+ ScanlineEffect_Clear();
ResetCameraUpdateInfo();
InstallCameraPanAheadCallback();
sub_805C7C4(0);
diff --git a/src/field/party_menu.c b/src/field/party_menu.c
index 790aede60..7d243f569 100644
--- a/src/field/party_menu.c
+++ b/src/field/party_menu.c
@@ -32,7 +32,7 @@
#include "string_util.h"
#include "strings.h"
#include "task.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
#include "util.h"
#include "script_pokemon_80F9.h"
#include "ewram.h"
@@ -648,7 +648,7 @@ bool8 InitPartyMenu(void)
gMain.state++;
break;
case 1:
- remove_some_task();
+ ScanlineEffect_Stop();
gMain.state++;
break;
case 2:
@@ -679,11 +679,11 @@ bool8 InitPartyMenu(void)
gMain.state++;
break;
case 7:
- SetUpWindowConfig(&gWindowConfig_81E6C90);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C90);
gMain.state++;
break;
case 8:
- InitWindowFromConfig(&gUnknown_03004210, &gWindowConfig_81E6C90);
+ Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C90);
MultistepInitWindowTileData(&gUnknown_03004210, 1);
gMain.state++;
break;
@@ -716,7 +716,7 @@ bool8 InitPartyMenu(void)
}
break;
case 13:
- MultistepInitMenuWindowBegin(&gWindowConfig_81E6CC8);
+ MultistepInitMenuWindowBegin(&gWindowTemplate_81E6CC8);
gMain.state++;
break;
case 14:
@@ -2676,26 +2676,26 @@ void PrintPartyMenuPromptText(u8 textId, u8 b)
switch (b)
{
case 0:
- MenuDrawTextWindow(0, 16, 23, 19);
+ Menu_DrawStdWindowFrame(0, 16, 23, 19);
break;
case 1:
- MenuDrawTextWindow(0, 16, 19, 19);
+ Menu_DrawStdWindowFrame(0, 16, 19, 19);
break;
case 2:
- MenuDrawTextWindow(0, 16, 22, 19);
+ Menu_DrawStdWindowFrame(0, 16, 22, 19);
break;
case 3:
- MenuDrawTextWindow(0, 16, 18, 19);
+ Menu_DrawStdWindowFrame(0, 16, 18, 19);
break;
}
- MenuPrint(PartyMenuPromptTexts[textId], 1, 17);
+ Menu_PrintText(PartyMenuPromptTexts[textId], 1, 17);
}
}
void sub_806D5A4(void)
{
- MenuZeroFillWindowRect(0, 16, 29, 19);
+ Menu_EraseWindowRect(0, 16, 29, 19);
}
void sub_806D5B8(u8 monIndex)
@@ -2706,7 +2706,7 @@ void sub_806D5B8(u8 monIndex)
u8 right = gUnknown_08376948[IsDoubleBattle()][monIndex].right;
u8 bottom = gUnknown_08376948[IsDoubleBattle()][monIndex].bottom;
- ZeroFillWindowRect(&gUnknown_03004210, left, top, right, bottom);
+ Text_EraseWindowRect(&gUnknown_03004210, left, top, right, bottom);
var1 = 0;
CpuFastSet(&var1, OBJ_VRAM1 + monIndex * 0x400, 0x1000100);
@@ -2720,7 +2720,7 @@ void sub_806D668(u8 monIndex)
u8 right = gUnknown_08376978[IsDoubleBattle()][monIndex].right;
u8 bottom = gUnknown_08376978[IsDoubleBattle()][monIndex].bottom;
- ZeroFillWindowRect(&gUnknown_03004210, left, top, right, bottom);
+ Text_EraseWindowRect(&gUnknown_03004210, left, top, right, bottom);
var1 = 0;
CpuFastSet(&var1, OBJ_VRAM1 + 0x300 + monIndex * 0x400, 0x1000040);
@@ -3313,7 +3313,7 @@ void PartyMenuDoPrintMonNickname(u8 monIndex, int b, const u8 *nameBuffer)
{
u32 var1 = 0;
CpuFastSet(&var1, gTileBuffer, 0x1000100);
- sub_8004E3C((struct WindowConfig *)&gWindowConfig_81E6CAC, gTileBuffer, nameBuffer);
+ Text_InitWindow8004E3C((struct WindowTemplate *)&gWindowTemplate_81E6CAC, gTileBuffer, nameBuffer);
CpuFastSet(gTileBuffer, OBJ_VRAM1 + (monIndex * 0x400), 128);
}
@@ -3423,7 +3423,7 @@ void PartyMenuDoPrintLevel(u8 monIndex, u8 menuLayout, u8 level)
var1 = 0;
CpuFastSet(&var1, gUnknown_02039460, 0x1000020);
- sub_8004E3C((struct WindowConfig *)&gWindowConfig_81E6CAC, gUnknown_02039460 - 0x100 /*gTileBuffer*/, gStringVar1);
+ Text_InitWindow8004E3C((struct WindowTemplate *)&gWindowTemplate_81E6CAC, gUnknown_02039460 - 0x100 /*gTileBuffer*/, gStringVar1);
CpuFastSet(gUnknown_02039460, OBJ_VRAM1 + 0x200 + (monIndex * 0x400), 32);
}
@@ -3517,7 +3517,7 @@ void PartyMenuDoPrintHP(u8 monIndex, u8 b, u16 currentHP, u16 maxHP)
var = 0;
CpuFastSet(&var, gUnknown_02039460, 0x1000040);
- sub_8004E3C((struct WindowConfig *)&gWindowConfig_81E6CAC, gUnknown_02039460 - 0x100 /*gTileBuffer*/, gStringVar1);
+ Text_InitWindow8004E3C((struct WindowTemplate *)&gWindowTemplate_81E6CAC, gUnknown_02039460 - 0x100 /*gTileBuffer*/, gStringVar1);
CpuFastSet(gUnknown_02039460, OBJ_VRAM1 + 0x300 + (monIndex * 0x400), 64);
}
@@ -3667,8 +3667,8 @@ void ClosePartyPopupMenu(u8 index, const struct PartyPopupMenu *menu)
SetPartyPopupMenuOffsets(index, &left, &top, menu);
- MenuZeroFillWindowRect(left, top, left + menu[index].width, menu[index].numChoices * 2 + top + 1);
- HandleDestroyMenuCursors();
+ Menu_EraseWindowRect(left, top, left + menu[index].width, menu[index].numChoices * 2 + top + 1);
+ Menu_DestroyCursor();
}
TaskFunc PartyMenuGetPopupMenuFunc(u8 menuIndex, const struct PartyPopupMenu *menus, const struct MenuAction2 *menuActions, u8 itemIndex)
@@ -3683,7 +3683,7 @@ u8 sub_806E834(const u8 *message, u8 arg1)
gUnknown_0202E8F6 = 1;
- MenuDrawTextWindow(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
+ Menu_DrawStdWindowFrame(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
MenuPrintMessage(message, WINDOW_LEFT + 1, 15);
taskId = CreateTask(sub_806E884, 1);
@@ -3694,11 +3694,11 @@ u8 sub_806E834(const u8 *message, u8 arg1)
static void sub_806E884(u8 taskId)
{
- if (MenuUpdateWindowText())
+ if (Menu_UpdateWindowText())
{
gUnknown_0202E8F6 = 0;
if (gTasks[taskId].data[0] == 0)
- MenuZeroFillWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
+ Menu_EraseWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
DestroyTask(taskId);
}
}
@@ -3788,13 +3788,13 @@ void party_menu_link_mon_held_item_object(u8 taskId)
void PartyMenuTryGiveMonHeldItem_806EACC(u8 taskId)
{
- s8 selection = ProcessMenuInputNoWrap_();
+ s8 selection = Menu_ProcessInputNoWrap_();
if (selection == 0)
{
u16 currentItem;
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
currentItem = GetMonData(ewram1C000.pokemon, MON_DATA_HELD_ITEM);
RemoveBagItem(ewram1C000.unk6, 1);
if (AddBagItem(currentItem, 1) == TRUE)
@@ -3823,7 +3823,7 @@ void PartyMenuTryGiveMonHeldItem_806EACC(u8 taskId)
return;
if (selection == -1)
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
}
gTasks[taskId].func = party_menu_link_mon_held_item_object;
}
@@ -3925,7 +3925,7 @@ void DoTakeMail(u8 taskId, TaskFunc func)
void Task_LoseMailMessage(u8 taskId)
{
- s8 selection = ProcessMenuInputNoWrap_();
+ s8 selection = Menu_ProcessInputNoWrap_();
if (selection == 0)
{
@@ -3938,7 +3938,7 @@ void Task_LoseMailMessage(u8 taskId)
{
sub_806E834(gOtherText_BagFullCannotRemoveItem, 0);
}
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
gTasks[taskId].func = party_menu_link_mon_held_item_object;
}
else
@@ -3947,8 +3947,8 @@ void Task_LoseMailMessage(u8 taskId)
return;
if (selection == -1)
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(23, 8, 29, 13);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskId].func = party_menu_link_mon_held_item_object;
}
}
@@ -3964,11 +3964,11 @@ void Task_ConfirmLoseMailMessage(u8 taskId)
void Task_TakeHeldMail(u8 taskId)
{
- s8 selection = ProcessMenuInputNoWrap_();
+ s8 selection = Menu_ProcessInputNoWrap_();
if (selection == 0)
{
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
if (TakeMailFromMon2(ewram1C000.pokemon) != 0xFF)
sub_806E834(gOtherText_MailWasSent, 0);
else
@@ -3981,7 +3981,7 @@ void Task_TakeHeldMail(u8 taskId)
return;
if (selection == -1)
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
sub_806E834(gOtherText_MailRemovedMessageLost, 1);
gTasks[taskId].func = Task_ConfirmLoseMailMessage;
}
@@ -4126,11 +4126,11 @@ void sub_806F358(u8 taskId)
void sub_806F390(u8 taskId)
{
- s8 selection = ProcessMenuInputNoWrap_();
+ s8 selection = Menu_ProcessInputNoWrap_();
if (selection == 0)
{
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
sub_806E834(gOtherText_WhichMoveToForget2, 1);
gTasks[taskId].func = sub_806F44C;
}
@@ -4206,7 +4206,7 @@ void StopTryingToTeachMove_806F588(u8 taskId)
void StopTryingToTeachMove_806F614(u8 taskId)
{
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
StringCopy(gStringVar2, gMoveNames[ewram1C000.unk8]);
StringExpandPlaceholders(gStringVar4, gOtherText_StopTryingTo);
sub_806E834(gStringVar4, 1);
@@ -4224,11 +4224,11 @@ void StopTryingToTeachMove_806F67C(u8 taskId)
void StopTryingToTeachMove_806F6B4(u8 taskId)
{
- s8 selection = ProcessMenuInputNoWrap_();
+ s8 selection = Menu_ProcessInputNoWrap_();
if (selection == 0)
{
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
GetMonNickname(ewram1C000.pokemon, gStringVar1);
StringCopy(gStringVar2, gMoveNames[ewram1C000.unk8]);
StringExpandPlaceholders(gStringVar4, gOtherText_DidNotLearnMove2);
@@ -4241,7 +4241,7 @@ void StopTryingToTeachMove_806F6B4(u8 taskId)
return;
if (selection == -1)
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(23, 8, 29, 13);
GetMonNickname(ewram1C000.pokemon, gStringVar1);
StringCopy(gStringVar2, gMoveNames[ewram1C000.unk8]);
StringExpandPlaceholders(gStringVar4, gOtherText_WantsToLearn);
@@ -4592,7 +4592,7 @@ void sub_8070088(u8 taskId)
else
{
gUnknown_0202E8F4 = 1;
- MenuZeroFillWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
+ Menu_EraseWindowRect(WINDOW_LEFT, 14, WINDOW_RIGHT, 19);
PlaySE(SE_KAIFUKU);
PartyMenuUpdateLevelOrStatus(ewram1C000.pokemon, ewram1C000.unk5);
task_pc_turn_off(&gUnknown_083769A8[IsDoubleBattle() * 12 + ewram1C000.unk5 * 2], 9);
@@ -4649,12 +4649,12 @@ void CreateItemUseMoveMenu(u8 partyMonIndex)
u8 i;
r6 = 0;
- MenuDrawTextWindow(19, 10, 29, 19);
+ Menu_DrawStdWindowFrame(19, 10, 29, 19);
for (i = 0; i < 4; i++)
{
u16 move = GetMonData(&gPlayerParty[partyMonIndex], MON_DATA_MOVE1 + i);
- MenuPrint(gMoveNames[move], 20, i * 2 + 11);
+ Menu_PrintText(gMoveNames[move], 20, i * 2 + 11);
if (move != 0)
r6++;
}
@@ -4666,12 +4666,12 @@ void Task_HandleItemUseMoveMenuInput(u8 taskId)
if (gMain.newKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
else if (gMain.newKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
else if (gMain.newKeys & A_BUTTON)
{
@@ -4713,17 +4713,17 @@ void DoPPRecoveryItemEffect(u8 taskId, u16 item, TaskFunc c)
void ItemUseMoveMenu_HandleMoveSelection(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(19, 10, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(19, 10, 29, 19);
sub_806D5A4();
- gTasks[taskId].data[11] = GetMenuCursorPos();
+ gTasks[taskId].data[11] = Menu_GetCursorPos();
DoRecoverPP(taskId);
}
void ItemUseMoveMenu_HandleCancel(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(19, 10, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(19, 10, 29, 19);
if (gMain.inBattle)
gTasks[ewram1C000.unk4].func = HandleBattlePartyMenu;
else
@@ -4852,7 +4852,7 @@ void PrintStatGrowthsInLevelUpWindow(u8 taskId)
{
u8 i;
- MenuDrawTextWindow(11, 0, 29, 7);
+ Menu_DrawStdWindowFrame(11, 0, 29, 7);
for (i = 0; i < NUM_STATS; i++)
{
@@ -4868,12 +4868,12 @@ void PrintStatGrowthsInLevelUpWindow(u8 taskId)
x = (i / 3) * 9 + 11;
y = ((i % 3) << 1) + 1;
- MenuPrint_PixelCoords(StatNames[i], (x + 1) * 8, y * 8, 1);
+ Menu_PrintTextPixelCoords(StatNames[i], (x + 1) * 8, y * 8, 1);
if (i == 2)
- MenuPrint_PixelCoords(gOtherText_TallPlusAndRightArrow, (x + 6) * 8 + 6, y * 8, 0);
+ Menu_PrintTextPixelCoords(gOtherText_TallPlusAndRightArrow, (x + 6) * 8 + 6, y * 8, 0);
else
- MenuPrint_PixelCoords(gOtherText_TallPlusAndRightArrow, (x + 6) * 8 + 6, y * 8, 1);
+ Menu_PrintTextPixelCoords(gOtherText_TallPlusAndRightArrow, (x + 6) * 8 + 6, y * 8, 1);
gStringVar1[0] = EXT_CTRL_CODE_BEGIN;
gStringVar1[1] = 0x14;
@@ -4881,7 +4881,7 @@ void PrintStatGrowthsInLevelUpWindow(u8 taskId)
ConvertIntToDecimalStringN(gStringVar1 + 3, ewram1B000.statGrowths[i], 1, 2);
- MenuPrint_PixelCoords(gStringVar1, (x + 6) * 8 + 12, y * 8, 0);
+ Menu_PrintTextPixelCoords(gStringVar1, (x + 6) * 8 + 12, y * 8, 0);
}
}
#elif GERMAN
@@ -4897,7 +4897,7 @@ void PrintStatGrowthsInLevelUpWindow(u8 taskId) {
movs r1, 0\n\
movs r2, 0x1D\n\
movs r3, 0x7\n\
- bl MenuDrawTextWindow\n\
+ bl Menu_DrawStdWindowFrame\n\
movs r7, 0\n\
ldr r0, _0807092C @ =gStringVar1\n\
mov r10, r0\n\
@@ -4981,7 +4981,7 @@ _0807086C:\n\
mov r0, r10\n\
adds r1, r4, 0\n\
adds r2, r5, 0\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
adds r0, r7, 0x1\n\
lsls r0, 24\n\
lsrs r7, r0, 24\n\
@@ -5028,7 +5028,7 @@ void PrintNewStatsInLevelUpWindow(u8 taskId)
gStringVar1[2] = 0x06;
ConvertIntToDecimalStringN(gStringVar1 + 3, ewram1B000.statGrowths[newStatIndex], 1, 3);
- MenuPrint_PixelCoords(gStringVar1, (x + 6) * 8 + 6, y * 8, 0);
+ Menu_PrintTextPixelCoords(gStringVar1, (x + 6) * 8 + 6, y * 8, 0);
}
}
@@ -5070,7 +5070,7 @@ void Task_RareCandy3(u8 taskId)
u16 learnedMove;
u16 evolutionSpecies;
- MenuZeroFillWindowRect(11, 0, 29, 7);
+ Menu_EraseWindowRect(11, 0, 29, 7);
learnedMove = MonTryLearningNewMove(ewram1C000.pokemon, TRUE);
ewram1B000.unk282 = 1;
diff --git a/src/field/player_pc.c b/src/field/player_pc.c
index 928cb9689..0d5c5234b 100644
--- a/src/field/player_pc.c
+++ b/src/field/player_pc.c
@@ -217,8 +217,8 @@ void PlayerPC(void)
static void InitPlayerPCMenu(u8 taskId)
{
- MenuDrawTextWindow(0, 0, 10, gPcItemMenuOptionsNum * 2 + 1);
- PrintMenuItemsReordered(1, 1, gPcItemMenuOptionsNum, sPlayerPCMenuActions, gPcItemMenuOptionOrder);
+ Menu_DrawStdWindowFrame(0, 0, 10, gPcItemMenuOptionsNum * 2 + 1);
+ Menu_PrintItemsReordered(1, 1, gPcItemMenuOptionsNum, sPlayerPCMenuActions, gPcItemMenuOptionOrder);
InitMenu(0, 1, 1, gPcItemMenuOptionsNum, 0, 9);
TASK.FUNC = PlayerPCProcessMenuInput;
}
@@ -228,22 +228,22 @@ static void PlayerPCProcessMenuInput(u8 taskId)
if (gMain.newAndRepeatedKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
else if (gMain.newKeys & A_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
- sPlayerPCMenuActions[gPcItemMenuOptionOrder[GetMenuCursorPos()]].func(taskId);
+ sPlayerPCMenuActions[gPcItemMenuOptionOrder[Menu_GetCursorPos()]].func(taskId);
}
else if (gMain.newKeys & B_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
sPlayerPCMenuActions[gPcItemMenuOptionsNum[gPcItemMenuOptionOrder - 1]].func(taskId); // run EXIT.
}
@@ -262,7 +262,7 @@ static void PlayerPC_ItemStorage(u8 taskId)
static void PlayerPC_Mailbox(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 10, 9);
+ Menu_EraseWindowRect(0, 0, 10, 9);
eMailboxInfo.count = GetMailboxMailCount();
if (eMailboxInfo.count == 0)
@@ -280,7 +280,7 @@ static void PlayerPC_Mailbox(u8 taskId)
static void PlayerPC_Decoration(u8 var)
{
- MenuZeroFillWindowRect(0, 0, 10, 9);
+ Menu_EraseWindowRect(0, 0, 10, 9);
DoPlayerPCDecoration(var);
}
@@ -288,7 +288,7 @@ static void PlayerPC_TurnOff(u8 taskId)
{
if (gPcItemMenuOptionsNum == 4) // if the option count is 4, we are at the bedroom PC and not player PC, so do gender specific handling.
{
- MenuZeroFillWindowRect(0, 0, 0x1D, 0x13);
+ Menu_EraseWindowRect(0, 0, 0x1D, 0x13);
if (gSaveBlock2.playerGender == MALE)
ScriptContext1_SetupScript(gBrendanHouse_TurnPCOff);
@@ -297,7 +297,7 @@ static void PlayerPC_TurnOff(u8 taskId)
}
else
{
- MenuZeroFillWindowRect(0, 0, 10, 9);
+ Menu_EraseWindowRect(0, 0, 10, 9);
EnableBothScriptContexts();
}
DestroyTask(taskId);
@@ -305,17 +305,17 @@ static void PlayerPC_TurnOff(u8 taskId)
static void InitItemStorageMenu(u8 var)
{
- MenuZeroFillWindowRect(0, 0, 10, 9);
- MenuDrawTextWindow(0, 0, 11, 9);
- PrintMenuItems(1, 1, 4, (struct MenuAction *)gPCText_ItemPCOptionsText);
+ Menu_EraseWindowRect(0, 0, 10, 9);
+ Menu_DrawStdWindowFrame(0, 0, 11, 9);
+ Menu_PrintItems(1, 1, 4, (struct MenuAction *)gPCText_ItemPCOptionsText);
InitMenu(0, 1, 1, 4, var, 10);
ItemStorageMenuPrint(gPCText_OptionDescList[var]);
}
static void ItemStorageMenuPrint(const u8 *textPtr)
{
- MenuFillWindowRectWithBlankTile(2, 15, 27, 18);
- MenuPrint(textPtr, 2, 15);
+ Menu_BlankWindowRect(2, 15, 27, 18);
+ Menu_PrintText(textPtr, 2, 15);
}
static void ItemStorageMenuProcessInput(u8 var)
@@ -323,23 +323,23 @@ static void ItemStorageMenuProcessInput(u8 var)
if (gMain.newAndRepeatedKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
- ItemStorageMenuPrint(gPCText_OptionDescList[GetMenuCursorPos()]);
+ Menu_MoveCursor(-1);
+ ItemStorageMenuPrint(gPCText_OptionDescList[Menu_GetCursorPos()]);
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
- ItemStorageMenuPrint(gPCText_OptionDescList[GetMenuCursorPos()]);
+ Menu_MoveCursor(1);
+ ItemStorageMenuPrint(gPCText_OptionDescList[Menu_GetCursorPos()]);
}
else if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- gPCText_ItemPCOptionsText[GetMenuCursorPos()].func(var);
+ gPCText_ItemPCOptionsText[Menu_GetCursorPos()].func(var);
}
else if (gMain.newKeys & B_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
gPCText_ItemPCOptionsText[ITEMPC_MENU_EXIT].func(var);
}
@@ -368,7 +368,7 @@ static void ItemStorage_HandleReturnToProcessInput(u8 taskId)
void ItemStorage_ReturnToMenuAfterDeposit(void)
{
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
InitItemStorageMenu(ITEMPC_MENU_DEPOSIT);
CreateTask(ItemStorage_HandleReturnToProcessInput, 0);
pal_fill_black();
@@ -378,13 +378,13 @@ static void ItemStorage_Withdraw(u8 taskId)
{
s16 *data = TASK.data;
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 11, 9);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 11, 9);
NUM_ITEMS = CountUsedPCItemSlots();
if (NUM_ITEMS != 0)
{
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
CURRENT_ITEM_STORAGE_MENU = ITEMPC_MENU_WITHDRAW;
PAGE_INDEX = 0;
ITEMS_ABOVE_TOP = 0;
@@ -400,13 +400,13 @@ static void ItemStorage_Toss(u8 taskId)
{
s16 *data = TASK.data;
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 11, 9);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 11, 9);
NUM_ITEMS = CountUsedPCItemSlots();
if (NUM_ITEMS)
{
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ Menu_EraseWindowRect(0, 14, 29, 19);
CURRENT_ITEM_STORAGE_MENU = ITEMPC_MENU_TOSS;
PAGE_INDEX = 0;
ITEMS_ABOVE_TOP = 0;
@@ -420,8 +420,8 @@ static void ItemStorage_Toss(u8 taskId)
static void ItemStorage_Exit(u8 var)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 11, 9);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 11, 9);
ReshowPlayerPC(var);
}
@@ -450,7 +450,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
if(PAGE_INDEX != 0) // did the cursor move physically upwards?
{
PlaySE(SE_SELECT);
- PAGE_INDEX = MoveMenuCursor(-1);
+ PAGE_INDEX = Menu_MoveCursor(-1);
trueIndex = ITEMS_ABOVE_TOP + PAGE_INDEX;
if (SWITCH_MODE_ACTIVE == FALSE) // are we not currently switching items?
{
@@ -474,7 +474,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
ItemStorage_DrawBothListAndDescription(taskId);
if (SWITCH_MODE_ACTIVE != FALSE)
- MoveMenuCursor(0); // don't move the cursor. it's at the top of the page index, but not the true index.
+ Menu_MoveCursor(0); // don't move the cursor. it's at the top of the page index, but not the true index.
}
}
else if(gMain.newAndRepeatedKeys & DPAD_DOWN) // _0813A306
@@ -482,7 +482,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
if(PAGE_INDEX != NUM_PAGE_ITEMS - 1)
{
PlaySE(SE_SELECT);
- PAGE_INDEX = MoveMenuCursor(1);
+ PAGE_INDEX = Menu_MoveCursor(1);
trueIndex = ITEMS_ABOVE_TOP + PAGE_INDEX;
if(SWITCH_MODE_ACTIVE != FALSE)
@@ -500,7 +500,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
ItemStorage_DrawBothListAndDescription(taskId);
if (SWITCH_MODE_ACTIVE != FALSE)
- MoveMenuCursor(0);
+ Menu_MoveCursor(0);
}
}
else if(gMain.newKeys & SELECT_BUTTON) // _0813A3A0
@@ -549,7 +549,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
PlaySE(SE_SELECT);
if(SWITCH_MODE_ACTIVE == FALSE)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
ItemStorage_GoBackToPlayerPCMenu(taskId);
}
else
@@ -565,8 +565,8 @@ static void ItemStorage_GoBackToPlayerPCMenu(u8 taskId)
BuyMenuFreeMemory();
DestroyVerticalScrollIndicator(0);
DestroyVerticalScrollIndicator(1);
- MenuZeroFillWindowRect(0, 0, 29, 19);
- MenuDisplayMessageBox();
+ Menu_EraseWindowRect(0, 0, 29, 19);
+ Menu_DisplayDialogueFrame();
InitItemStorageMenu(TASK.CURRENT_ITEM_STORAGE_MENU);
TASK.FUNC = ItemStorageMenuProcessInput;
}
@@ -603,7 +603,7 @@ static void ItemStorage_DoItemAction(u8 taskId)
ItemStorage_PrintItemPcResponse(ITEMPC_HOW_MANY_TO_TOSS);
}
NUM_QUANTITY_ROLLER = 1;
- MenuDrawTextWindow(6, 8, 13, 11);
+ Menu_DrawStdWindowFrame(6, 8, 13, 11);
sub_80A418C(NUM_QUANTITY_ROLLER, STR_CONV_MODE_RIGHT_ALIGN, 8, 9, 3);
TASK.FUNC = ItemStorage_HandleQuantityRolling;
}
@@ -652,7 +652,7 @@ static void ItemStorage_HandleQuantityRolling(u8 taskId)
else if(gMain.newKeys & A_BUTTON) // confirm quantity.
{
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(6, 6, 0xD, 0xB);
+ Menu_EraseWindowRect(6, 6, 0xD, 0xB);
if(CURRENT_ITEM_STORAGE_MENU == ITEMPC_MENU_WITHDRAW)
ItemStorage_DoItemWithdraw(taskId);
@@ -662,7 +662,7 @@ static void ItemStorage_HandleQuantityRolling(u8 taskId)
else if(gMain.newKeys & B_BUTTON) // cancel quantity.
{
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(6, 6, 0xD, 0xB);
+ Menu_EraseWindowRect(6, 6, 0xD, 0xB);
StartVerticalScrollIndicators(0);
StartVerticalScrollIndicators(1);
ItemStorage_PrintItemPcResponse(gSaveBlock1.pcItems[ITEMS_ABOVE_TOP + PAGE_INDEX].itemId); // why not use trueIndex?
@@ -713,7 +713,7 @@ static void ItemStorage_DoItemToss(u8 taskId)
static void ItemStorage_ResumeInputFromYesToss(u8 taskId)
{
- MenuZeroFillWindowRect(0x6, 0x6, 0xD, 0xB);
+ Menu_EraseWindowRect(0x6, 0x6, 0xD, 0xB);
ItemStorage_PrintItemPcResponse(ITEMPC_THREW_AWAY_ITEM);
TASK.FUNC = ItemStorage_HandleRemoveItem;
}
@@ -722,7 +722,7 @@ static void ItemStorage_ResumeInputFromNoToss(u8 taskId)
{
s16 *data = TASK.data;
- MenuZeroFillWindowRect(0x6, 0x6, 0xD, 0xB);
+ Menu_EraseWindowRect(0x6, 0x6, 0xD, 0xB);
InitMenu(0, 16, 2, NUM_PAGE_ITEMS, PAGE_INDEX, 0xD);
StartVerticalScrollIndicators(0);
StartVerticalScrollIndicators(1);
@@ -765,7 +765,7 @@ static void ItemStorage_WaitPressHandleResumeProcessInput(u8 taskId)
static void ItemStorage_HandleResumeProcessInput(u8 taskId)
{
- MenuZeroFillWindowRect(0x6, 0x6, 0xD, 0xB);
+ Menu_EraseWindowRect(0x6, 0x6, 0xD, 0xB);
StartVerticalScrollIndicators(0);
StartVerticalScrollIndicators(1);
ItemStorage_DrawBothListAndDescription(taskId);
@@ -817,14 +817,14 @@ static void ItemStorage_DrawItemQuantity(u16 arg1, enum StringConvertMode arg2,
sub_80A4164(gStringVar1, arg1, arg2, arg4);
if(isSwapSelected != FALSE)
- MenuPrint(gSelectedItemQuantityFormatText, 0x1A, arg3);
+ Menu_PrintText(gSelectedItemQuantityFormatText, 0x1A, arg3);
else
- MenuPrint(gNonSelectedItemQuantityFormatText, 0x1A, arg3);
+ Menu_PrintText(gNonSelectedItemQuantityFormatText, 0x1A, arg3);
}
static void ItemStorage_DrawItemVoidQuantity(u8 var)
{
- MenuPrint(gUnknown_08406330, 0x19, var);
+ Menu_PrintText(gUnknown_08406330, 0x19, var);
}
static void ItemStorage_DrawItemName(struct ItemSlot *itemSlot, u8 var, int isSwapSelected)
@@ -832,9 +832,9 @@ static void ItemStorage_DrawItemName(struct ItemSlot *itemSlot, u8 var, int isSw
CopyItemName(itemSlot->itemId, gStringVar1);
if(isSwapSelected != FALSE)
- MenuPrint(gSelectedItemFormattedText, 16, var);
+ Menu_PrintText(gSelectedItemFormattedText, 16, var);
else
- MenuPrint(gNonSelectedItemFormattedText, 16, var);
+ Menu_PrintText(gNonSelectedItemFormattedText, 16, var);
}
static void ItemStorage_DrawNormalItemEntry(struct ItemSlot *itemSlot, u8 var, int var2)
@@ -900,7 +900,7 @@ static void ItemStorage_DrawItemList(u8 taskId)
}
if (i - ITEMS_ABOVE_TOP < 8)
- MenuFillWindowRectWithBlankTile(16, yCoord + 4, 0x1C, 0x12);
+ Menu_BlankWindowRect(16, yCoord + 4, 0x1C, 0x12);
if (ITEMS_ABOVE_TOP != 0)
CreateVerticalScrollIndicators(0, 0xB8, 8);
@@ -977,11 +977,11 @@ static void ItemStorage_GoBackToItemPCMenu(u8 taskId, u8 var)
sub_80F944C();
LoadScrollIndicatorPalette();
ItemStorage_LoadPalette();
- MenuDrawTextWindow(0xF, 0, 0x1D, 0x13);
- MenuDrawTextWindow(0, 0xC, 0xE, 0x13);
- MenuDrawTextWindow(0, 0, 0xB, 3);
+ Menu_DrawStdWindowFrame(0xF, 0, 0x1D, 0x13);
+ Menu_DrawStdWindowFrame(0, 0xC, 0xE, 0x13);
+ Menu_DrawStdWindowFrame(0, 0, 0xB, 3);
ItemStorage_PrintItemPcResponse(gSaveBlock1.pcItems[0].itemId);
- MenuPrint(gPCText_ItemPCOptionsText[var].text, 1, 1);
+ Menu_PrintText(gPCText_ItemPCOptionsText[var].text, 1, 1);
ItemStorage_DrawItemList(taskId);
InitMenu(0, 0x10, 2, NUM_PAGE_ITEMS, PAGE_INDEX, 0xD);
}
@@ -1037,22 +1037,22 @@ static void Mailbox_DrawMailList(u8 taskId) // taskId is unused
for (i = eMailboxInfo.itemsAbove; i < eMailboxInfo.itemsAbove + eMailboxInfo.pageItems; i++)
{
yCoord = (i - eMailboxInfo.itemsAbove) * 2;
- MenuFillWindowRectWithBlankTile(0x15, yCoord + 2, 0x1C, yCoord + 3);
+ Menu_BlankWindowRect(0x15, yCoord + 2, 0x1C, yCoord + 3);
if (i == eMailboxInfo.count)
{
- MenuPrint(gOtherText_CancelNoTerminator, 0x15, yCoord + 2);
+ Menu_PrintText(gOtherText_CancelNoTerminator, 0x15, yCoord + 2);
break;
}
else
{
StringCopy(gStringVar1, gSaveBlock1.mail[i + 6].playerName);
SanitizeNameString(gStringVar1);
- MenuPrint(gStringVar1, 0x15, yCoord + 2);
+ Menu_PrintText(gStringVar1, 0x15, yCoord + 2);
}
}
if (i - eMailboxInfo.itemsAbove != 8)
- MenuFillWindowRectWithBlankTile(0x15, yCoord + 4, 0x1C, 0x12);
+ Menu_BlankWindowRect(0x15, yCoord + 4, 0x1C, 0x12);
if (eMailboxInfo.itemsAbove != 0)
CreateVerticalScrollIndicators(0, 0xC8, 8);
@@ -1069,10 +1069,10 @@ static void Mailbox_DrawMailboxMenu(u8 taskId)
{
sub_80F944C();
LoadScrollIndicatorPalette();
- MenuZeroFillWindowRect(0, 0, 0x1D, 0x13);
- MenuDrawTextWindow(0, 0, 0x8, 0x3);
- MenuPrint(gPCText_Mailbox, 1, 1);
- MenuDrawTextWindow(0x14, 0, 0x1D, 0x13);
+ Menu_EraseWindowRect(0, 0, 0x1D, 0x13);
+ Menu_DrawStdWindowFrame(0, 0, 0x8, 0x3);
+ Menu_PrintText(gPCText_Mailbox, 1, 1);
+ Menu_DrawStdWindowFrame(0x14, 0, 0x1D, 0x13);
Mailbox_DrawMailList(taskId);
InitMenu(0, 0x15, 2, eMailboxInfo.pageItems, eMailboxInfo.cursorPos, 8);
}
@@ -1087,7 +1087,7 @@ static void Mailbox_ProcessInput(u8 taskId)
if(eMailboxInfo.cursorPos != 0)
{
PlaySE(SE_SELECT);
- eMailboxInfo.cursorPos = MoveMenuCursor(-1);
+ eMailboxInfo.cursorPos = Menu_MoveCursor(-1);
}
else if(eMailboxInfo.itemsAbove != 0)
{
@@ -1101,7 +1101,7 @@ static void Mailbox_ProcessInput(u8 taskId)
if(eMailboxInfo.cursorPos != eMailboxInfo.pageItems - 1)
{
PlaySE(SE_SELECT);
- eMailboxInfo.cursorPos = MoveMenuCursor(1);
+ eMailboxInfo.cursorPos = Menu_MoveCursor(1);
}
else if(eMailboxInfo.itemsAbove + eMailboxInfo.cursorPos != eMailboxInfo.count)
{
@@ -1112,7 +1112,7 @@ static void Mailbox_ProcessInput(u8 taskId)
}
else if(gMain.newKeys & A_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
if(eMailboxInfo.itemsAbove + eMailboxInfo.cursorPos == eMailboxInfo.count)
@@ -1127,7 +1127,7 @@ static void Mailbox_ProcessInput(u8 taskId)
}
else if(gMain.newKeys & B_BUTTON)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
Mailbox_TurnOff(taskId);
}
@@ -1143,7 +1143,7 @@ static void Mailbox_CloseScrollIndicators(void)
static void Mailbox_PrintWhatToDoWithPlayerMailText(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 0x1D, 0x13);
+ Menu_EraseWindowRect(0, 0, 0x1D, 0x13);
StringCopy(gStringVar1, gSaveBlock1.mail[eMailboxInfo.itemsAbove + 6 + eMailboxInfo.cursorPos].playerName);
SanitizeNameString(gStringVar1);
StringExpandPlaceholders(gStringVar4, gOtherText_WhatWillYouDoMail);
@@ -1152,7 +1152,7 @@ static void Mailbox_PrintWhatToDoWithPlayerMailText(u8 taskId)
static void Mailbox_ReturnToPlayerPC(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 0x1D, 0x13);
+ Menu_EraseWindowRect(0, 0, 0x1D, 0x13);
ReshowPlayerPC(taskId);
}
@@ -1164,8 +1164,8 @@ static void Mailbox_TurnOff(u8 taskId)
static void Mailbox_PrintMailOptions(u8 taskId) // Mailbox_PrintMailOptions
{
- MenuDrawTextWindow(0, 0, 0xC, 0x9);
- PrintMenuItems(1, 1, 4, (struct MenuAction *)gMailboxMailOptions);
+ Menu_DrawStdWindowFrame(0, 0, 0xC, 0x9);
+ Menu_PrintItems(1, 1, 4, (struct MenuAction *)gMailboxMailOptions);
InitMenu(0, 1, 1, 4, 0, 0xB);
TASK.FUNC = Mailbox_MailOptionsProcessInput;
}
@@ -1175,17 +1175,17 @@ static void Mailbox_MailOptionsProcessInput(u8 taskId)
if(gMain.newAndRepeatedKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
else if(gMain.newAndRepeatedKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
else if(gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- gMailboxMailOptions[GetMenuCursorPos()].func(taskId);
+ gMailboxMailOptions[Menu_GetCursorPos()].func(taskId);
}
else if(gMain.newKeys & B_BUTTON)
{
@@ -1231,9 +1231,9 @@ static const u8 gHighlightedMoveToBagFormatText[] = _("{COLOR RED}{STR_VAR_1}");
static void Mailbox_MoveToBag(u8 taskId)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
StringCopy(gStringVar1, gOtherText_MoveToBag);
- MenuPrint(gHighlightedMoveToBagFormatText, 1, 3); // gHighlightedMoveToBagFormatText
+ Menu_PrintText(gHighlightedMoveToBagFormatText, 1, 3); // gHighlightedMoveToBagFormatText
DisplayItemMessageOnField(taskId, gOtherText_MessageWillBeLost, Mailbox_DrawYesNoBeforeMove, 0);
}
@@ -1247,7 +1247,7 @@ static void Mailbox_DoMailMoveToBag(u8 taskId)
{
struct MailStruct *mail = &gSaveBlock1.mail[eMailboxInfo.itemsAbove + 6 + eMailboxInfo.cursorPos];
- MenuZeroFillWindowRect(0x14, 8, 0x1A, 0xD);
+ Menu_EraseWindowRect(0x14, 8, 0x1A, 0xD);
if(AddBagItem(mail->itemId, 1) == FALSE)
{
@@ -1270,7 +1270,7 @@ static void Mailbox_DoMailMoveToBag(u8 taskId)
static void Mailbox_ReturnToInputAfterNo(u8 taskId) // Mailbox_ReturnToInputAfterNo
{
- MenuZeroFillWindowRect(0x14, 0x8, 0x1A, 0xD);
+ Menu_EraseWindowRect(0x14, 0x8, 0x1A, 0xD);
Mailbox_DrawMailMenuAndDoProcessInput(taskId);
}
@@ -1325,8 +1325,8 @@ static void Mailbox_NoPokemonForMail(u8 taskId)
static void Mailbox_Cancel(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 0xC, 0x9);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 0xC, 0x9);
Mailbox_DrawMailMenuAndDoProcessInput(taskId);
}
diff --git a/src/field/pokeblock.c b/src/field/pokeblock.c
index 640d4731f..7e8bdc2ce 100644
--- a/src/field/pokeblock.c
+++ b/src/field/pokeblock.c
@@ -8,7 +8,7 @@
#include "script.h"
#include "strings.h"
#include "task.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
#include "text.h"
#include "main.h"
#include "menu.h"
@@ -255,7 +255,7 @@ static bool8 sub_810B6C0(void)
gMain.state++;
break;
case 1:
- remove_some_task();
+ ScanlineEffect_Stop();
gMain.state++;
break;
case 2:
@@ -275,15 +275,15 @@ static bool8 sub_810B6C0(void)
gMain.state++;
break;
case 5:
- SetUpWindowConfig(&gWindowConfig_81E6E34);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6E34);
gMain.state++;
break;
case 6:
- SetUpWindowConfig(&gWindowConfig_81E6E50);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6E50);
gMain.state++;
break;
case 7:
- MultistepInitMenuWindowBegin(&gWindowConfig_81E6E34);
+ MultistepInitMenuWindowBegin(&gWindowTemplate_81E6E34);
gMain.state++;
break;
case 8:
@@ -293,7 +293,7 @@ static bool8 sub_810B6C0(void)
}
break;
case 9:
- MultistepInitMenuWindowBegin(&gWindowConfig_81E6E50);
+ MultistepInitMenuWindowBegin(&gWindowTemplate_81E6E50);
gMain.state++;
break;
case 10:
@@ -445,18 +445,18 @@ void debug_sub_8120F98(void)
static void sub_810BB0C(void)
{
- BasicInitMenuWindow(&gWindowConfig_81E6E34);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E34);
sub_8072BD8(ItemId_GetItem(ITEM_POKEBLOCK_CASE)->name, 2, 1, 0x48);
}
static void sub_810BB30(void)
{
- BasicInitMenuWindow(&gWindowConfig_81E6E34);
- MenuPrint(gContestStatsText_Spicy, 2, 13);
- MenuPrint(gContestStatsText_Dry, 2, 15);
- MenuPrint(gContestStatsText_Sweet, 2, 17);
- MenuPrint(gContestStatsText_Bitter, 8, 13);
- MenuPrint(gContestStatsText_Sour, 8, 15);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E34);
+ Menu_PrintText(gContestStatsText_Spicy, 2, 13);
+ Menu_PrintText(gContestStatsText_Dry, 2, 15);
+ Menu_PrintText(gContestStatsText_Sweet, 2, 17);
+ Menu_PrintText(gContestStatsText_Bitter, 8, 13);
+ Menu_PrintText(gContestStatsText_Sour, 8, 15);
}
static void sub_810BB88(u8 a0)
@@ -464,17 +464,17 @@ static void sub_810BB88(u8 a0)
u8 i;
u8 y;
u8 *buf;
- BasicInitMenuWindow(&gWindowConfig_81E6E34);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E34);
for (i=a0; i<=a0+8; i++)
{
y = (i - a0) << 1;
if (i == gUnknown_02039248.unk2)
{
buf = sub_8072C74(gStringVar1, gContestStatsText_StowCase, 0x78, 0);
- MenuPrint(gStringVar1, 15, y + 1);
+ Menu_PrintText(gStringVar1, 15, y + 1);
if (i != a0 + 8)
{
- MenuZeroFillWindowRect(15, y + 3, 29, 18);
+ Menu_EraseWindowRect(15, y + 3, 29, 18);
}
break;
}
@@ -484,7 +484,7 @@ static void sub_810BB88(u8 a0)
buf[2] = 0x06;
buf += 3;
ConvertIntToDecimalStringN(buf, sub_810C9B0(&gSaveBlock1.pokeblocks[i]), STR_CONV_MODE_RIGHT_ALIGN, 3);
- MenuPrint(gStringVar1, 15, y + 1);
+ Menu_PrintText(gStringVar1, 15, y + 1);
}
}
@@ -596,15 +596,15 @@ static void sub_810BDAC(bool8 flag)
gBGTilemapBuffers[2][v0 + 32] = 15;
}
}
- BasicInitMenuWindow(&gWindowConfig_81E6E34);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E34);
if (gUnknown_02039248.unk0 + gUnknown_02039248.unk1 != gUnknown_02039248.unk2)
{
sub_8072C14(gStringVar1, sub_810C9E8(&gSaveBlock1.pokeblocks[gUnknown_02039248.unk0 + gUnknown_02039248.unk1]), 16, 1);
- MenuPrint(gStringVar1, 11, 17);
+ Menu_PrintText(gStringVar1, 11, 17);
}
else
{
- MenuZeroFillWindowRect(11, 17, 12, 18);
+ Menu_EraseWindowRect(11, 17, 12, 18);
}
}
@@ -812,9 +812,9 @@ static void sub_810C368(u8 taskId)
v0 = 2;
sub_80F98A4(0);
sub_80F98A4(1);
- BasicInitMenuWindow(&gWindowConfig_81E6E50);
- MenuDrawTextWindow(7, v0 + 4, 13, 11);
- PrintMenuItemsReordered(8, v0 + 5, gUnknown_0203924C, gUnknown_083F7EF4, gUnknown_03000758);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E50);
+ Menu_DrawStdWindowFrame(7, v0 + 4, 13, 11);
+ Menu_PrintItemsReordered(8, v0 + 5, gUnknown_0203924C, gUnknown_083F7EF4, gUnknown_03000758);
InitMenu(0, 8, v0 + 5, gUnknown_0203924C, 0, 5);
gSpecialVar_ItemId = gUnknown_02039248.unk0 + gUnknown_02039248.unk1;
gTasks[taskId].func = sub_810C40C;
@@ -824,24 +824,24 @@ static void sub_810C40C(u8 taskId)
{
if (gMain.newAndRepeatedKeys & DPAD_UP)
{
- if (GetMenuCursorPos())
+ if (Menu_GetCursorPos())
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
{
- if (GetMenuCursorPos() != gUnknown_0203924C - 1)
+ if (Menu_GetCursorPos() != gUnknown_0203924C - 1)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(+1);
+ Menu_MoveCursor(+1);
}
}
else if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- gUnknown_083F7EF4[gUnknown_03000758[GetMenuCursorPos()]].func(taskId);
+ gUnknown_083F7EF4[gUnknown_03000758[Menu_GetCursorPos()]].func(taskId);
}
else if (gMain.newKeys & B_BUTTON)
{
@@ -868,9 +868,9 @@ static void sub_810C508(u8 taskId)
static void sub_810C540(u8 taskId)
{
- BasicInitMenuWindow(&gWindowConfig_81E6E50);
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(7, 4, 13, 11);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E50);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(7, 4, 13, 11);
StringCopy(gStringVar1, gPokeblockNames[gSaveBlock1.pokeblocks[gUnknown_02039248.unk0 + gUnknown_02039248.unk1].color]);
StringExpandPlaceholders(gStringVar4, gContestStatsText_ThrowAwayPrompt);
DisplayItemMessageOnField(taskId, gStringVar4, sub_810C5EC, 0);
@@ -890,7 +890,7 @@ static void sub_810C5EC(u8 taskId)
static void sub_810C610(u8 taskId)
{
- MenuZeroFillWindowRect(7, 6, 13, 11);
+ Menu_EraseWindowRect(7, 6, 13, 11);
PokeblockClearIfExists((gUnknown_02039248.unk0 + gUnknown_02039248.unk1));
StringExpandPlaceholders(gStringVar4, gContestStatsText_WasThrownAway);
DisplayItemMessageOnField(taskId, gStringVar4, sub_810C704, 0);
@@ -906,9 +906,9 @@ static void sub_810C668(u8 taskId)
{
sub_80F979C(1, 0);
}
- BasicInitMenuWindow(&gWindowConfig_81E6E50);
- MenuZeroFillWindowRect(7, 6, 13, 11);
- MenuZeroFillWindowRect(0, 14, 29, 19);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E50);
+ Menu_EraseWindowRect(7, 6, 13, 11);
+ Menu_EraseWindowRect(0, 14, 29, 19);
gTasks[taskId].func = sub_810BF7C;
}
@@ -922,7 +922,7 @@ static void sub_810C6DC(u8 taskId)
static void sub_810C704(u8 taskId)
{
- BasicInitMenuWindow(&gWindowConfig_81E6E34);
+ BasicInitMenuWindow(&gWindowTemplate_81E6E34);
sub_810BC84(gUnknown_02039248.unk1);
sub_80F979C(1, 1);
gTasks[taskId].func = sub_810C6DC;
@@ -932,8 +932,8 @@ static void sub_810C748(u8 taskId)
{
StartVerticalScrollIndicators(0);
StartVerticalScrollIndicators(1);
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(7, 4, 13, 11);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(7, 4, 13, 11);
gTasks[taskId].func = sub_810BF7C;
}
diff --git a/src/field/region_map.c b/src/field/region_map.c
index 07e77e389..a098eb73d 100644
--- a/src/field/region_map.c
+++ b/src/field/region_map.c
@@ -1540,11 +1540,11 @@ void CB2_InitFlyRegionMap(void)
FreeAllSpritePalettes();
break;
case 1:
- SetUpWindowConfig(&gWindowConfig_81E7224);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E7224);
break;
case 2:
- InitMenuWindow(&gWindowConfig_81E7224);
- MenuZeroFillScreen();
+ InitMenuWindow(&gWindowTemplate_81E7224);
+ Menu_EraseScreen();
break;
case 3:
InitRegionMap(&ewram0_3.regionMap, 0);
@@ -1562,7 +1562,7 @@ void CB2_InitFlyRegionMap(void)
break;
case 6:
LoadPalette(sFlyRegionMapFrame_Pal, 16, 32);
- MenuPrint_PixelCoords(gOtherText_FlyToWhere, 1, 0x90, 1);
+ Menu_PrintTextPixelCoords(gOtherText_FlyToWhere, 1, 0x90, 1);
break;
case 7:
CreateFlyTargetGraphics();
@@ -1619,8 +1619,8 @@ static void PrintFlyTargetName(void)
{
if (FlagGet(r4->flag))
{
- MenuDrawTextWindow(16, 14, 29, 19);
- MenuPrint(ewram0_3.regionMap.mapSectionName, 17, 15);
+ Menu_DrawStdWindowFrame(16, 14, 29, 19);
+ Menu_PrintText(ewram0_3.regionMap.mapSectionName, 17, 15);
MenuPrint_RightAligned(r4->unk0[ewram0_3.regionMap.everGrandeCityArea], 29, 17);
return;
}
@@ -1631,16 +1631,16 @@ static void PrintFlyTargetName(void)
asm("mov %0, #0\n":"=r"(zero)); // zero = 0
if (zero == 0)
{
- MenuDrawTextWindow(16, 16, 29, 19);
- MenuPrint(ewram0_3.regionMap.mapSectionName, 17, 17);
- MenuZeroFillWindowRect(16, 14, 29, 15);
+ Menu_DrawStdWindowFrame(16, 16, 29, 19);
+ Menu_PrintText(ewram0_3.regionMap.mapSectionName, 17, 17);
+ Menu_EraseWindowRect(16, 14, 29, 15);
}
}
else
{
- MenuDrawTextWindow(16, 16, 29, 19);
- MenuPrint(ewramBlankMapName, 17, 17);
- MenuZeroFillWindowRect(16, 14, 29, 15);
+ Menu_DrawStdWindowFrame(16, 16, 29, 19);
+ Menu_PrintText(ewramBlankMapName, 17, 17);
+ Menu_EraseWindowRect(16, 14, 29, 15);
}
}
diff --git a/src/field/scrcmd.c b/src/field/scrcmd.c
index 05a909e81..e795fd8ed 100644
--- a/src/field/scrcmd.c
+++ b/src/field/scrcmd.c
@@ -1333,7 +1333,7 @@ bool8 ScrCmd_drawbox(struct ScriptContext *ctx)
u8 right = ScriptReadByte(ctx);
u8 bottom = ScriptReadByte(ctx);
- MenuDrawTextWindow(left, top, right, bottom);
+ Menu_DrawStdWindowFrame(left, top, right, bottom);
return FALSE;
}
@@ -1363,7 +1363,7 @@ bool8 ScrCmd_erasebox(struct ScriptContext *ctx)
u8 right = ScriptReadByte(ctx);
u8 bottom = ScriptReadByte(ctx);
- MenuZeroFillWindowRect(left, top, right, bottom);
+ Menu_EraseWindowRect(left, top, right, bottom);
return FALSE;
}
@@ -1428,8 +1428,8 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
u8 v6 = ptr[4];
u8 v7 = ptr[5];
StringBraille(gStringVar4, ptr + 6);
- MenuDrawTextWindow(v2, v3, v4, v5);
- MenuPrint(gStringVar4, v6, v7);
+ Menu_DrawStdWindowFrame(v2, v3, v4, v5);
+ Menu_PrintText(gStringVar4, v6, v7);
return FALSE;
}
diff --git a/src/field/script_menu.c b/src/field/script_menu.c
index 9f3ab75cc..9d901a03c 100644
--- a/src/field/script_menu.c
+++ b/src/field/script_menu.c
@@ -622,7 +622,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, u8 ig
static u16 GetStringWidthInTilesForScriptMenu(const u8 *str)
{
// each tile on screen is 8x8, so it needs the number of tiles and not pixels, hence the division by 8.
- return (GetStringWidthGivenWindowConfig((struct WindowConfig *)&gWindowConfig_81E6CE4, str) + 7) / 8;
+ return (Text_GetStringWidthFromWindowTemplate((struct WindowTemplate *)&gWindowTemplate_81E6CE4, str) + 7) / 8;
}
static void DrawMultichoiceMenu(u8 left, u8 top, u8 count, const struct MenuAction *list, u8 ignoreBPress, u8 cursorPos)
@@ -651,8 +651,8 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 count, const struct MenuActi
bottom = top + (2 * count + 1);
- MenuDrawTextWindow(left, top, right, bottom);
- PrintMenuItems(left + 1, top + 1, count, list);
+ Menu_DrawStdWindowFrame(left, top, right, bottom);
+ Menu_PrintItems(left + 1, top + 1, count, list);
InitMenu(0, left + 1, top + 1, count, cursorPos, right - left - 1);
StartScriptMenuTask(left, top, right, bottom, ignoreBPress, count);
}
@@ -687,9 +687,9 @@ static void Task_HandleMultichoiceInput(u8 taskId)
if (!gPaletteFade.active)
{
if (!gTasks[taskId].tDoWrap)
- selection = ProcessMenuInputNoWrap();
+ selection = Menu_ProcessInputNoWrap();
else
- selection = ProcessMenuInput();
+ selection = Menu_ProcessInput();
if (selection != -2)
{
@@ -704,8 +704,8 @@ static void Task_HandleMultichoiceInput(u8 taskId)
{
gSpecialVar_Result = selection;
}
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(gTasks[taskId].tLeft, gTasks[taskId].tTop, gTasks[taskId].tRight, gTasks[taskId].tBottom);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(gTasks[taskId].tLeft, gTasks[taskId].tTop, gTasks[taskId].tRight, gTasks[taskId].tBottom);
DestroyTask(taskId);
EnableBothScriptContexts();
}
@@ -745,7 +745,7 @@ static void sub_80B53B4(u8 left, u8 top, u8 count, const struct MenuAction *list
right = (right + left) + 2;
bottom = top + (2 * count + 1);
- PrintMenuItems(left, top, count, list);
+ Menu_PrintItems(left, top, count, list);
InitMenu(0, left, top, count, 0, right - left - 1);
StartScriptMenuTask(left, top, right, bottom, ignoreBPress, count);
}
@@ -788,7 +788,7 @@ static void Task_HandleYesNoInput(u8 taskId)
return;
}
- switch (ProcessMenuInputNoWrap())
+ switch (Menu_ProcessInputNoWrap())
{
case -2:
return;
@@ -805,7 +805,7 @@ static void Task_HandleYesNoInput(u8 taskId)
left = gTasks[taskId].tLeft;
top = gTasks[taskId].tTop;
- MenuZeroFillWindowRect(left, top, left + 6, top + 5);
+ Menu_EraseWindowRect(left, top, left + 6, top + 5);
DestroyTask(taskId);
EnableBothScriptContexts();
}
@@ -839,7 +839,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPr
bottom = (2 * (gMultichoiceLists[multichoiceId].count / columnCount)) + 3 + top;
}
- width = sub_807288C(columnCount);
+ width = Menu_GetColumnXCoord(columnCount);
gTasks[taskId].tLeft = left;
gTasks[taskId].tTop = top;
gTasks[taskId].tRight = width + left + 2;
@@ -851,7 +851,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPr
static void Task_HandleMultichoiceGridInput(u8 taskId)
{
- s8 selection = sub_80727CC();
+ s8 selection = Menu_ProcessInputGridLayout();
if (selection != -2)
{
@@ -866,8 +866,8 @@ static void Task_HandleMultichoiceGridInput(u8 taskId)
{
gSpecialVar_Result = selection;
}
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(gTasks[taskId].tLeft, gTasks[taskId].tTop, gTasks[taskId].tRight, gTasks[taskId].tBottom);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(gTasks[taskId].tLeft, gTasks[taskId].tTop, gTasks[taskId].tRight, gTasks[taskId].tBottom);
DestroyTask(taskId);
EnableBothScriptContexts();
}
@@ -909,23 +909,23 @@ void ScriptMenu_CreatePCMenu(void)
if (FlagGet(FLAG_SYS_GAME_CLEAR)) // player has cleared game?
{
numChoices = 4;
- MenuDrawTextWindow(0, 0, width + 2, 9);
- MenuPrint(gPCText_HallOfFame, 1, 5);
- MenuPrint(gPCText_LogOff, 1, 7);
+ Menu_DrawStdWindowFrame(0, 0, width + 2, 9);
+ Menu_PrintText(gPCText_HallOfFame, 1, 5);
+ Menu_PrintText(gPCText_LogOff, 1, 7);
}
else
{
numChoices = 3;
- MenuDrawTextWindow(0, 0, width + 2, 7);
- MenuPrint(gPCText_LogOff, 1, 5);
+ Menu_DrawStdWindowFrame(0, 0, width + 2, 7);
+ Menu_PrintText(gPCText_LogOff, 1, 5);
}
if (FlagGet(FLAG_SYS_PC_LANETTE)) // player met lanette?
- MenuPrint(gPCText_LanettesPC, 1, 1);
+ Menu_PrintText(gPCText_LanettesPC, 1, 1);
else
- MenuPrint(gPCText_SomeonesPC, 1, 1);
+ Menu_PrintText(gPCText_SomeonesPC, 1, 1);
- MenuPrint(gPCText_PlayersPC, 1, 3);
+ Menu_PrintText(gPCText_PlayersPC, 1, 3);
InitMenu(0, 1, 1, numChoices, 0, width + 1);
StartScriptMenuTask(0, 0, width + 2, 2 * numChoices + 1, 0, numChoices);
}
@@ -1008,15 +1008,15 @@ _080B57B4:\n\
movs r0, 0\n\
movs r1, 0\n\
movs r3, 0x9\n\
- bl MenuDrawTextWindow\n\
+ bl Menu_DrawStdWindowFrame\n\
ldr r0, _080B57F8 @ =gPCText_HallOfFame\n\
movs r1, 0x1\n\
movs r2, 0x5\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
ldr r0, _080B57F0 @ =gPCText_LogOff\n\
movs r1, 0x1\n\
movs r2, 0x7\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
b _080B5818\n\
.align 2, 0\n\
_080B57E8: .4byte gPCText_SomeonesPC\n\
@@ -1032,11 +1032,11 @@ _080B57FC:\n\
movs r0, 0\n\
movs r1, 0\n\
movs r3, 0x7\n\
- bl MenuDrawTextWindow\n\
+ bl Menu_DrawStdWindowFrame\n\
ldr r0, _080B5834 @ =gPCText_LogOff\n\
movs r1, 0x1\n\
movs r2, 0x5\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
_080B5818:\n\
adds r6, r4, 0\n\
ldr r0, _080B5838 @ =0x0000084b\n\
@@ -1047,7 +1047,7 @@ _080B5818:\n\
ldr r0, _080B583C @ =gPCText_LanettesPC\n\
movs r1, 0x1\n\
movs r2, 0x1\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
b _080B584A\n\
.align 2, 0\n\
_080B5834: .4byte gPCText_LogOff\n\
@@ -1057,12 +1057,12 @@ _080B5840:\n\
ldr r0, _080B5888 @ =gPCText_SomeonesPC\n\
movs r1, 0x1\n\
movs r2, 0x1\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
_080B584A:\n\
ldr r0, _080B588C @ =gPCText_PlayersPC\n\
movs r1, 0x1\n\
movs r2, 0x3\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
movs r4, 0\n\
str r4, [sp]\n\
adds r0, r5, 0x1\n\
@@ -1096,8 +1096,8 @@ _080B588C: .4byte gPCText_PlayersPC\n\
void ScriptMenu_DisplayPCStartupPrompt(void)
{
- MenuDisplayMessageBox();
- MenuPrint(gPCText_WhichPCShouldBeAccessed, 2, 15);
+ Menu_DisplayDialogueFrame();
+ Menu_PrintText(gPCText_WhichPCShouldBeAccessed, 2, 15);
}
#define tState data[0]
@@ -1122,7 +1122,7 @@ static void Task_PokemonPicWindow(u8 taskId)
task->tState++;
break;
case 3:
- MenuZeroFillWindowRect(task->tWindowX, task->tWindowY, task->tWindowX + 9, task->tWindowY + 10);
+ Menu_EraseWindowRect(task->tWindowX, task->tWindowY, task->tWindowX + 9, task->tWindowY + 10);
DestroyTask(taskId);
break;
}
@@ -1139,7 +1139,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y)
}
else
{
- MenuDrawTextWindow(x, y, x + 9, y + 10);
+ Menu_DrawStdWindowFrame(x, y, x + 9, y + 10);
taskId = CreateTask(Task_PokemonPicWindow, 0x50);
gTasks[taskId].tState = 0;
gTasks[taskId].tMonSpecies = species;
diff --git a/src/field/secret_base.c b/src/field/secret_base.c
index 2e4138a3b..203b57867 100644
--- a/src/field/secret_base.c
+++ b/src/field/secret_base.c
@@ -913,7 +913,7 @@ void Task_SecretBasePC_Registry(u8 taskId)
taskData[1] = 0;
taskData[2] = 0;
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80BC7D8(taskId);
gTasks[taskId].func = sub_80BC824;
@@ -948,8 +948,8 @@ void sub_80BC6B0(u8 taskId)
if (sub_80BC268(i) == TRUE)
{
sub_80BC190(gStringVar1, i);
- MenuFillWindowRectWithBlankTile(18, 2 * n + 2, 28, 2 * n + 3);
- MenuPrint(gStringVar1, 18, 2 * n + 2);
+ Menu_BlankWindowRect(18, 2 * n + 2, 28, 2 * n + 3);
+ Menu_PrintText(gStringVar1, 18, 2 * n + 2);
if (++n == 8)
break;
}
@@ -957,11 +957,11 @@ void sub_80BC6B0(u8 taskId)
if (n < 8)
{
- MenuFillWindowRectWithBlankTile(18, 2 * n + 2, 28, 2 * n + 3);
- MenuPrint(gUnknownText_Exit, 18, 2 * n + 2);
+ Menu_BlankWindowRect(18, 2 * n + 2, 28, 2 * n + 3);
+ Menu_PrintText(gUnknownText_Exit, 18, 2 * n + 2);
DestroyVerticalScrollIndicator(1);
if (n != 7)
- MenuFillWindowRectWithBlankTile(18, ((n << 25) + (1 << 26)) >> 24, 28, 18); // the shifts are needed to match
+ Menu_BlankWindowRect(18, ((n << 25) + (1 << 26)) >> 24, 28, 18); // the shifts are needed to match
}
else
CreateVerticalScrollIndicators(1, 0xbc, 0x98);
@@ -975,7 +975,7 @@ void sub_80BC6B0(u8 taskId)
void sub_80BC7D8(u8 taskId)
{
u16 *taskData = gTasks[taskId].data;
- MenuDrawTextWindow(17, 0, 29, 19);
+ Menu_DrawStdWindowFrame(17, 0, 29, 19);
InitMenu(0, 18, 2, taskData[3] + 1, taskData[1], 11);
sub_80BC6B0(taskId);
@@ -990,7 +990,7 @@ void sub_80BC824(u8 taskId)
if (taskData[1])
{
PlaySE(5);
- taskData[1] = MoveMenuCursor(-1);
+ taskData[1] = Menu_MoveCursor(-1);
}
else if (taskData[2])
{
@@ -1013,7 +1013,7 @@ void sub_80BC824(u8 taskId)
else
{
PlaySE(5);
- taskData[1] = MoveMenuCursor(1);
+ taskData[1] = Menu_MoveCursor(1);
}
}
else if (gMain.newKeys & A_BUTTON)
@@ -1021,13 +1021,13 @@ void sub_80BC824(u8 taskId)
PlaySE(5);
if (taskData[1] + taskData[2] == taskData[0])
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80BCC54(taskId);
}
else
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
taskData[4] = sub_80BC948(taskData[1] + taskData[2]);
sub_80BC980(taskId);
}
@@ -1035,8 +1035,8 @@ void sub_80BC824(u8 taskId)
else if (gMain.newKeys & B_BUTTON)
{
PlaySE(5);
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80BCC54(taskId);
}
}
@@ -1066,8 +1066,8 @@ void sub_80BC980(u8 taskId)
{
PauseVerticalScrollIndicator(0);
PauseVerticalScrollIndicator(1);
- MenuDrawTextWindow(1, 0, 12, 5);
- PrintMenuItems(2, 1, 2, (const struct MenuAction *)gUnknown_083D13D4);
+ Menu_DrawStdWindowFrame(1, 0, 12, 5);
+ Menu_PrintItems(2, 1, 2, (const struct MenuAction *)gUnknown_083D13D4);
InitMenu(0, 2, 1, 2, 0, 10);
gTasks[taskId].func = sub_80BC9E4;
}
@@ -1076,24 +1076,24 @@ void sub_80BC9E4(u8 taskId)
{
if (gMain.newAndRepeatedKeys & DPAD_UP)
{
- if (GetMenuCursorPos())
+ if (Menu_GetCursorPos())
{
PlaySE(5);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
{
- if (GetMenuCursorPos() != 1)
+ if (Menu_GetCursorPos() != 1)
{
PlaySE(5);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
}
else if (gMain.newKeys & A_BUTTON)
{
PlaySE(5);
- gUnknown_083D13D4[GetMenuCursorPos()].func(taskId);
+ gUnknown_083D13D4[Menu_GetCursorPos()].func(taskId);
}
else if (gMain.newKeys & B_BUTTON)
{
@@ -1108,8 +1108,8 @@ void sub_80BCA84(u8 taskId)
DestroyVerticalScrollIndicator(0);
DestroyVerticalScrollIndicator(1);
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80BC190(gStringVar1, taskData[4]);
StringExpandPlaceholders(gStringVar4, gOtherText_OkayToDeleteFromRegistry);
@@ -1126,7 +1126,7 @@ void sub_80BCB10(u8 taskId)
{
s16 *taskData = gTasks[taskId].data;
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
gSaveBlock1.secretBases[taskData[4]].sbr_field_1_6 = 0;
taskData[0]--;
@@ -1147,13 +1147,13 @@ void sub_80BCB10(u8 taskId)
void sub_80BCB90(u8 taskId)
{
- MenuZeroFillWindowRect(20, 8, 26, 13);
+ Menu_EraseWindowRect(20, 8, 26, 13);
DisplayItemMessageOnField(taskId, gOtherText_RegisteredDataDeleted, sub_80BCB10, 0);
}
void sub_80BCBC0(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_EraseWindowRect(0, 0, 29, 19);
sub_80BC7D8(taskId);
gTasks[taskId].func = sub_80BC824;
@@ -1164,7 +1164,7 @@ void sub_80BCBF8(u8 taskId)
s16 *taskData = gTasks[taskId].data;
InitMenu(0, 18, 2, taskData[3] + 1, taskData[1], 11);
- MenuZeroFillWindowRect(1, 0, 12, 5);
+ Menu_EraseWindowRect(1, 0, 12, 5);
StartVerticalScrollIndicators(0);
StartVerticalScrollIndicators(1);
diff --git a/src/field/shop.c b/src/field/shop.c
index 23d668fc7..1dc6ba0cd 100644
--- a/src/field/shop.c
+++ b/src/field/shop.c
@@ -15,7 +15,7 @@
#include "strings.h"
#include "task.h"
#include "tv.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
#include "field_map_obj.h"
#include "field_player_avatar.h"
#include "fieldmap.h"
@@ -84,14 +84,14 @@ u8 CreateShopMenu(u8 martType)
if (martType == MART_TYPE_0)
{
gMartInfo.numChoices = 2;
- MenuDrawTextWindow(0, 0, 10, 7);
- PrintMenuItemsReordered(1, 1, 3, sBuySellQuitMenuActions, gUnknown_083CC6E8);
+ Menu_DrawStdWindowFrame(0, 0, 10, 7);
+ Menu_PrintItemsReordered(1, 1, 3, sBuySellQuitMenuActions, gUnknown_083CC6E8);
}
else
{
gMartInfo.numChoices = 1;
- MenuDrawTextWindow(0, 0, 10, 5);
- PrintMenuItemsReordered(1, 1, 2, sBuySellQuitMenuActions, gUnknown_083CC6EB);
+ Menu_DrawStdWindowFrame(0, 0, 10, 5);
+ Menu_PrintItemsReordered(1, 1, 2, sBuySellQuitMenuActions, gUnknown_083CC6EB);
}
InitMenu(0, 1, 1, gMartInfo.numChoices + 1, 0, 9); // add 1 for cancel
@@ -126,7 +126,7 @@ void sub_80B2E38(u8 var)
if (gMartInfo.cursor) // can move cursor up?
{
PlaySE(SE_SELECT);
- gMartInfo.cursor = MoveMenuCursor(-1);
+ gMartInfo.cursor = Menu_MoveCursor(-1);
}
}
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
@@ -134,7 +134,7 @@ void sub_80B2E38(u8 var)
if (gMartInfo.cursor != gMartInfo.numChoices) // can move cursor down?
{
PlaySE(SE_SELECT);
- gMartInfo.cursor = MoveMenuCursor(1);
+ gMartInfo.cursor = Menu_MoveCursor(1);
}
}
else if (gMain.newKeys & A_BUTTON)
@@ -174,8 +174,8 @@ void sub_80B2F30(u8 taskId)
void HandleShopMenuQuit(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 11, 8);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 11, 8);
sub_80BE3BC();
ScriptContext2_Disable();
DestroyTask(taskId);
@@ -266,7 +266,7 @@ void BuyMenuDrawGraphics(void)
register u16 zero2 asm("r5");
sub_80F9438();
- remove_some_task();
+ ScanlineEffect_Stop();
REG_BG1HOFS = (zero2 = 0);
REG_BG1VOFS = zero2;
REG_BG2HOFS = zero2;
@@ -285,12 +285,12 @@ void BuyMenuDrawGraphics(void)
ResetPaletteFade();
ResetSpriteData();
ResetTasks();
- SetUpWindowConfig(&gWindowConfig_81E6DFC);
- InitMenuWindow(&gWindowConfig_81E6DFC);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6DFC);
+ InitMenuWindow(&gWindowTemplate_81E6DFC);
BuyMenuDrawMapGraphics();
gMartInfo.cursor = zero;
gMartInfo.choicesAbove = zero2;
- MenuZeroFillWindowRect(0, 0, 0x20, 0x20);
+ Menu_EraseWindowRect(0, 0, 0x20, 0x20);
OpenMoneyWindow(gSaveBlock1.money, 0, 0);
sub_80B3764(0, 7);
sub_80B37EC();
@@ -532,7 +532,7 @@ void sub_80B37F8(u8 taskId)
gStringVar1[1] = 0x14;
gStringVar1[2] = 0x6;
ConvertIntToDecimalStringN(&gStringVar1[3], gTasks[taskId].data[1], 1, 2);
- MenuPrint(gOtherText_xString1, 1, 11);
+ Menu_PrintText(gOtherText_xString1, 1, 11);
sub_80A3FA0(gBGTilemapBuffers[1], 1, 11, 12, 2, 0xC3E1);
}
@@ -557,7 +557,7 @@ void sub_80B389C(u16 itemId, u8 var2, bool32 hasControlCode)
stringPtr = &gStringVar1[3];
GetMoneyAmountText(stringPtr, (ItemId_GetPrice(itemId) >> GetPriceReduction(1)), 0x4);
- MenuPrint_PixelCoords(&gStringVar1[0], 0xCA, var2 << 3, 1);
+ Menu_PrintTextPixelCoords(&gStringVar1[0], 0xCA, var2 << 3, 1);
}
void sub_80B3930(u16 itemId, u8 var2, bool32 hasControlCode)
@@ -586,7 +586,7 @@ void sub_80B3930(u16 itemId, u8 var2, bool32 hasControlCode)
else
{
GetMoneyAmountText(stringPtr, gDecorations[itemId].price, 0x4);
- MenuPrint_PixelCoords(&gStringVar1[0], 0xCA, var2 << 3, 0x1);
+ Menu_PrintTextPixelCoords(&gStringVar1[0], 0xCA, var2 << 3, 0x1);
}
}
@@ -604,8 +604,8 @@ void sub_80B39D0(int var1, int var2, bool32 hasControlCode)
if (i != 8 && gMartInfo.choicesAbove + i == gMartInfo.itemCount)
{
- MenuFillWindowRectWithBlankTile(0xE, (i << 1) + 2, 0x1C, (i << 1) + 3);
- MenuPrint(gOtherText_CancelNoTerminator, 0xE, (i << 1) + 2);
+ Menu_BlankWindowRect(0xE, (i << 1) + 2, 0x1C, (i << 1) + 3);
+ Menu_PrintText(gOtherText_CancelNoTerminator, 0xE, (i << 1) + 2);
}
}
@@ -659,7 +659,7 @@ void sub_80B3BD0(u8 taskId)
void sub_80B3BF4(u8 taskId)
{
- MenuZeroFillWindowRect(0x7, 0x8, 0xD, 0xD);
+ Menu_EraseWindowRect(0x7, 0x8, 0xD, 0xD);
sub_80A3FA0(gBGTilemapBuffers[1], 8, 9, 4, 4, 0);
sub_80B379C();
sub_80B3420();
@@ -706,7 +706,7 @@ void sub_80B3D38(u8 taskId)
void sub_80B3D7C(u8 taskId)
{
sub_80B39D0(gMartInfo.cursor, gMartInfo.cursor, 0);
- MenuZeroFillWindowRect(0x7, 0x8, 0xD, 0xD);
+ Menu_EraseWindowRect(0x7, 0x8, 0xD, 0xD);
sub_80A3FA0(gBGTilemapBuffers[1], 0x8, 0x9, 0x4, 0x4, 0);
sub_80B4378(taskId);
}
@@ -719,7 +719,7 @@ void sub_80B3DC8(u8 taskId)
if (gMain.newKeys & A_BUTTON)
{
gMartTotalCost = (ItemId_GetPrice(gMartInfo.itemList[gMartInfo.choicesAbove + gMartInfo.cursor]) >> GetPriceReduction(1)) * gTasks[taskId].data[1]; // set total cost of your purchase.
- MenuZeroFillWindowRect(0, 0xA, 0xD, 0xD);
+ Menu_EraseWindowRect(0, 0xA, 0xD, 0xD);
sub_80A3FA0(gBGTilemapBuffers[1], 0x1, 0xB, 0xC, 0x2, 0);
sub_80B379C();
sub_80B3420();
@@ -741,7 +741,7 @@ void sub_80B3EFC(u8 taskId)
u16 var;
gTasks[taskId].data[1] = 1;
- MenuDrawTextWindow(0, 0xA, 0xD, 0xD);
+ Menu_DrawStdWindowFrame(0, 0xA, 0xD, 0xD);
sub_80B37F8(taskId);
var = gSaveBlock1.money / (ItemId_GetPrice(gMartInfo.itemList[gMartInfo.choicesAbove + gMartInfo.cursor]) >> GetPriceReduction(1));
@@ -1049,7 +1049,7 @@ void sub_80B40E8(u8 taskId) // Mart_DoCursorAction
else // if the cursor is not 0, choicesAbove cannot be updated yet since the cursor is at the top of the menu, so update cursor.
{
PlaySE(SE_SELECT);
- gMartInfo.cursor = MoveMenuCursor(-1); // move cursor up
+ gMartInfo.cursor = Menu_MoveCursor(-1); // move cursor up
sub_80B3A70();
}
}
@@ -1070,7 +1070,7 @@ void sub_80B40E8(u8 taskId) // Mart_DoCursorAction
else if (gMartInfo.cursor != gMartInfo.itemCount)
{
PlaySE(SE_SELECT);
- gMartInfo.cursor = MoveMenuCursor(1);
+ gMartInfo.cursor = Menu_MoveCursor(1);
sub_80B3A70();
}
}
@@ -1084,8 +1084,8 @@ void sub_80B40E8(u8 taskId) // Mart_DoCursorAction
PauseVerticalScrollIndicator(1);
sub_80F979C(1, 1);
sub_80B39D0(gMartInfo.cursor, gMartInfo.cursor, 1);
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0xC, 0xD, 0x13);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0xC, 0xD, 0x13);
if (gMartInfo.martType == MART_TYPE_0)
{
@@ -1139,8 +1139,8 @@ void sub_80B40E8(u8 taskId) // Mart_DoCursorAction
void sub_80B4378(u8 taskId)
{
- MenuZeroFillWindowRect(0, 0xE, 0x1D, 0x13);
- MenuZeroFillWindowRect(0, 0xA, 0xD, 0xD);
+ Menu_EraseWindowRect(0, 0xE, 0x1D, 0x13);
+ Menu_EraseWindowRect(0, 0xA, 0xD, 0xD);
sub_80A3FA0(gBGTilemapBuffers[1], 0x1, 0xB, 0xC, 0x2, 0);
sub_80B3420();
sub_80B3764(6, 7);
diff --git a/src/field/slot_machine.c b/src/field/slot_machine.c
index a524790b4..9ff3a037c 100644
--- a/src/field/slot_machine.c
+++ b/src/field/slot_machine.c
@@ -400,8 +400,8 @@ static void SlotMachineSetup_0_1(void)
static void SlotMachineSetup_3_0(void)
{
- SetUpWindowConfig(&gWindowConfig_81E7128);
- InitMenuWindow(&gWindowConfig_81E7128);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E7128);
+ InitMenuWindow(&gWindowTemplate_81E7128);
}
static void SlotMachineSetup_4_0(void)
@@ -584,8 +584,8 @@ static bool8 sub_8101E3C(struct Task *task)
static void sub_8101F2C(const u8 *str)
{
- MenuDisplayMessageBox();
- MenuPrint(str, 2, 15);
+ Menu_DisplayDialogueFrame();
+ Menu_PrintText(str, 2, 15);
}
static bool8 sub_8101F44(struct Task *task)
@@ -599,7 +599,7 @@ static bool8 sub_8101F60(struct Task *task)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
eSlotMachine->state = 5;
}
return FALSE;
@@ -850,10 +850,10 @@ static bool8 sub_8102318(struct Task *task)
static bool8 sub_8102344(struct Task *task)
{
- s8 input = ProcessMenuInputNoWrap_();
+ s8 input = Menu_ProcessInputNoWrap_();
if (input == 0)
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
sub_8103D8C(0);
sub_8103D8C(1);
sub_8103D8C(2);
@@ -862,7 +862,7 @@ static bool8 sub_8102344(struct Task *task)
}
else if (input == 1 || input == -1)
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
eSlotMachine->state = 5;
}
return FALSE;
@@ -879,7 +879,7 @@ static bool8 sub_81023B8(struct Task *task)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
eSlotMachine->state = 5;
}
return FALSE;
@@ -896,7 +896,7 @@ static bool8 sub_81023FC(struct Task *task)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
eSlotMachine->state = 27;
}
return FALSE;
@@ -2807,8 +2807,8 @@ static void sub_8104B80(struct Task *task)
{
sub_8104DA4();
sub_81065DC();
- BasicInitMenuWindow(&gWindowConfig_81E7144);
- MenuPrint_PixelCoords(gOtherText_ReelTime, 10, 32, 1);
+ BasicInitMenuWindow(&gWindowTemplate_81E7144);
+ Menu_PrintTextPixelCoords(gOtherText_ReelTime, 10, 32, 1);
BeginNormalPaletteFade(-1, 0, 16, 0, 0);
task->data[0]++;
}
@@ -2824,8 +2824,8 @@ static void sub_8104BC8(struct Task *task)
static void sub_8104BFC(struct Task *task)
{
- MenuZeroFillScreen();
- BasicInitMenuWindow(&gWindowConfig_81E7128);
+ Menu_EraseScreen();
+ BasicInitMenuWindow(&gWindowTemplate_81E7128);
sub_81064B8();
sub_8104CAC(task->data[1]);
sub_810423C(eSlotMachine->pikaPower);
diff --git a/src/field/start_menu.c b/src/field/start_menu.c
index dccf1714e..d6881cb01 100644
--- a/src/field/start_menu.c
+++ b/src/field/start_menu.c
@@ -28,7 +28,7 @@
#include "strings2.h"
#include "task.h"
#include "trainer_card.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
//Menu actions
enum {
@@ -193,8 +193,8 @@ static void BuildStartMenuActions_Link(void)
static void DisplaySafariBallsWindow(void)
{
sub_8072C44(gStringVar1, gNumSafariBalls, 12, 1);
- MenuDrawTextWindow(0, 0, 10, 5);
- MenuPrint(gOtherText_SafariStock, 1, 1);
+ Menu_DrawStdWindowFrame(0, 0, 10, 5);
+ Menu_PrintText(gOtherText_SafariStock, 1, 1);
}
//Prints n menu items starting at *index
@@ -204,7 +204,7 @@ static bool32 PrintStartMenuItemsMultistep(s16 *index, u32 n)
do
{
- MenuPrint(sStartMenuItems[sCurrentStartMenuActions[_index]].text, 23, 2 + _index * 2);
+ Menu_PrintText(sStartMenuItems[sCurrentStartMenuActions[_index]].text, 23, 2 + _index * 2);
_index++;
if (_index >= sNumStartMenuActions)
{
@@ -226,7 +226,7 @@ static bool32 InitStartMenuMultistep(s16 *step, s16 *index)
(*step)++;
break;
case 2:
- MenuDrawTextWindow(22, 0, 29, sNumStartMenuActions * 2 + 3);
+ Menu_DrawStdWindowFrame(22, 0, 29, sNumStartMenuActions * 2 + 3);
*index = 0;
(*step)++;
break;
@@ -271,7 +271,7 @@ void CreateStartMenuTask(void (*func)(u8))
{
u8 taskId;
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
taskId = CreateTask(Task_StartMenu, 0x50);
SetTaskFuncWithFollowupFunc(taskId, Task_StartMenu, func);
}
@@ -310,12 +310,12 @@ static u8 StartMenu_InputProcessCallback(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)
{
@@ -404,7 +404,7 @@ static u8 StartMenu_PlayerCallback(void)
//When player selects SAVE
static u8 StartMenu_SaveCallback(void)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
gCallback_03004AE8 = SaveCallback1;
return 0;
}
@@ -473,13 +473,13 @@ static u8 SaveCallback2(void)
return FALSE;
case SAVE_CANCELED:
//Go back to start menu
- MenuZeroFillScreen();
+ Menu_EraseScreen();
InitStartMenu();
gCallback_03004AE8 = StartMenu_InputProcessCallback;
return FALSE;
case SAVE_SUCCESS:
case SAVE_ERROR:
- MenuZeroFillScreen();
+ Menu_EraseScreen();
sub_8064E2C();
ScriptContext2_Disable();
return TRUE;
@@ -498,7 +498,7 @@ static u8 RunSaveDialogCallback(void)
{
if (savingComplete)
{
- if (!MenuUpdateWindowText())
+ if (!Menu_UpdateWindowText())
return 0;
}
savingComplete = FALSE;
@@ -514,7 +514,7 @@ void ScrSpecial_DoSaveDialog(void)
static void DisplaySaveMessageWithCallback(const u8 *ptr, u8 (*func)(void))
{
StringExpandPlaceholders(gStringVar4, ptr);
- MenuDisplayMessageBox();
+ Menu_DisplayDialogueFrame();
MenuPrintMessageDefaultCoords(gStringVar4);
savingComplete = TRUE;
saveDialogCallback = func;
@@ -547,7 +547,7 @@ static void sub_8071700(void)
static void HideSaveDialog(void)
{
- MenuZeroFillWindowRect(20, 8, 26, 13);
+ Menu_EraseWindowRect(20, 8, 26, 13);
}
static void SaveDialogStartTimeout(void)
@@ -579,7 +579,7 @@ static bool8 SaveDialogCheckForTimeoutAndKeypress(void)
static u8 SaveDialogCB_DisplayConfirmMessage(void)
{
- MenuZeroFillScreen();
+ Menu_EraseScreen();
HandleDrawSaveWindowInfo(0, 0);
DisplaySaveMessageWithCallback(gSaveText_WouldYouLikeToSave, SaveDialogCB_DisplayConfirmYesNoMenu);
return SAVE_IN_PROGRESS;
@@ -594,7 +594,7 @@ static u8 SaveDialogCB_DisplayConfirmYesNoMenu(void)
static u8 SaveDialogCB_ProcessConfirmYesNoMenu(void)
{
- switch (ProcessMenuInputNoWrap_())
+ switch (Menu_ProcessInputNoWrap_())
{
case 0: //YES
HideSaveDialog();
@@ -640,7 +640,7 @@ static u8 SaveDialogCB_DisplayOverwriteYesNoMenu(void)
static u8 SaveDialogCB_ProcessOverwriteYesNoMenu(void)
{
- switch (ProcessMenuInputNoWrap_())
+ switch (Menu_ProcessInputNoWrap_())
{
case 0: //YES
HideSaveDialog();
@@ -694,7 +694,7 @@ static u8 SaveDialogCB_DoSave(void)
static u8 SaveDialogCB_SaveSuccess(void)
{
- if (MenuUpdateWindowText())
+ if (Menu_UpdateWindowText())
{
PlaySE(SE_SAVE);
saveDialogCallback = SaveDialogCB_ReturnSuccess;
@@ -715,7 +715,7 @@ static u8 SaveDialogCB_ReturnSuccess(void)
static u8 SaveDialogCB_SaveError(void)
{
- if (MenuUpdateWindowText())
+ if (Menu_UpdateWindowText())
{
PlaySE(SE_BOO);
saveDialogCallback = SaveDialogCB_ReturnError;
@@ -750,7 +750,7 @@ static bool32 sub_80719FC(u8 *step)
REG_DISPCNT = 0;
SetVBlankCallback(NULL);
- remove_some_task();
+ ScanlineEffect_Stop();
DmaClear16(3, PLTT, PLTT_SIZE);
addr = (void *)VRAM;
size = 0x18000;
@@ -771,11 +771,11 @@ static bool32 sub_80719FC(u8 *step)
ResetSpriteData();
ResetTasks();
ResetPaletteFade();
- dp12_8087EA4();
+ ScanlineEffect_Clear();
break;
case 2:
- SetUpWindowConfig(&gWindowConfig_81E6CE4);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6CE4);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_BG0_ON;
break;
case 3:
@@ -821,8 +821,8 @@ static void Task_8071B64(u8 taskId)
switch (*step)
{
case 0:
- MenuDisplayMessageBox();
- MenuPrint(gSystemText_Saving, 2, 15);
+ Menu_DisplayDialogueFrame();
+ Menu_PrintText(gSystemText_Saving, 2, 15);
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
(*step)++;
break;
diff --git a/src/field/starter_choose.c b/src/field/starter_choose.c
index 701d4087a..418488774 100644
--- a/src/field/starter_choose.c
+++ b/src/field/starter_choose.c
@@ -14,7 +14,7 @@
#include "strings.h"
#include "task.h"
#include "trig.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
extern u16 gSpecialVar_Result;
extern struct SpriteTemplate gUnknown_02024E8C;
@@ -285,7 +285,7 @@ void CB2_ChooseStarter(void)
LZ77UnCompVram(&gBirchHelpGfx, (void *)VRAM);
LZ77UnCompVram(&gBirchBagTilemap, (void *)(VRAM + 0x3000));
LZ77UnCompVram(&gBirchGrassTilemap, (void *)(VRAM + 0x3800));
- remove_some_task();
+ ScanlineEffect_Stop();
ResetTasks();
ResetSpriteData();
ResetPaletteFade();
@@ -294,8 +294,8 @@ void CB2_ChooseStarter(void)
LoadCompressedObjectPic(&gUnknown_083F7794[0]);
LoadCompressedObjectPic(&gUnknown_083F77A4[0]);
LoadSpritePalettes(gUnknown_083F77B4);
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
savedIme = REG_IME;
@@ -355,8 +355,8 @@ static void MainCallback2(void)
static void Task_StarterChoose1(u8 taskId)
{
CreateStarterPokemonLabel(0xFF, gTasks[taskId].tStarterSelection);
- MenuDrawTextWindow(2, 14, 27, 19);
- MenuPrint(gOtherText_BirchInTrouble, 3, 15);
+ Menu_DrawStdWindowFrame(2, 14, 27, 19);
+ Menu_PrintText(gOtherText_BirchInTrouble, 3, 15);
gTasks[taskId].func = Task_StarterChoose2;
}
@@ -368,7 +368,7 @@ static void Task_StarterChoose2(u8 taskId)
{
u8 spriteId;
- MenuZeroFillWindowRect(
+ Menu_EraseWindowRect(
gStarterChoose_LabelCoords[selection][0],
gStarterChoose_LabelCoords[selection][1],
gStarterChoose_LabelCoords[selection][0] + 13,
@@ -424,9 +424,9 @@ static void Task_StarterChoose3(u8 taskId)
static void Task_StarterChoose4(u8 taskId)
{
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
- MenuDrawTextWindow(2, 14, 27, 19);
+ Menu_DrawStdWindowFrame(2, 14, 27, 19);
//"Do you choose this POKEMON?"
- MenuPrint(gOtherText_DoYouChoosePoke, 3, 15);
+ Menu_PrintText(gOtherText_DoYouChoosePoke, 3, 15);
DisplayYesNoMenu(21, 7, 1);
gTasks[taskId].func = Task_StarterChoose5;
}
@@ -435,7 +435,7 @@ static void Task_StarterChoose5(u8 taskId)
{
u8 spriteId;
- switch (ProcessMenuInputNoWrap_())
+ switch (Menu_ProcessInputNoWrap_())
{
case 0: // YES
//Return the starter choice and exit.
@@ -445,7 +445,7 @@ static void Task_StarterChoose5(u8 taskId)
case 1: // NO
case -1: // B button
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(21, 7, 27, 12);
+ Menu_EraseWindowRect(21, 7, 27, 12);
spriteId = gTasks[taskId].tPkmnSpriteId;
FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[spriteId].oam.paletteNum));
@@ -498,7 +498,7 @@ static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
if (prevSelection != 0xFF)
{
//Remove the old Pokemon label
- MenuZeroFillWindowRect(
+ Menu_EraseWindowRect(
gStarterChoose_LabelCoords[prevSelection][0],
gStarterChoose_LabelCoords[prevSelection][1],
gStarterChoose_LabelCoords[prevSelection][0] + 13,
@@ -527,7 +527,7 @@ static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
//Copy POKEMON string to label
StringCopy(labelText + dstIndex, gOtherText_Poke);
- MenuPrint(
+ Menu_PrintText(
labelText,
gStarterChoose_LabelCoords[selection][0],
gStarterChoose_LabelCoords[selection][1]);
@@ -535,7 +535,7 @@ static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
//Copy Pokemon name to label
sub_8072C74(labelText + 5, gSpeciesNames[species], 0x6B, 1);
- MenuPrint(
+ Menu_PrintText(
labelText,
gStarterChoose_LabelCoords[selection][0],
gStarterChoose_LabelCoords[selection][1] + 2);
@@ -574,7 +574,7 @@ static void CreateStarterPokemonLabel(u8 prevSelection, u8 selection)
adds r3, r1, 0x3\n\
lsls r3, 24\n\
lsrs r3, 24\n\
- bl MenuZeroFillWindowRect\n\
+ bl Menu_EraseWindowRect\n\
ldr r0, _0810A964 @ =0x04000040\n\
movs r1, 0\n\
strh r1, [r0]\n\
@@ -649,7 +649,7 @@ _0810A8CA:\n\
mov r0, sp\n\
adds r1, r4, 0\n\
adds r2, r5, 0\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
mov r0, sp\n\
movs r1, 0\n\
movs r2, 0xF\n\
@@ -669,7 +669,7 @@ _0810A8CA:\n\
lsrs r2, 24\n\
mov r0, sp\n\
adds r1, r4, 0\n\
- bl MenuPrint\n\
+ bl Menu_PrintText\n\
lsls r0, r4, 3\n\
adds r0, 0x4\n\
lsls r0, 24\n\
diff --git a/src/field/trader.c b/src/field/trader.c
index 61cb0b4a2..b4732ab15 100644
--- a/src/field/trader.c
+++ b/src/field/trader.c
@@ -100,7 +100,7 @@ void CreateAvailableDecorationsMenu(u8 taskId)
}
}
- MenuDrawTextWindow(0, 1, 12, numChoices * 2 + 2);
+ Menu_DrawStdWindowFrame(0, 1, 12, numChoices * 2 + 2);
for (i = 0; i < 4; i++)
{
@@ -108,18 +108,18 @@ void CreateAvailableDecorationsMenu(u8 taskId)
{
if (trader->unk1[i] > DECOR_REGISTEEL_DOLL)
{
- MenuPrint(gOtherText_FiveQuestionsAndSlash, 1, numDecorations * 2 + 2);
+ Menu_PrintText(gOtherText_FiveQuestionsAndSlash, 1, numDecorations * 2 + 2);
}
else
{
- MenuPrint(gDecorations[trader->unk1[i]].name, 1, numDecorations * 2 + 2);
+ Menu_PrintText(gDecorations[trader->unk1[i]].name, 1, numDecorations * 2 + 2);
}
numDecorations++;
}
}
- MenuPrint(gOtherText_CancelNoTerminator, 1, numDecorations * 2 + 2);
+ Menu_PrintText(gOtherText_CancelNoTerminator, 1, numDecorations * 2 + 2);
InitMenu(0, 1, 2, numChoices, 0, 11);
gTasks[taskId].data[1] = numDecorations;
}
@@ -135,8 +135,8 @@ void sub_8109B34(u8 taskId, u8 decorationId)
gSpecialVar_0x8004 = decorationId;
}
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 1, 12, 12);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 1, 12, 12);
DestroyTask(taskId);
EnableBothScriptContexts();
}
@@ -148,17 +148,17 @@ void Task_HandleGetDecorationMenuInput(u8 taskId)
if (gMain.newKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
}
else if (gMain.newKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
}
else if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
- gSpecialVar_0x8005 = GetMenuCursorPos();
+ gSpecialVar_0x8005 = Menu_GetCursorPos();
if (gTasks[taskId].data[1] == gSpecialVar_0x8005)
{
sub_8109B34(taskId, 0);
@@ -215,8 +215,8 @@ void ScrSpecial_TraderMenuGiveDecoration(void)
void sub_8109D04(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
DestroyVerticalScrollIndicator(0);
DestroyVerticalScrollIndicator(1);
sub_80F9520(gUnknown_020388F7, 8);
@@ -237,8 +237,8 @@ void sub_8109D04(u8 taskId)
void sub_8109DAC(u8 taskId)
{
- HandleDestroyMenuCursors();
- MenuZeroFillWindowRect(0, 0, 29, 19);
+ Menu_DestroyCursor();
+ Menu_EraseWindowRect(0, 0, 29, 19);
gSpecialVar_0x8006 = 0;
DestroyTask(taskId);
EnableBothScriptContexts();
diff --git a/src/field/tv.c b/src/field/tv.c
index e88e3c72b..e1eade130 100644
--- a/src/field/tv.c
+++ b/src/field/tv.c
@@ -864,7 +864,7 @@ void PutPokemonTodayCaughtOnAir(void)
sub_80BE138((TVShow *)pokemonToday);
pokemonToday->language = GAME_LANGUAGE;
pokemonToday->language2 = sub_80BDEAC(pokemonToday->nickname);
- StripExtCtrlCodes(pokemonToday->nickname);
+ Text_StripExtCtrlCodes(pokemonToday->nickname);
}
}
}
@@ -966,7 +966,7 @@ void InterviewAfter_BravoTrainerPokemonProfile(void)
sub_80BE160((TVShow *)bravoTrainerNew);
bravoTrainerNew->language = GAME_LANGUAGE;
bravoTrainerNew->var1f = sub_80BDEAC(bravoTrainerNew->pokemonNickname);
- StripExtCtrlCodes(bravoTrainerNew->pokemonNickname);
+ Text_StripExtCtrlCodes(bravoTrainerNew->pokemonNickname);
}
}
@@ -1075,7 +1075,7 @@ void sub_80BE478(void)
sub_80BE160((TVShow *)nameRaterShow);
nameRaterShow->language = GAME_LANGUAGE;
nameRaterShow->pokemonNameLanguage = sub_80BDEAC(nameRaterShow->pokemonName);
- StripExtCtrlCodes(nameRaterShow->pokemonName);
+ Text_StripExtCtrlCodes(nameRaterShow->pokemonName);
}
}
@@ -1138,7 +1138,7 @@ void InterviewAfter_PkmnFanClubOpinions(void)
sub_80BE160((TVShow *)fanclubOpinions);
fanclubOpinions->language = GAME_LANGUAGE;
fanclubOpinions->var0E = sub_80BDEAC(fanclubOpinions->var10);
- StripExtCtrlCodes(fanclubOpinions->var10);
+ Text_StripExtCtrlCodes(fanclubOpinions->var10);
}
void InterviewAfter_DummyShow4(void)
diff --git a/src/field/use_pokeblock.c b/src/field/use_pokeblock.c
index 354193c14..8ea93aab8 100644
--- a/src/field/use_pokeblock.c
+++ b/src/field/use_pokeblock.c
@@ -116,7 +116,7 @@ static void sub_81365A0(void);
static void sub_81365C8(void);
static void sub_8136638(void);
static void sub_81368A4(void);
-void sub_8089668(void);
+void ScanlineEffect_InitHBlankDmaTransfer(void);
static void sub_8136B44(void);
static u8 sub_81370E4(u8);
static void sub_8136BB8(void);
@@ -193,7 +193,7 @@ static void sub_8136264(void)
ProcessSpriteCopyRequests();
TransferPlttBuffer();
sub_80F5CDC(6);
- sub_8089668();
+ ScanlineEffect_InitHBlankDmaTransfer();
}
static void launch_c3_walk_stairs_and_run_once(void (*const func)(void))
@@ -227,11 +227,11 @@ static void sub_8136294(void)
gUnknown_02039304->unk50++;
break;
case 3:
- SetUpWindowConfig(&gWindowConfig_81E7080);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E7080);
gUnknown_02039304->unk50++;
break;
case 4:
- MultistepInitMenuWindowBegin(&gWindowConfig_81E7080);
+ MultistepInitMenuWindowBegin(&gWindowTemplate_81E7080);
gUnknown_02039304->unk50++;
break;
case 5:
@@ -609,28 +609,28 @@ static void sub_8136BB8(void)
GetMonData(&gPlayerParty[sub_81370A4(gUnknown_083DFEC4->unk87DC)], MON_DATA_NICKNAME, gUnknown_02039304->stringBuffer);
StringGetEnd10(gUnknown_02039304->stringBuffer);
StringAppend(gUnknown_02039304->stringBuffer, gOtherText_GetsAPokeBlock);
- BasicInitMenuWindow(&gWindowConfig_81E709C);
- MenuDrawTextWindow(0, 16, 29, 19);
- MenuPrint(gUnknown_02039304->stringBuffer, 1, 17);
+ BasicInitMenuWindow(&gWindowTemplate_81E709C);
+ Menu_DrawStdWindowFrame(0, 16, 29, 19);
+ Menu_PrintText(gUnknown_02039304->stringBuffer, 1, 17);
DisplayYesNoMenu(23, 10, 1);
- MoveMenuCursor(0);
+ Menu_MoveCursor(0);
}
static s8 sub_8136C40(void)
{
- s8 retval = ProcessMenuInputNoWrap();
+ s8 retval = Menu_ProcessInputNoWrap();
if ((u8)(retval + 1) < 3)
{
- MenuZeroFillScreen();
- BasicInitMenuWindow(&gWindowConfig_81E7080);
+ Menu_EraseScreen();
+ BasicInitMenuWindow(&gWindowTemplate_81E7080);
}
return retval;
}
static void sub_8136C6C(void)
{
- BasicInitMenuWindow(&gWindowConfig_81E709C);
- MenuDrawTextWindow(0, 16, 29, 19);
+ BasicInitMenuWindow(&gWindowTemplate_81E709C);
+ Menu_DrawStdWindowFrame(0, 16, 29, 19);
for (gUnknown_02039304->unk53 = 0; gUnknown_02039304->unk53 < 5 && gUnknown_02039304->unk61[gUnknown_02039304->unk53] == 0; gUnknown_02039304->unk53++);
if (gUnknown_02039304->unk53 < 5)
{
@@ -666,21 +666,21 @@ static bool8 sub_8136D00(void)
static void sub_8136D60(void)
{
- BasicInitMenuWindow(&gWindowConfig_81E709C);
- MenuDrawTextWindow(0, 16, 29, 19);
- MenuPrint(gOtherText_WontEat, 1, 17);
+ BasicInitMenuWindow(&gWindowTemplate_81E709C);
+ Menu_DrawStdWindowFrame(0, 16, 29, 19);
+ Menu_PrintText(gOtherText_WontEat, 1, 17);
}
static void sub_8136D8C(void)
{
- MenuZeroFillScreen();
- BasicInitMenuWindow(&gWindowConfig_81E7080);
+ Menu_EraseScreen();
+ BasicInitMenuWindow(&gWindowTemplate_81E7080);
}
static void Pokeblock_MenuWindowTextPrint(const u8 *message)
{
- MenuDrawTextWindow(0, 16, 29, 19);
- MenuPrint(message, 1, 17);
+ Menu_DrawStdWindowFrame(0, 16, 29, 19);
+ Menu_PrintText(message, 1, 17);
}
#ifdef NONMATCHING
diff --git a/src/field/wallclock.c b/src/field/wallclock.c
index 2892d09f9..aaa7f9ae8 100644
--- a/src/field/wallclock.c
+++ b/src/field/wallclock.c
@@ -10,7 +10,7 @@
#include "strings2.h"
#include "task.h"
#include "trig.h"
-#include "unknown_task.h"
+#include "scanline_effect.h"
extern u16 gSpecialVar_0x8004;
extern u8 gMiscClock_Gfx[];
@@ -229,15 +229,15 @@ static void LoadWallClockGraphics(void)
LoadPalette(gMiscClockMale_Pal, 0, 32);
else
LoadPalette(gMiscClockFemale_Pal, 0, 32);
- remove_some_task();
+ ScanlineEffect_Stop();
ResetTasks();
ResetSpriteData();
ResetPaletteFade();
FreeAllSpritePalettes();
LoadCompressedObjectPic(&gUnknown_083F7A90[0]);
LoadSpritePalettes(gUnknown_083F7AA0);
- SetUpWindowConfig(&gWindowConfig_81E6C3C);
- InitMenuWindow(&gWindowConfig_81E6CE4);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C3C);
+ InitMenuWindow(&gWindowTemplate_81E6CE4);
}
static void WallClockInit(void)
@@ -414,10 +414,10 @@ static void Task_SetClock2(u8 taskId)
//Ask player "Is this the correct time?"
static void Task_SetClock3(u8 taskId)
{
- MenuDrawTextWindow(2, 16, 27, 19);
- MenuPrint(gOtherText_CorrectTimePrompt, 3, 17);
- MenuDrawTextWindow(23, 8, 29, 13);
- PrintMenuItems(24, 9, 2, gMenuYesNoItems);
+ Menu_DrawStdWindowFrame(2, 16, 27, 19);
+ Menu_PrintText(gOtherText_CorrectTimePrompt, 3, 17);
+ Menu_DrawStdWindowFrame(23, 8, 29, 13);
+ Menu_PrintItems(24, 9, 2, gMenuYesNoItems);
InitMenu(0, 24, 9, 2, 1, 5);
gTasks[taskId].func = Task_SetClock4;
}
@@ -425,7 +425,7 @@ static void Task_SetClock3(u8 taskId)
//Get menu selection
static void Task_SetClock4(u8 taskId)
{
- switch (ProcessMenuInputNoWrap_())
+ switch (Menu_ProcessInputNoWrap_())
{
case 0: //YES
PlaySE(SE_SELECT);
@@ -433,10 +433,10 @@ static void Task_SetClock4(u8 taskId)
return;
case -1: //B button
case 1: //NO
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
PlaySE(SE_SELECT);
- MenuZeroFillWindowRect(23, 8, 29, 13);
- MenuZeroFillWindowRect(2, 16, 27, 19);
+ Menu_EraseWindowRect(23, 8, 29, 13);
+ Menu_EraseWindowRect(2, 16, 27, 19);
gTasks[taskId].func = Task_SetClock2; //Go back and let player adjust clock
}
}