From 9dd867689e85e2ce7f50ec9fc0344220e60a7777 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 19 Jan 2021 04:19:14 -0500 Subject: [PATCH] Use ARRAY_COUNT in PrintMenuTable --- src/main_menu.c | 2 +- src/player_pc.c | 4 ++-- src/secret_base.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main_menu.c b/src/main_menu.c index 0100a3341e..74af96da8a 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -2097,7 +2097,7 @@ static void NewGameBirchSpeech_ShowGenderMenu(void) { DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - PrintMenuTable(1, 2, sMenuActions_Gender); + PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gender), sMenuActions_Gender); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0); PutWindowTilemap(1); CopyWindowToVram(1, 3); diff --git a/src/player_pc.c b/src/player_pc.c index 928aac706c..ff3087db42 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -443,7 +443,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var) windowTemplate.width = GetMaxWidthInMenuTable(gPCText_ItemPCOptionsText, 4); data[4] = AddWindow(&windowTemplate); SetStandardWindowBorderStyle(data[4], 0); - PrintMenuTable(data[4], 4, gPCText_ItemPCOptionsText); + PrintMenuTable(data[4], ARRAY_COUNT(gPCText_ItemPCOptionsText), gPCText_ItemPCOptionsText); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[4], 4, var); ScheduleBgCopyTilemapToVram(0); ItemStorageMenuPrint(gPCText_OptionDescList[var]); @@ -686,7 +686,7 @@ static void Mailbox_ReturnToPlayerPC(u8 taskId) static void Mailbox_PrintMailOptions(u8 taskId) { u8 r4 = sub_81D1C84(2); - PrintMenuTable(r4, 4, gMailboxMailOptions); + PrintMenuTable(r4, ARRAY_COUNT(gMailboxMailOptions), gMailboxMailOptions); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(r4, 4, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Mailbox_MailOptionsProcessInput; diff --git a/src/secret_base.c b/src/secret_base.c index 8e09295933..d49eef2774 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -996,7 +996,7 @@ static void ShowRegistryMenuActions(u8 taskId) template.width = GetMaxWidthInMenuTable(sRegistryMenuActions, 2); data[7] = AddWindow(&template); SetStandardWindowBorderStyle(data[7], 0); - PrintMenuTable(data[7], 2, sRegistryMenuActions); + PrintMenuTable(data[7], ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions); InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[7], 2, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = HandleRegistryMenuActionsInput;