From 8a7432f465a221c3082085d61ecc7f826235714a Mon Sep 17 00:00:00 2001 From: HailSanta <53960937+HailSanta@users.noreply.github.com> Date: Wed, 1 Mar 2023 21:36:11 -0500 Subject: [PATCH] popup and window priority (#960) Co-authored-by: HailSanta --- include/enums.h | 6 +- src/415D90.c | 4 +- src/80850_len_3060.c | 8 +- src/8a860_len_3f30.c | 507 +++++++++++----------- src/filemenu/filemenu_common.c | 6 +- src/filemenu/filemenu_createfile.c | 4 +- src/filemenu/filemenu_info.c | 2 +- src/filemenu/filemenu_main.c | 28 +- src/filemenu/filemenu_yesno.c | 4 +- src/pause/pause_badges.c | 2 +- src/pause/pause_items.c | 2 +- src/pause/pause_map.c | 4 +- src/pause/pause_partners.c | 66 ++- src/pause/pause_spirits.c | 4 +- src/pause/pause_stats.c | 2 +- src/pause/pause_tabs.c | 14 +- src/status_icons.c | 4 +- src/world/area_kkj/kkj_19/kkj_19_2_main.c | 4 +- src/world/script_api/shops.c | 4 +- ver/us/asm/bss2_2.s | 34 +- ver/us/symbol_addrs.txt | 24 +- 21 files changed, 393 insertions(+), 340 deletions(-) diff --git a/include/enums.h b/include/enums.h index 30612544d3..2a81ce619f 100644 --- a/include/enums.h +++ b/include/enums.h @@ -3667,10 +3667,12 @@ enum PopupResult { enum WindowPriority { WINDOW_PRIORITY_0 = 0, + WINDOW_PRIORITY_1 = 1, WINDOW_PRIORITY_10 = 10, WINDOW_PRIORITY_19 = 19, WINDOW_PRIORITY_20 = 20, WINDOW_PRIORITY_21 = 21, + WINDOW_PRIORITY_64 = 64, }; /// not really @@ -5361,7 +5363,7 @@ enum CameraFlags { enum CameraMoveFlags { CAMERA_MOVE_IGNORE_PLAYER_Y = 0x00000001, CAMERA_MOVE_FLAG_2 = 0x00000002, - CAMERA_MOVE_FLAG_4 = 0x00000004 + CAMERA_MOVE_FLAG_4 = 0x00000004, }; enum CameraSettingsType { @@ -5943,7 +5945,7 @@ enum WindowId { WINDOW_ID_17 = 17, WINDOW_ID_18 = 18, WINDOW_ID_19 = 19, - WINDOW_ID_20 = 20, + WINDOW_ID_CURRENCY_COUNTER = 20, WINDOW_ID_21 = 21, WINDOW_ID_PAUSE_MAIN = 22, WINDOW_ID_PAUSE_DECRIPTION = 23, diff --git a/src/415D90.c b/src/415D90.c index 301d3d19b2..cd713dc932 100644 --- a/src/415D90.c +++ b/src/415D90.c @@ -1180,7 +1180,7 @@ s32 btl_submenu_moves_update(void) { moveX = 20; moveY = BattleMenu_Moves_PosY; - set_window_properties(8, moveX, 186, 280, 32, 20, func_802A4494, NULL, -1); + set_window_properties(8, moveX, 186, 280, 32, WINDOW_PRIORITY_20, func_802A4494, NULL, -1); set_window_update(WINDOW_ID_1, WINDOW_UPDATE_SHOW); if (!BattleMenu_UsingSpiritsSubmenu) { set_window_update(WINDOW_ID_2, WINDOW_UPDATE_SHOW); @@ -1808,7 +1808,7 @@ s32 func_802A4A54(void) { set_window_properties(WINDOW_ID_7, x + 18, y - 6, 108, 16, 1, func_802A56F8, NULL, -1); x = 20; y = 186; - set_window_properties(WINDOW_ID_8, x, y, 280, 32, 20, func_802A5738, NULL, -1); + set_window_properties(WINDOW_ID_8, x, y, 280, 32, WINDOW_PRIORITY_20, func_802A5738, NULL, -1); set_window_update(WINDOW_ID_6, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_7, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); diff --git a/src/80850_len_3060.c b/src/80850_len_3060.c index 80ba373573..d691d56cd7 100644 --- a/src/80850_len_3060.c +++ b/src/80850_len_3060.c @@ -1106,7 +1106,7 @@ void update_coin_counter(void) { if ((uiStatus->displayCoins == playerData->coins) || (uiStatus->unk_6C[0] <= 30)) { uiStatus->unk_6C[0] -= 1; if (uiStatus->unk_6C[0] == 0) { - set_window_update(WINDOW_ID_20, (s32)basic_hidden_window_update); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_hidden_window_update); uiStatus->unk_6C[1] = 15; D_8010CD10 = 0; D_8010CD12 = 1; @@ -1127,7 +1127,7 @@ void show_coin_counter(void) { s32 index; if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) { - set_window_update(WINDOW_ID_20, WINDOW_UPDATE_HIDE); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, WINDOW_UPDATE_HIDE); if (uiStatus->iconIndex12 > -1) { hud_element_free(uiStatus->iconIndex10); hud_element_free(uiStatus->iconIndex11); @@ -1140,8 +1140,8 @@ void show_coin_counter(void) { } if (uiStatus->unk_6C[0] == 0) { - set_window_properties(WINDOW_ID_20, 32, 164, 64, 20, 0x15, coin_counter_draw_content, 0, -1); - set_window_update(WINDOW_ID_20, (s32)basic_window_update); + set_window_properties(WINDOW_ID_CURRENCY_COUNTER, 32, 164, 64, 20, WINDOW_PRIORITY_21, coin_counter_draw_content, 0, -1); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_window_update); index = hud_element_create(&HES_MenuTimes); uiStatus->iconIndex10 = index; hud_element_set_flags(index, HUD_ELEMENT_FLAG_80); diff --git a/src/8a860_len_3f30.c b/src/8a860_len_3f30.c index 1c2e63e340..c6292150cf 100644 --- a/src/8a860_len_3f30.c +++ b/src/8a860_len_3f30.c @@ -53,33 +53,33 @@ s16 PopupContentScissorWidths[] = { extern s32 gPopupState; extern s32 D_8010D644; -extern s32 PopupSelectedIdx; -extern s32 D_8010D64C; -extern s32 D_8010D650; -extern s8 D_8010D654; -extern s8 D_8010D655; -extern s8 D_8010D656; +extern s32 PopupMenu_SelectedIndex; +extern s32 PopupMenu_PrevSelectedIndex; +extern s32 PopupMenu_Alpha; +extern s8 PopupMenu_FirstDisplayIndex; +extern s8 PopupMenu_LastDisplayIndex; +extern s8 PopupMenu_DisplayedEntryCount; extern s16 D_8010D658; extern s16 D_8010D65A; -extern s32 D_8010D65C; -extern s32 D_8010D660; -extern s32 D_8010D664; -extern s32 D_8010D668; -extern s32 D_8010D66C; -extern s32 D_8010D670; -extern s32 D_8010D674; -extern s32 D_8010D678; +extern s32 PopupMenu_EmptybarHEID; +extern s32 PopupMenu_TitleIconHEID; +extern s32 PopupMenu_TimesHEID; +extern s32 PopupMenu_PartnerLevelHEID; +extern s32 PopupMenu_CursorHEID; +extern s32 PopupMenu_UpArrowHEID; +extern s32 PopupMenu_DownArrowHEID; +extern s32 PopupMenu_EntryIconHEID; extern s16 D_8010D67C; extern s16 D_8010D67E; extern s16 D_8010D680; extern s16 D_8010D682; extern s16 D_8010D684; extern s16 D_8010D686; -extern s16 D_8010D688; -extern s16 D_8010D68A; +extern s16 PopupMenu_StarPieceCounterPosX; +extern s16 PopupMenu_StarPieceCounterPosY; extern s16 D_8010D68C; extern s8 PopupNotBattle; -extern s8 D_8010D68F; +extern s8 PopupMenu_MaxDisplayableEntryCount; extern s8 D_8010D690; extern s8 D_8010D691; extern s8 D_8010D692; @@ -115,7 +115,7 @@ void popup_menu_draw_title_contents(s32* userData, s32 baseX, s32 baseY, s32 wid void func_800F48F4(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening); void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening); void func_800F4C1C(PopupMessage* popup, s32 x, s32 y); -void func_800F4C6C(PopupMessage* popup, s32 x, s32 y); +void popup_draw_cost_icon(PopupMessage* popup, s32 x, s32 y); void popup_draw_already_have_partner(PopupMessage* popup, s32 x, s32 y); void func_800F4D28(PopupMessage* popup, s32 x, s32 y); @@ -169,42 +169,42 @@ void hide_popup_menu(void) { if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { set_window_update(WINDOW_ID_16, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_20, (s32) basic_hidden_window_update); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_hidden_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { set_window_update(WINDOW_ID_18, (s32) basic_hidden_window_update); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { set_window_update(WINDOW_ID_16, (s32) basic_hidden_window_update); - set_window_update(WINDOW_ID_20, (s32) basic_hidden_window_update); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_hidden_window_update); } gPopupState = POPUP_STATE_10; D_8010D644 = D_8010D692; } void destroy_popup_menu(void) { - hud_element_free(D_8010D65C); - hud_element_free(D_8010D678); - hud_element_free(D_8010D66C); - hud_element_free(D_8010D670); - hud_element_free(D_8010D674); + hud_element_free(PopupMenu_EmptybarHEID); + hud_element_free(PopupMenu_EntryIconHEID); + hud_element_free(PopupMenu_CursorHEID); + hud_element_free(PopupMenu_UpArrowHEID); + hud_element_free(PopupMenu_DownArrowHEID); if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) { - hud_element_free(D_8010D660); - hud_element_free(D_8010D664); + hud_element_free(PopupMenu_TitleIconHEID); + hud_element_free(PopupMenu_TimesHEID); } if (gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) { - hud_element_free(D_8010D660); - hud_element_free(D_8010D664); + hud_element_free(PopupMenu_TitleIconHEID); + hud_element_free(PopupMenu_TimesHEID); } if (gPopupMenu->popupType == POPUP_TYPE_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) { - hud_element_free(D_8010D668); + hud_element_free(PopupMenu_PartnerLevelHEID); } if (gPopupMenu->popupType == POPUP_TYPE_SELL_ITEM) { - hud_element_free(D_8010D660); + hud_element_free(PopupMenu_TitleIconHEID); } if ((gPopupMenu->popupType <= POPUP_TYPE_USE_ITEM || @@ -282,7 +282,7 @@ void func_800F16CC(void) { if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { set_window_update(WINDOW_ID_16, (s32) basic_window_update); - set_window_update(WINDOW_ID_20, (s32) basic_window_update); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { set_window_update(WINDOW_ID_18, (s32) basic_window_update); @@ -290,27 +290,27 @@ void func_800F16CC(void) { if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { set_window_update(WINDOW_ID_16, (s32) basic_window_update); } - hud_element_set_tint(D_8010D65C, 255, 255, 255); - hud_element_set_tint(D_8010D678, 255, 255, 255); - hud_element_set_tint(D_8010D66C, 255, 255, 255); - hud_element_set_tint(D_8010D670, 255, 255, 255); - hud_element_set_tint(D_8010D674, 255, 255, 255); + hud_element_set_tint(PopupMenu_EmptybarHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_EntryIconHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_CursorHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_UpArrowHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_DownArrowHEID, 255, 255, 255); if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - hud_element_set_tint(D_8010D660, 255, 255, 255); - hud_element_set_tint(D_8010D664, 255, 255, 255); + hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_TimesHEID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D660, 255, 255, 255); - hud_element_set_tint(D_8010D664, 255, 255, 255); + hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_TimesHEID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D668, 255, 255, 255); + hud_element_set_tint(PopupMenu_PartnerLevelHEID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - hud_element_set_tint(D_8010D660, 255, 255, 255); + hud_element_set_tint(PopupMenu_TitleIconHEID, 255, 255, 255); } - hud_element_set_script(D_8010D66C, &HES_AnimatedHandPointer); + hud_element_set_script(PopupMenu_CursorHEID, &HES_AnimatedHandPointer); D_8010D690 = MSG_PAL_STANDARD; gPopupState = POPUP_STATE_20; } @@ -334,17 +334,17 @@ s32 popup_menu_update(void) { D_8010D682 = 186; D_8010D684 = 16; D_8010D686 = 88; - D_8010D688 = 32; - D_8010D68A = 164; + PopupMenu_StarPieceCounterPosX = 32; + PopupMenu_StarPieceCounterPosY = 164; if (PopupNotBattle) { D_8010D67C = PopupWorldStartX[gPopupMenu->popupType] + 20; } - if (D_8010D68F >= 7) { + if (PopupMenu_MaxDisplayableEntryCount >= 7) { D_8010D67E = 62; } D_8010D68C = 0; elementID = hud_element_create(&HES_EmptyBar); - D_8010D65C = elementID; + PopupMenu_EmptybarHEID = elementID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); hud_element_set_tint(elementID, 255, 255, 255); if (gPopupMenu->popupType != POPUP_MENU_THROW_AWAY_ITEM) { @@ -353,49 +353,49 @@ s32 popup_menu_update(void) { one = POPUP_MENU_SWITCH_PARTNER; // required to match (why is 1 loaded so early?) elementID = hud_element_create(gPopupMenu->ptrIcon[0]); - D_8010D678 = elementID; + PopupMenu_EntryIconHEID = elementID; hud_element_set_scale(elementID, 0.45f); hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80); elementID = hud_element_create(&HES_AnimatedHandPointer); - D_8010D66C = elementID; + PopupMenu_CursorHEID = elementID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80); elementID = hud_element_create(&HES_GreenArrowUp); - D_8010D670 = elementID; + PopupMenu_UpArrowHEID = elementID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80); elementID = hud_element_create(&HES_GreenArrowDown); - D_8010D674 = elementID; + PopupMenu_DownArrowHEID = elementID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_DROP_SHADOW | HUD_ELEMENT_FLAG_80); if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - D_8010D660 = hud_element_create(&HES_StatusStarPiece); - elementID = D_8010D660; + PopupMenu_TitleIconHEID = hud_element_create(&HES_StatusStarPiece); + elementID = PopupMenu_TitleIconHEID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); hud_element_set_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - D_8010D660 = hud_element_create(&HES_StatusStarPiece); - elementID = D_8010D660; + PopupMenu_TitleIconHEID = hud_element_create(&HES_StatusStarPiece); + elementID = PopupMenu_TitleIconHEID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_FILTER_TEX | HUD_ELEMENT_FLAG_80); hud_element_set_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - D_8010D660 = hud_element_create(&HES_StatusCoin); - elementID = D_8010D660; + PopupMenu_TitleIconHEID = hud_element_create(&HES_StatusCoin); + elementID = PopupMenu_TitleIconHEID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); hud_element_set_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - D_8010D664 = hud_element_create(&HES_MenuTimes); - elementID = D_8010D664; + PopupMenu_TimesHEID = hud_element_create(&HES_MenuTimes); + elementID = PopupMenu_TimesHEID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); hud_element_set_tint(elementID, 255, 255, 255); } if (gPopupMenu->popupType == one || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - D_8010D668 = hud_element_create(D_80109890[0]); - elementID = D_8010D668; + PopupMenu_PartnerLevelHEID = hud_element_create(D_80109890[0]); + elementID = PopupMenu_PartnerLevelHEID; hud_element_set_flags(elementID, HUD_ELEMENT_FLAG_80); hud_element_set_tint(elementID, 255, 255, 255); } @@ -415,7 +415,7 @@ s32 popup_menu_update(void) { case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_USEKEY: - set_window_properties(WINDOW_ID_14, posX, posY, 145, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); if (gPopupMenu->dipMode == 0) { set_window_properties(WINDOW_ID_15, 25, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); } else { @@ -425,55 +425,55 @@ s32 popup_menu_update(void) { set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_SWITCH_PARTNER: - set_window_properties(WINDOW_ID_14, posX, posY, 139, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 139, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_17, 13, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_14, posX, posY, 162, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 162, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_15, 17, -6, 96, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_UPGRADE_PARTNER: - set_window_properties(WINDOW_ID_14, posX, posY, 146, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 146, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_17, 12, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_14, posX, posY, 167, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 167, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_15, 22, -6, 95, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_LETTER: - set_window_properties(WINDOW_ID_14, posX, posY, 170, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 170, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_15, 32, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_TAKE_FROM_CHEST: - set_window_properties(WINDOW_ID_14, posX, posY, 145, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 145, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_15, 12, -6, 121, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: - set_window_properties(WINDOW_ID_14, posX, posY, 128, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 128, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_15, 12, -6, 104, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_POSTCARD: - set_window_properties(WINDOW_ID_14, posX, posY, 149, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 149, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_15, 6, -6, 139, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_POST_OFFICE: - set_window_properties(WINDOW_ID_14, posX, posY, 131, (D_8010D656 * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); + set_window_properties(WINDOW_ID_14, posX, posY, 131, (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 26, WINDOW_PRIORITY_20, popup_menu_draw_menu_contents, NULL, -1); set_window_properties(WINDOW_ID_17, 10, -6, 114, 16, WINDOW_PRIORITY_21, popup_menu_draw_title_contents, NULL, WINDOW_ID_14); set_window_update(WINDOW_ID_15, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_17, WINDOW_UPDATE_SHOW); @@ -482,25 +482,26 @@ s32 popup_menu_update(void) { switch (gPopupMenu->popupType) { case POPUP_MENU_TRADE_FOR_BADGE: - set_window_properties(WINDOW_ID_16, 126, -14, 32, 32, WINDOW_PRIORITY_21, func_800F4C6C, NULL, WINDOW_ID_14); + set_window_properties(WINDOW_ID_16, 126, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); break; case POPUP_MENU_SELL_ITEM: - set_window_properties(WINDOW_ID_16, 131, -14, 32, 32, WINDOW_PRIORITY_21, func_800F4C6C, NULL, WINDOW_ID_14); + set_window_properties(WINDOW_ID_16, 131, -14, 32, 32, WINDOW_PRIORITY_21, popup_draw_cost_icon, NULL, WINDOW_ID_14); break; } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - set_window_properties(WINDOW_ID_20, D_8010D688, D_8010D68A, 64, 20, WINDOW_PRIORITY_21, func_800F4D28, NULL, -1); + set_window_properties(WINDOW_ID_CURRENCY_COUNTER, PopupMenu_StarPieceCounterPosX, PopupMenu_StarPieceCounterPosY, + 64, 20, WINDOW_PRIORITY_21, func_800F4D28, NULL, -1); } do { cond = FALSE; - if (PopupSelectedIdx >= D_8010D654 + D_8010D655 - 1) { - D_8010D654++; - if (D_8010D654 > gPopupMenu->numEntries - D_8010D68F) { - D_8010D654 = gPopupMenu->numEntries - D_8010D68F; - if (D_8010D654 < 0) { - D_8010D654 = 0; + if (PopupMenu_SelectedIndex >= PopupMenu_FirstDisplayIndex + PopupMenu_LastDisplayIndex - 1) { + PopupMenu_FirstDisplayIndex++; + if (PopupMenu_FirstDisplayIndex > gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_FirstDisplayIndex = gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount; + if (PopupMenu_FirstDisplayIndex < 0) { + PopupMenu_FirstDisplayIndex = 0; } } else { cond = TRUE; @@ -508,8 +509,8 @@ s32 popup_menu_update(void) { } } while (cond); - D_8010D655 = D_8010D654 + D_8010D68F; - D_8010D658 = -D_8010D654 * LINE_HEIGHT; + PopupMenu_LastDisplayIndex = PopupMenu_FirstDisplayIndex + PopupMenu_MaxDisplayableEntryCount; + D_8010D658 = -PopupMenu_FirstDisplayIndex * LINE_HEIGHT; if (gPopupMenu->popupType >= POPUP_MENU_USE_ITEM && (gPopupMenu->popupType < POPUP_MENU_READ_DIARY_PAGE || gPopupMenu->popupType == POPUP_MENU_USEKEY)) { @@ -605,7 +606,7 @@ s32 popup_menu_update(void) { if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { set_window_update(WINDOW_ID_16, (s32)basic_window_update); - set_window_update(WINDOW_ID_20, (s32)basic_window_update); + set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { set_window_update(WINDOW_ID_18, (s32)basic_window_update); @@ -619,58 +620,65 @@ s32 popup_menu_update(void) { if (D_8010D644 != 0) { D_8010D644--; } else { - D_8010D64C = PopupSelectedIdx; + PopupMenu_PrevSelectedIndex = PopupMenu_SelectedIndex; + // change selection on up input if (gGameStatusPtr->heldButtons[0] & (BUTTON_STICK_UP | BUTTON_Z) && - (PopupSelectedIdx > 0 || (gGameStatusPtr->pressedButtons[0] & (BUTTON_STICK_UP | BUTTON_Z)))) + (PopupMenu_SelectedIndex > 0 || (gGameStatusPtr->pressedButtons[0] & (BUTTON_STICK_UP | BUTTON_Z)))) { do { - PopupSelectedIdx--; + PopupMenu_SelectedIndex--; } while (0); // required to match } + // change selection on down input if (gGameStatusPtr->heldButtons[0] & (BUTTON_STICK_DOWN | BUTTON_R) && - ((PopupSelectedIdx < gPopupMenu->numEntries - 1) || (gGameStatusPtr->pressedButtons[0] & (BUTTON_STICK_DOWN | BUTTON_R)))) + ((PopupMenu_SelectedIndex < gPopupMenu->numEntries - 1) || (gGameStatusPtr->pressedButtons[0] & (BUTTON_STICK_DOWN | BUTTON_R)))) { do { - PopupSelectedIdx++; + PopupMenu_SelectedIndex++; } while (0); // required to match } // wrap selected index - if (PopupSelectedIdx < 0) { - PopupSelectedIdx = gPopupMenu->numEntries - 1; + if (PopupMenu_SelectedIndex < 0) { + PopupMenu_SelectedIndex = gPopupMenu->numEntries - 1; } - if (PopupSelectedIdx > gPopupMenu->numEntries - 1) { - PopupSelectedIdx = 0; + if (PopupMenu_SelectedIndex > gPopupMenu->numEntries - 1) { + PopupMenu_SelectedIndex = 0; } - if (D_8010D64C != PopupSelectedIdx) { + if (PopupMenu_PrevSelectedIndex != PopupMenu_SelectedIndex) { sfx_play_sound(SOUND_MENU_CHANGE_SELECTION); } + // ensure one option is displayed above the selected index, if applicable + // shift up to 4 entries at a time on list wrap for (i = 0; i < 4; i++) { - if (PopupSelectedIdx < D_8010D654 + 1) { - D_8010D654--; - if (D_8010D654 < 0) { - D_8010D654 = 0; + if (PopupMenu_SelectedIndex < PopupMenu_FirstDisplayIndex + 1) { + PopupMenu_FirstDisplayIndex--; + if (PopupMenu_FirstDisplayIndex < 0) { + PopupMenu_FirstDisplayIndex = 0; } } } + // ensure one option is displayed after the selected index, if applicable + // shift up to 4 entries at a time on list wrap for (i = 0; i < 4; i++) { - if (PopupSelectedIdx >= D_8010D655 - 1) { - D_8010D654++; - if (D_8010D654 > gPopupMenu->numEntries - D_8010D68F) { - D_8010D654 = gPopupMenu->numEntries - D_8010D68F; - if (D_8010D654 < 0) { - D_8010D654 = 0; + if (PopupMenu_SelectedIndex >= PopupMenu_LastDisplayIndex - 1) { + PopupMenu_FirstDisplayIndex++; + if (PopupMenu_FirstDisplayIndex > gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_FirstDisplayIndex = gPopupMenu->numEntries - PopupMenu_MaxDisplayableEntryCount; + if (PopupMenu_FirstDisplayIndex < 0) { + PopupMenu_FirstDisplayIndex = 0; } } } - D_8010D655 = D_8010D654 + D_8010D68F; + PopupMenu_LastDisplayIndex = PopupMenu_FirstDisplayIndex + PopupMenu_MaxDisplayableEntryCount; } + // make selection on A button input if (gGameStatusPtr->pressedButtons[0] & BUTTON_A) { switch (gPopupMenu->popupType) { case POPUP_MENU_READ_LETTER: @@ -690,7 +698,7 @@ s32 popup_menu_update(void) { } break; default: - if (gPopupMenu->enabled[PopupSelectedIdx]) { + if (gPopupMenu->enabled[PopupMenu_SelectedIndex]) { sfx_play_sound(SOUND_MENU_NEXT); if (!PopupNotBattle) { gPopupState = POPUP_STATE_CHOSE_WORLD; @@ -783,33 +791,33 @@ s32 popup_menu_update(void) { } break; case POPUP_STATE_CHOSE_WORLD: - hud_element_set_tint(D_8010D65C, 160, 160, 160); - hud_element_set_tint(D_8010D678, 160, 160, 160); - hud_element_set_tint(D_8010D66C, 160, 160, 160); - hud_element_set_tint(D_8010D670, 160, 160, 160); - hud_element_set_tint(D_8010D674, 160, 160, 160); - hud_element_set_script(D_8010D66C, &HES_HandPointer); + hud_element_set_tint(PopupMenu_EmptybarHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_EntryIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_CursorHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_UpArrowHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_DownArrowHEID, 160, 160, 160); + hud_element_set_script(PopupMenu_CursorHEID, &HES_HandPointer); if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - hud_element_set_tint(D_8010D660, 160, 160, 160); - hud_element_set_tint(D_8010D664, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D660, 160, 160, 160); - hud_element_set_tint(D_8010D664, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D668, 160, 160, 160); + hud_element_set_tint(PopupMenu_PartnerLevelHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - hud_element_set_tint(D_8010D660, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); } D_8010D690 = MSG_PAL_0D; - gPopupMenu->result = PopupSelectedIdx + 1; - return PopupSelectedIdx + 1; + gPopupMenu->result = PopupMenu_SelectedIndex + 1; + return PopupMenu_SelectedIndex + 1; case POPUP_STATE_CHOSE_BATTLE: - gPopupMenu->result = PopupSelectedIdx + 1; - return PopupSelectedIdx + 1; + gPopupMenu->result = PopupMenu_SelectedIndex + 1; + return PopupMenu_SelectedIndex + 1; case POPUP_STATE_MINUS_3: switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: @@ -856,16 +864,16 @@ s32 popup_menu_update(void) { D_8010D644--; if (D_8010D644 == 0) { gPopupState = POPUP_STATE_11; - gPopupMenu->result = PopupSelectedIdx + 1; - return PopupSelectedIdx + 1; + gPopupMenu->result = PopupMenu_SelectedIndex + 1; + return PopupMenu_SelectedIndex + 1; } break; case POPUP_STATE_20: D_8010D644++; if (D_8010D644 >= D_8010D692) { gPopupState = POPUP_STATE_CHOOSING; - gPopupMenu->result = PopupSelectedIdx + 1; - return PopupSelectedIdx + 1; + gPopupMenu->result = PopupMenu_SelectedIndex + 1; + return PopupMenu_SelectedIndex + 1; } break; case POPUP_STATE_ALREADY_HAVE_PARTNER_BEGIN: @@ -902,26 +910,26 @@ s32 popup_menu_update(void) { gPopupMenu->result = POPUP_RESULT_CHOOSING; break; case POPUP_STATE_CANCEL_DIP: - hud_element_set_tint(D_8010D65C, 160, 160, 160); - hud_element_set_tint(D_8010D678, 160, 160, 160); - hud_element_set_tint(D_8010D66C, 160, 160, 160); - hud_element_set_tint(D_8010D670, 160, 160, 160); - hud_element_set_tint(D_8010D674, 160, 160, 160); - hud_element_set_script(D_8010D66C, &HES_HandPointer); + hud_element_set_tint(PopupMenu_EmptybarHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_EntryIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_CursorHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_UpArrowHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_DownArrowHEID, 160, 160, 160); + hud_element_set_script(PopupMenu_CursorHEID, &HES_HandPointer); if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - hud_element_set_tint(D_8010D660, 160, 160, 160); - hud_element_set_tint(D_8010D664, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D660, 160, 160, 160); - hud_element_set_tint(D_8010D664, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D668, 160, 160, 160); + hud_element_set_tint(PopupMenu_PartnerLevelHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - hud_element_set_tint(D_8010D660, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); } switch (gPopupMenu->popupType) { @@ -979,26 +987,26 @@ s32 popup_menu_update(void) { gPopupState = POPUP_STATE_MINUS_3; break; case POPUP_STATE_CANCEL_DIP_DECLINE: - hud_element_set_tint(D_8010D65C, 255, 255, 255); - hud_element_set_tint(D_8010D678, 255, 255, 255); - hud_element_set_tint(D_8010D66C, 255, 255, 255); - hud_element_set_tint(D_8010D670, 255, 255, 255); - hud_element_set_tint(D_8010D674, 255, 255, 255); + hud_element_set_tint(PopupMenu_EmptybarHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_EntryIconHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_CursorHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_UpArrowHEID, 255, 255, 255); + hud_element_set_tint(PopupMenu_DownArrowHEID, 255, 255, 255); if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { - hud_element_set_tint(D_8010D660, 160, 160, 160); - hud_element_set_tint(D_8010D664, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D660, 160, 160, 160); - hud_element_set_tint(D_8010D664, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); + hud_element_set_tint(PopupMenu_TimesHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { - hud_element_set_tint(D_8010D668, 160, 160, 160); + hud_element_set_tint(PopupMenu_PartnerLevelHEID, 160, 160, 160); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { - hud_element_set_tint(D_8010D660, 160, 160, 160); + hud_element_set_tint(PopupMenu_TitleIconHEID, 160, 160, 160); } - hud_element_set_script(D_8010D66C, &HES_HandPointer); + hud_element_set_script(PopupMenu_CursorHEID, &HES_HandPointer); switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: @@ -1069,7 +1077,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt baseX += 2; baseY += 15; - y = -D_8010D654 * LINE_HEIGHT; + y = -PopupMenu_FirstDisplayIndex * LINE_HEIGHT; y1 = D_8010D658; dy = y - y1; @@ -1088,7 +1096,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt x = baseX; y = baseY; - y1 = y + D_8010D656 * LINE_HEIGHT + 4; + y1 = y + PopupMenu_DisplayedEntryCount * LINE_HEIGHT + 4; switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: case POPUP_MENU_TRADE_FOR_BADGE: @@ -1116,16 +1124,16 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt if (gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) { y = baseY + D_8010D658 + 21; } - id = D_8010D65C; + id = PopupMenu_EmptybarHEID; hud_element_set_render_pos(id, baseX + 73, y - 3); - hud_element_set_alpha(id, D_8010D650); - if (D_8010D68F < gPopupMenu->numEntries) { + hud_element_set_alpha(id, PopupMenu_Alpha); + if (PopupMenu_MaxDisplayableEntryCount < gPopupMenu->numEntries) { hud_element_draw_without_clipping(id); } x = baseX; y = baseY + 2; - y1 = y + D_8010D656 * LINE_HEIGHT; - if ((gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) && (D_8010D654 < 2)) { + y1 = y + PopupMenu_DisplayedEntryCount * LINE_HEIGHT; + if ((gPopupMenu->popupType == POPUP_MENU_THROW_AWAY_ITEM) && (PopupMenu_FirstDisplayIndex < 2)) { y = baseY; y1++; } @@ -1140,7 +1148,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt t = 0; for (i = 0; i < gPopupMenu->numEntries; i++, t++) { - if (i < sp28 - 1 || i > sp28 + D_8010D656) { + if (i < sp28 - 1 || i > sp28 + PopupMenu_DisplayedEntryCount) { y += LINE_HEIGHT; if (i == 0) { y += offset; @@ -1163,17 +1171,17 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: case POPUP_MENU_POST_OFFICE: - draw_msg(gPopupMenu->nameMsg[t], x, y, D_8010D650, msgPal, DRAW_MSG_STYLE_MENU); + draw_msg(gPopupMenu->nameMsg[t], x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: - draw_msg(gPopupMenu->nameMsg[t], x, y, D_8010D650, msgPal, DRAW_MSG_STYLE_MENU); + draw_msg(gPopupMenu->nameMsg[t], x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_LETTER: if (gPopupMenu->enabled[t] == 2) { msgPal = MSG_PAL_22; } - draw_msg(gPopupMenu->nameMsg[t], x, y, D_8010D650, msgPal, DRAW_MSG_STYLE_MENU); + draw_msg(gPopupMenu->nameMsg[t], x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_DIARY_PAGE: if (gPopupMenu->value[t] != 0) { @@ -1182,7 +1190,7 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt msgPal = MSG_PAL_STANDARD; } set_message_value(gPopupMenu->userIndex[t] + 1, 0); - draw_msg(MSG_Menus_00CD, x + 8, y, D_8010D650, msgPal, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00CD, x + 8, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_POSTCARD: if (gPopupMenu->value[t] != 0) { @@ -1191,14 +1199,14 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt msgPal = MSG_PAL_STANDARD; } a0 = gPopupMenu->nameMsg[t]; - draw_msg(a0, x, y, D_8010D650, msgPal, DRAW_MSG_STYLE_MENU); + draw_msg(a0, x, y, PopupMenu_Alpha, msgPal, DRAW_MSG_STYLE_MENU); break; } switch (gPopupMenu->popupType) { case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: for (j = 0; j < ARRAY_COUNT(D_80109890); j++) { - id = D_8010D668; + id = PopupMenu_PartnerLevelHEID; if (gPopupMenu->enabled[i]) { hud_element_set_script(id, D_80109890[j]); @@ -1216,10 +1224,10 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt } break; case POPUP_MENU_TRADE_FOR_BADGE: - draw_number(gPopupMenu->value[t], x + 115, y, 1, msgPal, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); + draw_number(gPopupMenu->value[t], x + 115, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); break; case POPUP_MENU_SELL_ITEM: - draw_number(gPopupMenu->value[t], x + 121, y, 1, msgPal, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); + draw_number(gPopupMenu->value[t], x + 121, y, 1, msgPal, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE_RIGHT); break; } y += LINE_HEIGHT; @@ -1251,16 +1259,16 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt case POPUP_MENU_USEKEY: case POPUP_MENU_POST_OFFICE: for (i = 0; i < gPopupMenu->numEntries; i++) { - if (sp28 - 1 > i || sp28 + D_8010D656 < i) { + if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) { y += LINE_HEIGHT; if (i == 0) { y += offset; } } else { - id = D_8010D678; + id = PopupMenu_EntryIconHEID; hud_element_set_script(id, gPopupMenu->ptrIcon[i]); hud_element_set_render_pos(id, x, y); - hud_element_set_alpha(id, D_8010D650); + hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_set_scale(id, 0.45f); hud_element_draw_without_clipping(id); y += LINE_HEIGHT; @@ -1272,16 +1280,16 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt break; case POPUP_MENU_READ_DIARY_PAGE: for (i = 0; i < gPopupMenu->numEntries; i++) { - if (sp28 - 1 > i || sp28 + D_8010D656 < i) { + if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) { y += LINE_HEIGHT; if (i == 0) { y += offset; } } else { - id = D_8010D678; + id = PopupMenu_EntryIconHEID; hud_element_set_script(id, gPopupMenu->ptrIcon[i]); hud_element_set_render_pos(id, x, y); - hud_element_set_alpha(id, D_8010D650); + hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_set_scale(id, 0.45f); hud_element_draw_without_clipping(id); y += LINE_HEIGHT; @@ -1293,16 +1301,16 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt break; case POPUP_MENU_READ_POSTCARD: for (i = 0; i < gPopupMenu->numEntries; i++) { - if (sp28 - 1 > i || sp28 + D_8010D656 < i) { + if (sp28 - 1 > i || sp28 + PopupMenu_DisplayedEntryCount < i) { y += LINE_HEIGHT; if (i == 0) { y += offset; } } else { - id = D_8010D678; + id = PopupMenu_EntryIconHEID; hud_element_set_script(id, gPopupMenu->ptrIcon[i]); hud_element_set_render_pos(id, x, y); - hud_element_set_alpha(id, D_8010D650); + hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_set_scale(id, 0.45f); hud_element_draw_without_clipping(id); y += LINE_HEIGHT; @@ -1314,21 +1322,21 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt break; } - v0 = (PopupSelectedIdx - D_8010D654) * LINE_HEIGHT; + v0 = (PopupMenu_SelectedIndex - PopupMenu_FirstDisplayIndex) * LINE_HEIGHT; x = baseX + 8; y = baseY + 9 + v0; - id = D_8010D66C; + id = PopupMenu_CursorHEID; - if (gPopupMenu->popupType == POPUP_TYPE_THROW_AWAY_ITEM && PopupSelectedIdx == 0) { + if (gPopupMenu->popupType == POPUP_TYPE_THROW_AWAY_ITEM && PopupMenu_SelectedIndex == 0) { y -= 2; } hud_element_set_render_pos(id, x, y); - hud_element_set_alpha(id, D_8010D650); + hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_draw_without_clipping(id); x = baseX; y = baseY - 6; - y1 = y + (D_8010D656 * LINE_HEIGHT) + 16; + y1 = y + (PopupMenu_DisplayedEntryCount * LINE_HEIGHT) + 16; switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: case POPUP_MENU_THROW_AWAY_ITEM: @@ -1384,21 +1392,21 @@ void popup_menu_draw_menu_contents(s32* userData, s32 baseX, s32 baseY, s32 widt break; } - if (D_8010D654 > 0) { - id = D_8010D670; + if (PopupMenu_FirstDisplayIndex > 0) { + id = PopupMenu_UpArrowHEID; x = baseX + offset; y = baseY; hud_element_set_render_pos(id, x + 35, y - 1); - hud_element_set_alpha(id, D_8010D650); + hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_draw_without_clipping(id); } - if (D_8010D655 < gPopupMenu->numEntries) { - id = D_8010D674; + if (PopupMenu_LastDisplayIndex < gPopupMenu->numEntries) { + id = PopupMenu_DownArrowHEID; x = baseX + offset; - y = baseY + D_8010D68F * LINE_HEIGHT; + y = baseY + PopupMenu_MaxDisplayableEntryCount * LINE_HEIGHT; hud_element_set_render_pos(id, x + 35, y + 5); - hud_element_set_alpha(id, D_8010D650); + hud_element_set_alpha(id, PopupMenu_Alpha); hud_element_draw_without_clipping(id); } } @@ -1414,48 +1422,48 @@ void popup_menu_draw_title_contents( case POPUP_MENU_THROW_AWAY_ITEM: switch (gPopupMenu->dipMode) { case 0: - draw_msg(MSG_Menus_Items, baseX + 26, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_Items, baseX + 26, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case 1: - draw_msg(MSG_Menus_DoubleDip, baseX + 4, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); - draw_number(gPopupMenu->titleNumber, baseX + 94, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); - draw_number(2, baseX + 114, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(MSG_Menus_DoubleDip, baseX + 4, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_number(gPopupMenu->titleNumber, baseX + 94, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_number(2, baseX + 114, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); break; case 2: - draw_msg(MSG_Menus_TripleDip, baseX + 6, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); - draw_number(gPopupMenu->titleNumber, baseX + 94, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); - draw_number(3, baseX + 114, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_msg(MSG_Menus_TripleDip, baseX + 6, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_number(gPopupMenu->titleNumber, baseX + 94, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_number(3, baseX + 114, baseY + 2, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_32, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); break; } break; case POPUP_MENU_TRADE_FOR_BADGE: - draw_msg(MSG_MenuTip_0032, baseX + 27, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_MenuTip_0032, baseX + 27, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_LETTER: - draw_msg(MSG_MenuTip_0033, baseX + 23, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_MenuTip_0033, baseX + 23, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_TAKE_FROM_CHEST: - draw_msg(MSG_Menus_00D7, baseX + 4, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00D7, baseX + 4, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_DIARY_PAGE: - draw_msg(MSG_Menus_00CE, baseX + 8, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00CE, baseX + 8, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_READ_POSTCARD: - draw_msg(MSG_Menus_00D0, baseX + 6, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_00D0, baseX + 6, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_USEKEY: - draw_msg(MSG_Menus_Items, baseX + 27, baseY + 2, D_8010D650, MSG_PAL_32, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_Items, baseX + 27, baseY + 2, PopupMenu_Alpha, MSG_PAL_32, DRAW_MSG_STYLE_MENU); break; case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_UPGRADE_PARTNER: case POPUP_MENU_POST_OFFICE: - draw_msg(MSG_Menus_PartyMember, baseX + 8, baseY + 2, D_8010D650, MSG_PAL_34, DRAW_MSG_STYLE_MENU); + draw_msg(MSG_Menus_PartyMember, baseX + 8, baseY + 2, PopupMenu_Alpha, MSG_PAL_34, DRAW_MSG_STYLE_MENU); break; } } void func_800F48F4(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { - draw_msg(gPopupMenu->descMsg[PopupSelectedIdx], baseX + 8, baseY, D_8010D650, D_8010D690, 0); + draw_msg(gPopupMenu->descMsg[PopupMenu_SelectedIndex], baseX + 8, baseY, PopupMenu_Alpha, D_8010D690, 0); } void func_800F4944(s32* userData, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { @@ -1550,7 +1558,7 @@ void func_800F4C1C(PopupMessage* popup, s32 x, s32 y) { draw_msg(msg, xPos, yPos, 255, MSG_PAL_0F, 0); } -void func_800F4C6C(PopupMessage* popup, s32 x, s32 y) { +void popup_draw_cost_icon(PopupMessage* popup, s32 x, s32 y) { s32 hudElement; s32 xPos; s32 yPos; @@ -1558,12 +1566,12 @@ void func_800F4C6C(PopupMessage* popup, s32 x, s32 y) { switch (gPopupMenu->popupType) { case POPUP_TYPE_TRADE_FOR_BADGE: xPos = x + 16; - hudElement = D_8010D660; + hudElement = PopupMenu_TitleIconHEID; yPos = y + 16; break; case POPUP_TYPE_SELL_ITEM: xPos = x + 17; - hudElement = D_8010D660; + hudElement = PopupMenu_TitleIconHEID; yPos = y + 17; break; default: @@ -1571,7 +1579,7 @@ void func_800F4C6C(PopupMessage* popup, s32 x, s32 y) { } hud_element_set_render_pos(hudElement, xPos, yPos); - hud_element_set_alpha(hudElement, D_8010D650); + hud_element_set_alpha(hudElement, PopupMenu_Alpha); hud_element_draw_clipped(hudElement); } @@ -1580,13 +1588,13 @@ void popup_draw_already_have_partner(PopupMessage* popup, s32 x, s32 y) { } void func_800F4D28(PopupMessage* popup, s32 x, s32 y) { - s32 hudElement = D_8010D660; + s32 hudElement = PopupMenu_TitleIconHEID; PlayerData* playerData = &gPlayerData; s32 xPos = x + 14; s32 yPos = y + 9; s32 type; - hud_element_set_alpha(hudElement, D_8010D650); + hud_element_set_alpha(hudElement, PopupMenu_Alpha); if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) { hud_element_set_render_pos(hudElement, xPos, yPos); @@ -1595,14 +1603,15 @@ void func_800F4D28(PopupMessage* popup, s32 x, s32 y) { } hud_element_draw_clipped(hudElement); - hudElement = D_8010D664; + + hudElement = PopupMenu_TimesHEID; hud_element_set_render_pos(hudElement, x + 26, y + 11); - hud_element_set_alpha(hudElement, D_8010D650); + hud_element_set_alpha(hudElement, PopupMenu_Alpha); hud_element_draw_clipped(hudElement); type = gPopupMenu->popupType; if (type == POPUP_TYPE_TRADE_FOR_BADGE) { - draw_number(playerData->starPieces, x + 58, y + 4, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, D_8010D650, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); + draw_number(playerData->starPieces, x + 58, y + 4, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, PopupMenu_Alpha, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); } } @@ -1632,30 +1641,30 @@ void create_standard_popup_menu(PopupMenu* popup) { } PopupNotBattle = TRUE; - D_8010D68F = 6; + PopupMenu_MaxDisplayableEntryCount = 6; gPopupState = POPUP_STATE_INIT; initialPos = gPopupMenu->initialPos; numEntries = gPopupMenu->numEntries; - PopupSelectedIdx = initialPos; + PopupMenu_SelectedIndex = initialPos; if (initialPos >= numEntries) { - PopupSelectedIdx = numEntries - 1; + PopupMenu_SelectedIndex = numEntries - 1; } - D_8010D654 = 0; - D_8010D64C = PopupSelectedIdx; + PopupMenu_FirstDisplayIndex = 0; + PopupMenu_PrevSelectedIndex = PopupMenu_SelectedIndex; entryCount = gPopupMenu->numEntries; - D_8010D656 = entryCount; - if (D_8010D68F < entryCount) { - D_8010D656 = 6; + PopupMenu_DisplayedEntryCount = entryCount; + if (PopupMenu_MaxDisplayableEntryCount < entryCount) { + PopupMenu_DisplayedEntryCount = 6; } - D_8010D655 = 6; - if (gPopupMenu->numEntries < D_8010D68F) { - D_8010D655 = gPopupMenu->numEntries; + PopupMenu_LastDisplayIndex = 6; + if (gPopupMenu->numEntries < PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_LastDisplayIndex = gPopupMenu->numEntries; } - D_8010D650 = 255; + PopupMenu_Alpha = 255; D_8010D691 = 4; D_8010D692 = 6; gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, NULL); @@ -1681,26 +1690,26 @@ void create_shop_popup_menu(PopupMenu* popup) { } PopupNotBattle = TRUE; - D_8010D68F = 6; + PopupMenu_MaxDisplayableEntryCount = 6; gPopupState = POPUP_STATE_INIT; - PopupSelectedIdx = gPopupMenu->initialPos; - if (PopupSelectedIdx >= gPopupMenu->numEntries) { - PopupSelectedIdx = gPopupMenu->numEntries - 1; + PopupMenu_SelectedIndex = gPopupMenu->initialPos; + if (PopupMenu_SelectedIndex >= gPopupMenu->numEntries) { + PopupMenu_SelectedIndex = gPopupMenu->numEntries - 1; } - D_8010D654 = 0; - D_8010D64C = PopupSelectedIdx; - D_8010D656 = gPopupMenu->numEntries; + PopupMenu_FirstDisplayIndex = 0; + PopupMenu_PrevSelectedIndex = PopupMenu_SelectedIndex; + PopupMenu_DisplayedEntryCount = gPopupMenu->numEntries; - if (D_8010D656 > D_8010D68F) { - D_8010D656 = D_8010D68F; + if (PopupMenu_DisplayedEntryCount > PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_DisplayedEntryCount = PopupMenu_MaxDisplayableEntryCount; } - D_8010D655 = D_8010D68F; - if (gPopupMenu->numEntries < D_8010D68F) { - D_8010D655 = gPopupMenu->numEntries; + PopupMenu_LastDisplayIndex = PopupMenu_MaxDisplayableEntryCount; + if (gPopupMenu->numEntries < PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_LastDisplayIndex = gPopupMenu->numEntries; } - D_8010D650 = 255; + PopupMenu_Alpha = 255; D_8010D691 = 4; D_8010D692 = 6; gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, NULL); @@ -1725,26 +1734,26 @@ void create_battle_popup_menu(PopupMenu* popup) { } PopupNotBattle = FALSE; - D_8010D68F = 6; + PopupMenu_MaxDisplayableEntryCount = 6; gPopupState = POPUP_STATE_INIT; - PopupSelectedIdx = gPopupMenu->initialPos; - if (PopupSelectedIdx >= gPopupMenu->numEntries) { - PopupSelectedIdx = gPopupMenu->numEntries - 1; + PopupMenu_SelectedIndex = gPopupMenu->initialPos; + if (PopupMenu_SelectedIndex >= gPopupMenu->numEntries) { + PopupMenu_SelectedIndex = gPopupMenu->numEntries - 1; } - D_8010D654 = 0; - D_8010D64C = PopupSelectedIdx; - D_8010D656 = gPopupMenu->numEntries; + PopupMenu_FirstDisplayIndex = 0; + PopupMenu_PrevSelectedIndex = PopupMenu_SelectedIndex; + PopupMenu_DisplayedEntryCount = gPopupMenu->numEntries; - if (D_8010D656 > D_8010D68F) { - D_8010D656 = D_8010D68F; + if (PopupMenu_DisplayedEntryCount > PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_DisplayedEntryCount = PopupMenu_MaxDisplayableEntryCount; } - D_8010D655 = D_8010D68F; - if (gPopupMenu->numEntries < D_8010D68F) { - D_8010D655 = gPopupMenu->numEntries; + PopupMenu_LastDisplayIndex = PopupMenu_MaxDisplayableEntryCount; + if (gPopupMenu->numEntries < PopupMenu_MaxDisplayableEntryCount) { + PopupMenu_LastDisplayIndex = gPopupMenu->numEntries; } - D_8010D650 = 255; + PopupMenu_Alpha = 255; D_8010D691 = 9; D_8010D692 = 2; gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, NULL); diff --git a/src/filemenu/filemenu_common.c b/src/filemenu/filemenu_common.c index 973de48cf5..11ab25332b 100644 --- a/src/filemenu/filemenu_common.c +++ b/src/filemenu/filemenu_common.c @@ -57,7 +57,7 @@ MenuWindowBP filemenu_common_windowBPs[3] = { }, .width = 288, .height = 192, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = NULL, .tab = NULL, .parentID = -1, @@ -73,7 +73,7 @@ MenuWindowBP filemenu_common_windowBPs[3] = { }, .width = 288, .height = 192, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = filemenu_draw_contents_copy_arrow, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -89,7 +89,7 @@ MenuWindowBP filemenu_common_windowBPs[3] = { }, .width = 320, .height = 240, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = filemenu_draw_cursor, .tab = NULL, .parentID = -1, diff --git a/src/filemenu/filemenu_createfile.c b/src/filemenu/filemenu_createfile.c index caa8bda956..46db297038 100644 --- a/src/filemenu/filemenu_createfile.c +++ b/src/filemenu/filemenu_createfile.c @@ -19,7 +19,7 @@ MenuWindowBP filemenu_createfile_windowBPs[] = { .pos = { .x = 68, .y = 10 }, .width = 164, .height = 46, - .priority = 64, + .priority = WINDOW_PRIORITY_64, .fpDrawContents = &filemenu_draw_contents_file_create_header, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -33,7 +33,7 @@ MenuWindowBP filemenu_createfile_windowBPs[] = { .pos = { .x = 12, .y = 67 }, .width = 262, .height = 113, - .priority = 64, + .priority = WINDOW_PRIORITY_64, .fpDrawContents = &filemenu_draw_contents_choose_name, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, diff --git a/src/filemenu/filemenu_info.c b/src/filemenu/filemenu_info.c index d491d29032..0ba123a930 100644 --- a/src/filemenu/filemenu_info.c +++ b/src/filemenu/filemenu_info.c @@ -21,7 +21,7 @@ MenuWindowBP filemenu_info_windowBPs[] = { .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, - .priority = 64, + .priority = WINDOW_PRIORITY_64, .fpDrawContents = &filemenu_info_draw_message_contents, .tab = NULL, .parentID = -1, diff --git a/src/filemenu/filemenu_main.c b/src/filemenu/filemenu_main.c index f0cd00ad69..4fc37ec525 100644 --- a/src/filemenu/filemenu_main.c +++ b/src/filemenu/filemenu_main.c @@ -69,7 +69,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_title, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -83,7 +83,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = -2, .y = 6 }, .width = 68, .height = 20, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_stereo, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -97,7 +97,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 221, .y = 6 }, .width = 68, .height = 20, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_mono, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -111,7 +111,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 5, .y = 171 }, .width = 88, .height = 16, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_option_left, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -125,7 +125,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 0, .y = 171 }, .width = 88, .height = 16, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_option_center, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -139,7 +139,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 195, .y = 171 }, .width = 88, .height = 16, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_option_right, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -153,7 +153,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 9, .y = 110 }, .width = 130, .height = 54, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_2_info, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -167,7 +167,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_2_title , .tab = NULL, .parentID = WINDOW_ID_FILEMENU_FILE2_INFO, @@ -181,7 +181,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 149, .y = 110 }, .width = 130, .height = 54, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_3_info, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -195,7 +195,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_3_title, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_FILE3_INFO, @@ -209,7 +209,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 9, .y = 41 }, .width = 130 + OFFSET_WIDTH, .height = 54, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_0_info, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -223,7 +223,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_0_title, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_FILE0_INFO, @@ -237,7 +237,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 149, .y = 41 }, .width = 130, .height = 54, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_1_info, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_MAIN, @@ -251,7 +251,7 @@ MenuWindowBP filemenu_main_windowBPs[] = { .pos = { .x = 3, .y = -8 }, .width = 124 + OFFSET_WIDTH, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_draw_contents_file_1_title, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_FILE1_INFO, diff --git a/src/filemenu/filemenu_yesno.c b/src/filemenu/filemenu_yesno.c index a3548796af..bad11d08d5 100644 --- a/src/filemenu/filemenu_yesno.c +++ b/src/filemenu/filemenu_yesno.c @@ -41,7 +41,7 @@ MenuWindowBP filemenu_yesno_windowBPs[] = { .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, - .priority = 0x40, + .priority = WINDOW_PRIORITY_64, .fpDrawContents = &filemenu_yesno_draw_options_contents, .tab = NULL, .parentID = -1, @@ -55,7 +55,7 @@ MenuWindowBP filemenu_yesno_windowBPs[] = { .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &filemenu_yesno_draw_prompt_contents, .tab = NULL, .parentID = WINDOW_ID_FILEMENU_YESNO_OPTIONS, diff --git a/src/pause/pause_badges.c b/src/pause/pause_badges.c index ed29f4f822..63d2976238 100644 --- a/src/pause/pause_badges.c +++ b/src/pause/pause_badges.c @@ -64,7 +64,7 @@ MenuWindowBP gPauseBadgesWindowBPs[] = { .pos = { .x = 3, .y = 16 }, .width = 289, .height = 154, - .priority = 1, + .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_badges_draw_contents, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, diff --git a/src/pause/pause_items.c b/src/pause/pause_items.c index a3c71300dd..8f5b2a7558 100644 --- a/src/pause/pause_items.c +++ b/src/pause/pause_items.c @@ -39,7 +39,7 @@ MenuWindowBP gPauseItemsWindowBPs[] = { .pos = { .x = 3, .y = 16 }, .width = 289, .height = 154, - .priority = 1, + .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_items_draw_contents, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, diff --git a/src/pause/pause_map.c b/src/pause/pause_map.c index 031e349934..05a28e641d 100644 --- a/src/pause/pause_map.c +++ b/src/pause/pause_map.c @@ -106,7 +106,7 @@ MenuWindowBP gPauseMapWindowBPs[] = { .pos = { .x = 3, .y = 16 }, .width = 289, .height = 154, - .priority = 1, + .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_map_draw_contents, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -120,7 +120,7 @@ MenuWindowBP gPauseMapWindowBPs[] = { .pos = { .x = 56, .y = 124 }, .width = 180, .height = 20, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_map_draw_title, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAP, diff --git a/src/pause/pause_partners.c b/src/pause/pause_partners.c index 8252a97232..ac6ce5b073 100644 --- a/src/pause/pause_partners.c +++ b/src/pause/pause_partners.c @@ -39,12 +39,14 @@ HudScript* gPausePartnersIconScripts[] = { &HES_FPCost, &HES_StatFp_1, &HES_PartnerRank, &HES_PartnerRank, &HES_MoveDiamond, &HES_MoveBlueOrb, &HES_MoveGreenOrb, &HES_MoveRedOrb }; + Vp gPausePartnersViewport = { .vp = { .vscale = { 640, 480, 511, 0 }, .vtrans = { 640, 480, 511, 0 }, } }; + s32 gPausePartnersSpriteAnims[][4] = { { ANIM_WorldGoombario_Still, @@ -95,18 +97,57 @@ s32 gPausePartnersSpriteAnims[][4] = { ANIM_LIST_END } }; -s32 gPausePartnersPartnerIDs[] = { 1, 2, 3, 4, 9, 6, 7, 8}; -s32 gPausePartnersMessages[] = { - MSG_PartnerDesc_Goombario_Pause, MSG_PartnerDesc_Kooper_Pause, MSG_PartnerDesc_Bombette_Pause, MSG_PartnerDesc_Parakarry_Pause, - MSG_PartnerDesc_Bow_Pause, MSG_PartnerDesc_Watt_Pause, MSG_PartnerDesc_Sushie_Pause, MSG_PartnerDesc_Lakilester_Pause + +s32 gPausePartnersPartnerIDs[] = { + PARTNER_GOOMBARIO, + PARTNER_KOOPER, + PARTNER_BOMBETTE, + PARTNER_PARAKARRY, + PARTNER_BOW, + PARTNER_WATT, + PARTNER_SUSHIE, + PARTNER_LAKILESTER, }; -s32 gPausePartnersMoveBase[] = { MOVE_HEADBONK1, MOVE_SHELL_TOSS1, MOVE_BODY_SLAM1, MOVE_SKY_DIVE1, - MOVE_SMACK1, MOVE_ELECTRO_DASH1, MOVE_BELLY_FLOP1, MOVE_SPINY_FLIP1 }; + +s32 gPausePartnersMessages[] = { + MSG_PartnerDesc_Goombario_Pause, + MSG_PartnerDesc_Kooper_Pause, + MSG_PartnerDesc_Bombette_Pause, + MSG_PartnerDesc_Parakarry_Pause, + MSG_PartnerDesc_Bow_Pause, + MSG_PartnerDesc_Watt_Pause, + MSG_PartnerDesc_Sushie_Pause, + MSG_PartnerDesc_Lakilester_Pause +}; + +s32 gPausePartnersMoveBase[] = { + MOVE_HEADBONK1, + MOVE_SHELL_TOSS1, + MOVE_BODY_SLAM1, + MOVE_SKY_DIVE1, + MOVE_SMACK1, + MOVE_ELECTRO_DASH1, + MOVE_BELLY_FLOP1, + MOVE_SPINY_FLIP1 +}; + s8 gPausePartnersGridData[] = { 4, 5, 6, 7, 0, 1, 2, 3 }; -char* gPausePartnersAssetNames[] = { "party_kurio", "party_kameki", "party_pinki", "party_pareta", "party_resa", "party_akari", "party_opuku", "party_pokopi", "letter_peach" }; + +char* gPausePartnersAssetNames[] = { + "party_kurio", + "party_kameki", + "party_pinki", + "party_pareta", + "party_resa", + "party_akari", + "party_opuku", + "party_pokopi", + "letter_peach" +}; + s8* gPausePartnersImageBuffers[] = { gPauseBufferImg1, gPauseBufferImg2 }; s8* gPausePartnersPaletteBuffers[] = { gPauseBufferPal1, gPauseBufferPal2 }; s32 D_8024F74C = 0; @@ -135,7 +176,7 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .pos = { .x = 3, .y = 16 }, .width = 289, .height = 154, - .priority = 1, + .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_partners_draw_contents, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -148,7 +189,7 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .pos = { .x = 8, .y = 103 }, .width = 112, .height = 20, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_title, .tab = NULL, .parentID = WINDOW_ID_PAUSE_PARTNERS, @@ -161,7 +202,7 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .pos = { .x = 133, .y = 36 }, .width = 140, .height = 80, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_movelist, .tab = NULL, .parentID = WINDOW_ID_PAUSE_PARTNERS, @@ -174,7 +215,7 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .pos = { .x = 12, .y = -6 }, .width = 80, .height = 16, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_movelist_title, .tab = NULL, .parentID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST, @@ -187,7 +228,7 @@ MenuWindowBP gPausePartnersWindowBPs[] = { .pos = { .x = 102, .y = -12 }, .width = 32, .height = 32, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_partners_draw_movelist_flower, .tab = NULL, .parentID = WINDOW_ID_PAUSE_PARTNERS_MOVELIST, @@ -546,6 +587,7 @@ void pause_partners_init(MenuPanel* panel) { void pause_partners_handle_input(MenuPanel* panel) { s32 delta; s32 level, level2; + s32 partnerID; s32 oldPos; if (gPausePartnersNumPartners >= 2 && (gPausePartnersLevel == 0 || (gPauseHeldButtons & (BUTTON_Z | BUTTON_R)))) { diff --git a/src/pause/pause_spirits.c b/src/pause/pause_spirits.c index 58de2d123f..5d7ecb4d0c 100644 --- a/src/pause/pause_spirits.c +++ b/src/pause/pause_spirits.c @@ -104,7 +104,7 @@ MenuWindowBP gPauseSpiritsWindowsBPs[] = { .pos = { .x = 3, .y = 16 }, .width = 289, .height = 154, - .priority = 1, + .priority = WINDOW_PRIORITY_1, .fpDrawContents = &pause_spirits_draw_contents, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -118,7 +118,7 @@ MenuWindowBP gPauseSpiritsWindowsBPs[] = { .pos = { .x = 86, .y = 124 }, .width = 120, .height = 20, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_spirits_draw_title, .tab = NULL, .parentID = WINDOW_ID_PAUSE_SPIRITS, diff --git a/src/pause/pause_stats.c b/src/pause/pause_stats.c index c94c26a930..02473b8c57 100644 --- a/src/pause/pause_stats.c +++ b/src/pause/pause_stats.c @@ -91,7 +91,7 @@ MenuWindowBP gStatsMenuWindowBPs[] = { .pos = { .x = 3, .y = 16 }, .width = 289, .height = 154, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &pause_stats_draw_contents, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, diff --git a/src/pause/pause_tabs.c b/src/pause/pause_tabs.c index 8f0ad410b1..af1b86eda9 100644 --- a/src/pause/pause_tabs.c +++ b/src/pause/pause_tabs.c @@ -30,7 +30,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 0, .y = 7 }, .width = 43, .height = 15, - .priority = 64, + .priority = WINDOW_PRIORITY_64, .fpDrawContents = pause_tabs_draw_stats, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -44,7 +44,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 0, .y = 7 }, .width = 43, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_badges, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -58,7 +58,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 0, .y = 7 }, .width = 43, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_items, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -72,7 +72,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 0, .y = 7 }, .width = 43, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_party, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -86,7 +86,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 0, .y = 7 }, .width = 43, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_spirits, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -100,7 +100,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 0, .y = 7 }, .width = 43, .height = 15, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = pause_tabs_draw_map, .tab = NULL, .parentID = WINDOW_ID_PAUSE_MAIN, @@ -114,7 +114,7 @@ MenuWindowBP gPauseTabsWindowBPs[] = { .pos = { .x = 8, .y = 8 }, .width = 16, .height = 16, - .priority = 64, + .priority = WINDOW_PRIORITY_64, .fpDrawContents = pause_tabs_draw_invis, .tab = NULL, .parentID = WINDOW_ID_NONE, diff --git a/src/status_icons.c b/src/status_icons.c index 868d29d64d..c4a688dd86 100644 --- a/src/status_icons.c +++ b/src/status_icons.c @@ -295,7 +295,7 @@ void draw_merlee_message(void* data) { width = get_msg_width(messageID, 0) + 23; xPos = 160 - (width / 2); height = 45; - set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, height, 0, draw_merlee_message_string, popup, -1); + set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, height, WINDOW_PRIORITY_0, draw_merlee_message_string, popup, -1); set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } break; @@ -307,7 +307,7 @@ void draw_merlee_message(void* data) { width = get_msg_width(messageID, 0) + 23; xPos = 160 - (width / 2); height = 28; - set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, height, 0, draw_merlee_message_string, popup, -1); + set_window_properties(WINDOW_ID_BATTLE_POPUP, xPos, 80, width, height, WINDOW_PRIORITY_0, draw_merlee_message_string, popup, -1); set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW); } break; diff --git a/src/world/area_kkj/kkj_19/kkj_19_2_main.c b/src/world/area_kkj/kkj_19/kkj_19_2_main.c index da4ea04ed1..305fb579f4 100644 --- a/src/world/area_kkj/kkj_19/kkj_19_2_main.c +++ b/src/world/area_kkj/kkj_19/kkj_19_2_main.c @@ -119,7 +119,7 @@ MenuWindowBP N(IngredientWindows)[] = { .pos = { 100, 66 }, .width = 120, .height = 28, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &N(draw_content_ingredient_name), .tab = NULL, .parentID = -1, @@ -132,7 +132,7 @@ MenuWindowBP N(IngredientWindows)[] = { .pos = { 32, 184 }, .width = 256, .height = 32, - .priority = 0, + .priority = WINDOW_PRIORITY_0, .fpDrawContents = &N(draw_content_ingredient_desc), .tab = NULL, .parentID = -1, diff --git a/src/world/script_api/shops.c b/src/world/script_api/shops.c index 6ebb5f6ed1..5022842567 100644 --- a/src/world/script_api/shops.c +++ b/src/world/script_api/shops.c @@ -944,8 +944,8 @@ API_CALLABLE(MakeShop) { hud_element_set_flags(shop->costIconID, HUD_ELEMENT_FLAG_80); hud_element_clear_flags(shop->costIconID, HUD_ELEMENT_FLAG_FILTER_TEX); get_worker(create_worker_frontUI(NULL, draw_shop_items)); - set_window_properties(WINDOW_ID_ITEM_INFO_NAME, 100, 66, 120, 28, 0, shop_draw_item_name, NULL, -1); - set_window_properties(WINDOW_ID_ITEM_INFO_DESC, 32, 184, 256, 32, 1, shop_draw_item_desc, NULL, -1); + set_window_properties(WINDOW_ID_ITEM_INFO_NAME, 100, 66, 120, 28, WINDOW_PRIORITY_0, shop_draw_item_name, NULL, -1); + set_window_properties(WINDOW_ID_ITEM_INFO_DESC, 32, 184, 256, 32, WINDOW_PRIORITY_1, shop_draw_item_desc, NULL, -1); gWindowStyles[10].defaultStyleID = WINDOW_STYLE_9; gWindowStyles[11].defaultStyleID = WINDOW_STYLE_3; shop->currentItemSlot = 0; diff --git a/ver/us/asm/bss2_2.s b/ver/us/asm/bss2_2.s index e2780e074c..57eb0ece54 100644 --- a/ver/us/asm/bss2_2.s +++ b/ver/us/asm/bss2_2.s @@ -70,22 +70,22 @@ dlabel gPopupState dlabel D_8010D644 .space 4 -dlabel PopupSelectedIdx +dlabel PopupMenu_SelectedIndex .space 4 -dlabel D_8010D64C +dlabel PopupMenu_PrevSelectedIndex .space 4 -dlabel D_8010D650 +dlabel PopupMenu_Alpha .space 4 -dlabel D_8010D654 +dlabel PopupMenu_FirstDisplayIndex .space 1 -dlabel D_8010D655 +dlabel PopupMenu_LastDisplayIndex .space 1 -dlabel D_8010D656 +dlabel PopupMenu_DisplayedEntryCount .space 2 dlabel D_8010D658 @@ -94,28 +94,28 @@ dlabel D_8010D658 dlabel D_8010D65A .space 2 -dlabel D_8010D65C +dlabel PopupMenu_EmptybarHEID .space 4 -dlabel D_8010D660 +dlabel PopupMenu_TitleIconHEID .space 4 -dlabel D_8010D664 +dlabel PopupMenu_TimesHEID .space 4 -dlabel D_8010D668 +dlabel PopupMenu_PartnerLevelHEID .space 4 -dlabel D_8010D66C +dlabel PopupMenu_CursorHEID .space 4 -dlabel D_8010D670 +dlabel PopupMenu_UpArrowHEID .space 4 -dlabel D_8010D674 +dlabel PopupMenu_DownArrowHEID .space 4 -dlabel D_8010D678 +dlabel PopupMenu_EntryIconHEID .space 4 dlabel D_8010D67C @@ -136,10 +136,10 @@ dlabel D_8010D684 dlabel D_8010D686 .space 2 -dlabel D_8010D688 +dlabel PopupMenu_StarPieceCounterPosX .space 2 -dlabel D_8010D68A +dlabel PopupMenu_StarPieceCounterPosY .space 2 dlabel D_8010D68C @@ -148,7 +148,7 @@ dlabel D_8010D68C dlabel PopupNotBattle .space 1 -dlabel D_8010D68F +dlabel PopupMenu_MaxDisplayableEntryCount .space 1 dlabel D_8010D690 diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index 4a8e32d956..1542908f4c 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -3099,7 +3099,7 @@ popup_menu_draw_title_contents = 0x800F4648; // type:func rom:0x8DAF8 func_800F48F4 = 0x800F48F4; // type:func rom:0x8DDA4 func_800F4944 = 0x800F4944; // type:func rom:0x8DDF4 func_800F4C1C = 0x800F4C1C; // type:func rom:0x8E0CC -func_800F4C6C = 0x800F4C6C; // type:func rom:0x8E11C +popup_draw_cost_icon = 0x800F4C6C; // type:func rom:0x8E11C popup_draw_already_have_partner = 0x800F4CF0; // type:func rom:0x8E1A0 func_800F4D28 = 0x800F4D28; // type:func rom:0x8E1D8 create_standard_popup_menu = 0x800F4E40; // type:func rom:0x8E2F0 @@ -3881,16 +3881,16 @@ update_entity_transform_matrix = 0x8011022C; // type:func rom:0xA692C update_shadow_transform_matrix = 0x80110374; // type:func rom:0xA6A74 gPopupState = 0x8010D640; // type:data rom:0xA6AF0 D_8010D644 = 0x8010D644; // type:data rom:0xA6AF4 -PopupSelectedIdx = 0x8010D648; // type:data rom:0xA6AF8 -D_8010D64C = 0x8010D64C; // type:data rom:0xA6AFC -D_8010D650 = 0x8010D650; // type:data rom:0xA6B00 -D_8010D654 = 0x8010D654; // type:data rom:0xA6B04 -D_8010D655 = 0x8010D655; // type:data rom:0xA6B05 -D_8010D656 = 0x8010D656; // type:data rom:0xA6B06 +PopupMenu_SelectedIndex = 0x8010D648; // type:data rom:0xA6AF8 +PopupMenu_PrevSelectedIndex = 0x8010D64C; // type:data rom:0xA6AFC +PopupMenu_Alpha = 0x8010D650; // type:data rom:0xA6B00 +PopupMenu_FirstDisplayIndex = 0x8010D654; // type:data rom:0xA6B04 +PopupMenu_LastDisplayIndex = 0x8010D655; // type:data rom:0xA6B05 +PopupMenu_DisplayedEntryCount = 0x8010D656; // type:data rom:0xA6B06 D_8010D658 = 0x8010D658; // type:data rom:0xA6B08 D_8010D65A = 0x8010D65A; // type:data rom:0xA6B0A -D_8010D65C = 0x8010D65C; // type:data rom:0xA6B0C -D_8010D660 = 0x8010D660; // type:data rom:0xA6B10 +PopupMenu_EmptybarHEID = 0x8010D65C; // type:data rom:0xA6B0C +PopupTitleIconHEID = 0x8010D660; // type:data rom:0xA6B10 D_8010D664 = 0x8010D664; // type:data rom:0xA6B14 D_8010D668 = 0x8010D668; // type:data rom:0xA6B18 D_8010D66C = 0x8010D66C; // type:data rom:0xA6B1C @@ -3903,11 +3903,11 @@ D_8010D680 = 0x8010D680; // type:data rom:0xA6B30 D_8010D682 = 0x8010D682; // type:data rom:0xA6B32 D_8010D684 = 0x8010D684; // type:data rom:0xA6B34 D_8010D686 = 0x8010D686; // type:data rom:0xA6B36 -D_8010D688 = 0x8010D688; // type:data rom:0xA6B38 -D_8010D68A = 0x8010D68A; // type:data rom:0xA6B3A +PopupMenu_StarPieceCounterPosX = 0x8010D688; // type:data rom:0xA6B38 +PopupMenu_StarPieceCounterPosY = 0x8010D68A; // type:data rom:0xA6B3A D_8010D68C = 0x8010D68C; // type:data rom:0xA6B3C PopupNotBattle = 0x8010D68E; // type:data rom:0xA6B3E -D_8010D68F = 0x8010D68F; // type:data rom:0xA6B3F +PopupMenu_MaxDisplayableEntryCount = 0x8010D68F; // type:data rom:0xA6B3F D_8010D690 = 0x8010D690; // type:data rom:0xA6B40 D_8010D691 = 0x8010D691; // type:data rom:0xA6B41 D_8010D692 = 0x8010D692; // type:data rom:0xA6B42