From 5fe0aee063209c2f06985e59253292f16161c47a Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Tue, 11 Jun 2024 19:10:23 +0200 Subject: [PATCH] Add config to turn off two-framed front sprites (#4750) * Add config to turn off two-framed front sprites * Two frames should be on by default * Simplifies integration --- include/config/pokemon.h | 1 + src/pokemon.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/config/pokemon.h b/include/config/pokemon.h index 18f9c28e45..3aa4b14db5 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -46,6 +46,7 @@ #define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen. #define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets. #define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before. +#define P_TWO_FRAME_FRONT_SPRITES TRUE // In Pokémon Emerald, Pokémon front sprites always consist of two frames. This config can revert it to only use the first frame, as is the case in the other Gen 3 games. // Learnset helper toggles #define P_LEARNSET_HELPER_TEACHABLE TRUE // If TRUE, teachable_learnsets.h will be populated by tools/learnset_helpers/teachable.py using the included JSON files based on available TMs and tutors. diff --git a/src/pokemon.c b/src/pokemon.c index 0d1512dae8..6a761ea3f8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -6220,7 +6220,7 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality) bool8 HasTwoFramesAnimation(u16 species) { - return species != SPECIES_UNOWN; + return P_TWO_FRAME_FRONT_SPRITES && species != SPECIES_UNOWN; } static bool8 ShouldSkipFriendshipChange(void)