summaryrefslogtreecommitdiff
path: root/arm9/src
diff options
context:
space:
mode:
authorwho-knows-who <j.williams97@outlook.com>2020-10-23 14:50:33 +0100
committerwho-knows-who <j.williams97@outlook.com>2020-10-23 14:50:33 +0100
commite13202e2f19c9f1673a021dbcc062d96b9f0f06c (patch)
tree29ceff4adc54f17ce6fdfa5d84e65c955732c11e /arm9/src
parent61dee8c8ed498f44d2cf56fef785fc04e82dd3cf (diff)
Matched file unk_0202C144.s
Diffstat (limited to 'arm9/src')
-rw-r--r--arm9/src/unk_0202C144.c18
1 files changed, 18 insertions, 0 deletions
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