From 4ef2fb4a4415f8b0911b1eefbb2be473532454b5 Mon Sep 17 00:00:00 2001 From: Fex Collects Date: Mon, 3 Mar 2025 04:47:02 +0000 Subject: [PATCH 1/2] Small variable documentation update --- include/pokemon.h | 2 +- src/pokemon.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index 2d34bf04c..d9f0b7faa 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -74,7 +74,7 @@ s16 GetAlphabetParentNo(s16 index, s32 r1); s16 GetInternalNo(s16 index); s32 CalculateEXPGain(s16 index, s32 level); s16 GetPokemonEvolveConditons(s16 index, unkEvolve *); -u8 GetPokemonOverworldPalette(s16 index, u32 r1); +u8 GetPokemonOverworldPalette(s16 index, bool32 recolorShopKecleon); bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 spriteId); OpenedFile *OpenPokemonDialogueSpriteFile(s16 index); OpenedFile *GetDialogueSpriteDataPtr(s32 index); diff --git a/src/pokemon.c b/src/pokemon.c index a5f5bfdb2..5deead3ae 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -890,10 +890,10 @@ s16 GetPokemonEvolveConditions(s16 index, unkEvolve *r1) return index; } -u8 GetPokemonOverworldPalette(s16 index, u32 r1) +u8 GetPokemonOverworldPalette(s16 index, bool32 recolorShopKecleon) { s32 id = SpeciesId(index); - if (r1 != 0) + if (recolorShopKecleon) { return 10; } From 79da9a38a53633727eda519a84c558c7fab4fbbe Mon Sep 17 00:00:00 2001 From: Fex Collects Date: Mon, 3 Mar 2025 05:22:56 +0000 Subject: [PATCH 2/2] Address comments --- src/code_8069E0C.c | 4 ++-- src/friend_areas_map_util.c | 2 +- src/world_map.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/code_8069E0C.c b/src/code_8069E0C.c index 7181cc058..d32a61f91 100644 --- a/src/code_8069E0C.c +++ b/src/code_8069E0C.c @@ -2084,10 +2084,10 @@ void sub_806C51C(Entity *entity) } if (decoySprite) { - overworldPal = GetPokemonOverworldPalette(MONSTER_DECOY, 0); + overworldPal = GetPokemonOverworldPalette(MONSTER_DECOY, FALSE); } else { - overworldPal = GetPokemonOverworldPalette(entInfo->apparentID, 0); + overworldPal = GetPokemonOverworldPalette(entInfo->apparentID, FALSE); } if (entity->unk22 == 0) { diff --git a/src/friend_areas_map_util.c b/src/friend_areas_map_util.c index f2d2cb1df..5d88a9508 100644 --- a/src/friend_areas_map_util.c +++ b/src/friend_areas_map_util.c @@ -71,7 +71,7 @@ void FriendAreasMap_InitGfx(void) gFriendAreasMapPtr->unk0[4] = OpenFileAndGetFileDataPtr(gUnknown_80D408C[2], &gTitleMenuFileArchive); gFriendAreasMapPtr->unk0[1] = OpenFileAndGetFileDataPtr("palet", &gMonsterFileArchive); gFriendAreasMapPtr->unk0[0] = OpenFileAndGetFileDataPtr(gUnknown_80D408C[3], &gTitleMenuFileArchive); - gFriendAreasMapPtr->unk4DD0 = GetPokemonOverworldPalette(pokeStruct->speciesNum, 0); + gFriendAreasMapPtr->unk4DD0 = GetPokemonOverworldPalette(pokeStruct->speciesNum, FALSE); sub_8005610(gFriendAreasMapPtr->unk0[2], 0x40, 0x1F, 0); diff --git a/src/world_map.c b/src/world_map.c index e6d57a29c..50032c5a1 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -291,7 +291,7 @@ static void sub_801059C(void) sWorldMapPtr->unk1100[4] = OpenFileAndGetFileDataPtr(gUnknown_80D4014[2], &gTitleMenuFileArchive); sWorldMapPtr->unk1100[1] = OpenFileAndGetFileDataPtr("palet", &gMonsterFileArchive); sWorldMapPtr->unk1100[0] = OpenFileAndGetFileDataPtr(gUnknown_80D4014[3], &gTitleMenuFileArchive); - sWorldMapPtr->unk52D4 = GetPokemonOverworldPalette(pokeStruct->speciesNum, 0); + sWorldMapPtr->unk52D4 = GetPokemonOverworldPalette(pokeStruct->speciesNum, FALSE); sub_8005610(sWorldMapPtr->unk1100[2], 0x40, 0x1F, 0);