From e13202e2f19c9f1673a021dbcc062d96b9f0f06c Mon Sep 17 00:00:00 2001 From: who-knows-who Date: Fri, 23 Oct 2020 14:50:33 +0100 Subject: Matched file unk_0202C144.s --- arm9/src/unk_0202C144.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 arm9/src/unk_0202C144.c (limited to 'arm9/src') diff --git a/arm9/src/unk_0202C144.c b/arm9/src/unk_0202C144.c new file mode 100644 index 00000000..27125eb3 --- /dev/null +++ b/arm9/src/unk_0202C144.c @@ -0,0 +1,18 @@ +#include "global.h" +#include "pokemon.h" +#include "pokedex.h" +#include "save_block_2.h" +#include "unk_02029FBO.h" +#include "poketch.h" + +THUMB_FUNC void FUN_0202C144(struct SaveBlock2 *sav2, struct Pokemon *pokemon) { + if (GetMonData(pokemon, MON_DATA_IS_EGG, NULL) == 0) + { + struct Pokedex *pokedex = Sav2_Pokedex_get(sav2); + void *unkSavStruct = FUN_02029FC8(sav2); /* SavArray_get(sav2, 20) */ + + FUN_0202A1C4(unkSavStruct, pokedex, GetMonData(pokemon, MON_DATA_SPECIES, NULL)); + Pokedex_SetMonCaughtFlag(pokedex, pokemon); + Sav2_Poketch_PokemonHistoryAddMon(Sav2_Poketch_get(sav2), &pokemon->box); + } +} \ No newline at end of file -- cgit v1.2.3