From 842b9dc6c0f2a4bacce7f3992eb0a6de9c128b97 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Thu, 31 Aug 2023 14:30:13 -0400 Subject: [PATCH] Incorporated bugfixes from upstream --- src/battle_factory_screen.c | 9 +++------ src/battle_gfx_sfx_util.c | 6 ++---- src/contest.c | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/battle_factory_screen.c b/src/battle_factory_screen.c index fb6926e5e..8cba2bcee 100644 --- a/src/battle_factory_screen.c +++ b/src/battle_factory_screen.c @@ -639,8 +639,7 @@ static const struct SpriteSheet sSwap_SpriteSheets[] = {sActionBoxLeft_Gfx, sizeof(sActionBoxLeft_Gfx), GFXTAG_ACTION_BOX_LEFT}, {sActionBoxRight_Gfx, sizeof(sActionBoxRight_Gfx), GFXTAG_ACTION_BOX_RIGHT}, #ifdef BUGFIX - {sActionHighlightLeft_Gfx, 8 * TILE_SIZE_4BPP, /* Incorrect size */ GFXTAG_ACTION_HIGHLIGHT_LEFT}, - //{sActionHighlightLeft_Gfx, sizeof(sActionHighlightLeft_Gfx), GFXTAG_ACTION_HIGHLIGHT_LEFT}, TODOMERGE + {sActionHighlightLeft_Gfx, sizeof(sActionHighlightLeft_Gfx), GFXTAG_ACTION_HIGHLIGHT_LEFT}, #else {sActionHighlightLeft_Gfx, 8 * TILE_SIZE_4BPP, /* Incorrect size */ GFXTAG_ACTION_HIGHLIGHT_LEFT}, #endif @@ -1153,8 +1152,7 @@ static void CB2_InitSelectScreen(void) case 1: sSelectMenuTilesetBuffer = Alloc(sizeof(gFrontierFactoryMenu_Gfx)); #ifdef BUGFIX - //sSelectMonPicBgTilesetBuffer = AllocZeroed(sizeof(sMonPicBg_Gfx)); //TODOMERGE - sSelectMonPicBgTilesetBuffer = AllocZeroed(sizeof(gFrontierFactoryMenu_Gfx)); // Incorrect size + sSelectMonPicBgTilesetBuffer = AllocZeroed(sizeof(sMonPicBg_Gfx)); #else sSelectMonPicBgTilesetBuffer = AllocZeroed(sizeof(gFrontierFactoryMenu_Gfx)); // Incorrect size #endif @@ -3291,8 +3289,7 @@ static void CB2_InitSwapScreen(void) case 1: sSwapMenuTilesetBuffer = Alloc(sizeof(gFrontierFactoryMenu_Gfx)); #ifdef BUGFIX - //sSwapMonPicBgTilesetBuffer = AllocZeroed(sizeof(sMonPicBg_Gfx)); TODOMERGE - sSwapMonPicBgTilesetBuffer = AllocZeroed(sizeof(gFrontierFactoryMenu_Gfx)); // Incorrect size + sSwapMonPicBgTilesetBuffer = AllocZeroed(sizeof(sMonPicBg_Gfx)); #else sSwapMonPicBgTilesetBuffer = AllocZeroed(sizeof(gFrontierFactoryMenu_Gfx)); // Incorrect size #endif diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 1db077cba..0dc464702 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -197,8 +197,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) if ((numMovesPerGroup & (0xF << 4)) >= (2 << 4)) numMultipleMoveGroups++; #ifdef BUGFIX - if ((numMovesPerGroup & (0xF << 4)) >= (2 << 8)) - //if ((numMovesPerGroup & (0xF << 8)) >= (2 << 8)) TODOMERGE + if ((numMovesPerGroup & (0xF << 8)) >= (2 << 8)) #else if ((numMovesPerGroup & (0xF << 4)) >= (2 << 8)) #endif @@ -233,8 +232,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void) if ((numMovesPerGroup & (0xF << 4)) >= (2 << 4)) randSelectGroup = PALACE_MOVE_GROUP_DEFENSE; #ifdef BUGFIX - if ((numMovesPerGroup & (0xF << 4)) >= (2 << 8)) - //if ((numMovesPerGroup & (0xF << 8)) >= (2 << 8)) TODOMERGE + if ((numMovesPerGroup & (0xF << 8)) >= (2 << 8)) #else if ((numMovesPerGroup & (0xF << 4)) >= (2 << 8)) #endif diff --git a/src/contest.c b/src/contest.c index 1eb4bcf50..36e76718c 100644 --- a/src/contest.c +++ b/src/contest.c @@ -6032,8 +6032,7 @@ static u8 GetMonNicknameLanguage(u8 *nickname) || *nickname == CHAR_DBL_QUOTE_RIGHT || *nickname == CHAR_SGL_QUOTE_LEFT #ifdef BUGFIX - || *nickname == CHAR_DBL_QUOTE_LEFT // Most likely a typo, CHAR_SGL_QUOTE_RIGHT should be here instead. - //|| *nickname == CHAR_SGL_QUOTE_RIGHT //TODOMERGE + || *nickname == CHAR_SGL_QUOTE_RIGHT #else || *nickname == CHAR_DBL_QUOTE_LEFT // Most likely a typo, CHAR_SGL_QUOTE_RIGHT should be here instead. #endif