diff --git a/src/pause/pause_badges.c b/src/pause/pause_badges.c index 74acfc8c45..b7eea9829d 100644 --- a/src/pause/pause_badges.c +++ b/src/pause/pause_badges.c @@ -1,4 +1,5 @@ #include "pause_common.h" +#include "message_ids.h" extern Gfx gPauseDLOrbs[]; @@ -438,7 +439,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width if (i == 0) { if (isNone) { - draw_msg(pause_get_menu_msg(0x45), badgeListX + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX, + draw_msg(pause_get_menu_msg(PAUSE_MSG_NO_BADGE), badgeListX + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX, badgeListY + pause_badges_scroll_offset_y(posY) + badgeEntryOffsetY, 255, palette, style); } else { if (gItemTable[badgeID].nameMsg) { @@ -580,7 +581,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width hud_element_set_render_pos(gPauseBadgesIconIDs[16], baseX + OFFSET_1_X, baseY + OFFSET_1_Y); hud_element_draw_without_clipping(gPauseBadgesIconIDs[16]); - draw_msg(pause_get_menu_msg(70), baseX + OFFSET_2_X, baseY + 74, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(PAUSE_MSG_BADGE_BP), baseX + OFFSET_2_X, baseY + 74, 255, MSG_PAL_STANDARD, DRAW_MSG_STYLE_MENU); draw_number(playerData->maxBP, baseX + OFFSET_3_X, baseY + OFFSET_3_Y, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); bpAmount = playerData->maxBP - pause_get_total_equipped_bp_cost(); bpAvailOffsetX = 0; @@ -588,7 +589,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width if (bpAmount < 10) { bpAvailOffsetX = -4; } - pause_draw_menu_label(7, baseX + 12, baseY + 100 + bpAvailOffsetY); + pause_draw_menu_label(PAUSE_LBL_AVAILABLE, baseX + 12, baseY + 100 + bpAvailOffsetY); draw_number(bpAmount, baseX + 73 + bpAvailOffsetX, baseY + 100 + bpAvailOffsetY, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE | DRAW_NUMBER_STYLE_ALIGN_RIGHT); orbColorR = 0; @@ -632,7 +633,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width 91, 34, 255, gPauseBadgesCurrentTab == 1 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); - msg = pause_get_menu_msg(0x47); + msg = pause_get_menu_msg(PAUSE_MSG_ALL_BADGES); msgX = baseX + 10; if (gPauseBadgesCurrentTab == 0) { msgX = baseX + 19; @@ -647,7 +648,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, gPauseBadgesCurrentTab == 1 ? baseX + 9 : baseX, baseY + 37, 0, 91, 34, 255, gPauseBadgesCurrentTab == 0 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); - msg = pause_get_menu_msg(0x48); + msg = pause_get_menu_msg(PAUSE_MSG_ACTIVE); msgX = baseX + 12; if (gPauseBadgesCurrentTab == 1) { msgX = baseX + 21; @@ -659,7 +660,7 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width } draw_msg(msg, msgX, msgY, msgOpacity, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); - msg = pause_get_menu_msg(0x49); + msg = pause_get_menu_msg(PAUSE_MSG_BADGES); msgX = baseX + 26; if (gPauseBadgesCurrentTab == 1) { msgX = baseX + 35; @@ -697,10 +698,10 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width pause_set_cursor_opacity(0); if (gPauseBadgesShowNotEnoughBP == 1) { draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 137, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); - draw_msg(pause_get_menu_msg(0x4A), baseX + 86, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(PAUSE_MSG_NOT_ENOUGH_BP), baseX + 86, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); } else { draw_box(DRAW_FLAG_NO_CLIP, &gPauseWS_13, baseX + 67, baseY + 60, 0, 173, 26, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); - draw_msg(pause_get_menu_msg(0x4B), baseX + 90, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(PAUSE_MSG_DONT_WEAR_MORE), baseX + 90, baseY + 66, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); } } } @@ -959,7 +960,7 @@ void pause_badges_handle_input(MenuPanel* panel) { if (((itemID != BADGE_NONE_STANDIN) && (itemID != BADGE_INVALID) && (itemID != 0))) { gPauseCurrentDescMsg = gItemTable[itemID].fullDescMsg; } else { - gPauseCurrentDescMsg = 0; + gPauseCurrentDescMsg = MSG_NONE; gPauseCurrentDescIconScript = NULL; } } else { diff --git a/src/pause/pause_common.h b/src/pause/pause_common.h index f88de0b7ff..90fc4e0db9 100644 --- a/src/pause/pause_common.h +++ b/src/pause/pause_common.h @@ -126,4 +126,106 @@ s32 pause_get_menu_msg(s32 index); s32 pause_interp_vertical_scroll(s32 deltaBefore); void pause_sort_item_list(s16* arr, s32 len, s32 (*compare)(s16*, s16 *)); +enum PauseMenuLabels { + PAUSE_LBL_HP = 0, + PAUSE_LBL_FP = 1, + PAUSE_LBL_BP = 2, + PAUSE_LBL_BOOTS = 3, + PAUSE_LBL_HAMMER = 4, + PAUSE_LBL_ENERGY = 5, + PAUSE_LBL_STATS = 6, + PAUSE_LBL_AVAILABLE = 7, + PAUSE_LBL_ABILITIES = 8, +}; + +enum PauseMenuMessages { + PAUSE_MSG_NONE = 0x00, + PAUSE_MSG_TUT_NAME_BADGES = 0x01, + PAUSE_MSG_TUT_UNUSED_1 = 0x02, + PAUSE_MSG_TUT_UNUSED_2 = 0x03, + PAUSE_MSG_TUT_UNUSED_3 = 0x04, + PAUSE_MSG_TUT_UNUSED_4 = 0x05, + PAUSE_MSG_TUT_UNUSED_5 = 0x06, + PAUSE_MSG_TUT_UNUSED_6 = 0x07, + PAUSE_MSG_TUT_UNUSED_7 = 0x08, + PAUSE_MSG_TUT_DESC_1 = 0x09, + PAUSE_MSG_TUT_DESC_2 = 0x0A, + PAUSE_MSG_TUT_DESC_3 = 0x0B, + PAUSE_MSG_TUT_DESC_4 = 0x0C, + PAUSE_MSG_TUT_DESC_5 = 0x0D, + PAUSE_MSG_TUT_DESC_6 = 0x0E, + PAUSE_MSG_TUT_DESC_7 = 0x0F, + PAUSE_MSG_TUT_CMD_1 = 0x10, + PAUSE_MSG_TUT_CMD_2 = 0x11, + PAUSE_MSG_TUT_CMD_3 = 0x12, + PAUSE_MSG_TUT_CMD_4 = 0x13, + PAUSE_MSG_TUT_CMD_5 = 0x14, + PAUSE_MSG_TUT_CMD_6 = 0x15, + PAUSE_MSG_TUT_CMD_7 = 0x16, + PAUSE_MSG_17 = 0x17, + PAUSE_MSG_18 = 0x18, + PAUSE_MSG_19 = 0x19, + PAUSE_MSG_1A = 0x1A, + PAUSE_MSG_TAB_STATS = 0x1B, + PAUSE_MSG_TAB_BADGES = 0x1C, + PAUSE_MSG_TAB_ITEMS = 0x1D, + PAUSE_MSG_TAB_PARTY = 0x1E, + PAUSE_MSG_TAB_SPIRITS = 0x1F, + PAUSE_MSG_TAB_MAP = 0x20, + PAUSE_MSG_TIP_CONTROLS = 0x21, + PAUSE_MSG_TIP_HP = 0x22, + PAUSE_MSG_TIP_FP = 0x23, + PAUSE_MSG_TIP_BP = 0x24, + PAUSE_MSG_TIP_BOOTS_1 = 0x25, + PAUSE_MSG_TIP_BOOTS_2 = 0x26, + PAUSE_MSG_TIP_BOOTS_3 = 0x27, + PAUSE_MSG_TIP_HAMMER_0 = 0x28, + PAUSE_MSG_TIP_HAMMER_1 = 0x29, + PAUSE_MSG_TIP_HAMMER_2 = 0x2A, + PAUSE_MSG_TIP_HAMMER_3 = 0x2B, + PAUSE_MSG_TIP_STAR_POWER = 0x2C, + PAUSE_MSG_TIP_STAR_POINTS = 0x2D, + PAUSE_MSG_TIP_COINS = 0x2E, + PAUSE_MSG_TIP_SECRETS = 0x2F, + PAUSE_MSG_TIP_STAR_PIECES = 0x30, + PAUSE_MSG_TIP_TIME = 0x31, + PAUSE_MSG_LBL_COINS = 0x32, + PAUSE_MSG_LBL_STAR_POINTS = 0x33, + PAUSE_MSG_LBL_STAR_PIECES = 0x34, + PAUSE_MSG_LBL_TIME = 0x35, + PAUSE_MSG_LBL_HP = 0x36, + PAUSE_MSG_LBL_FP = 0x37, + PAUSE_MSG_LBL_BP = 0x38, + PAUSE_MSG_SLASH = 0x39, + PAUSE_MSG_DOT = 0x3A, + PAUSE_MSG_3B = 0x3B, + PAUSE_MSG_3C = 0x3C, + PAUSE_MSG_3D = 0x3D, + PAUSE_MSG_3E = 0x3E, + PAUSE_MSG_3F = 0x3F, + PAUSE_MSG_40 = 0x40, + PAUSE_MSG_41 = 0x41, + PAUSE_MSG_42 = 0x42, + PAUSE_MSG_MARIO = 0x43, + PAUSE_MSG_LEVEL = 0x44, + PAUSE_MSG_NO_BADGE = 0x45, + PAUSE_MSG_BADGE_BP = 0x46, + PAUSE_MSG_ALL_BADGES = 0x47, + PAUSE_MSG_ACTIVE = 0x48, + PAUSE_MSG_BADGES = 0x49, + PAUSE_MSG_NOT_ENOUGH_BP = 0x4A, + PAUSE_MSG_DONT_WEAR_MORE = 0x4B, + PAUSE_MSG_BAGDE_DESC_ALL = 0x4C, + PAUSE_MSG_BAGDE_DESC_ACTIVE = 0x4D, + PAUSE_MSG_BAGDE_DESC_NONE = 0x4E, + PAUSE_MSG_KEY_ITEMS = 0x4F, + PAUSE_MSG_CONSUMABLES = 0x50, + PAUSE_MSG_DESC_CONSUMABLES = 0x51, + PAUSE_MSG_DESC_KEY_ITEMS = 0x52, + PAUSE_MSG_PARTNER_HP = 0x53, + PAUSE_MSG_PARTNER_FP = 0x54, + PAUSE_MSG_PARTNER_ABILITIES = 0x55, + PAUSE_MSG_UNKNOWN_SPIRIT = 0x56, +}; + #endif diff --git a/src/pause/pause_gfx.c b/src/pause/pause_gfx.c index 2ebc59480b..62e5c701eb 100644 --- a/src/pause/pause_gfx.c +++ b/src/pause/pause_gfx.c @@ -319,107 +319,179 @@ Gfx gPauseDLSpiritsBg[] = { }; #if VERSION_IQUE -s8 gPauseMsg_17[] = { 0x8F, 0x0C, 0x75, 0x12, 0xFD }; -s8 gPauseMsg_18[] = { 0x7B, 0x0E, 0x7C, 0x0E, 0xFD }; -s8 gPauseMsg_19[] = { 0x77, 0x10, 0x74, 0x0D, 0xFD }; -s8 gPauseMsg_1A[] = { 0x79, 0x12, 0x67, 0x09, 0xFD }; -s8 gPauseMsg_32[] = { 0x64, 0x02, 0x75, 0x11, 0xFD }; -s8 gPauseMsg_33[] = { 0x62, 0x05, 0x62, 0x05, 0x87, 0x06, 0x5F, 0x18, 0xFD }; -s8 gPauseMsg_34[] = { 0x62, 0x05, 0x73, 0x02, 0x67, 0x11, 0x85, 0x10, 0xFD }; -s8 gPauseMsg_35[] = { 0x7D, 0x0C, 0x85, 0x12, 0x85, 0x05, 0x79, 0x02, 0xFD }; -s8 gPauseMsg_36[] = { 0x28, 0x30, 0xFD }; -s8 gPauseMsg_37[] = { 0x26, 0x30, 0xFD }; -s8 gPauseMsg_38[] = { 0x22, 0x30, 0xFD }; -s8 gPauseMsg_39[] = { 0x0F, 0xFD }; -s8 gPauseMsg_3A[] = { 0x0E, 0xFD }; -s8 gPauseMsg_3B[] = { 0x69, 0x08, 0x81, 0x07, 0xFD }; -s8 gPauseMsg_3C[] = { 0x7B, 0x25, 0x60, 0x01, 0xFD }; -s8 gPauseMsg_3D[] = { 0x6B, 0x02, 0x6C, 0x02, 0x7B, 0x25, 0x60, 0x01, 0xFD }; -s8 gPauseMsg_3E[] = { 0x6D, 0x0A, 0x6C, 0x02, 0x7B, 0x25, 0x60, 0x01, 0xFD }; -s8 gPauseMsg_3F[] = { 0x69, 0x08, 0x81, 0x07, 0xFD }; -s8 gPauseMsg_40[] = { 0x68, 0x04, 0x60, 0x01, 0xFD }; -s8 gPauseMsg_41[] = { 0x6B, 0x02, 0x6C, 0x02, 0x68, 0x04, 0x60, 0x01, 0xFD }; -s8 gPauseMsg_42[] = { 0x6D, 0x0A, 0x6C, 0x02, 0x68, 0x04, 0x60, 0x01, 0xFD }; -s8 gPauseMsg_43[] = { 0x75, 0x04, 0x76, 0x04, 0x81, 0x03, 0xFD }; -s8 gPauseMsg_44[] = { 0x82, 0x07, 0x6C, 0x02, 0xFD }; -s8 gPauseMsg_46[] = { 0x22, 0x30, 0xFD }; -s8 gPauseMsg_47[] = { 0x69, 0x07, 0x81, 0x07, 0x7B, 0x0E, 0x7C, 0x0E, 0xFD }; -s8 gPauseMsg_48[] = { 0x81, 0x07, 0x6F, 0x17, 0x7B, 0x0E, 0x7C, 0x0E, 0xFD }; -s8 gPauseMsg_49[] = { 0xFD }; -s8 gPauseMsg_4A[] = { 0x69, 0x08, 0x81, 0x07, 0x6C, 0x14, 0x78, 0x0D, 0xF7, 0x22, 0x30, 0xFD }; -s8 gPauseMsg_4B[] = { 0x76, 0x06, 0x8B, 0x06, 0x85, 0x07, 0x82, 0x12, 0x8C, 0x04, 0x87, 0x04, 0xFD }; -s8 gPauseMsg_50[] = { 0x77, 0x10, 0x74, 0x0D, 0xFD }; -s8 gPauseMsg_4F[] = { 0x8C, 0x07, 0x80, 0x05, 0x77, 0x10, 0x74, 0x0D, 0xFD }; -s8 gPauseMsg_53[] = { 0x28, 0x30, 0xFD }; -s8 gPauseMsg_54[] = { 0x26, 0x30, 0xFD }; -s8 gPauseMsg_55[] = { 0x6A, 0x11, 0x8B, 0x06, 0xFD }; -s8 gPauseMsg_56[] = { 0x74, 0x08, 0x74, 0x08, 0x74, 0x08, 0xFD }; +u8 gPauseMsg_17[] = { 0x8F, 0x0C, 0x75, 0x12, 0xFD }; +u8 gPauseMsg_18[] = { 0x7B, 0x0E, 0x7C, 0x0E, 0xFD }; +u8 gPauseMsg_19[] = { 0x77, 0x10, 0x74, 0x0D, 0xFD }; +u8 gPauseMsg_1A[] = { 0x79, 0x12, 0x67, 0x09, 0xFD }; +u8 gPauseMsg_32[] = { 0x64, 0x02, 0x75, 0x11, 0xFD }; +u8 gPauseMsg_33[] = { 0x62, 0x05, 0x62, 0x05, 0x87, 0x06, 0x5F, 0x18, 0xFD }; +u8 gPauseMsg_34[] = { 0x62, 0x05, 0x73, 0x02, 0x67, 0x11, 0x85, 0x10, 0xFD }; +u8 gPauseMsg_35[] = { 0x7D, 0x0C, 0x85, 0x12, 0x85, 0x05, 0x79, 0x02, 0xFD }; +u8 gPauseMsg_36[] = { 0x28, 0x30, 0xFD }; +u8 gPauseMsg_37[] = { 0x26, 0x30, 0xFD }; +u8 gPauseMsg_38[] = { 0x22, 0x30, 0xFD }; +u8 gPauseMsg_39[] = { 0x0F, 0xFD }; +u8 gPauseMsg_3A[] = { 0x0E, 0xFD }; +u8 gPauseMsg_3B[] = { 0x69, 0x08, 0x81, 0x07, 0xFD }; +u8 gPauseMsg_3C[] = { 0x7B, 0x25, 0x60, 0x01, 0xFD }; +u8 gPauseMsg_3D[] = { 0x6B, 0x02, 0x6C, 0x02, 0x7B, 0x25, 0x60, 0x01, 0xFD }; +u8 gPauseMsg_3E[] = { 0x6D, 0x0A, 0x6C, 0x02, 0x7B, 0x25, 0x60, 0x01, 0xFD }; +u8 gPauseMsg_3F[] = { 0x69, 0x08, 0x81, 0x07, 0xFD }; +u8 gPauseMsg_40[] = { 0x68, 0x04, 0x60, 0x01, 0xFD }; +u8 gPauseMsg_41[] = { 0x6B, 0x02, 0x6C, 0x02, 0x68, 0x04, 0x60, 0x01, 0xFD }; +u8 gPauseMsg_42[] = { 0x6D, 0x0A, 0x6C, 0x02, 0x68, 0x04, 0x60, 0x01, 0xFD }; +u8 gPauseMsg_43[] = { 0x75, 0x04, 0x76, 0x04, 0x81, 0x03, 0xFD }; +u8 gPauseMsg_44[] = { 0x82, 0x07, 0x6C, 0x02, 0xFD }; +u8 gPauseMsg_46[] = { 0x22, 0x30, 0xFD }; +u8 gPauseMsg_47[] = { 0x69, 0x07, 0x81, 0x07, 0x7B, 0x0E, 0x7C, 0x0E, 0xFD }; +u8 gPauseMsg_48[] = { 0x81, 0x07, 0x6F, 0x17, 0x7B, 0x0E, 0x7C, 0x0E, 0xFD }; +u8 gPauseMsg_49[] = { 0xFD }; +u8 gPauseMsg_4A[] = { 0x69, 0x08, 0x81, 0x07, 0x6C, 0x14, 0x78, 0x0D, 0xF7, 0x22, 0x30, 0xFD }; +u8 gPauseMsg_4B[] = { 0x76, 0x06, 0x8B, 0x06, 0x85, 0x07, 0x82, 0x12, 0x8C, 0x04, 0x87, 0x04, 0xFD }; +u8 gPauseMsg_50[] = { 0x77, 0x10, 0x74, 0x0D, 0xFD }; +u8 gPauseMsg_4F[] = { 0x8C, 0x07, 0x80, 0x05, 0x77, 0x10, 0x74, 0x0D, 0xFD }; +u8 gPauseMsg_53[] = { 0x28, 0x30, 0xFD }; +u8 gPauseMsg_54[] = { 0x26, 0x30, 0xFD }; +u8 gPauseMsg_55[] = { 0x6A, 0x11, 0x8B, 0x06, 0xFD }; +u8 gPauseMsg_56[] = { 0x74, 0x08, 0x74, 0x08, 0x74, 0x08, 0xFD }; #else -s8 gPauseMsg_17[] = { 0x33, 0x54, 0x41, 0x54, 0x53, 0xFD }; // Stats[End] -s8 gPauseMsg_18[] = { 0x22, 0x41, 0x44, 0x47, 0x45, 0xFD }; // Badge[End] -s8 gPauseMsg_19[] = { 0x29, 0x54, 0x45, 0x4D, 0x53, 0xFD }; // Items[End] -s8 gPauseMsg_1A[] = { 0x30, 0x41, 0x52, 0x54, 0x59, 0xFD }; // Party[End] -s8 gPauseMsg_32[] = { 0x23, 0x4F, 0x49, 0x4E, 0x53, 0xFD }; // Coins[End] -s8 gPauseMsg_33[] = { 0x33, 0x54, 0x41, 0x52, 0xF7, 0x30, 0x4F, 0x49, 0x4E, 0x54, 0x53, 0xFD }; // Star Points[End] -s8 gPauseMsg_34[] = { 0x33, 0x54, 0x41, 0x52, 0xF7, 0x30, 0x49, 0x45, 0x43, 0x45, 0x53, 0xFD }; // Star Pieces[End] -s8 gPauseMsg_35[] = { 0x30, 0x4C, 0x41, 0x59, 0xF7, 0x34, 0x49, 0x4D, 0x45, 0xFD }; // Play Time[End] -s8 gPauseMsg_36[] = { 0x28, 0x30, 0xFD }; // HP[End] -s8 gPauseMsg_37[] = { 0x26, 0x30, 0xFD }; // FP[End] -s8 gPauseMsg_38[] = { 0x22, 0x30, 0xFD }; // BP[End] -s8 gPauseMsg_39[] = { 0x0F, 0xFD }; // /[End] -s8 gPauseMsg_3A[] = { 0x0E, 0xFD }; // .[End] -s8 gPauseMsg_3B[] = { 0x2E, 0x4F, 0x4E, 0x45, 0xFD }; // None[End] -s8 gPauseMsg_3C[] = { 0x22, 0x4F, 0x4F, 0x54, 0x53, 0xFD }; // Boots[End] -s8 gPauseMsg_3D[] = { 0x33, 0x55, 0x50, 0x45, 0x52, 0xF7, 0x22, 0x4F, 0x4F, 0x54, 0x53, 0xFD }; // Super Boots[End] -s8 gPauseMsg_3E[] = { 0x35, 0x4C, 0x54, 0x52, 0x41, 0xF7, 0x22, 0x4F, 0x4F, 0x54, 0x53, 0xFD }; // Ultra Boots[End] -s8 gPauseMsg_3F[] = { 0x2E, 0x4F, 0x4E, 0x45, 0xFD }; // None[End] -s8 gPauseMsg_40[] = { 0x28, 0x41, 0x4D, 0x4D, 0x45, 0x52, 0xFD }; // Hammer[End] -s8 gPauseMsg_41[] = { 0x33, 0x55, 0x50, 0x45, 0x52, 0xF7, 0x28, 0x41, 0x4D, 0x4D, 0x45, 0x52, 0xFD }; // Super Hammer[End] -s8 gPauseMsg_42[] = { 0x35, 0x4C, 0x54, 0x52, 0x41, 0xF7, 0x28, 0x41, 0x4D, 0x4D, 0x45, 0x52, 0xFD }; // Ultra Hammer[End] -s8 gPauseMsg_43[] = { 0x2D, 0x41, 0x52, 0x49, 0x4F, 0xFD }; // Mario[End] -s8 gPauseMsg_44[] = { 0x2C, 0x45, 0x56, 0x45, 0x4C, 0xFD }; // Level[End] -s8 gPauseMsg_46[] = { 0x22, 0x30, 0xFD }; // BP[End] -s8 gPauseMsg_47[] = { 0x21, 0x4C, 0x4C, 0xF7, 0x22, 0x41, 0x44, 0x47, 0x45, 0x53, 0xFD }; // All Badges[End] -s8 gPauseMsg_48[] = { 0x21, 0x43, 0x54, 0x49, 0x56, 0x45, 0xFD }; // Active[End] -s8 gPauseMsg_49[] = { 0x22, 0x41, 0x44, 0x47, 0x45, 0x53, 0xFD }; // Badges[End] -s8 gPauseMsg_4A[] = { 0x2E, 0x4F, 0x54, 0xF7, 0x45, 0x4E, 0x4F, 0x55, 0x47, 0x48, 0xF7, 0x22, 0x30, 0xFD }; // Not enough BP[End] -s8 gPauseMsg_4B[] = { 0x24, 0x4F, 0x4E, 0x07, 0x54, 0xF7, 0x57, 0x45, 0x41, 0x52, 0xF7, 0x4D, 0x4F, 0x52, 0x45, 0x01, 0xFD }; // Don't wear more![End] -s8 gPauseMsg_50[] = { 0x29, 0x54, 0x45, 0x4D, 0x53, 0xFD }; // Items[End] -s8 gPauseMsg_4F[] = { 0x2B, 0x45, 0x59, 0xF7, 0x29, 0x54, 0x45, 0x4D, 0x53, 0xFD }; // Key Items[End] -s8 gPauseMsg_53[] = { 0x28, 0x30, 0xFD }; // HP[End] -s8 gPauseMsg_54[] = { 0x26, 0x30, 0xFD }; // FP[End] -s8 gPauseMsg_55[] = { 0x21, 0x42, 0x49, 0x4C, 0x49, 0x54, 0x49, 0x45, 0x53, 0xFD }; // Abilities[End] -s8 gPauseMsg_56[] = { 0x1F, 0x1F, 0x1F, 0xFD }; // ???[End] +u8 gPauseMsg_17[] = { 0x33, 0x54, 0x41, 0x54, 0x53, 0xFD }; // Stats[End] +u8 gPauseMsg_18[] = { 0x22, 0x41, 0x44, 0x47, 0x45, 0xFD }; // Badge[End] +u8 gPauseMsg_19[] = { 0x29, 0x54, 0x45, 0x4D, 0x53, 0xFD }; // Items[End] +u8 gPauseMsg_1A[] = { 0x30, 0x41, 0x52, 0x54, 0x59, 0xFD }; // Party[End] +u8 gPauseMsg_32[] = { 0x23, 0x4F, 0x49, 0x4E, 0x53, 0xFD }; // Coins[End] +u8 gPauseMsg_33[] = { 0x33, 0x54, 0x41, 0x52, 0xF7, 0x30, 0x4F, 0x49, 0x4E, 0x54, 0x53, 0xFD }; // Star Points[End] +u8 gPauseMsg_34[] = { 0x33, 0x54, 0x41, 0x52, 0xF7, 0x30, 0x49, 0x45, 0x43, 0x45, 0x53, 0xFD }; // Star Pieces[End] +u8 gPauseMsg_35[] = { 0x30, 0x4C, 0x41, 0x59, 0xF7, 0x34, 0x49, 0x4D, 0x45, 0xFD }; // Play Time[End] +u8 gPauseMsg_36[] = { MSG_CHAR_UPPER_H, MSG_CHAR_UPPER_P, MSG_CHAR_READ_END }; // HP[End] +u8 gPauseMsg_37[] = { MSG_CHAR_UPPER_F, MSG_CHAR_UPPER_P, MSG_CHAR_READ_END }; // FP[End] +u8 gPauseMsg_38[] = { MSG_CHAR_UPPER_B, MSG_CHAR_UPPER_P, MSG_CHAR_READ_END }; // BP[End] +u8 gPauseMsg_39[] = { MSG_CHAR_FORWARDSLASH, MSG_CHAR_READ_END }; // /[End] +u8 gPauseMsg_3A[] = { MSG_CHAR_PERIOD, MSG_CHAR_READ_END }; // .[End] +u8 gPauseMsg_3B[] = { 0x2E, 0x4F, 0x4E, 0x45, 0xFD }; // None[End] +u8 gPauseMsg_3C[] = { 0x22, 0x4F, 0x4F, 0x54, 0x53, 0xFD }; // Boots[End] +u8 gPauseMsg_3D[] = { 0x33, 0x55, 0x50, 0x45, 0x52, 0xF7, 0x22, 0x4F, 0x4F, 0x54, 0x53, 0xFD }; // Super Boots[End] +u8 gPauseMsg_3E[] = { 0x35, 0x4C, 0x54, 0x52, 0x41, 0xF7, 0x22, 0x4F, 0x4F, 0x54, 0x53, 0xFD }; // Ultra Boots[End] +u8 gPauseMsg_3F[] = { 0x2E, 0x4F, 0x4E, 0x45, 0xFD }; // None[End] +u8 gPauseMsg_40[] = { 0x28, 0x41, 0x4D, 0x4D, 0x45, 0x52, 0xFD }; // Hammer[End] +u8 gPauseMsg_41[] = { 0x33, 0x55, 0x50, 0x45, 0x52, 0xF7, 0x28, 0x41, 0x4D, 0x4D, 0x45, 0x52, 0xFD }; // Super Hammer[End] +u8 gPauseMsg_42[] = { 0x35, 0x4C, 0x54, 0x52, 0x41, 0xF7, 0x28, 0x41, 0x4D, 0x4D, 0x45, 0x52, 0xFD }; // Ultra Hammer[End] +u8 gPauseMsg_43[] = { 0x2D, 0x41, 0x52, 0x49, 0x4F, 0xFD }; // Mario[End] +u8 gPauseMsg_44[] = { 0x2C, 0x45, 0x56, 0x45, 0x4C, 0xFD }; // Level[End] +u8 gPauseMsg_46[] = { MSG_CHAR_UPPER_B, MSG_CHAR_UPPER_P, MSG_CHAR_READ_END }; // BP[End] +u8 gPauseMsg_47[] = { 0x21, 0x4C, 0x4C, 0xF7, 0x22, 0x41, 0x44, 0x47, 0x45, 0x53, 0xFD }; // All Badges[End] +u8 gPauseMsg_48[] = { 0x21, 0x43, 0x54, 0x49, 0x56, 0x45, 0xFD }; // Active[End] +u8 gPauseMsg_49[] = { 0x22, 0x41, 0x44, 0x47, 0x45, 0x53, 0xFD }; // Badges[End] +u8 gPauseMsg_4A[] = { 0x2E, 0x4F, 0x54, 0xF7, 0x45, 0x4E, 0x4F, 0x55, 0x47, 0x48, 0xF7, 0x22, 0x30, 0xFD }; // Not enough BP[End] +u8 gPauseMsg_4B[] = { 0x24, 0x4F, 0x4E, 0x07, 0x54, 0xF7, 0x57, 0x45, 0x41, 0x52, 0xF7, 0x4D, 0x4F, 0x52, 0x45, 0x01, 0xFD }; // Don't wear more![End] +u8 gPauseMsg_50[] = { 0x29, 0x54, 0x45, 0x4D, 0x53, 0xFD }; // Items[End] +u8 gPauseMsg_4F[] = { 0x2B, 0x45, 0x59, 0xF7, 0x29, 0x54, 0x45, 0x4D, 0x53, 0xFD }; // Key Items[End] +u8 gPauseMsg_53[] = { MSG_CHAR_UPPER_H, MSG_CHAR_UPPER_P, MSG_CHAR_READ_END }; // HP[End] +u8 gPauseMsg_54[] = { MSG_CHAR_UPPER_F, MSG_CHAR_UPPER_P, MSG_CHAR_READ_END }; // FP[End] +u8 gPauseMsg_55[] = { 0x21, 0x42, 0x49, 0x4C, 0x49, 0x54, 0x49, 0x45, 0x53, 0xFD }; // Abilities[End] +u8 gPauseMsg_56[] = { MSG_CHAR_QUESTION, MSG_CHAR_QUESTION, MSG_CHAR_QUESTION, MSG_CHAR_READ_END }; // ???[End] #endif s32 gPauseMessages[] = { - 0, MSG_MenuTip_BadgeTutorial_01, MSG_MenuTip_002B, MSG_MenuTip_002C, - MSG_MenuTip_002D, MSG_MenuTip_002E, MSG_MenuTip_002F, MSG_MenuTip_0030, - MSG_MenuTip_0031, MSG_MenuTip_BadgeTutorial_02, MSG_MenuTip_BadgeTutorial_03, MSG_MenuTip_BadgeTutorial_04, - MSG_MenuTip_BadgeTutorial_05, MSG_MenuTip_BadgeTutorial_06, MSG_MenuTip_BadgeTutorial_07, MSG_MenuTip_BadgeTutorial_08, - MSG_MenuTip_BadgeTutorial_09, MSG_MenuTip_BadgeTutorial_10, MSG_MenuTip_BadgeTutorial_11, MSG_MenuTip_BadgeTutorial_12, - MSG_MenuTip_BadgeTutorial_13, MSG_MenuTip_BadgeTutorial_14, MSG_MenuTip_BadgeTutorial_15, (s32)gPauseMsg_17, - (s32)gPauseMsg_18, (s32)gPauseMsg_19, (s32)gPauseMsg_1A, MSG_MenuTip_StatsTab, - MSG_MenuTip_BadgesTab, MSG_MenuTip_ItemsTab, MSG_MenuTip_PartyTab, MSG_MenuTip_SpiritsTab, - MSG_MenuTip_MapTab, MSG_MenuTip_ControllingMario, MSG_MenuTip_HeartPoints, MSG_MenuTip_FlowerPoints, - MSG_MenuTip_BadgePoints, MSG_MenuTip_Boots1, MSG_MenuTip_Boots2, MSG_MenuTip_Boots3, - MSG_MenuTip_Hammer0, MSG_MenuTip_Hammer1, MSG_MenuTip_Hammer2, MSG_MenuTip_Hammer3, - MSG_MenuTip_StarPower, MSG_MenuTip_StarPoints, MSG_MenuTip_Coins, MSG_MenuTip_Secrets, - MSG_MenuTip_StarPieces, MSG_MenuTip_Time, (s32)gPauseMsg_32, (s32)gPauseMsg_33, - (s32)gPauseMsg_34, (s32)gPauseMsg_35, (s32)gPauseMsg_36, (s32)gPauseMsg_37, - (s32)gPauseMsg_38, (s32)gPauseMsg_39, (s32)gPauseMsg_3A, (s32)gPauseMsg_3B, - (s32)gPauseMsg_3C, (s32)gPauseMsg_3D, (s32)gPauseMsg_3E, (s32)gPauseMsg_3F, - (s32)gPauseMsg_40, (s32)gPauseMsg_41, (s32)gPauseMsg_42, (s32)gPauseMsg_43, - (s32)gPauseMsg_44, MSG_MenuTip_None, (s32)gPauseMsg_46, (s32)gPauseMsg_47, - (s32)gPauseMsg_48, (s32)gPauseMsg_49, (s32)gPauseMsg_4A, (s32)gPauseMsg_4B, - MSG_MenuTip_BadgeTab_All, MSG_MenuTip_BadgeTab_Equipped, MSG_MenuTip_None, (s32)gPauseMsg_4F, - (s32)gPauseMsg_50, MSG_MenuTip_ItemTab_Consumables, MSG_MenuTip_ItemTab_KeyItems, (s32)gPauseMsg_53, - (s32)gPauseMsg_54, (s32)gPauseMsg_55, (s32)gPauseMsg_56 + [PAUSE_MSG_NONE] MSG_NONE, + [PAUSE_MSG_TUT_NAME_BADGES] MSG_MenuTip_BadgeTutorial_01, + [PAUSE_MSG_TUT_UNUSED_1] MSG_MenuTip_002B, + [PAUSE_MSG_TUT_UNUSED_2] MSG_MenuTip_002C, + [PAUSE_MSG_TUT_UNUSED_3] MSG_MenuTip_002D, + [PAUSE_MSG_TUT_UNUSED_4] MSG_MenuTip_002E, + [PAUSE_MSG_TUT_UNUSED_5] MSG_MenuTip_002F, + [PAUSE_MSG_TUT_UNUSED_6] MSG_MenuTip_0030, + [PAUSE_MSG_TUT_UNUSED_7] MSG_MenuTip_0031, + [PAUSE_MSG_TUT_DESC_1] MSG_MenuTip_BadgeTutorial_02, + [PAUSE_MSG_TUT_DESC_2] MSG_MenuTip_BadgeTutorial_03, + [PAUSE_MSG_TUT_DESC_3] MSG_MenuTip_BadgeTutorial_04, + [PAUSE_MSG_TUT_DESC_4] MSG_MenuTip_BadgeTutorial_05, + [PAUSE_MSG_TUT_DESC_5] MSG_MenuTip_BadgeTutorial_06, + [PAUSE_MSG_TUT_DESC_6] MSG_MenuTip_BadgeTutorial_07, + [PAUSE_MSG_TUT_DESC_7] MSG_MenuTip_BadgeTutorial_08, + [PAUSE_MSG_TUT_CMD_1] MSG_MenuTip_BadgeTutorial_09, + [PAUSE_MSG_TUT_CMD_2] MSG_MenuTip_BadgeTutorial_10, + [PAUSE_MSG_TUT_CMD_3] MSG_MenuTip_BadgeTutorial_11, + [PAUSE_MSG_TUT_CMD_4] MSG_MenuTip_BadgeTutorial_12, + [PAUSE_MSG_TUT_CMD_5] MSG_MenuTip_BadgeTutorial_13, + [PAUSE_MSG_TUT_CMD_6] MSG_MenuTip_BadgeTutorial_14, + [PAUSE_MSG_TUT_CMD_7] MSG_MenuTip_BadgeTutorial_15, + [PAUSE_MSG_17] (s32) gPauseMsg_17, + [PAUSE_MSG_18] (s32) gPauseMsg_18, + [PAUSE_MSG_19] (s32) gPauseMsg_19, + [PAUSE_MSG_1A] (s32) gPauseMsg_1A, + [PAUSE_MSG_TAB_STATS] MSG_MenuTip_StatsTab, + [PAUSE_MSG_TAB_BADGES] MSG_MenuTip_BadgesTab, + [PAUSE_MSG_TAB_ITEMS] MSG_MenuTip_ItemsTab, + [PAUSE_MSG_TAB_PARTY] MSG_MenuTip_PartyTab, + [PAUSE_MSG_TAB_SPIRITS] MSG_MenuTip_SpiritsTab, + [PAUSE_MSG_TAB_MAP] MSG_MenuTip_MapTab, + [PAUSE_MSG_TIP_CONTROLS] MSG_MenuTip_ControllingMario, + [PAUSE_MSG_TIP_HP] MSG_MenuTip_HeartPoints, + [PAUSE_MSG_TIP_FP] MSG_MenuTip_FlowerPoints, + [PAUSE_MSG_TIP_BP] MSG_MenuTip_BadgePoints, + [PAUSE_MSG_TIP_BOOTS_1] MSG_MenuTip_Boots1, + [PAUSE_MSG_TIP_BOOTS_2] MSG_MenuTip_Boots2, + [PAUSE_MSG_TIP_BOOTS_3] MSG_MenuTip_Boots3, + [PAUSE_MSG_TIP_HAMMER_0] MSG_MenuTip_Hammer0, + [PAUSE_MSG_TIP_HAMMER_1] MSG_MenuTip_Hammer1, + [PAUSE_MSG_TIP_HAMMER_2] MSG_MenuTip_Hammer2, + [PAUSE_MSG_TIP_HAMMER_3] MSG_MenuTip_Hammer3, + [PAUSE_MSG_TIP_STAR_POWER] MSG_MenuTip_StarPower, + [PAUSE_MSG_TIP_STAR_POINTS] MSG_MenuTip_StarPoints, + [PAUSE_MSG_TIP_COINS] MSG_MenuTip_Coins, + [PAUSE_MSG_TIP_SECRETS] MSG_MenuTip_Secrets, + [PAUSE_MSG_TIP_STAR_PIECES] MSG_MenuTip_StarPieces, + [PAUSE_MSG_TIP_TIME] MSG_MenuTip_Time, + [PAUSE_MSG_LBL_COINS] (s32) gPauseMsg_32, + [PAUSE_MSG_LBL_STAR_POINTS] (s32) gPauseMsg_33, + [PAUSE_MSG_LBL_STAR_PIECES] (s32) gPauseMsg_34, + [PAUSE_MSG_LBL_TIME] (s32) gPauseMsg_35, + [PAUSE_MSG_LBL_HP] (s32) gPauseMsg_36, + [PAUSE_MSG_LBL_FP] (s32) gPauseMsg_37, + [PAUSE_MSG_LBL_BP] (s32) gPauseMsg_38, + [PAUSE_MSG_SLASH] (s32) gPauseMsg_39, + [PAUSE_MSG_DOT] (s32) gPauseMsg_3A, + [PAUSE_MSG_3B] (s32) gPauseMsg_3B, + [PAUSE_MSG_3C] (s32) gPauseMsg_3C, + [PAUSE_MSG_3D] (s32) gPauseMsg_3D, + [PAUSE_MSG_3E] (s32) gPauseMsg_3E, + [PAUSE_MSG_3F] (s32) gPauseMsg_3F, + [PAUSE_MSG_40] (s32) gPauseMsg_40, + [PAUSE_MSG_41] (s32) gPauseMsg_41, + [PAUSE_MSG_42] (s32) gPauseMsg_42, + [PAUSE_MSG_MARIO] (s32) gPauseMsg_43, + [PAUSE_MSG_LEVEL] (s32) gPauseMsg_44, + [PAUSE_MSG_NO_BADGE] MSG_MenuTip_None, + [PAUSE_MSG_BADGE_BP] (s32) gPauseMsg_46, + [PAUSE_MSG_ALL_BADGES] (s32) gPauseMsg_47, + [PAUSE_MSG_ACTIVE] (s32) gPauseMsg_48, + [PAUSE_MSG_BADGES] (s32) gPauseMsg_49, + [PAUSE_MSG_NOT_ENOUGH_BP] (s32) gPauseMsg_4A, + [PAUSE_MSG_DONT_WEAR_MORE] (s32) gPauseMsg_4B, + [PAUSE_MSG_BAGDE_DESC_ALL] MSG_MenuTip_BadgeTab_All, + [PAUSE_MSG_BAGDE_DESC_ACTIVE] MSG_MenuTip_BadgeTab_Equipped, + [PAUSE_MSG_BAGDE_DESC_NONE] MSG_MenuTip_None, + [PAUSE_MSG_KEY_ITEMS] (s32) gPauseMsg_4F, + [PAUSE_MSG_CONSUMABLES] (s32) gPauseMsg_50, + [PAUSE_MSG_DESC_CONSUMABLES] MSG_MenuTip_ItemTab_Consumables, + [PAUSE_MSG_DESC_KEY_ITEMS] MSG_MenuTip_ItemTab_KeyItems, + [PAUSE_MSG_PARTNER_HP] (s32) gPauseMsg_53, + [PAUSE_MSG_PARTNER_FP] (s32) gPauseMsg_54, + [PAUSE_MSG_PARTNER_ABILITIES] (s32) gPauseMsg_55, + [PAUSE_MSG_UNKNOWN_SPIRIT] (s32) gPauseMsg_56, }; Gfx* gPauseDLLabels[] = { - gPauseDLBannerHp, gPauseDLBannerFp, gPauseDLBannerBp, gPauseDLBannerBoots, gPauseDLBannerHammer, - gPauseDLBannerStarEnergy, gPauseDLStatsBar, gPauseDLAvailable, gPauseDLCheckAbilities + [PAUSE_LBL_HP] gPauseDLBannerHp, + [PAUSE_LBL_FP] gPauseDLBannerFp, + [PAUSE_LBL_BP] gPauseDLBannerBp, + [PAUSE_LBL_BOOTS] gPauseDLBannerBoots, + [PAUSE_LBL_HAMMER] gPauseDLBannerHammer, + [PAUSE_LBL_ENERGY] gPauseDLBannerStarEnergy, + [PAUSE_LBL_STATS] gPauseDLStatsBar, + [PAUSE_LBL_AVAILABLE] gPauseDLAvailable, + [PAUSE_LBL_ABILITIES] gPauseDLCheckAbilities, }; s32 pause_get_menu_msg(s32 index) { diff --git a/src/pause/pause_items.c b/src/pause/pause_items.c index 6094150694..eb72068df6 100644 --- a/src/pause/pause_items.c +++ b/src/pause/pause_items.c @@ -1,4 +1,5 @@ #include "pause_common.h" +#include "message_ids.h" void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening); void pause_items_init(MenuPanel* panel); @@ -212,7 +213,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, if (i == 0) { if (isNone) { - draw_msg(pause_get_menu_msg(0x4E), sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX, + draw_msg(pause_get_menu_msg(PAUSE_MSG_BAGDE_DESC_NONE), sp6C + pause_items_scroll_offset_x(posX) + itemOffsetX, sp70 + pause_items_scroll_offset_y(posY) + itemOffsetY, 255, palette, style); } else { if (gItemTable[itemID].nameMsg) { @@ -296,7 +297,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, 91, 34, 255, gPauseItemsCurrentTab == 1 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); - msg = pause_get_menu_msg(0x4F); + msg = pause_get_menu_msg(PAUSE_MSG_KEY_ITEMS); msgX = baseX + 12; if (gPauseItemsCurrentTab == 0) { msgX = baseX + 21; @@ -312,7 +313,7 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, 91, 34, 255, gPauseItemsCurrentTab == 0 ? 128 : 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0); - msg = pause_get_menu_msg(0x50); + msg = pause_get_menu_msg(PAUSE_MSG_CONSUMABLES); msgX = baseX + 25; if (gPauseItemsCurrentTab == 1) { msgX = baseX + 34; @@ -541,14 +542,14 @@ void pause_items_handle_input(MenuPanel* panel) { if (gPauseItemsSelectedItem != ITEM_NONE_STANDIN && gPauseItemsSelectedItem != ITEM_INVALID && gPauseItemsSelectedItem != 0) { gPauseCurrentDescMsg = gItemTable[gPauseItemsSelectedItem].fullDescMsg; } else { - gPauseCurrentDescMsg = 0; + gPauseCurrentDescMsg = MSG_NONE; gPauseCurrentDescIconScript = NULL; } } else { if (gPauseItemsCurrentTab == 1) { - gPauseCurrentDescMsg = pause_get_menu_msg(0x51); + gPauseCurrentDescMsg = pause_get_menu_msg(PAUSE_MSG_DESC_CONSUMABLES); } else { - gPauseCurrentDescMsg = pause_get_menu_msg(0x52); + gPauseCurrentDescMsg = pause_get_menu_msg(PAUSE_MSG_DESC_KEY_ITEMS); } gPauseCurrentDescIconScript = NULL; diff --git a/src/pause/pause_main.c b/src/pause/pause_main.c index 61fa914b89..018e67c618 100644 --- a/src/pause/pause_main.c +++ b/src/pause/pause_main.c @@ -66,12 +66,42 @@ s16 gPauseWindowFlipDownAngles_2[] = { 10, 25, 42, 60, 80 }; s32 gPauseTutorialState = -1; s32 gPauseTutorialInputState = 3; s32 gPauseTutorialButtons[] = { BUTTON_A, BUTTON_STICK_RIGHT, BUTTON_A, BUTTON_A, BUTTON_A, BUTTON_A, BUTTON_START }; -s32 gPauseTutorialDescMessages[] = { 9, 10, 11, 12, 13, 14, 15 }; -s32 gPauseTutorialCmdMessages[] = { 16, 17, 18, 19, 20, 21, 22 }; -s32 D_8024F074[] = { 2, 3, 4, 5, 6, 7, 8 }; // unused + +s32 gPauseTutorialDescMessages[] = { + PAUSE_MSG_TUT_DESC_1, + PAUSE_MSG_TUT_DESC_2, + PAUSE_MSG_TUT_DESC_3, + PAUSE_MSG_TUT_DESC_4, + PAUSE_MSG_TUT_DESC_5, + PAUSE_MSG_TUT_DESC_6, + PAUSE_MSG_TUT_DESC_7, +}; + +s32 gPauseTutorialCmdMessages[] = { + PAUSE_MSG_TUT_CMD_1, + PAUSE_MSG_TUT_CMD_2, + PAUSE_MSG_TUT_CMD_3, + PAUSE_MSG_TUT_CMD_4, + PAUSE_MSG_TUT_CMD_5, + PAUSE_MSG_TUT_CMD_6, + PAUSE_MSG_TUT_CMD_7, +}; + + // unused +s32 D_8024F074[] = { + PAUSE_MSG_TUT_UNUSED_1, + PAUSE_MSG_TUT_UNUSED_2, + PAUSE_MSG_TUT_UNUSED_3, + PAUSE_MSG_TUT_UNUSED_4, + PAUSE_MSG_TUT_UNUSED_5, + PAUSE_MSG_TUT_UNUSED_6, + PAUSE_MSG_TUT_UNUSED_7, +}; + s32 gPauseTutorialIconIDs[] = { 5, 4, 5, 5, 5, 5, 6 }; u8 gPauseMenuTextScrollInterpEasingLUT[] = { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}; u8 gPauseMenuPageScrollInterpEasingLUT[] = { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}; + s32 gPauseTutorialSpriteAnims[][4] = { { ANIM_Goombaria_Still, @@ -553,9 +583,9 @@ void pause_tutorial_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } - get_msg_properties(pause_get_menu_msg(1), &msgHeight, &msgWidth, &msgMaxLineChars, &msgNumLines, &msgMaxLinesPerPage, NULL, 1); + get_msg_properties(pause_get_menu_msg(PAUSE_MSG_TUT_NAME_BADGES), &msgHeight, &msgWidth, &msgMaxLineChars, &msgNumLines, &msgMaxLinesPerPage, NULL, 1); margin = (s32)(width - msgWidth) >> 1; - draw_msg(pause_get_menu_msg(1), baseX + margin, baseY, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(PAUSE_MSG_TUT_NAME_BADGES), baseX + margin, baseY, 255, MSG_PAL_WHITE, DRAW_MSG_STYLE_MENU); gPauseTutorialScrollPos += pause_interp_text_scroll(gPauseTutorialState * 140 - gPauseTutorialScrollPos); gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1); state = gPauseTutorialState; @@ -600,7 +630,7 @@ void pause_init(void) { gPauseDescTextOffset = 0; gPauseDescTextMaxPos = 0; gPauseShownDescIconScript = 0; - gPauseCurrentDescMsg = 0; + gPauseCurrentDescMsg = MSG_NONE; gPauseCurrentDescIconScript = 0; gPauseMenuCurrentTab = 0; diff --git a/src/pause/pause_map.c b/src/pause/pause_map.c index 3eee87f685..d4f9fdd45a 100644 --- a/src/pause/pause_map.c +++ b/src/pause/pause_map.c @@ -517,7 +517,7 @@ void pause_map_handle_input(MenuPanel* tab) { gPauseCurrentDescIconScript = 0; if (gPauseMapCursorCurrentOption == -1) { - gPauseCurrentDescMsg = 0; + gPauseCurrentDescMsg = MSG_NONE; return; } diff --git a/src/pause/pause_partners.c b/src/pause/pause_partners.c index 9aba7b703d..cf145eeff2 100644 --- a/src/pause/pause_partners.c +++ b/src/pause/pause_partners.c @@ -354,7 +354,7 @@ void pause_partners_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid } if (gPauseMenuCurrentTab == currentTab && gPausePartnersLevel == 0) { - pause_draw_menu_label(8, 18, 158); + pause_draw_menu_label(PAUSE_LBL_ABILITIES, 18, 158); } } @@ -529,7 +529,7 @@ void pause_partners_draw_movelist(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid } void pause_partners_draw_movelist_title(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { - draw_msg(pause_get_menu_msg(0x55), baseX + 12, baseY + 1, 255, -1, DRAW_MSG_STYLE_MENU); + draw_msg(pause_get_menu_msg(PAUSE_MSG_PARTNER_ABILITIES), baseX + 12, baseY + 1, 255, -1, DRAW_MSG_STYLE_MENU); } void pause_partners_draw_movelist_flower(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { diff --git a/src/pause/pause_spirits.c b/src/pause/pause_spirits.c index ceca3a5b04..e310c0a44b 100644 --- a/src/pause/pause_spirits.c +++ b/src/pause/pause_spirits.c @@ -252,7 +252,7 @@ void pause_spirits_draw_title(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, if (playerData->maxStarPower > gPauseSpiritsIndexes[menu->selected]) { msgID = gPauseSpiritsIndexes[menu->selected] + MSG_Menus_SpiritName_Eldstar; } else { - msgID = pause_get_menu_msg(0x56); + msgID = pause_get_menu_msg(PAUSE_MSG_UNKNOWN_SPIRIT); } draw_msg(msgID, baseX + ((width - get_msg_width(msgID, 0)) >> 1), baseY + 1, 255, MSG_PAL_WHITE, 0); } @@ -373,7 +373,7 @@ void pause_spirits_handle_input(MenuPanel* panel) { gPauseCurrentDescIconScript = 0; if (get_player_data()->maxStarPower <= gPauseSpiritsIndexes[panel->selected]) { - gPauseCurrentDescMsg = pause_get_menu_msg(0x56); + gPauseCurrentDescMsg = pause_get_menu_msg(PAUSE_MSG_UNKNOWN_SPIRIT); } else { gPauseCurrentDescMsg = MSG_Menus_SpiritDesc_Eldstar + gPauseSpiritsIndexes[panel->selected]; } diff --git a/src/pause/pause_stats.c b/src/pause/pause_stats.c index 9f586994fa..6819ea32c6 100644 --- a/src/pause/pause_stats.c +++ b/src/pause/pause_stats.c @@ -38,10 +38,36 @@ typedef struct { s32 baseMsgID; } StatsEntryData; // size = 0xC -HudScript* gStatsMenuElements[] = { &HES_MarioHeadSmall, &HES_StatBoots0, &HES_StatHammer0, - &HES_StatusCoin, &HES_StatusStarPoint, &HES_StatStarPiece_1, - &HES_Clock, &HES_StatusHeart, &HES_StatFp_1, &HES_StatBp, - &HES_StatusStar1, &HES_StatTimes}; +enum { + STAT_ICON_MARIO = 0, + STAT_ICON_BOOTS = 1, + STAT_ICON_HAMMER = 2, + STAT_ICON_COIN = 3, + STAT_ICON_STAR_POINT = 4, + STAT_ICON_STAR_PIECE = 5, + STAT_ICON_CLOCK = 6, + STAT_ICON_HP = 7, + STAT_ICON_FP = 8, + STAT_ICON_BP = 9, + STAT_ICON_STAR = 10, + STAT_ICON_TIMES = 11, +}; + +HudScript* gStatsMenuElements[] = { + [STAT_ICON_MARIO] &HES_MarioHeadSmall, + [STAT_ICON_BOOTS] &HES_StatBoots0, + [STAT_ICON_HAMMER] &HES_StatHammer0, + [STAT_ICON_COIN] &HES_StatusCoin, + [STAT_ICON_STAR_POINT] &HES_StatusStarPoint, + [STAT_ICON_STAR_PIECE] &HES_StatStarPiece_1, + [STAT_ICON_CLOCK] &HES_Clock, + [STAT_ICON_HP] &HES_StatusHeart, + [STAT_ICON_FP] &HES_StatFp_1, + [STAT_ICON_BP] &HES_StatBp, + [STAT_ICON_STAR] &HES_StatusStar1, + [STAT_ICON_TIMES] &HES_StatTimes, +}; + HudScript* gStatsBootsElements[] = { &HES_StatBoots0, &HES_StatBoots1, &HES_StatBoots2, &HES_StatBoots3 }; HudScript* gStatsHammerElements[] = { &HES_StatHammer0, &HES_StatHammer1, &HES_StatHammer2, &HES_StatHammer3 }; s32 gPauseStatsBootsMessages[] = { 59, 60, 61, 62 }; @@ -56,18 +82,18 @@ s8 gPauseStatsGridData[] = { 3, 10 }; StatsEntryData gStatsMenuEntries[] = { - {.cursorX = 9, .cursorY = 20, .baseMsgID = 33}, - {.cursorX = 17, .cursorY = 55, .baseMsgID = 34}, - {.cursorX = 17, .cursorY = 90, .baseMsgID = 35}, - {.cursorX = 17, .cursorY = 124, .baseMsgID = 36}, - {.cursorX = 138, .cursorY = 28, .baseMsgID = 37}, - {.cursorX = 138, .cursorY = 53, .baseMsgID = 40}, - {.cursorX = 132, .cursorY = 76, .baseMsgID = 44}, - {.cursorX = 125, .cursorY = 91, .baseMsgID = 45}, - {.cursorX = 125, .cursorY = 106, .baseMsgID = 46}, - {.cursorX = 125, .cursorY = 121, .baseMsgID = 47}, - {.cursorX = 125, .cursorY = 138, .baseMsgID = 49} -}; + { .cursorX = 9, .cursorY = 20, .baseMsgID = PAUSE_MSG_TIP_CONTROLS }, + { .cursorX = 17, .cursorY = 55, .baseMsgID = PAUSE_MSG_TIP_HP }, + { .cursorX = 17, .cursorY = 90, .baseMsgID = PAUSE_MSG_TIP_FP }, + { .cursorX = 17, .cursorY = 124, .baseMsgID = PAUSE_MSG_TIP_BP }, + { .cursorX = 138, .cursorY = 28, .baseMsgID = PAUSE_MSG_TIP_BOOTS_1 }, + { .cursorX = 138, .cursorY = 53, .baseMsgID = PAUSE_MSG_TIP_HAMMER_0 }, + { .cursorX = 132, .cursorY = 76, .baseMsgID = PAUSE_MSG_TIP_STAR_POWER }, + { .cursorX = 125, .cursorY = 91, .baseMsgID = PAUSE_MSG_TIP_STAR_POINTS }, + { .cursorX = 125, .cursorY = 106, .baseMsgID = PAUSE_MSG_TIP_COINS }, + { .cursorX = 125, .cursorY = 121, .baseMsgID = PAUSE_MSG_TIP_SECRETS }, + { .cursorX = 125, .cursorY = 138, .baseMsgID = PAUSE_MSG_TIP_TIME }, +}; HudScript* gPauseStatsSPIncElements[] = { &HES_StatusSPIncrement1, &HES_StatusSPIncrement3, &HES_StatusSPIncrement2, &HES_StatusSPIncrement4, &HES_StatusSPIncrement5, &HES_StatusSPIncrement6, @@ -122,81 +148,99 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, PlayerData* playerData; s16 bootsLevel; s16 hammerLevel; - s32 icon10; - s32 limit; - s32 var_s2_2; - s32 var_s3_2; - s32 cond; - s32 elemIdx; + s32 powHudElemID; + s32 powIncrements; + s32 powIncIdx; + s32 curIncrement; + b32 drawingFirst; + s32 powBarIdx; s32 boxWidth; s16 level; - s32 frameCounter; - s32 maxStarPower; + s32 frameCount; + s32 powFullBars; - hud_element_set_render_pos(gPauseStatsIconIDs[3], baseX + 143, baseY + 109); - hud_element_draw_without_clipping(gPauseStatsIconIDs[3]); - draw_msg(pause_get_menu_msg(0x32), baseX + 155, baseY + 101, 255, 0xA, 1); - draw_number(gPlayerData.coins, baseX + 281, baseY + 101 + NUMBER_OFFSET_Y, 1, 0xA, 255, 3); - hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 108); - hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); - hud_element_set_render_pos(gPauseStatsIconIDs[4], baseX + 143, baseY + 0x5E); - hud_element_draw_without_clipping(gPauseStatsIconIDs[4]); - draw_msg(pause_get_menu_msg(51), baseX + 155, baseY + 86, 255, 0xA, 1); - draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86 + NUMBER_OFFSET_Y, 1, 0xA, 255, 3); - hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 93); - hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); - hud_element_set_render_pos(gPauseStatsIconIDs[5], baseX + 143, baseY + 123); - hud_element_draw_without_clipping(gPauseStatsIconIDs[5]); - draw_msg(pause_get_menu_msg(0x34), baseX + 155, baseY + 116, 255, 0xA, 1); - draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116 + NUMBER_OFFSET_Y, 1, 0xA, 255, 3); - hud_element_set_render_pos(gPauseStatsIconIDs[11], baseX + 248, baseY + 123); - hud_element_draw_without_clipping(gPauseStatsIconIDs[11]); - pause_draw_menu_label(0, baseX + 21, baseY + 35); - hud_element_set_render_pos(gPauseStatsIconIDs[7], baseX + 52, baseY + 57); - hud_element_draw_without_clipping(gPauseStatsIconIDs[7]); - draw_msg(pause_get_menu_msg(0x36), baseX + COL_A_X, baseY + ROW_1_Y, 255, 0, 1); + // draw coin count + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_COIN], baseX + 143, baseY + 109); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_COIN]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_COINS), baseX + 155, baseY + 101, 255, MSG_PAL_STANDARD, 1); + draw_number(gPlayerData.coins, baseX + 281, baseY + 101 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 108); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]); + + // draw star point count + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_STAR_POINT], baseX + 143, baseY + 94); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_STAR_POINT]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_STAR_POINTS), baseX + 155, baseY + 86, 255, MSG_PAL_STANDARD, 1); + draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 93); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]); + + // draw star piece count + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_STAR_PIECE], baseX + 143, baseY + 123); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_STAR_PIECE]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_STAR_PIECES), baseX + 155, baseY + 116, 255, MSG_PAL_STANDARD, 1); + draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 123); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]); + + // draw HP count + pause_draw_menu_label(PAUSE_LBL_HP, baseX + 21, baseY + 35); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_HP], baseX + 52, baseY + 57); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_HP]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_HP), baseX + COL_A_X, baseY + ROW_1_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.curHP, baseX + 78, baseY + 51, 1, 0, 255, 3); - draw_msg(pause_get_menu_msg(0x39), baseX + COL_B_X, baseY + ROW_2_Y, 255, 0, 1); + draw_msg(pause_get_menu_msg(PAUSE_MSG_SLASH), baseX + COL_B_X, baseY + ROW_2_Y, 255, MSG_PAL_WHITE, 1); draw_number(gPlayerData.curMaxHP, baseX + COL_C_X, baseY + ROW_2_Y + NUMBER_OFFSET_Y, 1, 0, 255, 3); - pause_draw_menu_label(1, baseX + 21, baseY + 69); - hud_element_set_render_pos(gPauseStatsIconIDs[8], baseX + 52, baseY + 92); - hud_element_draw_without_clipping(gPauseStatsIconIDs[8]); - draw_msg(pause_get_menu_msg(0x37), baseX + COL_A_X, baseY + ROW_3_Y, 255, 0, 1); - draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, 1, 0, 255, 3); - draw_msg(pause_get_menu_msg(0x39), baseX + COL_B_X, baseY + ROW_3_Y, 255, 0, 1); - draw_number(gPlayerData.curMaxFP, baseX + COL_C_X, baseY + ROW_3_Y + NUMBER_OFFSET_Y, 1, 0, 255, 3); - pause_draw_menu_label(2, baseX + 21, baseY + 103); - hud_element_set_render_pos(gPauseStatsIconIDs[9], baseX + 52, baseY + 126); - hud_element_draw_without_clipping(gPauseStatsIconIDs[9]); - draw_msg(pause_get_menu_msg(0x38), baseX + COL_A_X, baseY + ROW_4_Y, 255, 0, 1); - draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, 1, 0, 255, 3); - hud_element_set_render_pos(gPauseStatsIconIDs[6], baseX + 143, baseY + 140); - hud_element_draw_without_clipping(gPauseStatsIconIDs[6]); - draw_msg(pause_get_menu_msg(0x35), baseX + 155, baseY + 133, 255, 0xA, 1); - frameCounter = gPlayerData.frameCounter; - if (frameCounter > 21599999) { - frameCounter = 21599999; + // draw FP count + pause_draw_menu_label(PAUSE_LBL_FP, baseX + 21, baseY + 69); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_FP], baseX + 52, baseY + 92); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_FP]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_FP), baseX + COL_A_X, baseY + ROW_3_Y, 255, MSG_PAL_WHITE, 1); + draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, 1, MSG_PAL_WHITE, 255, 3); + draw_msg(pause_get_menu_msg(PAUSE_MSG_SLASH), baseX + COL_B_X, baseY + ROW_3_Y, 255, MSG_PAL_WHITE, 1); + draw_number(gPlayerData.curMaxFP, baseX + COL_C_X, baseY + ROW_3_Y + NUMBER_OFFSET_Y, 1, MSG_PAL_WHITE, 255, 3); + + // draw BP count + pause_draw_menu_label(PAUSE_LBL_BP, baseX + 21, baseY + 103); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_BP], baseX + 52, baseY + 126); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_BP]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_BP), baseX + COL_A_X, baseY + ROW_4_Y, 255, MSG_PAL_WHITE, 1); + draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, 1, MSG_PAL_WHITE, 255, 3); + + #define MINUTE (60 * 60) + #define HOUR (MINUTE * 60) + + // draw play time + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_CLOCK], baseX + 143, baseY + 140); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_CLOCK]); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_TIME), baseX + 155, baseY + 133, 255, MSG_PAL_STANDARD, 1); + frameCount = gPlayerData.frameCounter; + if (frameCount >= (100 * HOUR)) { + frameCount = (100 * HOUR) - 1; } - draw_number((frameCounter / 2160000) % 10, baseX + 237, baseY + 133 + NUMBER_OFFSET_Y, 1, 0xA, 255, 2); - draw_number((frameCounter / 216000) - ((frameCounter / 2160000) * 10), baseX + 246, baseY + 133 + NUMBER_OFFSET_Y, 1, 0xA, 255, 2); - draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 132, 255, 0xA, 1); - draw_msg(pause_get_menu_msg(0x3A), baseX + 257, baseY + 127, 255, 0xA, 1); - draw_number((frameCounter / 36000) - ((frameCounter / 216000) * 6), baseX + 264, baseY + 133 + NUMBER_OFFSET_Y, 1, 0xA, 255, 2); - draw_number((frameCounter / 3600) - ((frameCounter / 36000) * 10), baseX + 273, baseY + 133 + NUMBER_OFFSET_Y, 1, 0xA, 255, 2); + // draw hours + draw_number((frameCount / (10 * HOUR)) % 10, baseX + 237, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); + draw_number((frameCount / HOUR) % 10, baseX + 246, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); + draw_msg(pause_get_menu_msg(PAUSE_MSG_DOT), baseX + 257, baseY + 132, 255, MSG_PAL_STANDARD, 1); + draw_msg(pause_get_menu_msg(PAUSE_MSG_DOT), baseX + 257, baseY + 127, 255, MSG_PAL_STANDARD, 1); + // draw minutes + draw_number((frameCount / (10 * MINUTE)) % 6, baseX + 264, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); + draw_number((frameCount / MINUTE) % 10, baseX + 273, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2); bootsLevel = gPlayerData.bootsLevel; hammerLevel = gPlayerData.hammerLevel; level = gPlayerData.level; - draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, level >= 10 ? 0x79 : 0x71, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, level >= 10 ? 121 : 113, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); + // draw level #if !VERSION_IQUE - hud_element_set_render_pos(gPauseStatsIconIDs[0], baseX + 61, baseY + 21); - hud_element_draw_without_clipping(gPauseStatsIconIDs[0]); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_MARIO], baseX + 61, baseY + 21); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_MARIO]); #endif - draw_msg(pause_get_menu_msg(0x43), baseX + 16, baseY + 14, 255, 0, 1); - draw_msg(pause_get_menu_msg(0x44), baseX + POS_1_X, baseY + 14, 255, 0, 1); - draw_number(level, baseX + POS_2_X, baseY + 14 + NUMBER_OFFSET_Y, 1, 0, 255, 2); + draw_msg(pause_get_menu_msg(PAUSE_MSG_MARIO), baseX + 16, baseY + 14, 255, MSG_PAL_WHITE, 1); + draw_msg(pause_get_menu_msg(PAUSE_MSG_LEVEL), baseX + POS_1_X, baseY + 14, 255, MSG_PAL_WHITE, 1); + draw_number(level, baseX + POS_2_X, baseY + 14 + NUMBER_OFFSET_Y, 1, MSG_PAL_WHITE, 255, 2); bootsLevel++; if (bootsLevel < 0) { @@ -214,301 +258,319 @@ void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, hammerLevel = 3; } - pause_draw_menu_label(3, baseX + 137, baseY + 10); - pause_draw_menu_label(4, baseX + 137, baseY + 35); + pause_draw_menu_label(PAUSE_LBL_BOOTS, baseX + 137, baseY + 10); + pause_draw_menu_label(PAUSE_LBL_HAMMER, baseX + 137, baseY + 35); - hud_element_set_script(gPauseStatsIconIDs[1], gStatsBootsElements[bootsLevel]); - hud_element_set_render_pos(gPauseStatsIconIDs[1], baseX + 163, baseY + 29); - hud_element_draw_without_clipping(gPauseStatsIconIDs[1]); - draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, 0, 1); - hud_element_set_script(gPauseStatsIconIDs[2], gStatsHammerElements[hammerLevel]); - hud_element_set_render_pos(gPauseStatsIconIDs[2], baseX + 163, baseY + 54); - hud_element_draw_without_clipping(gPauseStatsIconIDs[2]); - draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, 0, 1); - pause_draw_menu_label(6, baseX + 130, baseY + 69); - pause_draw_menu_label(5, baseX + 138, baseY + 60); - cond = TRUE; - var_s3_2 = 0; - elemIdx = 0; - var_s2_2 = 0; - icon10 = gPauseStatsIconIDs[10]; + // draw boots + hud_element_set_script(gPauseStatsIconIDs[STAT_ICON_BOOTS], gStatsBootsElements[bootsLevel]); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_BOOTS], baseX + 163, baseY + 29); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_BOOTS]); + draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, MSG_PAL_WHITE, 1); + // draw hammer + hud_element_set_script(gPauseStatsIconIDs[STAT_ICON_HAMMER], gStatsHammerElements[hammerLevel]); + hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_HAMMER], baseX + 163, baseY + 54); + hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_HAMMER]); + draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, MSG_PAL_WHITE, 1); + + // draw star power bar + pause_draw_menu_label(PAUSE_LBL_STATS, baseX + 130, baseY + 69); + pause_draw_menu_label(PAUSE_LBL_ENERGY, baseX + 138, baseY + 60); + + drawingFirst = TRUE; + curIncrement = 0; + powBarIdx = 0; // which bar of the power meter we're drawing + powIncIdx = 0; // which increment of the bar we're drawing + powHudElemID = gPauseStatsIconIDs[STAT_ICON_STAR]; + + // get number of full power increments playerData = &gPlayerData; - maxStarPower = playerData->specialBarsFilled / 256; - limit = playerData->specialBarsFilled % 256; - limit /= 32; - limit += maxStarPower * 8; + powFullBars = playerData->specialBarsFilled / 256; + powIncrements = playerData->specialBarsFilled % 256; // get remainder in unfilled bar + powIncrements /= 32; // subdivide unfilled bar into 8 segments (8 = 256/32) + powIncrements += powFullBars * 8; // add 8 increments per full bar + // draw filled bars while (TRUE) { - - if (var_s3_2 >= limit) { - break; - } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[0], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - - if (var_s3_2 >= limit) { - break; - } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[1], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - - if (var_s3_2 >= limit) { + if (curIncrement >= powIncrements) { break; } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[2], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[0], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - var_s2_2++; + powIncIdx++; - if (var_s3_2 >= limit) { + if (curIncrement >= powIncrements) { break; } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[3], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[1], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - var_s2_2++; + powIncIdx++; - if (var_s3_2 >= limit) { + if (curIncrement >= powIncrements) { break; } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[4], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[2], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - var_s2_2++; + powIncIdx++; - if (var_s3_2 >= limit) { - break; - } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[5], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - if (var_s3_2 >= limit) { - break; - } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsSPIncElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[6], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; - } else { - hud_element_draw_next(icon10); - } - var_s2_2++; - - if (var_s3_2 >= limit) { + if (curIncrement >= powIncrements) { break; } - var_s3_2++; - hud_element_set_script(icon10, gPauseStatsStarElements[elemIdx]); - hud_element_set_render_pos(icon10, baseX + 0x98 + (elemIdx * 20), baseY + 0x4D); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[3], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - var_s2_2 = 0; - elemIdx += 1; - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { + break; + } + + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[4], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; + } else { + hud_element_draw_next(powHudElemID); + } + powIncIdx++; + + if (curIncrement >= powIncrements) { + break; + } + + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[5], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; + } else { + hud_element_draw_next(powHudElemID); + } + powIncIdx++; + + if (curIncrement >= powIncrements) { + break; + } + + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[6], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; + } else { + hud_element_draw_next(powHudElemID); + } + powIncIdx++; + + if (curIncrement >= powIncrements) { + break; + } + + curIncrement++; + hud_element_set_script(powHudElemID, gPauseStatsStarElements[powBarIdx]); + hud_element_set_render_pos(powHudElemID, baseX + 152 + (powBarIdx * 20), baseY + 77); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; + } else { + hud_element_draw_next(powHudElemID); + } + powIncIdx++; + + powIncIdx = 0; + powBarIdx += 1; + if (curIncrement >= powIncrements) { break; } } + + // get number of total power increments + powFullBars = playerData->maxStarPower; + powIncrements = 8 * powFullBars; - maxStarPower = playerData->maxStarPower; - limit = 8 * maxStarPower; + // draw empty bars while (TRUE) { - if (var_s3_2 >= limit) { + if (curIncrement >= powIncrements) { break; } - if (var_s2_2 == 0) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[0], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 0) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[0], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + if (curIncrement >= powIncrements) { break; } - var_s2_2++; + powIncIdx++; } - if (var_s2_2 == 1) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[1], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 1) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[1], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - var_s2_2++; } - - if (var_s2_2 == 2) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[2], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 2) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[2], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - var_s2_2++; } - - if (var_s2_2 == 3) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[3], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 3) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[3], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - var_s2_2++; } - - if (var_s2_2 == 4) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[4], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 4) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[4], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - var_s2_2++; } - - if (var_s2_2 == 5) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[5], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 5) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[5], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - - var_s2_2++; } - - if (var_s2_2 == 6) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusSPEmptyIncrement); - hud_element_set_render_pos(icon10, baseX + 140 + (elemIdx * 20) + D_8024F46C[6], baseY + 75); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 6) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement); + hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[6], baseY + 75); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - var_s2_2++; } - if (var_s2_2 == 7) { - var_s3_2++; - hud_element_set_script(icon10, &HES_StatusStarEmpty); - hud_element_set_render_pos(icon10, baseX + 152 + (elemIdx * 20), baseY + 0x4D); - if (cond) { - hud_element_draw_without_clipping(icon10); - cond = FALSE; + if (powIncIdx == 7) { + curIncrement++; + hud_element_set_script(powHudElemID, &HES_StatusStarEmpty); + hud_element_set_render_pos(powHudElemID, baseX + 152 + (powBarIdx * 20), baseY + 77); + if (drawingFirst) { + hud_element_draw_without_clipping(powHudElemID); + drawingFirst = FALSE; } else { - hud_element_draw_next(icon10); + hud_element_draw_next(powHudElemID); } - if (var_s3_2 >= limit) { + powIncIdx++; + + if (curIncrement >= powIncrements) { break; } - var_s2_2 = 0; } - var_s2_2 = 0; - elemIdx++; + powIncIdx = 0; + powBarIdx++; } if (gPauseMenuCurrentTab == 1) { StatsEntryData* entry = &gStatsMenuEntries[menu->selected]; - pause_set_cursor_pos(0x1F, baseX + entry->cursorX, baseY + entry->cursorY); + pause_set_cursor_pos(WINDOW_ID_PAUSE_STATS, baseX + entry->cursorX, baseY + entry->cursorY); } } @@ -610,15 +672,15 @@ void pause_stats_handle_input(MenuPanel* panel) { } switch (gStatsMenuEntries[panel->selected].baseMsgID) { - case 0x25: + case PAUSE_MSG_TIP_BOOTS_1: if (adjustedBootsLevel > 1) { msgOffset = adjustedBootsLevel - 1; } break; - case 0x28: + case PAUSE_MSG_TIP_HAMMER_0: msgOffset = adjustedHammerLevel; break; - case 0x2F: + case PAUSE_MSG_TIP_SECRETS: if (evt_get_variable(NULL, GF_Tutorial_GotStarPiece)) { msgOffset = 1; }