From 4ef1ec388a70082f5ed72269605968434659dcfa Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 2 Aug 2025 14:52:38 -0400 Subject: [PATCH 1/5] Identified trainer memo file --- include/{unk_02092494.h => trainer_memo.h} | 6 +++--- platinum.us/main.lsf | 2 +- src/applications/pokemon_summary_screen/window.c | 2 +- src/meson.build | 2 +- src/overlay005/daycare.c | 2 +- src/overlay006/npc_trade.c | 2 +- src/overlay088/ov88_0223B140.c | 2 +- src/overlay104/ov104_0222DCE0.c | 2 +- src/overlay109/ov109_021D0D80.c | 2 +- src/pokemon.c | 2 +- src/scrcmd_catching_show.c | 2 +- src/scrcmd_mystery_gift.c | 2 +- src/{unk_02092494.c => trainer_memo.c} | 2 +- src/unk_02098218.c | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) rename include/{unk_02092494.h => trainer_memo.h} (80%) rename src/{unk_02092494.c => trainer_memo.c} (99%) diff --git a/include/unk_02092494.h b/include/trainer_memo.h similarity index 80% rename from include/unk_02092494.h rename to include/trainer_memo.h index f31a42abe1..cefc09c937 100644 --- a/include/unk_02092494.h +++ b/include/trainer_memo.h @@ -1,5 +1,5 @@ -#ifndef POKEPLATINUM_UNK_02092494_H -#define POKEPLATINUM_UNK_02092494_H +#ifndef POKEPLATINUM_TRAINER_MEMO_H +#define POKEPLATINUM_TRAINER_MEMO_H #include "struct_defs/struct_02090800.h" @@ -11,4 +11,4 @@ void sub_0209282C(PokemonInfoDisplayStruct *param0); void UpdateMonStatusAndTrainerInfo(Pokemon *mon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID); void UpdateBoxMonStatusAndTrainerInfo(BoxPokemon *boxMon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID); -#endif // POKEPLATINUM_UNK_02092494_H +#endif // POKEPLATINUM_TRAINER_MEMO_H diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index 3cbd6cb2cd..31b512fd29 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -325,7 +325,7 @@ Static main Object main.nef.p/src_applications_pokemon_summary_screen_3d_anim.c.o Object main.nef.p/src_applications_pokemon_summary_screen_subscreen.c.o Object main.nef.p/src_ribbon.c.o - Object main.nef.p/src_unk_02092494.c.o + Object main.nef.p/src_trainer_memo.c.o Object main.nef.p/src_unk_020933F8.c.o Object main.nef.p/src_unk_02094EDC.c.o Object main.nef.p/src_unk_02095AF0.c.o diff --git a/src/applications/pokemon_summary_screen/window.c b/src/applications/pokemon_summary_screen/window.c index 6f55170c48..40a1d48f7f 100644 --- a/src/applications/pokemon_summary_screen/window.c +++ b/src/applications/pokemon_summary_screen/window.c @@ -24,7 +24,7 @@ #include "string_template.h" #include "text.h" #include "unk_0200C440.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "unk_02094EDC.h" #include "res/text/bank/pokemon_summary_screen.h" diff --git a/src/meson.build b/src/meson.build index febbc5872a..62d5678122 100644 --- a/src/meson.build +++ b/src/meson.build @@ -308,7 +308,7 @@ pokeplatinum_c = files( 'applications/pokemon_summary_screen/3d_anim.c', 'applications/pokemon_summary_screen/subscreen.c', 'ribbon.c', - 'unk_02092494.c', + 'trainer_memo.c', 'unk_020933F8.c', 'unk_02094EDC.c', 'unk_02095AF0.c', diff --git a/src/overlay005/daycare.c b/src/overlay005/daycare.c index 01e573ec7d..a913105c8a 100644 --- a/src/overlay005/daycare.c +++ b/src/overlay005/daycare.c @@ -31,7 +31,7 @@ #include "unk_02017038.h" #include "unk_0202CC64.h" #include "unk_020559DC.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "res/pokemon/species_egg_moves.h" diff --git a/src/overlay006/npc_trade.c b/src/overlay006/npc_trade.c index 79e759768c..fccdb19afc 100644 --- a/src/overlay006/npc_trade.c +++ b/src/overlay006/npc_trade.c @@ -19,7 +19,7 @@ #include "trainer_info.h" #include "unk_0202F180.h" #include "unk_020559DC.h" -#include "unk_02092494.h" +#include "trainer_memo.h" static inline Strbuf *NpcTrade_GetOtName(u32 heapID, u32 npcTradeID); static Strbuf *NpcTrade_GetNickname(u32 heapID, u32 npcTradeID); diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index f411651226..47758da746 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -77,7 +77,7 @@ #include "unk_02038F8C.h" #include "unk_0203909C.h" #include "unk_020393C8.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "unk_02095CD4.h" #include "vars_flags.h" #include "vram_transfer.h" diff --git a/src/overlay104/ov104_0222DCE0.c b/src/overlay104/ov104_0222DCE0.c index ec2028fb04..9aeaf61b52 100644 --- a/src/overlay104/ov104_0222DCE0.c +++ b/src/overlay104/ov104_0222DCE0.c @@ -32,7 +32,7 @@ #include "unk_0202C858.h" #include "unk_02038F8C.h" #include "unk_0208C098.h" -#include "unk_02092494.h" +#include "trainer_memo.h" static const u16 sTrainerClassToObjectID[][2] = { { TRAINER_CLASS_TRAINER_CHERYL, OBJ_EVENT_GFX_CHERYL }, diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index 173538cd7c..790b5d9f5a 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -57,7 +57,7 @@ #include "unk_02038ED4.h" #include "unk_020393C8.h" #include "unk_02073838.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "unk_0209BDF8.h" #include "vram_transfer.h" diff --git a/src/pokemon.c b/src/pokemon.c index 3ecedee257..0b95c6674f 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -57,7 +57,7 @@ #include "unk_02015F84.h" #include "unk_02017038.h" #include "unk_0202C9F4.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #define FATEFUL_ENCOUNTER_LOCATION 3002 diff --git a/src/scrcmd_catching_show.c b/src/scrcmd_catching_show.c index 223d84ad8e..d9dec22a33 100644 --- a/src/scrcmd_catching_show.c +++ b/src/scrcmd_catching_show.c @@ -23,7 +23,7 @@ #include "trainer_info.h" #include "unk_0202EEC0.h" #include "unk_0202F180.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "vars_flags.h" BOOL ScrCmd_SetClearInCatchingShowFlag(ScriptContext *ctx) diff --git a/src/scrcmd_mystery_gift.c b/src/scrcmd_mystery_gift.c index b6bbc20a57..a10f034426 100644 --- a/src/scrcmd_mystery_gift.c +++ b/src/scrcmd_mystery_gift.c @@ -36,7 +36,7 @@ #include "unk_0202D778.h" #include "unk_0202F180.h" #include "unk_02054884.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "vars_flags.h" #include "res/text/bank/mystery_gift_deliveryman.h" diff --git a/src/unk_02092494.c b/src/trainer_memo.c similarity index 99% rename from src/unk_02092494.c rename to src/trainer_memo.c index 138a57baab..19bfb59929 100644 --- a/src/unk_02092494.c +++ b/src/trainer_memo.c @@ -1,4 +1,4 @@ -#include "unk_02092494.h" +#include "trainer_memo.h" #include #include diff --git a/src/unk_02098218.c b/src/unk_02098218.c index 388a5edbcb..8be87280bd 100644 --- a/src/unk_02098218.c +++ b/src/unk_02098218.c @@ -38,7 +38,7 @@ #include "unk_02015F84.h" #include "unk_0202F180.h" #include "unk_0208694C.h" -#include "unk_02092494.h" +#include "trainer_memo.h" #include "vram_transfer.h" #include "constdata/const_020F2DAC.h" From ac306eb06f2ea48a75f9d7717325386c7e76f334 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 3 Aug 2025 09:37:52 -0400 Subject: [PATCH 2/5] Format --- src/applications/pokemon_summary_screen/window.c | 2 +- src/overlay005/daycare.c | 2 +- src/overlay006/npc_trade.c | 2 +- src/overlay088/ov88_0223B140.c | 2 +- src/overlay104/ov104_0222DCE0.c | 2 +- src/overlay109/ov109_021D0D80.c | 2 +- src/pokemon.c | 2 +- src/scrcmd_catching_show.c | 2 +- src/scrcmd_mystery_gift.c | 2 +- src/unk_02098218.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/applications/pokemon_summary_screen/window.c b/src/applications/pokemon_summary_screen/window.c index 40a1d48f7f..1e578fde81 100644 --- a/src/applications/pokemon_summary_screen/window.c +++ b/src/applications/pokemon_summary_screen/window.c @@ -23,8 +23,8 @@ #include "strbuf.h" #include "string_template.h" #include "text.h" -#include "unk_0200C440.h" #include "trainer_memo.h" +#include "unk_0200C440.h" #include "unk_02094EDC.h" #include "res/text/bank/pokemon_summary_screen.h" diff --git a/src/overlay005/daycare.c b/src/overlay005/daycare.c index a913105c8a..9f0274efee 100644 --- a/src/overlay005/daycare.c +++ b/src/overlay005/daycare.c @@ -28,10 +28,10 @@ #include "strbuf.h" #include "string_template.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_02017038.h" #include "unk_0202CC64.h" #include "unk_020559DC.h" -#include "trainer_memo.h" #include "res/pokemon/species_egg_moves.h" diff --git a/src/overlay006/npc_trade.c b/src/overlay006/npc_trade.c index fccdb19afc..30344c0c6f 100644 --- a/src/overlay006/npc_trade.c +++ b/src/overlay006/npc_trade.c @@ -17,9 +17,9 @@ #include "save_player.h" #include "strbuf.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_0202F180.h" #include "unk_020559DC.h" -#include "trainer_memo.h" static inline Strbuf *NpcTrade_GetOtName(u32 heapID, u32 npcTradeID); static Strbuf *NpcTrade_GetNickname(u32 heapID, u32 npcTradeID); diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index 47758da746..a2e5dc6764 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -65,6 +65,7 @@ #include "text.h" #include "touch_screen.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_020131EC.h" #include "unk_0202ACE0.h" #include "unk_0202CC64.h" @@ -77,7 +78,6 @@ #include "unk_02038F8C.h" #include "unk_0203909C.h" #include "unk_020393C8.h" -#include "trainer_memo.h" #include "unk_02095CD4.h" #include "vars_flags.h" #include "vram_transfer.h" diff --git a/src/overlay104/ov104_0222DCE0.c b/src/overlay104/ov104_0222DCE0.c index 9aeaf61b52..04698cd022 100644 --- a/src/overlay104/ov104_0222DCE0.c +++ b/src/overlay104/ov104_0222DCE0.c @@ -29,10 +29,10 @@ #include "strbuf.h" #include "string_template.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_0202C858.h" #include "unk_02038F8C.h" #include "unk_0208C098.h" -#include "trainer_memo.h" static const u16 sTrainerClassToObjectID[][2] = { { TRAINER_CLASS_TRAINER_CHERYL, OBJ_EVENT_GFX_CHERYL }, diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index 790b5d9f5a..218a7cd2ef 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -51,13 +51,13 @@ #include "text.h" #include "touch_pad.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_0202419C.h" #include "unk_020363E8.h" #include "unk_020366A0.h" #include "unk_02038ED4.h" #include "unk_020393C8.h" #include "unk_02073838.h" -#include "trainer_memo.h" #include "unk_0209BDF8.h" #include "vram_transfer.h" diff --git a/src/pokemon.c b/src/pokemon.c index 0b95c6674f..4d9ad61e61 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -54,10 +54,10 @@ #include "strbuf.h" #include "trainer_data.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_02015F84.h" #include "unk_02017038.h" #include "unk_0202C9F4.h" -#include "trainer_memo.h" #define FATEFUL_ENCOUNTER_LOCATION 3002 diff --git a/src/scrcmd_catching_show.c b/src/scrcmd_catching_show.c index d9dec22a33..607f7b42f0 100644 --- a/src/scrcmd_catching_show.c +++ b/src/scrcmd_catching_show.c @@ -21,9 +21,9 @@ #include "save_player.h" #include "system_flags.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_0202EEC0.h" #include "unk_0202F180.h" -#include "trainer_memo.h" #include "vars_flags.h" BOOL ScrCmd_SetClearInCatchingShowFlag(ScriptContext *ctx) diff --git a/src/scrcmd_mystery_gift.c b/src/scrcmd_mystery_gift.c index a10f034426..742c4c3a98 100644 --- a/src/scrcmd_mystery_gift.c +++ b/src/scrcmd_mystery_gift.c @@ -28,6 +28,7 @@ #include "string_template.h" #include "system_vars.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_02017038.h" #include "unk_0202602C.h" #include "unk_0202854C.h" @@ -36,7 +37,6 @@ #include "unk_0202D778.h" #include "unk_0202F180.h" #include "unk_02054884.h" -#include "trainer_memo.h" #include "vars_flags.h" #include "res/text/bank/mystery_gift_deliveryman.h" diff --git a/src/unk_02098218.c b/src/unk_02098218.c index 8be87280bd..bc37dbafcc 100644 --- a/src/unk_02098218.c +++ b/src/unk_02098218.c @@ -35,10 +35,10 @@ #include "sound_playback.h" #include "system.h" #include "trainer_info.h" +#include "trainer_memo.h" #include "unk_02015F84.h" #include "unk_0202F180.h" #include "unk_0208694C.h" -#include "trainer_memo.h" #include "vram_transfer.h" #include "constdata/const_020F2DAC.h" From 3ec84f7b8cb16c0fefb7f95885f43657e2f44dd7 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 3 Aug 2025 11:24:19 -0400 Subject: [PATCH 3/5] Synced the majority of trainer_memo.c --- include/struct_defs/struct_02090800.h | 28 +- include/trainer_memo.h | 4 +- .../pokemon_summary_screen/window.c | 20 +- src/trainer_memo.c | 968 ++++++++---------- 4 files changed, 479 insertions(+), 541 deletions(-) diff --git a/include/struct_defs/struct_02090800.h b/include/struct_defs/struct_02090800.h index 222bcd6a9d..6b31a9b371 100644 --- a/include/struct_defs/struct_02090800.h +++ b/include/struct_defs/struct_02090800.h @@ -7,17 +7,27 @@ #include "pokemon.h" #include "string_template.h" +// Each string in the notepad and which line it starts on. +typedef struct MemoNotepad { + int natureLine; + Strbuf *nature; + int dateLocationMetLine; + Strbuf *dateLocationMet; + int characteristicLine; + Strbuf *characteristic; + int flavorPreferenceLine; + Strbuf *flavorPreference; + int eggWatchLine; + Strbuf *eggWatch; +} MemoNotepad; + typedef struct { int heapID; - MessageLoader *unk_04; - StringTemplate *unk_08; - Pokemon *unk_0C; - BOOL unk_10; - PokemonInfoDisplayStruct_sub1 unk_14; - PokemonInfoDisplayStruct_sub1 unk_1C; - PokemonInfoDisplayStruct_sub1 unk_24; - PokemonInfoDisplayStruct_sub1 unk_2C; - PokemonInfoDisplayStruct_sub1 unk_34; + MessageLoader *msgData; + StringTemplate *msgFmt; + Pokemon *mon; + BOOL isMine; + MemoNotepad notepad; } PokemonInfoDisplayStruct; #endif // POKEPLATINUM_STRUCT_02090800_H diff --git a/include/trainer_memo.h b/include/trainer_memo.h index cefc09c937..686dd02547 100644 --- a/include/trainer_memo.h +++ b/include/trainer_memo.h @@ -6,8 +6,8 @@ #include "pokemon.h" #include "trainer_info.h" -PokemonInfoDisplayStruct *sub_02092494(Pokemon *param0, BOOL param1, int heapID); -void sub_0209282C(PokemonInfoDisplayStruct *param0); +PokemonInfoDisplayStruct *sub_02092494(Pokemon *mon, BOOL isMine, int heapID); +void sub_0209282C(PokemonInfoDisplayStruct *infoDisplay); void UpdateMonStatusAndTrainerInfo(Pokemon *mon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID); void UpdateBoxMonStatusAndTrainerInfo(BoxPokemon *boxMon, TrainerInfo *trainerInfo, int sel, int metLocation, int heapID); diff --git a/src/applications/pokemon_summary_screen/window.c b/src/applications/pokemon_summary_screen/window.c index 1e578fde81..4e87d38f8e 100644 --- a/src/applications/pokemon_summary_screen/window.c +++ b/src/applications/pokemon_summary_screen/window.c @@ -1098,24 +1098,24 @@ static void PrintTrainerMemo(Window *window, Pokemon *mon, BOOL monOTMatches) { PokemonInfoDisplayStruct *infoDisplay = sub_02092494(mon, monOTMatches, HEAP_ID_POKEMON_SUMMARY_SCREEN); - if (infoDisplay->unk_14.unk_04 != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_14.unk_04, 0, (infoDisplay->unk_14.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->notepad.nature != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.nature, 0, (infoDisplay->notepad.natureLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->unk_1C.unk_04 != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_1C.unk_04, 0, (infoDisplay->unk_1C.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->notepad.dateLocationMet != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.dateLocationMet, 0, (infoDisplay->notepad.dateLocationMetLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->unk_24.unk_04 != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_24.unk_04, 0, (infoDisplay->unk_24.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->notepad.characteristic != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.characteristic, 0, (infoDisplay->notepad.characteristicLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->unk_2C.unk_04 != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_2C.unk_04, 0, (infoDisplay->unk_2C.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->notepad.flavorPreference != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.flavorPreference, 0, (infoDisplay->notepad.flavorPreferenceLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->unk_34.unk_04 != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_34.unk_04, 0, (infoDisplay->unk_34.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->notepad.eggWatch != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.eggWatch, 0, (infoDisplay->notepad.eggWatchLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } sub_0209282C(infoDisplay); diff --git a/src/trainer_memo.c b/src/trainer_memo.c index 19bfb59929..492457657e 100644 --- a/src/trainer_memo.c +++ b/src/trainer_memo.c @@ -3,6 +3,9 @@ #include #include +#include "constants/flavor.h" +#include "generated/natures.h" + #include "struct_defs/struct_02090800.h" #include "global/pm_version.h" @@ -16,401 +19,363 @@ #include "trainer_info.h" #include "unk_02017038.h" -static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2); -static void InitializeNatureRelatedStrBuf(PokemonInfoDisplayStruct *param0); -static void InitializePokemonMetInfoStrBuf(PokemonInfoDisplayStruct *param0, int param1); -static void InitializeAlternateMetInfoStrBuf(PokemonInfoDisplayStruct *param0, int param1); -static void InitializeSpecialMetInfoStrBuf(PokemonInfoDisplayStruct *param0, int param1, int param2); -static void InitializeIVsStrBuf(PokemonInfoDisplayStruct *param0); -static void InitializeFlavorAffinityStrBuf(PokemonInfoDisplayStruct *param0); -static void InitializeFriendshipLevelStrBuf(PokemonInfoDisplayStruct *param0); +#include "res/text/bank/pokemon_summary_screen.h" + +typedef enum MetCondition { + MET_CONDITION_WILD_ENCOUNTER, + MET_CONDITION_WILD_ENCOUNTER_TRADED, + MET_CONDITION_WILD_GIFT, + MET_CONDITION_EGG_HATCHED, + MET_CONDITION_EGG_HATCHED_TRADED, + MET_CONDITION_EGG_HATCHED_GIFT, + MET_CONDITION_EGG_HATCHED_GIFT_TRADED, + MET_CONDITION_FATEFUL_ENCOUNTER, + MET_CONDITION_FATEFUL_ENCOUNTER_TRADED, + MET_CONDITION_FATEFUL_EGG_HATCHED, + MET_CONDITION_FATEFUL_EGG_HATCHED_TRADED, + MET_CONDITION_FATEFUL_EGG_HATCHED_ARRIVED, + MET_CONDITION_FATEFUL_EGG_HATCHED_ARRIVED_TRADED, + MET_CONDITION_FATEFUL_EGG_HATCHED_GIFT, + MET_CONDITION_FATEFUL_EGG_HATCHED_GIFT_TRADED, + MET_CONDITION_MIGRATED, + MET_CONDITION_EGG, + MET_CONDITION_EGG_TRADED, + MET_CONDITION_FATEFUL_EGG, + MET_CONDITION_FATEFUL_EGG_TRADED, + MET_CONDITION_FATEFUL_EGG_ARRIVED, +} MetCondition; + +static int MonMetCondition(Pokemon *mon, BOOL param1, int param2); +static void FormatNature(PokemonInfoDisplayStruct *infoDisplay); +static void FormatDateAndLocationMet(PokemonInfoDisplayStruct *infoDisplay, int msgNo); +static void FormatDateAndLocation_Migrated(PokemonInfoDisplayStruct *infoDisplay, int param1); +static void FormatDateAndLocation_Egg(PokemonInfoDisplayStruct *infoDisplay, int param1, int param2); +static void FormatCharacteristic(PokemonInfoDisplayStruct *infoDisplay); +static void FormatFlavorPreference(PokemonInfoDisplayStruct *infoDisplay); +static void FormatEggWatch(PokemonInfoDisplayStruct *infoDisplay); static void AssignTrainerInfoToBoxPokemon(BoxPokemon *boxMon, TrainerInfo *param1, int param2); static void BoxPokemon_SetMetLocationAndDate(BoxPokemon *boxMon, int metLocation, int isHatch); static void BoxPokemon_ResetMetLocationAndDate(BoxPokemon *boxMon, int isHatch); static void BoxPokemon_SetMetLevelToCurrentLevel(BoxPokemon *boxMon); static void BoxPokemon_SetFatefulEncounterFlag(BoxPokemon *boxMon); -PokemonInfoDisplayStruct *sub_02092494(Pokemon *param0, BOOL param1, int heapID) +PokemonInfoDisplayStruct *sub_02092494(Pokemon *mon, BOOL isMine, int heapID) { - PokemonInfoDisplayStruct *v0 = Heap_AllocFromHeap(heapID, sizeof(PokemonInfoDisplayStruct)); - v0->heapID = heapID; - v0->unk_04 = MessageLoader_Init(MESSAGE_LOADER_NARC_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_POKEMON_SUMMARY_SCREEN, v0->heapID); - v0->unk_08 = StringTemplate_New(9, 32, v0->heapID); - v0->unk_0C = param0; - v0->unk_10 = param1; - - { - v0->unk_14.unk_00 = 0; - v0->unk_14.unk_04 = NULL; - - v0->unk_1C.unk_00 = 0; - v0->unk_1C.unk_04 = NULL; - - v0->unk_24.unk_00 = 0; - v0->unk_24.unk_04 = NULL; - - v0->unk_2C.unk_00 = 0; - v0->unk_2C.unk_04 = NULL; - - v0->unk_34.unk_00 = 0; - v0->unk_34.unk_04 = NULL; - } - - switch (DeterminePokemonStatus(v0->unk_0C, v0->unk_10, v0->heapID)) { - case 0: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 49); - - v0->unk_24.unk_00 = 6; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 7; - InitializeFlavorAffinityStrBuf(v0); - break; - case 1: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 50); - - v0->unk_24.unk_00 = 6; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 7; - InitializeFlavorAffinityStrBuf(v0); - break; - case 2: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 51); - - v0->unk_24.unk_00 = 6; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 7; - InitializeFlavorAffinityStrBuf(v0); - break; - case 3: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 52); - - v0->unk_24.unk_00 = 8; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 9; - InitializeFlavorAffinityStrBuf(v0); - break; - case 4: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 53); - - v0->unk_24.unk_00 = 8; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 9; - InitializeFlavorAffinityStrBuf(v0); - break; - case 5: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 54); - - v0->unk_24.unk_00 = 8; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 9; - InitializeFlavorAffinityStrBuf(v0); - break; - case 6: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 55); - - v0->unk_24.unk_00 = 8; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 9; - InitializeFlavorAffinityStrBuf(v0); - break; - case 7: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 56); - - v0->unk_24.unk_00 = 7; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 8; - InitializeFlavorAffinityStrBuf(v0); - break; - case 8: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 57); - - v0->unk_24.unk_00 = 7; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 8; - InitializeFlavorAffinityStrBuf(v0); - break; - case 9: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 58); - - v0->unk_24.unk_00 = 9; - InitializeIVsStrBuf(v0); - break; - case 10: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 59); - - v0->unk_24.unk_00 = 9; - InitializeIVsStrBuf(v0); - break; - case 11: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 60); - - v0->unk_24.unk_00 = 9; - InitializeIVsStrBuf(v0); - break; - case 12: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 61); - - v0->unk_24.unk_00 = 9; - InitializeIVsStrBuf(v0); - break; - case 13: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 62); - - v0->unk_24.unk_00 = 9; - InitializeIVsStrBuf(v0); - break; - case 14: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializePokemonMetInfoStrBuf(v0, 63); - - v0->unk_24.unk_00 = 9; - InitializeIVsStrBuf(v0); - break; - case 15: - v0->unk_14.unk_00 = 1; - InitializeNatureRelatedStrBuf(v0); - - v0->unk_1C.unk_00 = 2; - InitializeAlternateMetInfoStrBuf(v0, 64); - - v0->unk_24.unk_00 = 6; - InitializeIVsStrBuf(v0); - - v0->unk_2C.unk_00 = 7; - InitializeFlavorAffinityStrBuf(v0); - break; - case 16: - v0->unk_1C.unk_00 = 1; - InitializeSpecialMetInfoStrBuf(v0, 101, 0); - - v0->unk_34.unk_00 = 6; - InitializeFriendshipLevelStrBuf(v0); - break; - case 17: - v0->unk_1C.unk_00 = 1; - InitializeSpecialMetInfoStrBuf(v0, 102, 1); - - v0->unk_34.unk_00 = 6; - InitializeFriendshipLevelStrBuf(v0); - break; - case 18: - v0->unk_1C.unk_00 = 1; - InitializeSpecialMetInfoStrBuf(v0, 103, 0); - - v0->unk_34.unk_00 = 6; - InitializeFriendshipLevelStrBuf(v0); - break; - case 19: - v0->unk_1C.unk_00 = 1; - InitializeSpecialMetInfoStrBuf(v0, 103, 1); - - v0->unk_34.unk_00 = 6; - InitializeFriendshipLevelStrBuf(v0); - break; - case 20: - v0->unk_1C.unk_00 = 1; - InitializeSpecialMetInfoStrBuf(v0, 104, 0); - - v0->unk_34.unk_00 = 6; - InitializeFriendshipLevelStrBuf(v0); + PokemonInfoDisplayStruct *ptr = Heap_AllocFromHeap(heapID, sizeof(PokemonInfoDisplayStruct)); + ptr->heapID = heapID; + ptr->msgData = MessageLoader_Init(MESSAGE_LOADER_NARC_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_POKEMON_SUMMARY_SCREEN, ptr->heapID); + ptr->msgFmt = StringTemplate_New(9, 32, ptr->heapID); + ptr->mon = mon; + ptr->isMine = isMine; + ptr->notepad.natureLine = 0; + ptr->notepad.nature = NULL; + ptr->notepad.dateLocationMetLine = 0; + ptr->notepad.dateLocationMet = NULL; + ptr->notepad.characteristicLine = 0; + ptr->notepad.characteristic = NULL; + ptr->notepad.flavorPreferenceLine = 0; + ptr->notepad.flavorPreference = NULL; + ptr->notepad.eggWatchLine = 0; + ptr->notepad.eggWatch = NULL; + + switch (MonMetCondition(ptr->mon, ptr->isMine, ptr->heapID)) { + case MET_CONDITION_WILD_ENCOUNTER: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00049); + ptr->notepad.characteristicLine = 6; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 7; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_WILD_ENCOUNTER_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00050); + ptr->notepad.characteristicLine = 6; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 7; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_WILD_GIFT: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00051); + ptr->notepad.characteristicLine = 6; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 7; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_EGG_HATCHED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00052); + ptr->notepad.characteristicLine = 8; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 9; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_EGG_HATCHED_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00053); + ptr->notepad.characteristicLine = 8; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 9; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_EGG_HATCHED_GIFT: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00054); + ptr->notepad.characteristicLine = 8; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 9; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_EGG_HATCHED_GIFT_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00055); + ptr->notepad.characteristicLine = 8; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 9; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_FATEFUL_ENCOUNTER: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00056); + ptr->notepad.characteristicLine = 7; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 8; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_FATEFUL_ENCOUNTER_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00057); + ptr->notepad.characteristicLine = 7; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 8; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_HATCHED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00058); + ptr->notepad.characteristicLine = 9; + FormatCharacteristic(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_HATCHED_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00059); + ptr->notepad.characteristicLine = 9; + FormatCharacteristic(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_HATCHED_ARRIVED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00060); + ptr->notepad.characteristicLine = 9; + FormatCharacteristic(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_HATCHED_ARRIVED_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00061); + ptr->notepad.characteristicLine = 9; + FormatCharacteristic(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_HATCHED_GIFT: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00062); + ptr->notepad.characteristicLine = 9; + FormatCharacteristic(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_HATCHED_GIFT_TRADED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocationMet(ptr, pl_msg_00000455_00063); + ptr->notepad.characteristicLine = 9; + FormatCharacteristic(ptr); + break; + case MET_CONDITION_MIGRATED: + ptr->notepad.natureLine = 1; + FormatNature(ptr); + ptr->notepad.dateLocationMetLine = 2; + FormatDateAndLocation_Migrated(ptr, pl_msg_00000455_00064); + ptr->notepad.characteristicLine = 6; + FormatCharacteristic(ptr); + ptr->notepad.flavorPreferenceLine = 7; + FormatFlavorPreference(ptr); + break; + case MET_CONDITION_EGG: + ptr->notepad.dateLocationMetLine = 1; + FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00101, 0); + ptr->notepad.eggWatchLine = 6; + FormatEggWatch(ptr); + break; + case MET_CONDITION_EGG_TRADED: + ptr->notepad.dateLocationMetLine = 1; + FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00102, 1); + ptr->notepad.eggWatchLine = 6; + FormatEggWatch(ptr); + break; + case MET_CONDITION_FATEFUL_EGG: + ptr->notepad.dateLocationMetLine = 1; + FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00103, 0); + ptr->notepad.eggWatchLine = 6; + FormatEggWatch(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_TRADED: + ptr->notepad.dateLocationMetLine = 1; + FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00103, 1); + ptr->notepad.eggWatchLine = 6; + FormatEggWatch(ptr); + break; + case MET_CONDITION_FATEFUL_EGG_ARRIVED: + ptr->notepad.dateLocationMetLine = 1; + FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00104, 0); + ptr->notepad.eggWatchLine = 6; + FormatEggWatch(ptr); break; } - - return v0; + return ptr; } -void sub_0209282C(PokemonInfoDisplayStruct *param0) +void sub_0209282C(PokemonInfoDisplayStruct *infoDisplay) { - if (param0->unk_14.unk_04 != NULL) { - Heap_Free(param0->unk_14.unk_04); + if (infoDisplay->notepad.nature != NULL) { + Heap_Free(infoDisplay->notepad.nature); } - - if (param0->unk_1C.unk_04 != NULL) { - Heap_Free(param0->unk_1C.unk_04); + if (infoDisplay->notepad.dateLocationMet != NULL) { + Heap_Free(infoDisplay->notepad.dateLocationMet); } - - if (param0->unk_24.unk_04 != NULL) { - Heap_Free(param0->unk_24.unk_04); + if (infoDisplay->notepad.characteristic != NULL) { + Heap_Free(infoDisplay->notepad.characteristic); } - - if (param0->unk_2C.unk_04 != NULL) { - Heap_Free(param0->unk_2C.unk_04); + if (infoDisplay->notepad.flavorPreference != NULL) { + Heap_Free(infoDisplay->notepad.flavorPreference); } - - if (param0->unk_34.unk_04 != NULL) { - Heap_Free(param0->unk_34.unk_04); + if (infoDisplay->notepad.eggWatch != NULL) { + Heap_Free(infoDisplay->notepad.eggWatch); } - StringTemplate_Free(param0->unk_08); - MessageLoader_Free(param0->unk_04); - Heap_Free(param0); + StringTemplate_Free(infoDisplay->msgFmt); + MessageLoader_Free(infoDisplay->msgData); + Heap_Free(infoDisplay); } -static void InitializeNatureRelatedStrBuf(PokemonInfoDisplayStruct *param0) +static void FormatNature(PokemonInfoDisplayStruct *infoDisplay) { - int v0 = Pokemon_GetNature(param0->unk_0C); - - if (v0 > 24) { - return; + int nature = Pokemon_GetNature(infoDisplay->mon); + if (nature <= NATURE_COUNT - 1) { + infoDisplay->notepad.nature = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); + MessageLoader_GetStrbuf(infoDisplay->msgData, (24 + nature), infoDisplay->notepad.nature); } - - param0->unk_14.unk_04 = Strbuf_Init(((2 * 18) * 2), param0->heapID); - MessageLoader_GetStrbuf(param0->unk_04, (24 + v0), param0->unk_14.unk_04); } -static void InitializePokemonMetInfoStrBuf(PokemonInfoDisplayStruct *param0, int param1) +static void FormatDateAndLocationMet(PokemonInfoDisplayStruct *infoDisplay, int msgNo) { - Strbuf *v0 = Strbuf_Init((((2 * 18) * 2) * 8), param0->heapID); - - param0->unk_1C.unk_04 = Strbuf_Init((((2 * 18) * 2) * 8), param0->heapID); - - MessageLoader_GetStrbuf(param0->unk_04, param1, v0); - StringTemplate_SetNumber(param0->unk_08, 0, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); - StringTemplate_SetMonthName(param0->unk_08, 1, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_MONTH, NULL)); - StringTemplate_SetNumber(param0->unk_08, 2, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_DAY, NULL), 2, 0, 1); - StringTemplate_SetNumber(param0->unk_08, 3, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_LEVEL, NULL), 3, 0, 1); - StringTemplate_SetMetLocationName(param0->unk_08, 4, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_LOCATION, NULL)); - StringTemplate_SetNumber(param0->unk_08, 5, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_YEAR, NULL), 2, 2, 1); - StringTemplate_SetMonthName(param0->unk_08, 6, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_MONTH, NULL)); - StringTemplate_SetNumber(param0->unk_08, 7, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_DAY, NULL), 2, 0, 1); - StringTemplate_SetMetLocationName(param0->unk_08, 8, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_LOCATION, NULL)); - StringTemplate_Format(param0->unk_08, param0->unk_1C.unk_04, v0); - Strbuf_Free(v0); + Strbuf *str = Strbuf_Init((((2 * 18) * 2) * 8), infoDisplay->heapID); + infoDisplay->notepad.dateLocationMet = Strbuf_Init((((2 * 18) * 2) * 8), infoDisplay->heapID); + + MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, str); + StringTemplate_SetNumber(infoDisplay->msgFmt, 0, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); + StringTemplate_SetMonthName(infoDisplay->msgFmt, 1, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_MONTH, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 2, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_DAY, NULL), 2, 0, 1); + StringTemplate_SetNumber(infoDisplay->msgFmt, 3, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_LEVEL, NULL), 3, 0, 1); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_LOCATION, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 5, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_YEAR, NULL), 2, 2, 1); + StringTemplate_SetMonthName(infoDisplay->msgFmt, 6, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_MONTH, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 7, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_DAY, NULL), 2, 0, 1); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 8, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_LOCATION, NULL)); + + StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->notepad.dateLocationMet, str); + Strbuf_Free(str); } -static void InitializeAlternateMetInfoStrBuf(PokemonInfoDisplayStruct *param0, int param1) +static void FormatDateAndLocation_Migrated(PokemonInfoDisplayStruct *infoDisplay, int msgNo) { - Strbuf *v0 = Strbuf_Init((((2 * 18) * 2) * 4), param0->heapID); + Strbuf *str = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); + infoDisplay->notepad.dateLocationMet = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); - param0->unk_1C.unk_04 = Strbuf_Init((((2 * 18) * 2) * 4), param0->heapID); + MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, str); + StringTemplate_SetNumber(infoDisplay->msgFmt, 0, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); + StringTemplate_SetMonthName(infoDisplay->msgFmt, 1, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_MONTH, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 2, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_DAY, NULL), 2, 0, 1); + StringTemplate_SetNumber(infoDisplay->msgFmt, 3, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_LEVEL, NULL), 3, 0, 1); - MessageLoader_GetStrbuf(param0->unk_04, param1, v0); - StringTemplate_SetNumber(param0->unk_08, 0, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); - StringTemplate_SetMonthName(param0->unk_08, 1, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_MONTH, NULL)); - StringTemplate_SetNumber(param0->unk_08, 2, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_DAY, NULL), 2, 0, 1); - StringTemplate_SetNumber(param0->unk_08, 3, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_LEVEL, NULL), 3, 0, 1); - - switch (Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_GAME, NULL)) { + switch (Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_GAME, NULL)) { default: - StringTemplate_SetMetLocationName(param0->unk_08, 4, (SpecialMetLoc_GetId(1, 7))); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, (SpecialMetLoc_GetId(1, 7))); break; case VERSION_FIRERED: case VERSION_LEAFGREEN: - StringTemplate_SetMetLocationName(param0->unk_08, 4, (SpecialMetLoc_GetId(1, 3))); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, (SpecialMetLoc_GetId(1, 3))); break; case VERSION_HEARTGOLD: case VERSION_SOULSILVER: - StringTemplate_SetMetLocationName(param0->unk_08, 4, (SpecialMetLoc_GetId(1, 4))); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, (SpecialMetLoc_GetId(1, 4))); break; case VERSION_RUBY: case VERSION_SAPPHIRE: case VERSION_EMERALD: - StringTemplate_SetMetLocationName(param0->unk_08, 4, (SpecialMetLoc_GetId(1, 5))); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, (SpecialMetLoc_GetId(1, 5))); break; case VERSION_GAMECUBE: - StringTemplate_SetMetLocationName(param0->unk_08, 4, (SpecialMetLoc_GetId(1, 8))); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, (SpecialMetLoc_GetId(1, 8))); break; case VERSION_DIAMOND: case VERSION_PEARL: case VERSION_PLATINUM: - StringTemplate_SetMetLocationName(param0->unk_08, 4, (SpecialMetLoc_GetId(1, 7))); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 4, (SpecialMetLoc_GetId(1, 7))); break; } - StringTemplate_Format(param0->unk_08, param0->unk_1C.unk_04, v0); - Strbuf_Free(v0); + StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->notepad.dateLocationMet, str); + Strbuf_Free(str); } -static void InitializeSpecialMetInfoStrBuf(PokemonInfoDisplayStruct *param0, int param1, int param2) +static void FormatDateAndLocation_Egg(PokemonInfoDisplayStruct *infoDisplay, int param1, int param2) { - Strbuf *v0 = Strbuf_Init((((2 * 18) * 2) * 5), param0->heapID); - - param0->unk_1C.unk_04 = Strbuf_Init((((2 * 18) * 2) * 5), param0->heapID); + Strbuf *str = Strbuf_Init((((2 * 18) * 2) * 5), infoDisplay->heapID); + infoDisplay->notepad.dateLocationMet = Strbuf_Init((((2 * 18) * 2) * 5), infoDisplay->heapID); - MessageLoader_GetStrbuf(param0->unk_04, param1, v0); + MessageLoader_GetStrbuf(infoDisplay->msgData, param1, str); if (param2 == 0) { - StringTemplate_SetNumber(param0->unk_08, 5, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_YEAR, NULL), 2, 2, 1); - StringTemplate_SetMonthName(param0->unk_08, 6, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_MONTH, NULL)); - StringTemplate_SetNumber(param0->unk_08, 7, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_DAY, NULL), 2, 0, 1); - StringTemplate_SetMetLocationName(param0->unk_08, 8, Pokemon_GetValue(param0->unk_0C, MON_DATA_MET_LOCATION, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 5, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_YEAR, NULL), 2, 2, 1); + StringTemplate_SetMonthName(infoDisplay->msgFmt, 6, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_MONTH, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 7, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_DAY, NULL), 2, 0, 1); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 8, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_LOCATION, NULL)); } else { - StringTemplate_SetNumber(param0->unk_08, 5, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); - StringTemplate_SetMonthName(param0->unk_08, 6, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_MONTH, NULL)); - StringTemplate_SetNumber(param0->unk_08, 7, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_DAY, NULL), 2, 0, 1); - StringTemplate_SetMetLocationName(param0->unk_08, 8, Pokemon_GetValue(param0->unk_0C, MON_DATA_HATCH_LOCATION, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 5, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); + StringTemplate_SetMonthName(infoDisplay->msgFmt, 6, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_MONTH, NULL)); + StringTemplate_SetNumber(infoDisplay->msgFmt, 7, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_DAY, NULL), 2, 0, 1); + StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 8, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_LOCATION, NULL)); } - StringTemplate_Format(param0->unk_08, param0->unk_1C.unk_04, v0); - Strbuf_Free(v0); + StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->notepad.dateLocationMet, str); + Strbuf_Free(str); } static const u16 Unk_020F5578[6][5] = { @@ -422,200 +387,168 @@ static const u16 Unk_020F5578[6][5] = { { 0x60, 0x61, 0x62, 0x63, 0x64 } }; -static void InitializeIVsStrBuf(PokemonInfoDisplayStruct *param0) +static void FormatCharacteristic(PokemonInfoDisplayStruct *infoDisplay) { - int v0[6], v1, v2; - int v3, v4; + int index, maxIV; - param0->unk_24.unk_04 = Strbuf_Init(((2 * 18) * 2), param0->heapID); + infoDisplay->notepad.characteristic = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); - v0[0] = (Pokemon_GetValue(param0->unk_0C, MON_DATA_HP_IV, NULL)); - v0[1] = (Pokemon_GetValue(param0->unk_0C, MON_DATA_ATK_IV, NULL)); - v0[2] = (Pokemon_GetValue(param0->unk_0C, MON_DATA_DEF_IV, NULL)); - v0[3] = (Pokemon_GetValue(param0->unk_0C, MON_DATA_SPEED_IV, NULL)); - v0[4] = (Pokemon_GetValue(param0->unk_0C, MON_DATA_SPATK_IV, NULL)); - v0[5] = (Pokemon_GetValue(param0->unk_0C, MON_DATA_SPDEF_IV, NULL)); + int hpIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_HP_IV, NULL); + int atkIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_ATK_IV, NULL); + int defIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_DEF_IV, NULL); + int speedIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_SPEED_IV, NULL); + int spAtkIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_SPATK_IV, NULL); + int spDefIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_SPDEF_IV, NULL); + u32 personality = Pokemon_GetValue(infoDisplay->mon, MON_DATA_PERSONALITY, NULL); - switch (Pokemon_GetValue(param0->unk_0C, MON_DATA_PERSONALITY, NULL) % 6) { - default: + switch (personality % 6) { case 0: - v1 = 0; - v2 = v0[0]; - - if (v2 < v0[1]) { - v1 = 1; - v2 = v0[1]; + default: + index = 0; + maxIV = hpIV; + if (maxIV < atkIV) { + index = 1; + maxIV = atkIV; } - - if (v2 < v0[2]) { - v1 = 2; - v2 = v0[2]; + if (maxIV < defIV) { + index = 2; + maxIV = defIV; } - - if (v2 < v0[3]) { - v1 = 3; - v2 = v0[3]; + if (maxIV < speedIV) { + index = 3; + maxIV = speedIV; } - - if (v2 < v0[4]) { - v1 = 4; - v2 = v0[4]; + if (maxIV < spAtkIV) { + index = 4; + maxIV = spAtkIV; } - - if (v2 < v0[5]) { - v1 = 5; - v2 = v0[5]; + if (maxIV < spDefIV) { + index = 5; + maxIV = spDefIV; } break; case 1: - v1 = 1; - v2 = v0[1]; - - if (v2 < v0[2]) { - v1 = 2; - v2 = v0[2]; + index = 1; + maxIV = atkIV; + if (maxIV < defIV) { + index = 2; + maxIV = defIV; } - - if (v2 < v0[3]) { - v1 = 3; - v2 = v0[3]; + if (maxIV < speedIV) { + index = 3; + maxIV = speedIV; } - - if (v2 < v0[4]) { - v1 = 4; - v2 = v0[4]; + if (maxIV < spAtkIV) { + index = 4; + maxIV = spAtkIV; } - - if (v2 < v0[5]) { - v1 = 5; - v2 = v0[5]; + if (maxIV < spDefIV) { + index = 5; + maxIV = spDefIV; } - - if (v2 < v0[0]) { - v1 = 0; - v2 = v0[0]; + if (maxIV < hpIV) { + index = 0; + maxIV = hpIV; } break; case 2: - v1 = 2; - v2 = v0[2]; - - if (v2 < v0[3]) { - v1 = 3; - v2 = v0[3]; + index = 2; + maxIV = defIV; + if (maxIV < speedIV) { + index = 3; + maxIV = speedIV; } - - if (v2 < v0[4]) { - v1 = 4; - v2 = v0[4]; + if (maxIV < spAtkIV) { + index = 4; + maxIV = spAtkIV; } - - if (v2 < v0[5]) { - v1 = 5; - v2 = v0[5]; + if (maxIV < spDefIV) { + index = 5; + maxIV = spDefIV; } - - if (v2 < v0[0]) { - v1 = 0; - v2 = v0[0]; + if (maxIV < hpIV) { + index = 0; + maxIV = hpIV; } - - if (v2 < v0[1]) { - v1 = 1; - v2 = v0[1]; + if (maxIV < atkIV) { + index = 1; + maxIV = atkIV; } break; case 3: - v1 = 3; - v2 = v0[3]; - - if (v2 < v0[4]) { - v1 = 4; - v2 = v0[4]; + index = 3; + maxIV = speedIV; + if (maxIV < spAtkIV) { + index = 4; + maxIV = spAtkIV; } - - if (v2 < v0[5]) { - v1 = 5; - v2 = v0[5]; + if (maxIV < spDefIV) { + index = 5; + maxIV = spDefIV; } - - if (v2 < v0[0]) { - v1 = 0; - v2 = v0[0]; + if (maxIV < hpIV) { + index = 0; + maxIV = hpIV; } - - if (v2 < v0[1]) { - v1 = 1; - v2 = v0[1]; + if (maxIV < atkIV) { + index = 1; + maxIV = atkIV; } - - if (v2 < v0[2]) { - v1 = 2; - v2 = v0[2]; + if (maxIV < defIV) { + index = 2; + maxIV = defIV; } break; case 4: - v1 = 4; - v2 = v0[4]; - - if (v2 < v0[5]) { - v1 = 5; - v2 = v0[5]; + index = 4; + maxIV = spAtkIV; + if (maxIV < spDefIV) { + index = 5; + maxIV = spDefIV; } - - if (v2 < v0[0]) { - v1 = 0; - v2 = v0[0]; + if (maxIV < hpIV) { + index = 0; + maxIV = hpIV; } - - if (v2 < v0[1]) { - v1 = 1; - v2 = v0[1]; + if (maxIV < atkIV) { + index = 1; + maxIV = atkIV; } - - if (v2 < v0[2]) { - v1 = 2; - v2 = v0[2]; + if (maxIV < defIV) { + index = 2; + maxIV = defIV; } - - if (v2 < v0[3]) { - v1 = 3; - v2 = v0[3]; + if (maxIV < speedIV) { + index = 3; + maxIV = speedIV; } break; case 5: - v1 = 5; - v2 = v0[5]; - - if (v2 < v0[0]) { - v1 = 0; - v2 = v0[0]; + index = 5; + maxIV = spDefIV; + if (maxIV < hpIV) { + index = 0; + maxIV = hpIV; } - - if (v2 < v0[1]) { - v1 = 1; - v2 = v0[1]; + if (maxIV < atkIV) { + index = 1; + maxIV = atkIV; } - - if (v2 < v0[2]) { - v1 = 2; - v2 = v0[2]; + if (maxIV < defIV) { + index = 2; + maxIV = defIV; } - - if (v2 < v0[3]) { - v1 = 3; - v2 = v0[3]; + if (maxIV < speedIV) { + index = 3; + maxIV = speedIV; } - - if (v2 < v0[4]) { - v1 = 4; - v2 = v0[4]; + if (maxIV < spAtkIV) { + index = 4; + maxIV = spAtkIV; } break; } - - v4 = Unk_020F5578[v1][(v2 % 5)]; - MessageLoader_GetStrbuf(param0->unk_04, v4, param0->unk_24.unk_04); + MessageLoader_GetStrbuf(infoDisplay->msgData, Unk_020F5578[index][(maxIV % 5)], infoDisplay->notepad.characteristic); } static const u16 Unk_020F556C[6] = { @@ -627,58 +560,53 @@ static const u16 Unk_020F556C[6] = { 0x45 }; -static void InitializeFlavorAffinityStrBuf(PokemonInfoDisplayStruct *param0) +static void FormatFlavorPreference(PokemonInfoDisplayStruct *infoDisplay) { - int v0, v1, v2; - - param0->unk_2C.unk_04 = Strbuf_Init(((2 * 18) * 2), param0->heapID); - v1 = 0; - - for (v0 = 0; v0 < 5; v0++) { - if (Pokemon_GetFlavorAffinity(param0->unk_0C, v0) == 1) { - v1 = v0 + 1; + infoDisplay->notepad.flavorPreference = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); + int index = 0; + for (int flavor = 0; flavor < FLAVOR_MAX; flavor++) { + if (Pokemon_GetFlavorAffinity(infoDisplay->mon, flavor) == 1) { + index = flavor + 1; } } - v2 = Unk_020F556C[v1]; - MessageLoader_GetStrbuf(param0->unk_04, v2, param0->unk_2C.unk_04); + MessageLoader_GetStrbuf(infoDisplay->msgData, Unk_020F556C[index], infoDisplay->notepad.flavorPreference); } -static void InitializeFriendshipLevelStrBuf(PokemonInfoDisplayStruct *param0) +static void FormatEggWatch(PokemonInfoDisplayStruct *infoDisplay) { - int v0 = Pokemon_GetValue(param0->unk_0C, MON_DATA_FRIENDSHIP, NULL); - int v1; + int msgNo; + int eggCycles = Pokemon_GetValue(infoDisplay->mon, MON_DATA_FRIENDSHIP, NULL); - param0->unk_34.unk_04 = Strbuf_Init((((2 * 18) * 2) * 4), param0->heapID); + infoDisplay->notepad.eggWatch = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); - if (v0 <= 5) { - v1 = 105; - } else if (v0 <= 10) { - v1 = 106; - } else if (v0 <= 40) { - v1 = 107; + if (eggCycles <= 5) { + msgNo = pl_msg_00000455_00105; + } else if (eggCycles <= 10) { + msgNo = pl_msg_00000455_00106; + } else if (eggCycles <= 40) { + msgNo = pl_msg_00000455_00107; } else { - v1 = 108; + msgNo = pl_msg_00000455_00108; } - - MessageLoader_GetStrbuf(param0->unk_04, v1, param0->unk_34.unk_04); + MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, infoDisplay->notepad.eggWatch); } -static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2) +static int MonMetCondition(Pokemon *mon, BOOL param1, int param2) { int v0 = 0; - if (Pokemon_GetValue(param0, MON_DATA_IS_EGG, NULL) == 0) { - if (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == 0) { - if (Pokemon_GetValue(param0, MON_DATA_HATCH_LOCATION, NULL) == (SpecialMetLoc_GetId(0, 55))) { + if (Pokemon_GetValue(mon, MON_DATA_IS_EGG, NULL) == 0) { + if (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == 0) { + if (Pokemon_GetValue(mon, MON_DATA_HATCH_LOCATION, NULL) == (SpecialMetLoc_GetId(0, 55))) { v0 = 15; - } else if (Pokemon_GetValue(param0, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { + } else if (Pokemon_GetValue(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { if (param1 == 1) { v0 = 7; } else { v0 = 8; } - } else if (Pokemon_GetValue(param0, MON_DATA_HATCH_LOCATION, NULL) == (SpecialMetLoc_GetId(1, 1))) { + } else if (Pokemon_GetValue(mon, MON_DATA_HATCH_LOCATION, NULL) == (SpecialMetLoc_GetId(1, 1))) { v0 = 2; } else { if (param1 == 1) { @@ -688,14 +616,14 @@ static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2) } } } else { - if (Pokemon_GetValue(param0, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { - if (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 2)) { + if (Pokemon_GetValue(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { + if (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 2)) { if (param1 == 1) { v0 = 13; } else { v0 = 14; } - } else if (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(2, 1)) { + } else if (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(2, 1)) { if (param1 == 1) { v0 = 11; } else { @@ -709,7 +637,7 @@ static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2) } } } else { - if ((Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 1)) || (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 0)) || (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 9)) || (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 10)) || (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 11))) { + if ((Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 1)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 0)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 9)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 10)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 11))) { if (param1 == 1) { v0 = 5; } else { @@ -726,8 +654,8 @@ static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2) } } else { if (param1 == 1) { - if (Pokemon_GetValue(param0, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { - if (Pokemon_GetValue(param0, MON_DATA_MET_LOCATION, NULL) == (SpecialMetLoc_GetId(2, 1))) { + if (Pokemon_GetValue(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { + if (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == (SpecialMetLoc_GetId(2, 1))) { v0 = 20; } else { v0 = 18; @@ -736,7 +664,7 @@ static int DeterminePokemonStatus(Pokemon *param0, BOOL param1, int param2) v0 = 16; } } else { - if (Pokemon_GetValue(param0, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { + if (Pokemon_GetValue(mon, MON_DATA_FATEFUL_ENCOUNTER, NULL) == 1) { v0 = 19; } else { v0 = 17; From bd18fff565cc0eea3b6d3e4ef044fd7de6402b61 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 5 Aug 2025 13:20:57 -0400 Subject: [PATCH 4/5] pokeplat review changes pt. 1 --- include/struct_defs/struct_02090800.h | 27 +- res/text/pokemon_summary_screen.gmm | 170 +++++----- .../pokemon_summary_screen/window.c | 20 +- src/trainer_memo.c | 304 +++++++++--------- 4 files changed, 260 insertions(+), 261 deletions(-) diff --git a/include/struct_defs/struct_02090800.h b/include/struct_defs/struct_02090800.h index 6b31a9b371..bd30bd5c6c 100644 --- a/include/struct_defs/struct_02090800.h +++ b/include/struct_defs/struct_02090800.h @@ -7,27 +7,22 @@ #include "pokemon.h" #include "string_template.h" -// Each string in the notepad and which line it starts on. -typedef struct MemoNotepad { - int natureLine; - Strbuf *nature; - int dateLocationMetLine; - Strbuf *dateLocationMet; - int characteristicLine; - Strbuf *characteristic; - int flavorPreferenceLine; - Strbuf *flavorPreference; - int eggWatchLine; - Strbuf *eggWatch; -} MemoNotepad; +typedef struct MemoNotepadString { + int line; + Strbuf *string; +} MemoNotepadString; -typedef struct { - int heapID; +typedef struct PokemonInfoDisplayStruct { + enum HeapId heapID; MessageLoader *msgData; StringTemplate *msgFmt; Pokemon *mon; BOOL isMine; - MemoNotepad notepad; + MemoNotepadString nature; + MemoNotepadString metDateAndLocation; + MemoNotepadString characteristic; + MemoNotepadString flavorPreference; + MemoNotepadString eggWatch; } PokemonInfoDisplayStruct; #endif // POKEPLATINUM_STRUCT_02090800_H diff --git a/res/text/pokemon_summary_screen.gmm b/res/text/pokemon_summary_screen.gmm index d7e76c0476..c7243af4a6 100644 --- a/res/text/pokemon_summary_screen.gmm +++ b/res/text/pokemon_summary_screen.gmm @@ -98,343 +98,343 @@ used TRAINER MEMO - + used {COLOR 2}Hardy{COLOR 0} nature. - + used {COLOR 2}Lonely{COLOR 0} nature. - + used {COLOR 2}Brave{COLOR 0} nature. - + used {COLOR 2}Adamant{COLOR 0} nature. - + used {COLOR 2}Naughty{COLOR 0} nature. - + used {COLOR 2}Bold{COLOR 0} nature. - + used {COLOR 2}Docile{COLOR 0} nature. - + used {COLOR 2}Relaxed{COLOR 0} nature. - + used {COLOR 2}Impish{COLOR 0} nature. - + used {COLOR 2}Lax{COLOR 0} nature. - + used {COLOR 2}Timid{COLOR 0} nature. - + used {COLOR 2}Hasty{COLOR 0} nature. - + used {COLOR 2}Serious{COLOR 0} nature. - + used {COLOR 2}Jolly{COLOR 0} nature. - + used {COLOR 2}Naive{COLOR 0} nature. - + used {COLOR 2}Modest{COLOR 0} nature. - + used {COLOR 2}Mild{COLOR 0} nature. - + used {COLOR 2}Quiet{COLOR 0} nature. - + used {COLOR 2}Bashful{COLOR 0} nature. - + used {COLOR 2}Rash{COLOR 0} nature. - + used {COLOR 2}Calm{COLOR 0} nature. - + used {COLOR 2}Gentle{COLOR 0} nature. - + used {COLOR 2}Sassy{COLOR 0} nature. - + used {COLOR 2}Careful{COLOR 0} nature. - + used {COLOR 2}Quirky{COLOR 0} nature. - + used {STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nMet at Lv. {STRVAR_1 52, 3, 0}. - + used {STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nApparently met at\nLv. {STRVAR_1 52, 3, 0}. - + used {STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nArrived at Lv. {STRVAR_1 52, 3, 0}. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg obtained.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg hatched. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg obtained.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg apparently hatched. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg received.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg hatched. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg received.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg apparently hatched. - + used {STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nHad a fateful encounter\nat Lv. {STRVAR_1 52, 3, 0}. - + used {STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nApparently had a\nfateful encounter at\nLv. {STRVAR_1 52, 3, 0}. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg obtained.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg hatched.\nFateful encounter. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg obtained.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg apparently hatched.\nFateful encounter. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg arrived.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg hatched.\nFateful encounter. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg arrived.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg apparently hatched.\nFateful encounter. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg obtained.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg hatched.\nFateful encounter. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}\nEgg obtained.\n{STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nEgg apparently hatched.\nFateful encounter. - + used {STRVAR_1 74, 1, 0} {STRVAR_1 51, 2, 0}, 20{STRVAR_1 51, 0, 0}\n{COLOR 2}{STRVAR_1 4, 4, 0}{COLOR 0}\nArrived at Lv. {STRVAR_1 52, 3, 0}. - + used Likes {COLOR 2}spicy{COLOR 0} food. - + used Likes {COLOR 2}dry{COLOR 0} food. - + used Likes {COLOR 2}sweet{COLOR 0} food. - + used Likes {COLOR 2}bitter{COLOR 0} food. - + used Likes {COLOR 2}sour{COLOR 0} food. - + used Happily eats anything. - + used Loves to eat. - + used Often dozes off. - + used Often scatters things. - + used Scatters things often. - + used Likes to relax. - + used Proud of its power. - + used Likes to thrash about. - + used A little quick tempered. - + used Likes to fight. - + used Quick tempered. - + used Sturdy body. - + used Capable of taking hits. - + used Highly persistent. - + used Good endurance. - + used Good perseverance. - + used Likes to run. - + used Alert to sounds. - + used Impetuous and silly. - + used Somewhat of a clown. - + used Quick to flee. - + used Highly curious. - + used Mischievous. - + used Thoroughly cunning. - + used Often lost in thought. - + used Very finicky. - + used Strong willed. - + used Somewhat vain. - + used Strongly defiant. - + used Hates to lose. - + used Somewhat stubborn. - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\nA mysterious Pokémon\nEgg received from\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}.\n - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\nA mysterious Pokémon\nEgg obtained in\n{COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}.\n - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\nA very mysterious\nPokémon Egg obtained\nat {COLOR 1}{STRVAR_1 4, 8, 0}{COLOR 0}.\n - + used {STRVAR_1 74, 6, 0} {STRVAR_1 51, 7, 0}, 20{STRVAR_1 51, 5, 0}\nA very mysterious\nPokémon Egg that came\nfrom {COLOR 2}{STRVAR_1 4, 8, 0}{COLOR 0}.\n - + used “The Egg Watch”\nSounds can be heard\ncoming from inside!\nIt will hatch soon! - + used “The Egg Watch”\nIt appears to move\noccasionally. It may\nbe close to hatching. - + used “The Egg Watch”\nWhat will hatch from\nthis? It doesn’t seem\nclose to hatching. - + used “The Egg Watch”\nIt looks like this Egg\nwill take a long time to\nhatch. diff --git a/src/applications/pokemon_summary_screen/window.c b/src/applications/pokemon_summary_screen/window.c index 736482fe72..fb61bb15a3 100644 --- a/src/applications/pokemon_summary_screen/window.c +++ b/src/applications/pokemon_summary_screen/window.c @@ -1098,24 +1098,24 @@ static void PrintTrainerMemo(Window *window, Pokemon *mon, BOOL monOTMatches) { PokemonInfoDisplayStruct *infoDisplay = sub_02092494(mon, monOTMatches, HEAP_ID_POKEMON_SUMMARY_SCREEN); - if (infoDisplay->notepad.nature != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.nature, 0, (infoDisplay->notepad.natureLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->nature.string != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->nature.string, 0, (infoDisplay->nature.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->notepad.dateLocationMet != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.dateLocationMet, 0, (infoDisplay->notepad.dateLocationMetLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->metDateAndLocation.string != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->metDateAndLocation.string, 0, (infoDisplay->metDateAndLocation.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->notepad.characteristic != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.characteristic, 0, (infoDisplay->notepad.characteristicLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->characteristic.string != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->characteristic.string, 0, (infoDisplay->characteristic.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->notepad.flavorPreference != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.flavorPreference, 0, (infoDisplay->notepad.flavorPreferenceLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->flavorPreference.string != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->flavorPreference.string, 0, (infoDisplay->flavorPreference.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } - if (infoDisplay->notepad.eggWatch != NULL) { - Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.eggWatch, 0, (infoDisplay->notepad.eggWatchLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); + if (infoDisplay->eggWatch.string != NULL) { + Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->eggWatch.string, 0, (infoDisplay->eggWatch.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL); } sub_0209282C(infoDisplay); diff --git a/src/trainer_memo.c b/src/trainer_memo.c index 492457657e..009ac2aaed 100644 --- a/src/trainer_memo.c +++ b/src/trainer_memo.c @@ -21,7 +21,7 @@ #include "res/text/bank/pokemon_summary_screen.h" -typedef enum MetCondition { +enum MetCondition { MET_CONDITION_WILD_ENCOUNTER, MET_CONDITION_WILD_ENCOUNTER_TRADED, MET_CONDITION_WILD_GIFT, @@ -43,9 +43,27 @@ typedef enum MetCondition { MET_CONDITION_FATEFUL_EGG, MET_CONDITION_FATEFUL_EGG_TRADED, MET_CONDITION_FATEFUL_EGG_ARRIVED, -} MetCondition; +}; + +static const u16 sFlavorMsgs[FLAVOR_MAX + 1] = { + PokemonSummary_Text_HappilyEatsAnything, + PokemonSummary_Text_LikesSpicyFood, + PokemonSummary_Text_LikesDryFood, + PokemonSummary_Text_LikesSweetFood, + PokemonSummary_Text_LikesBitterFood, + PokemonSummary_Text_LikesSourFood, +}; + +static const u16 sCharactersticMsgs[6][5] = { + { PokemonSummary_Text_LovesToEat, PokemonSummary_Text_OftenDozesOff, PokemonSummary_Text_OftenScattersThings, PokemonSummary_Text_ScattersThingsOften, PokemonSummary_Text_LikesToRelax }, + { PokemonSummary_Text_ProudOfItsPower, PokemonSummary_Text_LikesToTrashAbout, PokemonSummary_Text_ALittleQuickTempered, PokemonSummary_Text_LikesToFight, PokemonSummary_Text_QuickTempered }, + { PokemonSummary_Text_SturdyBody, PokemonSummary_Text_CapableOfTakingHits, PokemonSummary_Text_HighlyPersistent, PokemonSummary_Text_GoodEndurance, PokemonSummary_Text_GoodPerseverance }, + { PokemonSummary_Text_LikesToRun, PokemonSummary_Text_AlertToSounds, PokemonSummary_Text_ImpetuousAndSilly, PokemonSummary_Text_SomewhatOfAClown, PokemonSummary_Text_QuickToFlee }, + { PokemonSummary_Text_HighlyCurious, PokemonSummary_Text_Mischievous, PokemonSummary_Text_ThoroughlyCunning, PokemonSummary_Text_OftenLostInThought, PokemonSummary_Text_VeryFinicky }, + { PokemonSummary_Text_StrongWilled, PokemonSummary_Text_SomewhatVain, PokemonSummary_Text_StronglyDefiant, PokemonSummary_Text_HatesToLose, PokemonSummary_Text_SomewhatStubborn }, +}; -static int MonMetCondition(Pokemon *mon, BOOL param1, int param2); +static enum MetCondition MonMetCondition(Pokemon *mon, BOOL param1, int param2); static void FormatNature(PokemonInfoDisplayStruct *infoDisplay); static void FormatDateAndLocationMet(PokemonInfoDisplayStruct *infoDisplay, int msgNo); static void FormatDateAndLocation_Migrated(PokemonInfoDisplayStruct *infoDisplay, int param1); @@ -67,194 +85,194 @@ PokemonInfoDisplayStruct *sub_02092494(Pokemon *mon, BOOL isMine, int heapID) ptr->msgFmt = StringTemplate_New(9, 32, ptr->heapID); ptr->mon = mon; ptr->isMine = isMine; - ptr->notepad.natureLine = 0; - ptr->notepad.nature = NULL; - ptr->notepad.dateLocationMetLine = 0; - ptr->notepad.dateLocationMet = NULL; - ptr->notepad.characteristicLine = 0; - ptr->notepad.characteristic = NULL; - ptr->notepad.flavorPreferenceLine = 0; - ptr->notepad.flavorPreference = NULL; - ptr->notepad.eggWatchLine = 0; - ptr->notepad.eggWatch = NULL; + ptr->nature.line = 0; + ptr->nature.string = NULL; + ptr->metDateAndLocation.line = 0; + ptr->metDateAndLocation.string = NULL; + ptr->characteristic.line = 0; + ptr->characteristic.string = NULL; + ptr->flavorPreference.line = 0; + ptr->flavorPreference.string = NULL; + ptr->eggWatch.line = 0; + ptr->eggWatch.string = NULL; switch (MonMetCondition(ptr->mon, ptr->isMine, ptr->heapID)) { case MET_CONDITION_WILD_ENCOUNTER: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00049); - ptr->notepad.characteristicLine = 6; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_WildEncounter); + ptr->characteristic.line = 6; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 7; + ptr->flavorPreference.line = 7; FormatFlavorPreference(ptr); break; case MET_CONDITION_WILD_ENCOUNTER_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00050); - ptr->notepad.characteristicLine = 6; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_WildEncounterTraded); + ptr->characteristic.line = 6; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 7; + ptr->flavorPreference.line = 7; FormatFlavorPreference(ptr); break; case MET_CONDITION_WILD_GIFT: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00051); - ptr->notepad.characteristicLine = 6; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_WildEncounterGift); + ptr->characteristic.line = 6; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 7; + ptr->flavorPreference.line = 7; FormatFlavorPreference(ptr); break; case MET_CONDITION_EGG_HATCHED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00052); - ptr->notepad.characteristicLine = 8; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_EggHatched); + ptr->characteristic.line = 8; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 9; + ptr->flavorPreference.line = 9; FormatFlavorPreference(ptr); break; case MET_CONDITION_EGG_HATCHED_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00053); - ptr->notepad.characteristicLine = 8; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_EggHatchedTraded); + ptr->characteristic.line = 8; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 9; + ptr->flavorPreference.line = 9; FormatFlavorPreference(ptr); break; case MET_CONDITION_EGG_HATCHED_GIFT: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00054); - ptr->notepad.characteristicLine = 8; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_EggHatchedGift); + ptr->characteristic.line = 8; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 9; + ptr->flavorPreference.line = 9; FormatFlavorPreference(ptr); break; case MET_CONDITION_EGG_HATCHED_GIFT_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00055); - ptr->notepad.characteristicLine = 8; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_EggHatchedGiftTraded); + ptr->characteristic.line = 8; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 9; + ptr->flavorPreference.line = 9; FormatFlavorPreference(ptr); break; case MET_CONDITION_FATEFUL_ENCOUNTER: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00056); - ptr->notepad.characteristicLine = 7; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEncounter); + ptr->characteristic.line = 7; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 8; + ptr->flavorPreference.line = 8; FormatFlavorPreference(ptr); break; case MET_CONDITION_FATEFUL_ENCOUNTER_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00057); - ptr->notepad.characteristicLine = 7; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEncounterTraded); + ptr->characteristic.line = 7; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 8; + ptr->flavorPreference.line = 8; FormatFlavorPreference(ptr); break; case MET_CONDITION_FATEFUL_EGG_HATCHED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00058); - ptr->notepad.characteristicLine = 9; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEggHatched); + ptr->characteristic.line = 9; FormatCharacteristic(ptr); break; case MET_CONDITION_FATEFUL_EGG_HATCHED_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00059); - ptr->notepad.characteristicLine = 9; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEggHatchedTraded); + ptr->characteristic.line = 9; FormatCharacteristic(ptr); break; case MET_CONDITION_FATEFUL_EGG_HATCHED_ARRIVED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00060); - ptr->notepad.characteristicLine = 9; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEggHatchedArrived); + ptr->characteristic.line = 9; FormatCharacteristic(ptr); break; case MET_CONDITION_FATEFUL_EGG_HATCHED_ARRIVED_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00061); - ptr->notepad.characteristicLine = 9; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEggHatchedArrivedTraded); + ptr->characteristic.line = 9; FormatCharacteristic(ptr); break; case MET_CONDITION_FATEFUL_EGG_HATCHED_GIFT: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00062); - ptr->notepad.characteristicLine = 9; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEggHatchedGift); + ptr->characteristic.line = 9; FormatCharacteristic(ptr); break; case MET_CONDITION_FATEFUL_EGG_HATCHED_GIFT_TRADED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocationMet(ptr, pl_msg_00000455_00063); - ptr->notepad.characteristicLine = 9; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocationMet(ptr, PokemonSummary_Text_MetCondition_FatefulEggHatchedGiftTraded); + ptr->characteristic.line = 9; FormatCharacteristic(ptr); break; case MET_CONDITION_MIGRATED: - ptr->notepad.natureLine = 1; + ptr->nature.line = 1; FormatNature(ptr); - ptr->notepad.dateLocationMetLine = 2; - FormatDateAndLocation_Migrated(ptr, pl_msg_00000455_00064); - ptr->notepad.characteristicLine = 6; + ptr->metDateAndLocation.line = 2; + FormatDateAndLocation_Migrated(ptr, PokemonSummary_Text_MetCondition_Migrated); + ptr->characteristic.line = 6; FormatCharacteristic(ptr); - ptr->notepad.flavorPreferenceLine = 7; + ptr->flavorPreference.line = 7; FormatFlavorPreference(ptr); break; case MET_CONDITION_EGG: - ptr->notepad.dateLocationMetLine = 1; - FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00101, 0); - ptr->notepad.eggWatchLine = 6; + ptr->metDateAndLocation.line = 1; + FormatDateAndLocation_Egg(ptr, PokemonSummary_Text_MetCondition_Egg, FALSE); + ptr->eggWatch.line = 6; FormatEggWatch(ptr); break; case MET_CONDITION_EGG_TRADED: - ptr->notepad.dateLocationMetLine = 1; - FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00102, 1); - ptr->notepad.eggWatchLine = 6; + ptr->metDateAndLocation.line = 1; + FormatDateAndLocation_Egg(ptr, PokemonSummary_Text_MetCondition_EggTraded, TRUE); + ptr->eggWatch.line = 6; FormatEggWatch(ptr); break; case MET_CONDITION_FATEFUL_EGG: - ptr->notepad.dateLocationMetLine = 1; - FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00103, 0); - ptr->notepad.eggWatchLine = 6; + ptr->metDateAndLocation.line = 1; + FormatDateAndLocation_Egg(ptr, PokemonSummary_Text_MetCondition_FatefulEgg, FALSE); + ptr->eggWatch.line = 6; FormatEggWatch(ptr); break; case MET_CONDITION_FATEFUL_EGG_TRADED: - ptr->notepad.dateLocationMetLine = 1; - FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00103, 1); - ptr->notepad.eggWatchLine = 6; + ptr->metDateAndLocation.line = 1; + FormatDateAndLocation_Egg(ptr, PokemonSummary_Text_MetCondition_FatefulEgg, TRUE); + ptr->eggWatch.line = 6; FormatEggWatch(ptr); break; case MET_CONDITION_FATEFUL_EGG_ARRIVED: - ptr->notepad.dateLocationMetLine = 1; - FormatDateAndLocation_Egg(ptr, pl_msg_00000455_00104, 0); - ptr->notepad.eggWatchLine = 6; + ptr->metDateAndLocation.line = 1; + FormatDateAndLocation_Egg(ptr, PokemonSummary_Text_MetCondition_FatefulEggArrived, FALSE); + ptr->eggWatch.line = 6; FormatEggWatch(ptr); break; } @@ -263,20 +281,20 @@ PokemonInfoDisplayStruct *sub_02092494(Pokemon *mon, BOOL isMine, int heapID) void sub_0209282C(PokemonInfoDisplayStruct *infoDisplay) { - if (infoDisplay->notepad.nature != NULL) { - Heap_Free(infoDisplay->notepad.nature); + if (infoDisplay->nature.string != NULL) { + Heap_Free(infoDisplay->nature.string); } - if (infoDisplay->notepad.dateLocationMet != NULL) { - Heap_Free(infoDisplay->notepad.dateLocationMet); + if (infoDisplay->metDateAndLocation.string != NULL) { + Heap_Free(infoDisplay->metDateAndLocation.string); } - if (infoDisplay->notepad.characteristic != NULL) { - Heap_Free(infoDisplay->notepad.characteristic); + if (infoDisplay->characteristic.string != NULL) { + Heap_Free(infoDisplay->characteristic.string); } - if (infoDisplay->notepad.flavorPreference != NULL) { - Heap_Free(infoDisplay->notepad.flavorPreference); + if (infoDisplay->flavorPreference.string != NULL) { + Heap_Free(infoDisplay->flavorPreference.string); } - if (infoDisplay->notepad.eggWatch != NULL) { - Heap_Free(infoDisplay->notepad.eggWatch); + if (infoDisplay->eggWatch.string != NULL) { + Heap_Free(infoDisplay->eggWatch.string); } StringTemplate_Free(infoDisplay->msgFmt); @@ -288,15 +306,15 @@ static void FormatNature(PokemonInfoDisplayStruct *infoDisplay) { int nature = Pokemon_GetNature(infoDisplay->mon); if (nature <= NATURE_COUNT - 1) { - infoDisplay->notepad.nature = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); - MessageLoader_GetStrbuf(infoDisplay->msgData, (24 + nature), infoDisplay->notepad.nature); + infoDisplay->nature.string = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); + MessageLoader_GetStrbuf(infoDisplay->msgData, PokemonSummary_Text_Nature_Hardy + nature, infoDisplay->nature.string); } } static void FormatDateAndLocationMet(PokemonInfoDisplayStruct *infoDisplay, int msgNo) { Strbuf *str = Strbuf_Init((((2 * 18) * 2) * 8), infoDisplay->heapID); - infoDisplay->notepad.dateLocationMet = Strbuf_Init((((2 * 18) * 2) * 8), infoDisplay->heapID); + infoDisplay->metDateAndLocation.string = Strbuf_Init((((2 * 18) * 2) * 8), infoDisplay->heapID); MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, str); StringTemplate_SetNumber(infoDisplay->msgFmt, 0, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); @@ -309,14 +327,14 @@ static void FormatDateAndLocationMet(PokemonInfoDisplayStruct *infoDisplay, int StringTemplate_SetNumber(infoDisplay->msgFmt, 7, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_DAY, NULL), 2, 0, 1); StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 8, Pokemon_GetValue(infoDisplay->mon, MON_DATA_MET_LOCATION, NULL)); - StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->notepad.dateLocationMet, str); + StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->metDateAndLocation.string, str); Strbuf_Free(str); } static void FormatDateAndLocation_Migrated(PokemonInfoDisplayStruct *infoDisplay, int msgNo) { Strbuf *str = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); - infoDisplay->notepad.dateLocationMet = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); + infoDisplay->metDateAndLocation.string = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, str); StringTemplate_SetNumber(infoDisplay->msgFmt, 0, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_YEAR, NULL), 2, 2, 1); @@ -351,14 +369,14 @@ static void FormatDateAndLocation_Migrated(PokemonInfoDisplayStruct *infoDisplay break; } - StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->notepad.dateLocationMet, str); + StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->metDateAndLocation.string, str); Strbuf_Free(str); } static void FormatDateAndLocation_Egg(PokemonInfoDisplayStruct *infoDisplay, int param1, int param2) { Strbuf *str = Strbuf_Init((((2 * 18) * 2) * 5), infoDisplay->heapID); - infoDisplay->notepad.dateLocationMet = Strbuf_Init((((2 * 18) * 2) * 5), infoDisplay->heapID); + infoDisplay->metDateAndLocation.string = Strbuf_Init((((2 * 18) * 2) * 5), infoDisplay->heapID); MessageLoader_GetStrbuf(infoDisplay->msgData, param1, str); @@ -374,24 +392,15 @@ static void FormatDateAndLocation_Egg(PokemonInfoDisplayStruct *infoDisplay, int StringTemplate_SetMetLocationName(infoDisplay->msgFmt, 8, Pokemon_GetValue(infoDisplay->mon, MON_DATA_HATCH_LOCATION, NULL)); } - StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->notepad.dateLocationMet, str); + StringTemplate_Format(infoDisplay->msgFmt, infoDisplay->metDateAndLocation.string, str); Strbuf_Free(str); } -static const u16 Unk_020F5578[6][5] = { - { 0x47, 0x48, 0x49, 0x4A, 0x4B }, - { 0x4C, 0x4D, 0x4E, 0x4F, 0x50 }, - { 0x51, 0x52, 0x53, 0x54, 0x55 }, - { 0x56, 0x57, 0x58, 0x59, 0x5A }, - { 0x5B, 0x5C, 0x5D, 0x5E, 0x5F }, - { 0x60, 0x61, 0x62, 0x63, 0x64 } -}; - static void FormatCharacteristic(PokemonInfoDisplayStruct *infoDisplay) { int index, maxIV; - infoDisplay->notepad.characteristic = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); + infoDisplay->characteristic.string = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); int hpIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_HP_IV, NULL); int atkIV = Pokemon_GetValue(infoDisplay->mon, MON_DATA_ATK_IV, NULL); @@ -548,21 +557,12 @@ static void FormatCharacteristic(PokemonInfoDisplayStruct *infoDisplay) } break; } - MessageLoader_GetStrbuf(infoDisplay->msgData, Unk_020F5578[index][(maxIV % 5)], infoDisplay->notepad.characteristic); + MessageLoader_GetStrbuf(infoDisplay->msgData, sCharactersticMsgs[index][maxIV % 5], infoDisplay->characteristic.string); } -static const u16 Unk_020F556C[6] = { - 0x46, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45 -}; - static void FormatFlavorPreference(PokemonInfoDisplayStruct *infoDisplay) { - infoDisplay->notepad.flavorPreference = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); + infoDisplay->flavorPreference.string = Strbuf_Init(((2 * 18) * 2), infoDisplay->heapID); int index = 0; for (int flavor = 0; flavor < FLAVOR_MAX; flavor++) { if (Pokemon_GetFlavorAffinity(infoDisplay->mon, flavor) == 1) { @@ -570,7 +570,7 @@ static void FormatFlavorPreference(PokemonInfoDisplayStruct *infoDisplay) } } - MessageLoader_GetStrbuf(infoDisplay->msgData, Unk_020F556C[index], infoDisplay->notepad.flavorPreference); + MessageLoader_GetStrbuf(infoDisplay->msgData, sFlavorMsgs[index], infoDisplay->flavorPreference.string); } static void FormatEggWatch(PokemonInfoDisplayStruct *infoDisplay) @@ -578,21 +578,21 @@ static void FormatEggWatch(PokemonInfoDisplayStruct *infoDisplay) int msgNo; int eggCycles = Pokemon_GetValue(infoDisplay->mon, MON_DATA_FRIENDSHIP, NULL); - infoDisplay->notepad.eggWatch = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); + infoDisplay->eggWatch.string = Strbuf_Init((((2 * 18) * 2) * 4), infoDisplay->heapID); if (eggCycles <= 5) { - msgNo = pl_msg_00000455_00105; + msgNo = PokemonSummary_Text_EggWatch_ItWillHatchSoon; } else if (eggCycles <= 10) { - msgNo = pl_msg_00000455_00106; + msgNo = PokemonSummary_Text_EggWatch_CloseToHatching; } else if (eggCycles <= 40) { - msgNo = pl_msg_00000455_00107; + msgNo = PokemonSummary_Text_EggWatch_NotCloseToHatching; } else { - msgNo = pl_msg_00000455_00108; + msgNo = PokemonSummary_Text_EggWatch_LongTimeToHatch; } - MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, infoDisplay->notepad.eggWatch); + MessageLoader_GetStrbuf(infoDisplay->msgData, msgNo, infoDisplay->eggWatch.string); } -static int MonMetCondition(Pokemon *mon, BOOL param1, int param2) +static enum MetCondition MonMetCondition(Pokemon *mon, BOOL param1, int param2) { int v0 = 0; @@ -637,7 +637,11 @@ static int MonMetCondition(Pokemon *mon, BOOL param1, int param2) } } } else { - if ((Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 1)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 0)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 9)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 10)) || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 11))) { + if ((Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 1)) + || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 0)) + || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 9)) + || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 10)) + || (Pokemon_GetValue(mon, MON_DATA_MET_LOCATION, NULL) == SpecialMetLoc_GetId(1, 11))) { if (param1 == 1) { v0 = 5; } else { From 70ca0698239c644b2b6466ee38e868ace7a782ec Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 5 Aug 2025 13:25:04 -0400 Subject: [PATCH 5/5] pt2 --- include/struct_defs/struct_02090800.h | 2 -- include/struct_defs/struct_02090800_sub1.h | 11 ----------- 2 files changed, 13 deletions(-) delete mode 100644 include/struct_defs/struct_02090800_sub1.h diff --git a/include/struct_defs/struct_02090800.h b/include/struct_defs/struct_02090800.h index bd30bd5c6c..924f97acca 100644 --- a/include/struct_defs/struct_02090800.h +++ b/include/struct_defs/struct_02090800.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_02090800_H #define POKEPLATINUM_STRUCT_02090800_H -#include "struct_defs/struct_02090800_sub1.h" - #include "message.h" #include "pokemon.h" #include "string_template.h" diff --git a/include/struct_defs/struct_02090800_sub1.h b/include/struct_defs/struct_02090800_sub1.h deleted file mode 100644 index 8c79b4989b..0000000000 --- a/include/struct_defs/struct_02090800_sub1.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_02090800_SUB1_H -#define POKEPLATINUM_STRUCT_02090800_SUB1_H - -#include "strbuf.h" - -typedef struct { - int unk_00; - Strbuf *unk_04; -} PokemonInfoDisplayStruct_sub1; - -#endif // POKEPLATINUM_STRUCT_02090800_SUB1_H