Use ARRAY_COUNT in PrintMenuTable
This commit is contained in:
parent
3f9037d63a
commit
9dd867689e
3 changed files with 4 additions and 4 deletions
|
@ -2097,7 +2097,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void)
|
||||||
{
|
{
|
||||||
DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3);
|
DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3);
|
||||||
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
FillWindowPixelBuffer(1, PIXEL_FILL(1));
|
||||||
PrintMenuTable(1, 2, sMenuActions_Gender);
|
PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gender), sMenuActions_Gender);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
|
||||||
PutWindowTilemap(1);
|
PutWindowTilemap(1);
|
||||||
CopyWindowToVram(1, 3);
|
CopyWindowToVram(1, 3);
|
||||||
|
|
|
@ -443,7 +443,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
|
||||||
windowTemplate.width = GetMaxWidthInMenuTable(gPCText_ItemPCOptionsText, 4);
|
windowTemplate.width = GetMaxWidthInMenuTable(gPCText_ItemPCOptionsText, 4);
|
||||||
data[4] = AddWindow(&windowTemplate);
|
data[4] = AddWindow(&windowTemplate);
|
||||||
SetStandardWindowBorderStyle(data[4], 0);
|
SetStandardWindowBorderStyle(data[4], 0);
|
||||||
PrintMenuTable(data[4], 4, gPCText_ItemPCOptionsText);
|
PrintMenuTable(data[4], ARRAY_COUNT(gPCText_ItemPCOptionsText), gPCText_ItemPCOptionsText);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[4], 4, var);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[4], 4, var);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
ItemStorageMenuPrint(gPCText_OptionDescList[var]);
|
ItemStorageMenuPrint(gPCText_OptionDescList[var]);
|
||||||
|
@ -686,7 +686,7 @@ static void Mailbox_ReturnToPlayerPC(u8 taskId)
|
||||||
static void Mailbox_PrintMailOptions(u8 taskId)
|
static void Mailbox_PrintMailOptions(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 r4 = sub_81D1C84(2);
|
u8 r4 = sub_81D1C84(2);
|
||||||
PrintMenuTable(r4, 4, gMailboxMailOptions);
|
PrintMenuTable(r4, ARRAY_COUNT(gMailboxMailOptions), gMailboxMailOptions);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(r4, 4, 0);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(r4, 4, 0);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gTasks[taskId].func = Mailbox_MailOptionsProcessInput;
|
gTasks[taskId].func = Mailbox_MailOptionsProcessInput;
|
||||||
|
|
|
@ -996,7 +996,7 @@ static void ShowRegistryMenuActions(u8 taskId)
|
||||||
template.width = GetMaxWidthInMenuTable(sRegistryMenuActions, 2);
|
template.width = GetMaxWidthInMenuTable(sRegistryMenuActions, 2);
|
||||||
data[7] = AddWindow(&template);
|
data[7] = AddWindow(&template);
|
||||||
SetStandardWindowBorderStyle(data[7], 0);
|
SetStandardWindowBorderStyle(data[7], 0);
|
||||||
PrintMenuTable(data[7], 2, sRegistryMenuActions);
|
PrintMenuTable(data[7], ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions);
|
||||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[7], 2, 0);
|
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[7], 2, 0);
|
||||||
ScheduleBgCopyTilemapToVram(0);
|
ScheduleBgCopyTilemapToVram(0);
|
||||||
gTasks[taskId].func = HandleRegistryMenuActionsInput;
|
gTasks[taskId].func = HandleRegistryMenuActionsInput;
|
||||||
|
|
Loading…
Reference in a new issue