From b49a3bbde5864545141e9882a541f48cd432b946 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Tue, 27 May 2025 10:09:12 +0200 Subject: [PATCH 1/2] Missed ItemId_GetDescription change (#6992) --- src/overworld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overworld.c b/src/overworld.c index 7f38405bac..a72a9d6295 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -3348,7 +3348,7 @@ static u8 ReformatItemDescription(u16 item, u8 *dest) u8 count = 0; u8 numLines = 1; u8 maxChars = 32; - u8 *desc = (u8 *)ItemId_GetDescription(item); + u8 *desc = (u8 *)GetItemDescription(item); while (*desc != EOS) { From d27a3575f229002cf97bea5ea981411cbd4df4b3 Mon Sep 17 00:00:00 2001 From: malad1211 <43647853+malad1211@users.noreply.github.com> Date: Tue, 27 May 2025 15:12:12 +0700 Subject: [PATCH 2/2] Cleanup identical if blocks (#6988) --- src/battle_script_commands.c | 6 +----- src/ereader_helpers.c | 12 ++---------- src/pokedex_plus_hgss.c | 32 +++++++------------------------- src/scrcmd.c | 5 +---- 4 files changed, 11 insertions(+), 44 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 5cef6550de..f69ef38ad4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -11228,11 +11228,7 @@ static void Cmd_various(void) else gSideTimers[GetBattlerSide(battler)].auroraVeilTimer = gBattleTurnCounter + 5; gSideTimers[GetBattlerSide(battler)].auroraVeilBattlerId = battler; - - if (IsDoubleBattle() && CountAliveMonsInBattle(BATTLE_ALIVE_SIDE, gBattlerAttacker) == 2) - gBattleCommunication[MULTISTRING_CHOOSER] = 5; - else - gBattleCommunication[MULTISTRING_CHOOSER] = 5; + gBattleCommunication[MULTISTRING_CHOOSER] = 5; } break; } diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index 139e861a34..b476c01caa 100755 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -665,16 +665,8 @@ int EReaderHandleTransfer(u8 mode, size_t size, const void *data, void *recvBuff if (sSendRecvMgr.xferState != EREADER_XFER_CHK) { - if (sSendRecvMgr.isParent && sCounter1 > 2) - { - EnableSio(); - sSendRecvMgr.xferState = EREADER_XFER_CHK; - } - else - { - EnableSio(); - sSendRecvMgr.xferState = EREADER_XFER_CHK; - } + EnableSio(); + sSendRecvMgr.xferState = EREADER_XFER_CHK; } } break; diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 844aec9587..9039a774ee 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -4678,45 +4678,27 @@ static void LoadTilesetTilemapHGSS(u8 page) switch (page) { case INFO_SCREEN: - if (!HGSS_DECAPPED) - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_1_Gfx, 0x2000, 0, 0); - else - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_1_Gfx, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_1_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenInfo_Tilemap, 0, 0); break; case STATS_SCREEN: - if (!HGSS_DECAPPED) - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_1_Gfx, 0x2000, 0, 0); - else - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_1_Gfx, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_1_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenStats_Tilemap, 0, 0); break; case EVO_SCREEN: - if (!HGSS_DECAPPED) - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_2_Gfx, 0x2000, 0, 0); - else - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_2_Gfx, 0x2000, 0, 0); - CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenEvolution_Tilemap_PE, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_2_Gfx, 0x2000, 0, 0); + CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenEvolution_Tilemap_PE, 0, 0); break; case FORMS_SCREEN: - if (!HGSS_DECAPPED) - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_2_Gfx, 0x2000, 0, 0); - else - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_2_Gfx, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_2_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenForms_Tilemap, 0, 0); break; case CRY_SCREEN: - if (!HGSS_DECAPPED) - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_3_Gfx, 0x2000, 0, 0); - else - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_3_Gfx, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_3_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenCry_Tilemap, 0, 0); break; case SIZE_SCREEN: - if (!HGSS_DECAPPED) - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_3_Gfx, 0x2000, 0, 0); - else - DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_3_Gfx, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(3, sPokedexPlusHGSS_Menu_3_Gfx, 0x2000, 0, 0); CopyToBgTilemapBuffer(3, sPokedexPlusHGSS_ScreenSize_Tilemap, 0, 0); break; } diff --git a/src/scrcmd.c b/src/scrcmd.c index 4f047b24ea..4e9be4e576 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2541,10 +2541,7 @@ bool8 ScrCmd_setberrytree(struct ScriptContext *ctx) Script_RequestEffects(SCREFF_V1 | SCREFF_SAVE); - if (berry == 0) - PlantBerryTree(treeId, berry, growthStage, FALSE); - else - PlantBerryTree(treeId, berry, growthStage, FALSE); + PlantBerryTree(treeId, berry, growthStage, FALSE); return FALSE; }