summaryrefslogtreecommitdiff
path: root/src/battle
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle')
-rw-r--r--src/battle/battle_2.c20
-rw-r--r--src/battle/battle_4.c20
-rw-r--r--src/battle/battle_controller_linkopponent.c2
-rw-r--r--src/battle/battle_controller_linkpartner.c2
-rw-r--r--src/battle/battle_controller_opponent.c2
-rw-r--r--src/battle/battle_controller_player.c66
-rw-r--r--src/battle/battle_controller_safari.c16
-rw-r--r--src/battle/battle_controller_wally.c18
-rw-r--r--src/battle/battle_party_menu.c8
-rw-r--r--src/battle/battle_records.c34
-rw-r--r--src/battle/reshow_battle_screen.c4
11 files changed, 96 insertions, 96 deletions
diff --git a/src/battle/battle_2.c b/src/battle/battle_2.c
index ae84e5585..249b67e0d 100644
--- a/src/battle/battle_2.c
+++ b/src/battle/battle_2.c
@@ -234,7 +234,7 @@ void InitBattle(void)
}
//sub_80895F8(gUnknown_081F9674.unk0, gUnknown_081F9674.unk4, gUnknown_081F9674.unk8);
sub_80895F8(gUnknown_081F9674);
- SetUpWindowConfig(&gWindowConfig_81E6C58);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C58);
ResetPaletteFade();
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
@@ -245,9 +245,9 @@ void InitBattle(void)
gUnknown_030041B0 = 0;
gUnknown_030041B8 = 0;
gBattleTerrain = BattleSetup_GetTerrain();
- InitWindowFromConfig(&gUnknown_03004210, &gWindowConfig_81E6C58);
- InitWindowFromConfig(&gUnknown_030041D0, &gWindowConfig_81E71D0);
- InitWindowFromConfig(&gUnknown_03004250, &gWindowConfig_81E71EC);
+ Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
+ Text_InitWindowWithTemplate(&gUnknown_030041D0, &gWindowTemplate_81E71D0);
+ Text_InitWindowWithTemplate(&gUnknown_03004250, &gWindowTemplate_81E71EC);
sub_800D6D4();
sub_800DAB8();
ResetSpriteData();
@@ -553,7 +553,7 @@ void sub_800F02C(void)
gUnknown_02023A00[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS);
gUnknown_02023A00[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
gUnknown_02023A00[i].gender = GetMonGender(&gPlayerParty[i]);
- StripExtCtrlCodes(nickname);
+ Text_StripExtCtrlCodes(nickname);
gUnknown_02023A00[i].language = GetMonData(&gPlayerParty[i], MON_DATA_LANGUAGE);
if (gUnknown_02023A00[i].language != 1)
PadNameString(nickname, 0);
@@ -898,7 +898,7 @@ void BattleMainCB2(void)
{
AnimateSprites();
BuildOamBuffer();
- sub_800374C(&gUnknown_03004210);
+ Text_UpdateWindowInBattle(&gUnknown_03004210);
UpdatePaletteFade();
RunTasks();
}
@@ -1210,7 +1210,7 @@ void c2_8011A1C(void)
gUnknown_03004DE0[0][i] = 0xFF10;
gUnknown_03004DE0[1][i] = 0xFF10;
}
- SetUpWindowConfig(&gWindowConfig_81E6C58);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C58);
ResetPaletteFade();
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
@@ -1221,9 +1221,9 @@ void c2_8011A1C(void)
gUnknown_030041B0 = 0;
gUnknown_030041B8 = 0;
- InitWindowFromConfig(&gUnknown_03004210, &gWindowConfig_81E6C58);
- InitWindowFromConfig(&gUnknown_030041D0, &gWindowConfig_81E71D0);
- InitWindowFromConfig(&gUnknown_03004250, &gWindowConfig_81E71EC);
+ Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
+ Text_InitWindowWithTemplate(&gUnknown_030041D0, &gWindowTemplate_81E71D0);
+ Text_InitWindowWithTemplate(&gUnknown_03004250, &gWindowTemplate_81E71EC);
sub_800D6D4();
LoadCompressedPalette(gUnknown_08D004E0, 0, 64);
sub_800D74C();
diff --git a/src/battle/battle_4.c b/src/battle/battle_4.c
index 5a20a8324..164329c1b 100644
--- a/src/battle/battle_4.c
+++ b/src/battle/battle_4.c
@@ -136,7 +136,7 @@ u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move);
void IncrementGameStat(u8 index);
u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
u16 GetPokedexHeightWeight(u16 national_num, u8 heightweight);
-u8 sub_814A5C0(u8 a1, u16 a2, u8 a3, u16 a4, u8 a5);
+u8 MenuCursor_Create814A5C0(u8 a1, u16 a2, u8 a3, u16 a4, u8 a5);
void DestroyMenuCursor(void);
void sub_802BC6C(void);
u8 sub_809FA30(void);
@@ -155,7 +155,7 @@ u8 Overworld_GetMapTypeOfSaveblockLocation(void);
u8 CalculatePlayerPartyCount(void);
u16 Sqrt(u32 num);
u8 sub_809070C(u16 nationalNum, u32 TiD, u32 PiD); //task prepare poke dex display
-void sub_814A880(u8 a1, u8 a2);
+void MenuCursor_SetPos814A880(u8 a1, u8 a2);
u8 CheckMoveLimitations(u8 bank, u8 unusable_moves, u8 flags);
bool8 IsLinkDoubleBattle(void);
void sub_8094B6C(u8 bank, u8 partyID, u8 r2);
@@ -10767,9 +10767,9 @@ void atk59_handlelearnnewmove(void)
void sub_8023A80(void)
{
sub_802BBD4(0x18, 8, 0x1D, 0xD, 0);
- InitWindow(&gUnknown_03004210, BattleText_YesNo, 0x100, 0x19, 0x9);
- sub_8002F44(&gUnknown_03004210);
- sub_814A5C0(0, 0xFFFF, 0xC, 0x2D9F, 0x20);
+ Text_InitWindow(&gUnknown_03004210, BattleText_YesNo, 0x100, 0x19, 0x9);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
+ MenuCursor_Create814A5C0(0, 0xFFFF, 0xC, 0x2D9F, 0x20);
}
void sub_8023AD8(void)
@@ -11714,9 +11714,9 @@ _08024AC4:\n\
str r0, [sp]\n\
adds r0, r4, 0\n\
movs r3, 0xC\n\
- bl InitWindow\n\
+ bl Text_InitWindow\n\
adds r0, r4, 0\n\
- bl sub_8002F44\n\
+ bl Text_PrintWindow8002F44\n\
ldr r1, _08024AEC @ =gSharedMem\n\
ldr r2, _08024AF0 @ =0x0001609c\n\
adds r1, r2\n\
@@ -11835,9 +11835,9 @@ _08024BC0:\n\
str r0, [sp]\n\
adds r0, r4, 0\n\
movs r3, 0xC\n\
- bl InitWindow\n\
+ bl Text_InitWindow\n\
adds r0, r4, 0\n\
- bl sub_8002F44\n\
+ bl Text_PrintWindow8002F44\n\
ldr r1, _08024BFC @ =gSharedMem\n\
ldr r0, _08024C00 @ =0x0001609c\n\
adds r1, r0\n\
@@ -17333,7 +17333,7 @@ _0802BC68: .4byte 0x00001025\n\
void sub_802BC6C(void)
{
- sub_814A880(0xC8, ((gBattleCommunication[1] << 28) + 1207959552) >> 24); //what could that be?
+ MenuCursor_SetPos814A880(0xC8, ((gBattleCommunication[1] << 28) + 1207959552) >> 24); //what could that be?
}
void nullsub_6(void)
diff --git a/src/battle/battle_controller_linkopponent.c b/src/battle/battle_controller_linkopponent.c
index 54181bc21..69306b725 100644
--- a/src/battle/battle_controller_linkopponent.c
+++ b/src/battle/battle_controller_linkopponent.c
@@ -1413,7 +1413,7 @@ void LinkOpponentHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
- sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
gBattleBankFunc[gActiveBank] = sub_8037C2C;
}
diff --git a/src/battle/battle_controller_linkpartner.c b/src/battle/battle_controller_linkpartner.c
index 2c78d4a82..c86c337d9 100644
--- a/src/battle/battle_controller_linkpartner.c
+++ b/src/battle/battle_controller_linkpartner.c
@@ -1358,7 +1358,7 @@ void LinkPartnerHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
- sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
gBattleBankFunc[gActiveBank] = sub_811DFA0;
}
diff --git a/src/battle/battle_controller_opponent.c b/src/battle/battle_controller_opponent.c
index ab7b6944b..622e3e9f9 100644
--- a/src/battle/battle_controller_opponent.c
+++ b/src/battle/battle_controller_opponent.c
@@ -1407,7 +1407,7 @@ void OpponentHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
- sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
gBattleBankFunc[gActiveBank] = sub_80331D0;
}
diff --git a/src/battle/battle_controller_player.c b/src/battle/battle_controller_player.c
index f992e3e51..489581132 100644
--- a/src/battle/battle_controller_player.c
+++ b/src/battle/battle_controller_player.c
@@ -744,9 +744,9 @@ void sub_802C68C(void)
else
gUnknown_03004344 = gMoveSelectionCursor[gActiveBank] + 1;
sub_802E3B4(gUnknown_03004344, 27);
- FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
- InitWindow(&gUnknown_03004210, BattleText_SwitchWhich, 0x290, 0x17, 0x37);
- sub_8002F44(&gUnknown_03004210);
+ Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
+ Text_InitWindow(&gUnknown_03004210, BattleText_SwitchWhich, 0x290, 0x17, 0x37);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
gBattleBankFunc[gActiveBank] = sub_802CA60;
}
}
@@ -853,9 +853,9 @@ void sub_802CA60(void)
gBattleBankFunc[gActiveBank] = sub_802C68C;
gMoveSelectionCursor[gActiveBank] = gUnknown_03004344;
sub_802E3B4(gMoveSelectionCursor[gActiveBank], 0);
- FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
- InitWindow(&gUnknown_03004210, BattleText_PP, 0x290, 0x17, 0x37);
- sub_8002F44(&gUnknown_03004210);
+ Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
+ Text_InitWindow(&gUnknown_03004210, BattleText_PP, 0x290, 0x17, 0x37);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
sub_802E220();
sub_802E2D4();
}
@@ -866,9 +866,9 @@ void sub_802CA60(void)
sub_802E3B4(gMoveSelectionCursor[gActiveBank], 0);
sub_802E12C(gMoveSelectionCursor[gActiveBank], BattleText_Format);
gBattleBankFunc[gActiveBank] = sub_802C68C;
- FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
- InitWindow(&gUnknown_03004210, BattleText_PP, 0x290, 0x17, 0x37);
- sub_8002F44(&gUnknown_03004210);
+ Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
+ Text_InitWindow(&gUnknown_03004210, BattleText_PP, 0x290, 0x17, 0x37);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
sub_802E220();
sub_802E2D4();
}
@@ -1557,13 +1557,13 @@ void sub_802E12C(s32 a, const u8 *b)
StringCopy(gDisplayedStringBattle, b);
StringAppend(gDisplayedStringBattle, gMoveNames[r4->moves[a]]);
- InitWindow(
+ Text_InitWindow(
&gUnknown_03004210,
gDisplayedStringBattle,
0x300 + a * 20,
(a & 1) ? 11 : 1,
(a < 2) ? 0x37 : 0x39);
- sub_8002F44(&gUnknown_03004210);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
void sub_802E1B0(void)
@@ -1572,7 +1572,7 @@ void sub_802E1B0(void)
s32 i;
gUnknown_03004348 = 0;
- FillWindowRect(&gUnknown_03004210, 0x1016, 1, 0x37, 0x14, 0x3A);
+ Text_FillWindowRect(&gUnknown_03004210, 0x1016, 1, 0x37, 0x14, 0x3A);
for (i = 0; i < 4; i++)
{
nullsub_7(i);
@@ -1601,8 +1601,8 @@ void sub_802E220(void)
str = ConvertIntToDecimalStringN(str, r4->pp[gMoveSelectionCursor[gActiveBank]], 1, 2);
*str++ = CHAR_SLASH;
ConvertIntToDecimalStringN(str, r4->unkC[gMoveSelectionCursor[gActiveBank]], 1, 2);
- InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 0x2A2, 0x19, 0x37);
- sub_8002F44(&gUnknown_03004210);
+ Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 0x2A2, 0x19, 0x37);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
}
@@ -1613,8 +1613,8 @@ void sub_802E2D4(void)
{
if (gBattleBufferA[gActiveBank][2] == 1)
{
- FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
- InitWindow(&gUnknown_03004210, BattleText_ForgetMove, 0x290, 0x13, 0x37);
+ Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x37, 0x1C, 0x3A);
+ Text_InitWindow(&gUnknown_03004210, BattleText_ForgetMove, 0x290, 0x13, 0x37);
}
else
{
@@ -1623,10 +1623,10 @@ void sub_802E2D4(void)
str = StringCopy(str, BattleText_Format);
StringCopy(str, gTypeNames[gBattleMoves[r4->moves[gMoveSelectionCursor[gActiveBank]]].type]);
- FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x39, 0x1C, 0x3A);
- InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 0x2C0, 0x17, 0x39);
+ Text_FillWindowRect(&gUnknown_03004210, 0x1016, 0x17, 0x39, 0x1C, 0x3A);
+ Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 0x2C0, 0x17, 0x39);
}
- sub_8002F44(&gUnknown_03004210);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
const u8 gUnknown_081FAE89[][2] =
@@ -1652,7 +1652,7 @@ const u8 gUnknown_081FAE91[][2] =
void sub_802E3B4(u8 a, int unused)
{
sub_814A958(0x48);
- sub_814A880(gUnknown_081FAE89[a][0], gUnknown_081FAE89[a][1]);
+ MenuCursor_SetPos814A880(gUnknown_081FAE89[a][0], gUnknown_081FAE89[a][1]);
}
void nullsub_7(u8 a)
@@ -1662,7 +1662,7 @@ void nullsub_7(u8 a)
void sub_802E3E4(u8 a, int unused)
{
sub_814A958(0x2A);
- sub_814A880(gUnknown_081FAE91[a][0], gUnknown_081FAE91[a][1]);
+ MenuCursor_SetPos814A880(gUnknown_081FAE91[a][0], gUnknown_081FAE91[a][1]);
}
void nullsub_8(u8 a)
@@ -1697,7 +1697,7 @@ void b_link_standby_message(void)
{
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
- sub_8002EB0(&gUnknown_03004210, BattleText_LinkStandby, 0x90, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, BattleText_LinkStandby, 0x90, 2, 15);
}
}
@@ -2562,7 +2562,7 @@ void PlayerHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
- sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
gBattleBankFunc[gActiveBank] = sub_802DF18;
}
@@ -2580,14 +2580,14 @@ void PlayerHandlecmd18(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 160;
- FillWindowRect(&gUnknown_03004210, 10, 2, 15, 27, 18);
- FillWindowRect(&gUnknown_03004210, 10, 2, 35, 16, 38);
+ Text_FillWindowRect(&gUnknown_03004210, 10, 2, 15, 27, 18);
+ Text_FillWindowRect(&gUnknown_03004210, 10, 2, 35, 16, 38);
gBattleBankFunc[gActiveBank] = sub_802C098;
- InitWindow(&gUnknown_03004210, BattleText_MenuOptions, 400, 18, 35);
- sub_8002F44(&gUnknown_03004210);
- sub_814A5C0(0, 0xFFFF, 12, 11679, 0);
+ Text_InitWindow(&gUnknown_03004210, BattleText_MenuOptions, 400, 18, 35);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
+ MenuCursor_Create814A5C0(0, 0xFFFF, 12, 11679, 0);
for (r4 = 0; r4 < 4; r4++)
nullsub_8(r4);
@@ -2595,8 +2595,8 @@ void PlayerHandlecmd18(void)
sub_802E3E4(gActionSelectionCursor[gActiveBank], 0);
StrCpyDecodeToDisplayedStringBattle(BattleText_OtherMenu);
- InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_803037C_TILE_DATA_OFFSET, 2, 35);
- sub_8002F44(&gUnknown_03004210);
+ Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_803037C_TILE_DATA_OFFSET, 2, 35);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
void PlayerHandlecmd19()
@@ -2605,7 +2605,7 @@ void PlayerHandlecmd19()
void PlayerHandlecmd20(void)
{
- sub_814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
+ MenuCursor_Create814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
sub_80304A8();
gBattleBankFunc[gActiveBank] = sub_802C68C;
}
@@ -2619,8 +2619,8 @@ void sub_80304A8(void)
sub_802E3B4(gMoveSelectionCursor[gActiveBank], 0);
if (gBattleBufferA[gActiveBank][2] != 1)
{
- InitWindow(&gUnknown_03004210, BattleText_PP, 656, 23, 55);
- sub_8002F44(&gUnknown_03004210);
+ Text_InitWindow(&gUnknown_03004210, BattleText_PP, 656, 23, 55);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
sub_802E220();
sub_802E2D4();
diff --git a/src/battle/battle_controller_safari.c b/src/battle/battle_controller_safari.c
index 0a629ba4d..a4b610752 100644
--- a/src/battle/battle_controller_safari.c
+++ b/src/battle/battle_controller_safari.c
@@ -453,7 +453,7 @@ void SafariHandlePrintString(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
BufferStringBattle(*(u16 *)&gBattleBufferA[gActiveBank][2]);
- sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 144, 2, 15);
gBattleBankFunc[gActiveBank] = sub_812B694;
}
@@ -472,13 +472,13 @@ void SafariHandlecmd18(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 160;
gUnknown_03004210.paletteNum = 0;
- FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
- FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
+ Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
+ Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
gBattleBankFunc[gActiveBank] = bx_battle_menu_t6_2;
- InitWindow(&gUnknown_03004210, BattleText_MenuOptionsSafari, 400, 18, 35);
- sub_8002F44(&gUnknown_03004210);
- sub_814A5C0(0, 0xFFFF, 12, 11679, 0);
+ Text_InitWindow(&gUnknown_03004210, BattleText_MenuOptionsSafari, 400, 18, 35);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
+ MenuCursor_Create814A5C0(0, 0xFFFF, 12, 11679, 0);
for (i = 0; i < 4; i++)
nullsub_8(i);
@@ -486,8 +486,8 @@ void SafariHandlecmd18(void)
sub_802E3E4(gActionSelectionCursor[gActiveBank], 0);
StrCpyDecodeToDisplayedStringBattle(BattleText_PlayerMenu);
- InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_812BB10_TILE_DATA_OFFSET, 2, 35);
- sub_8002F44(&gUnknown_03004210);
+ Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, SUB_812BB10_TILE_DATA_OFFSET, 2, 35);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
void SafariHandlecmd19(void)
diff --git a/src/battle/battle_controller_wally.c b/src/battle/battle_controller_wally.c
index bd2b4a45b..6266d955c 100644
--- a/src/battle/battle_controller_wally.c
+++ b/src/battle/battle_controller_wally.c
@@ -1246,7 +1246,7 @@ void WallyHandlePrintString(void)
if (*ptr == 2)
DestroyMenuCursor();
BufferStringBattle(*ptr);
- sub_8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
+ Text_InitWindow8002EB0(&gUnknown_03004210, gDisplayedStringBattle, 0x90, 2, 15);
gBattleBankFunc[gActiveBank] = sub_8137454;
}
@@ -1265,22 +1265,22 @@ void WallyHandlecmd18(void)
gBattle_BG0_X = 0;
gBattle_BG0_Y = 160;
gUnknown_03004210.paletteNum = 0;
- FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
- FillWindowRect_DefaultPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
+ Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 15, 27, 18);
+ Text_FillWindowRectDefPalette(&gUnknown_03004210, 10, 2, 35, 16, 36);
gBattleBankFunc[gActiveBank] = sub_81372BC;
- InitWindow(&gUnknown_03004210, BattleText_MenuOptions, 400, 18, 35);
- sub_8002F44(&gUnknown_03004210);
- sub_814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
+ Text_InitWindow(&gUnknown_03004210, BattleText_MenuOptions, 400, 18, 35);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
+ MenuCursor_Create814A5C0(0, 0xFFFF, 12, 0x2D9F, 0);
for (i = 0; i < 4; i++)
nullsub_8(i);
sub_802E3E4(0, 0);
StrCpyDecodeToDisplayedStringBattle(BattleText_WallyMenu);
#ifdef ENGLISH
- InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 440, 2, 35);
+ Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 440, 2, 35);
#else
- InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 444, 2, 35);
+ Text_InitWindow(&gUnknown_03004210, gDisplayedStringBattle, 444, 2, 35);
#endif
- sub_8002F44(&gUnknown_03004210);
+ Text_PrintWindow8002F44(&gUnknown_03004210);
}
void WallyHandlecmd19(void)
diff --git a/src/battle/battle_party_menu.c b/src/battle/battle_party_menu.c
index 7bce00d82..68a97c536 100644
--- a/src/battle/battle_party_menu.c
+++ b/src/battle/battle_party_menu.c
@@ -583,13 +583,13 @@ static void Task_HandlePopupMenuInput(u8 taskId)
if (gMain.newAndRepeatedKeys & DPAD_UP)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(-1);
+ Menu_MoveCursor(-1);
return;
}
if (gMain.newAndRepeatedKeys & DPAD_DOWN)
{
PlaySE(SE_SELECT);
- MoveMenuCursor(1);
+ Menu_MoveCursor(1);
return;
}
if (gMain.newKeys & A_BUTTON)
@@ -598,7 +598,7 @@ static void Task_HandlePopupMenuInput(u8 taskId)
func = PartyMenuGetPopupMenuFunc(gTasks[taskId].data[4],
sBattlePartyPopupMenus,
sBattlePartyMenuActions,
- GetMenuCursorPos());
+ Menu_GetCursorPos());
func(taskId);
return;
}
@@ -723,7 +723,7 @@ static void Task_BattlePartyMenuShift(u8 taskId)
static void Task_BattlePartyMenuCancel(u8 taskId)
{
- HandleDestroyMenuCursors();
+ Menu_DestroyCursor();
ClosePartyPopupMenu(gTasks[taskId].data[4], sBattlePartyPopupMenus);
gTasks[taskId].data[4] = gTasks[taskId].data[5];
PrintPartyMenuPromptText(0, 0);
diff --git a/src/battle/battle_records.c b/src/battle/battle_records.c
index 97740e3da..4979760d7 100644
--- a/src/battle/battle_records.c
+++ b/src/battle/battle_records.c
@@ -202,7 +202,7 @@ static void PrintLinkBattleWinsLossesDraws(struct LinkBattleRecord *records)
ConvertIntToDecimalStringN_DigitWidth6(gStringVar1, GetGameStat(GAME_STAT_LINK_BATTLE_WINS), STR_CONV_MODE_RIGHT_ALIGN, 4);
ConvertIntToDecimalStringN_DigitWidth6(gStringVar2, GetGameStat(GAME_STAT_LINK_BATTLE_LOSSES), STR_CONV_MODE_RIGHT_ALIGN, 4);
ConvertIntToDecimalStringN_DigitWidth6(gStringVar3, GetGameStat(GAME_STAT_LINK_BATTLE_DRAWS), STR_CONV_MODE_RIGHT_ALIGN, 4);
- MenuPrint(gOtherText_WinRecord, 3, 3);
+ Menu_PrintText(gOtherText_WinRecord, 3, 3);
}
static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y)
@@ -217,39 +217,39 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y)
buffer[4] = 0x11;
buffer[5] = 1;
StringCopy(buffer + 6, gOtherText_SevenDashes);
- MenuPrint(buffer, 3, y);
+ Menu_PrintText(buffer, 3, y);
StringCopy(buffer + 6, gOtherText_FourDashes);
- MenuPrint(buffer, 11, y);
- MenuPrint(buffer, 17, y);
- MenuPrint(buffer, 23, y);
+ Menu_PrintText(buffer, 11, y);
+ Menu_PrintText(buffer, 17, y);
+ Menu_PrintText(buffer, 23, y);
}
else
{
StringFillWithTerminator(gStringVar1, 8);
StringCopyN(gStringVar1, record->name, 7);
- MenuPrint(gStringVar1, 3, y);
+ Menu_PrintText(gStringVar1, 3, y);
gStringVar1[0] = EXT_CTRL_CODE_BEGIN;
gStringVar1[1] = 0x14;
gStringVar1[2] = 6;
ConvertIntToDecimalStringN(gStringVar1 + 3, record->wins, STR_CONV_MODE_RIGHT_ALIGN, 4);
- MenuPrint(gStringVar1, 11, y);
+ Menu_PrintText(gStringVar1, 11, y);
ConvertIntToDecimalStringN(gStringVar1 + 3, record->losses, STR_CONV_MODE_RIGHT_ALIGN, 4);
- MenuPrint(gStringVar1, 17, y);
+ Menu_PrintText(gStringVar1, 17, y);
ConvertIntToDecimalStringN(gStringVar1 + 3, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4);
- MenuPrint(gStringVar1, 23, y);
+ Menu_PrintText(gStringVar1, 23, y);
}
}
void ShowLinkBattleRecords(void) {
s32 i;
- MenuDrawTextWindow(1, 0, 28, 18);
+ Menu_DrawStdWindowFrame(1, 0, 28, 18);
sub_8072BD8(gOtherText_BattleResults, 0, 1, 240);
PrintLinkBattleWinsLossesDraws(gSaveBlock1.linkBattleRecords);
#if ENGLISH
- MenuPrint(gOtherText_WinLoseDraw, 12, 6);
+ Menu_PrintText(gOtherText_WinLoseDraw, 12, 6);
#elif GERMAN
- MenuPrint_PixelCoords(gOtherText_WinLoseDraw, 88, 48, 1);
+ Menu_PrintTextPixelCoords(gOtherText_WinLoseDraw, 88, 48, 1);
#endif
for (i = 0; i < 5; i++)
@@ -285,11 +285,11 @@ static bool32 sub_8110494(u8 level)
static void PrintWinStreak(const u8 *str, u16 streak, u8 left, u8 top)
{
- MenuPrint(str, left, top);
+ Menu_PrintText(str, left, top);
if (streak > 9999)
streak = 9999;
sub_8072C14(gStringVar1, streak, 24, 1);
- MenuPrint(gOtherText_WinStreak, left + 7, top);
+ Menu_PrintText(gOtherText_WinStreak, left + 7, top);
}
static void PrintRecordWinStreak(u8 level, u8 left, u8 top)
@@ -320,10 +320,10 @@ static void PrintLastWinStreak(u8 level, u8 left, u8 top)
void ShowBattleTowerRecords(void)
{
u16 i;
- MenuDrawTextWindow(3, 1, 27, 17);
+ Menu_DrawStdWindowFrame(3, 1, 27, 17);
sub_8072BD8(gOtherText_BattleTowerResults, 3, 2, 0xC8);
- MenuPrint(gOtherText_Lv50, 5, 6);
- MenuPrint(gOtherText_Lv100, 5, 12);
+ Menu_PrintText(gOtherText_Lv50, 5, 6);
+ Menu_PrintText(gOtherText_Lv100, 5, 12);
for (i = 5; i < 26; i++)
{
sub_8071F60(CHAR_HYPHEN, i, 10);
diff --git a/src/battle/reshow_battle_screen.c b/src/battle/reshow_battle_screen.c
index 6a6d7a137..42bb3ba7f 100644
--- a/src/battle/reshow_battle_screen.c
+++ b/src/battle/reshow_battle_screen.c
@@ -78,9 +78,9 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
{
case 0:
dp12_8087EA4();
- SetUpWindowConfig(&gWindowConfig_81E6C58);
+ Text_LoadWindowTemplate(&gWindowTemplate_81E6C58);
ResetPaletteFade();
- InitWindowFromConfig(&gUnknown_03004210, &gWindowConfig_81E6C58);
+ Text_InitWindowWithTemplate(&gUnknown_03004210, &gWindowTemplate_81E6C58);
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gBattle_BG1_X = 0;