From 43cd1d23be3042484024c5cb51cd43484bf387d0 Mon Sep 17 00:00:00 2001 From: Montblanc Date: Tue, 27 Jan 2026 22:03:52 -0800 Subject: [PATCH] Add R button graphic prompt for boxes access --- graphics/party_menu/new/r_button_boxes.png | Bin 0 -> 237 bytes src/data/party_menu.h | 37 +++++++++++ src/party_menu.c | 72 ++++++++++++++++----- 3 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 graphics/party_menu/new/r_button_boxes.png diff --git a/graphics/party_menu/new/r_button_boxes.png b/graphics/party_menu/new/r_button_boxes.png new file mode 100644 index 0000000000000000000000000000000000000000..622b3b28e84a7a9cc0de6c5e9854fd0431f8d033 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!3-p)I`?e@QjEnx?oJHr&dIz4ats1|LR^9L z+ULnp=e+Ly?+MzQ{rvyEsIBLsj!nsaK4tCu??H3+7GJyf+)MNOR*B?mQxu(?#0>)T zfO@h$T^vI^I^Rz8exitCallback = NULL; sPartyMenuInternal->lastSelectedSlot = 0; sPartyMenuInternal->cursorSpriteId = 0x3fff; + sPartyMenuInternal->rButtonToBoxesSpriteId = SPRITE_NONE; if (menuType == PARTY_MENU_TYPE_CHOOSE_HALF) sPartyMenuInternal->chooseHalf = TRUE; @@ -687,10 +692,14 @@ static bool8 ShowPartyMenu(void) gMain.state++; break; case 14: - LoadMonIconPalettes(); + LoadRButtonToBoxesSpriteGfx(); gMain.state++; break; case 15: + LoadMonIconPalettes(); + gMain.state++; + break; + case 16: if (CreatePartyMonSpritesLoop()) { if (CalculatePlayerPartyCount() != 0 @@ -705,35 +714,39 @@ static bool8 ShowPartyMenu(void) gMain.state++; } break; - case 16: + case 17: if (RenderPartyMenuBoxes()) { sPartyMenuInternal->data[0] = 0; gMain.state++; } break; - case 17: + case 18: CreateCancelConfirmPokeballSprites(); gMain.state++; break; - case 18: + case 19: + CreateRButtonToBoxesSprite(); + gMain.state++; + break; + case 20: CreateCancelConfirmWindows(sPartyMenuInternal->chooseHalf); gMain.state++; break; - case 19: + case 21: gMain.state++; break; - case 20: + case 22: CreateTask(sPartyMenuInternal->task, 0); DisplayPartyMenuStdMessage(sPartyMenuInternal->messageId); gMain.state++; break; - case 21: + case 23: BlendPalettes(PALETTES_ALL, 16, 0); gPaletteFade.bufferTransferDisabled = FALSE; gMain.state++; break; - case 22: + case 24: BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); gMain.state++; break; @@ -801,37 +814,45 @@ static bool8 ReloadPartyMenu(void) gMain.state++; break; case 12: - LoadMonIconPalettes(); + LoadRButtonToBoxesSpriteGfx(); gMain.state++; break; case 13: + LoadMonIconPalettes(); + gMain.state++; + break; + case 14: if (CreatePartyMonSpritesLoop()) { sPartyMenuInternal->data[0] = 0; gMain.state++; } break; - case 14: + case 15: if (RenderPartyMenuBoxes()) { sPartyMenuInternal->data[0] = 0; gMain.state++; } break; - case 15: + case 16: CreateCancelConfirmPokeballSprites(); gMain.state++; break; - case 16: + case 17: + CreateRButtonToBoxesSprite(); + gMain.state++; + break; + case 18: CreateCancelConfirmWindows(sPartyMenuInternal->chooseHalf); gMain.state++; break; - case 17: + case 19: BlendPalettes(PALETTES_ALL, 16, RGB_WHITEALPHA); gPaletteFade.bufferTransferDisabled = FALSE; gMain.state++; break; - case 18: + case 20: BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_WHITEALPHA); gMain.state++; break; @@ -4683,6 +4704,27 @@ static void LoadPartyMenuPokeballGfx(void) LoadSpritePalette(&sSpritePalette_MenuPokeball); } +static void LoadRButtonToBoxesSpriteGfx(void) +{ + LoadCompressedSpriteSheet(&sSpriteSheet_RButtonBoxes); +} + +static void CreateRButtonToBoxesSprite(void) +{ + if (PARTY_MENU_PC_ACCESS + && gPartyMenu.action == PARTY_ACTION_CHOOSE_MON + && gPartyMenu.layout == PARTY_LAYOUT_SINGLE + && (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD + || gPartyMenu.menuType == PARTY_MENU_TYPE_DAYCARE)) + { + sPartyMenuInternal->rButtonToBoxesSpriteId = CreateSprite(&sSpriteTemplate_RButtonBoxes, 165, 164, 0); + } + else + { + sPartyMenuInternal->rButtonToBoxesSpriteId = SPRITE_NONE; + } +} + static void CreatePartyMonStatusSprite(struct Pokemon *mon, struct PartyMenuBox *menuBox) { if (GetMonData(mon, MON_DATA_SPECIES) != SPECIES_NONE)