From 7bf34448e45aa88e95c63a6bddb668a32c98aefb Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Mon, 5 Jun 2023 14:15:07 +0200 Subject: [PATCH 1/6] Rename GAME_STAT_FISHING_CAPTURES to GAME_STAT_FISHING_ENCOUNTERS --- include/constants/game_stat.h | 2 +- src/mauville_old_man.c | 2 +- src/wild_encounter.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/constants/game_stat.h b/include/constants/game_stat.h index 053e4a8f9e..5796afbaec 100644 --- a/include/constants/game_stat.h +++ b/include/constants/game_stat.h @@ -13,7 +13,7 @@ #define GAME_STAT_TRAINER_BATTLES 9 #define GAME_STAT_ENTERED_HOF 10 #define GAME_STAT_POKEMON_CAPTURES 11 -#define GAME_STAT_FISHING_CAPTURES 12 +#define GAME_STAT_FISHING_ENCOUNTERS 12 #define GAME_STAT_HATCHED_EGGS 13 #define GAME_STAT_EVOLVED_POKEMON 14 #define GAME_STAT_USED_POKECENTER 15 diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 6075bd5d95..36b29ed73b 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -969,7 +969,7 @@ static const struct Story sStorytellerStories[] = { MauvilleCity_PokemonCenter_1F_Text_PokemonCaughtStory }, { - GAME_STAT_FISHING_CAPTURES, 1, + GAME_STAT_FISHING_ENCOUNTERS, 1, MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtTitle, MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtAction, MauvilleCity_PokemonCenter_1F_Text_FishingPokemonCaughtStory diff --git a/src/wild_encounter.c b/src/wild_encounter.c index cc3ce82273..87d7d866bb 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -783,7 +783,7 @@ void FishingWildEncounter(u8 rod) { species = GenerateFishingWildMon(gWildMonHeaders[GetCurrentMapWildMonHeaderId()].fishingMonsInfo, rod); } - IncrementGameStat(GAME_STAT_FISHING_CAPTURES); + IncrementGameStat(GAME_STAT_FISHING_ENCOUNTERS); SetPokemonAnglerSpecies(species); BattleSetup_StartWildBattle(); } From 86459acb699e9182f78b163cc2a11029c859380d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 5 Jun 2023 13:13:35 -0400 Subject: [PATCH 2/6] Fix sTVPokemonAnslerTextGroup typo --- src/tv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tv.c b/src/tv.c index b32881d090..85819a7a1d 100644 --- a/src/tv.c +++ b/src/tv.c @@ -485,7 +485,7 @@ static const u8 *const sTVPokemonTodayFailedTextGroup[] = { gTVPokemonTodayFailedText06 }; -static const u8 *const sTVPokemonAnslerTextGroup[] = { +static const u8 *const sTVPokemonAnglerTextGroup[] = { gTVPokemonAnglerText00, gTVPokemonAnglerText01 }; @@ -5502,7 +5502,7 @@ static void DoTVShowPokemonAngler(void) TVShowDone(); break; } - ShowFieldMessage(sTVPokemonAnslerTextGroup[state]); + ShowFieldMessage(sTVPokemonAnglerTextGroup[state]); } static void DoTVShowTheWorldOfMasters(void) From 9c4a59f865360b7d6e0dede0e52812b897526588 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 5 Jun 2023 19:53:59 -0400 Subject: [PATCH 3/6] Fix swapped Dodrio Berry Picking palettes --- graphics/dodrio_berry_picking/bg.pal | 19 ------------------- graphics/dodrio_berry_picking/tree_border.pal | 19 ------------------- src/dodrio_berry_picking.c | 8 ++++---- 3 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 graphics/dodrio_berry_picking/bg.pal delete mode 100644 graphics/dodrio_berry_picking/tree_border.pal diff --git a/graphics/dodrio_berry_picking/bg.pal b/graphics/dodrio_berry_picking/bg.pal deleted file mode 100644 index c06550002f..0000000000 --- a/graphics/dodrio_berry_picking/bg.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -230 246 255 -82 180 172 -82 205 189 -156 156 131 -106 156 148 -123 123 98 -189 172 98 -189 189 139 -74 172 156 -172 172 131 -74 156 123 -115 115 82 -139 139 106 -164 164 115 -197 197 148 -230 246 255 diff --git a/graphics/dodrio_berry_picking/tree_border.pal b/graphics/dodrio_berry_picking/tree_border.pal deleted file mode 100644 index be2b62cc98..0000000000 --- a/graphics/dodrio_berry_picking/tree_border.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -230 246 255 -246 246 222 -230 230 180 -139 238 139 -246 246 189 -197 246 164 -246 230 197 -230 246 255 -230 213 180 -205 197 164 -148 222 148 -222 238 255 -139 205 139 -213 238 246 -222 246 255 -213 205 164 diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 8d47595c8b..1ba82c6d21 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -552,8 +552,8 @@ static const u8 sUnsharedColumns[MAX_RFU_PLAYERS][MAX_RFU_PLAYERS] = }; // Duplicate and unused gfx. Feel free to remove. -static const u32 sDuplicateGfx[] = INCBIN_U32("graphics/dodrio_berry_picking/bg.gbapal", - "graphics/dodrio_berry_picking/tree_border.gbapal", +static const u32 sDuplicateGfx[] = INCBIN_U32("graphics/dodrio_berry_picking/tree_border.gbapal", + "graphics/dodrio_berry_picking/bg.gbapal", "graphics/dodrio_berry_picking/dodrio.gbapal", "graphics/dodrio_berry_picking/shiny.gbapal", "graphics/dodrio_berry_picking/status.gbapal", @@ -3586,8 +3586,8 @@ static const u8 sUnsharedColumns_Duplicate[MAX_RFU_PLAYERS][MAX_RFU_PLAYERS] = {1, 3, 5, 6, 9}, }; -static const u16 sBg_Pal[] = INCBIN_U16("graphics/dodrio_berry_picking/bg.gbapal", - "graphics/dodrio_berry_picking/tree_border.gbapal"); +static const u16 sBg_Pal[] = INCBIN_U16("graphics/dodrio_berry_picking/tree_border.gbapal", + "graphics/dodrio_berry_picking/bg.gbapal"); static const u16 sDodrioNormal_Pal[] = INCBIN_U16("graphics/dodrio_berry_picking/dodrio.gbapal"); static const u16 sDodrioShiny_Pal[] = INCBIN_U16("graphics/dodrio_berry_picking/shiny.gbapal"); static const u16 sStatus_Pal[] = INCBIN_U16("graphics/dodrio_berry_picking/status.gbapal"); From 62f592f4df59e39b77fe356c8d1aff1f23208ad3 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Tue, 6 Jun 2023 09:02:52 +0100 Subject: [PATCH 4/6] Fix EWRAM_DATA wildcards `ewram_data` not `.ewram_data`, doh! --- ld_script.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld_script.txt b/ld_script.txt index bd9d7c4a35..4be5965240 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -20,8 +20,8 @@ SECTIONS { . = 0x1C000; INCLUDE "sym_ewram.ld" - src/*.o(.ewram_data); - gflib/*.o(.ewram_data); + src/*.o(ewram_data); + gflib/*.o(ewram_data); *libc.a:impure.o(.data); *libc.a:locale.o(.data); From 2651401e6b17a0ab5db1f28ec5c8220434950c42 Mon Sep 17 00:00:00 2001 From: Michael Panzlaff Date: Mon, 29 May 2023 01:00:38 +0200 Subject: [PATCH 5/6] Fix PATH for modern target for non dkp systems When prepending something to PATH, we should use PATH=/foo/bar:$PATH and not PATH=/foo/bar:PATH. Because your shell won't certainly find something under the literal name PATH. If one is not using devkitarm, TOOLCHAIN will resolve to an empty string. If TOOLCHAIN is an empty string the only search path for the modern gcc will be /bin which may work on some installations but is probably not what was originally intended with this line. So let's just search the standard search path if nothing can be found under $(TOOLCHAIN). Either way, PATH is already set up previously, so we can make sure MODERNCC is invoked properly by calling MODERNCC with PATH=$(PATH). --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50a7e0d255..7476a9dc31 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ LD := $(PREFIX)ld # note: the makefile must be set up so MODERNCC is never called # if MODERN=0 MODERNCC := $(PREFIX)gcc -PATH_MODERNCC := PATH=$(TOOLCHAIN)/bin:PATH $(MODERNCC) +PATH_MODERNCC := PATH="$(PATH)" $(MODERNCC) ifeq ($(OS),Windows_NT) EXE := .exe From b2901c51b0a589de6a1b8bd5971ee244a9c62b80 Mon Sep 17 00:00:00 2001 From: PSF Date: Tue, 27 Jun 2023 15:32:49 -0700 Subject: [PATCH 6/6] Added bugfix for SaveBeforeLinkMultisChallenge to remove extra incrementgamestat --- data/maps/BattleFrontier_BattleTowerLobby/scripts.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc index e99c7f88e8..8d60105bd3 100644 --- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc +++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc @@ -421,7 +421,12 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge:: call Common_EventScript_SaveGame setvar VAR_TEMP_0, 255 goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed +@ GAME_STAT_ENTERED_BATTLE_TOWER should not be incremented here, for two reasons: +@ 1. It is incremented again in BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful or BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful +@ 2. If the player tries to save, but fails, the counter will still be incremented even if the player never enters the tower. +.ifndef BUGFIX incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER +.endif specialvar VAR_RESULT, IsWirelessAdapterConnected goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink goto BattleFrontier_BattleTowerLobby_EventScript_TryCableLink