Skip to content

Commit

Permalink
More pokedex documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienntindall committed Jan 14, 2025
1 parent b5f5526 commit 5a7b409
Show file tree
Hide file tree
Showing 48 changed files with 374 additions and 384 deletions.
2 changes: 1 addition & 1 deletion asm/macros/scrcmd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4475,7 +4475,7 @@
.short \arg0
.endm

.macro ScrCmd_337 arg0, arg1
.macro ScrCmd_HasSeenSpecies arg0, arg1
.short 823
.short \arg0
.short \arg1
Expand Down
16 changes: 8 additions & 8 deletions include/overlay005/ov5_021F77A8.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

#include "field_script_context.h"

BOOL ScrCmd_337(ScriptContext *param0);
BOOL ScrCmd_2E5(ScriptContext *param0);
BOOL ScrCmd_2E9(ScriptContext *param0);
BOOL ScrCmd_2EA(ScriptContext *param0);
BOOL ScrCmd_2EB(ScriptContext *param0);
BOOL ScrCmd_2E6(ScriptContext *param0);
BOOL ScrCmd_2EC(ScriptContext *param0);
BOOL ScrCmd_2ED(ScriptContext *param0);
BOOL ScrCmd_HasSeenSpecies(ScriptContext *ctx);
BOOL ScrCmd_2E5(ScriptContext *ctx);
BOOL ScrCmd_2E9(ScriptContext *ctx);
BOOL ScrCmd_2EA(ScriptContext *ctx);
BOOL ScrCmd_2EB(ScriptContext *ctx);
BOOL ScrCmd_2E6(ScriptContext *ctx);
BOOL ScrCmd_2EC(ScriptContext *ctx);
BOOL ScrCmd_2ED(ScriptContext *ctx);

#endif // POKEPLATINUM_OV5_021F77A8_H
2 changes: 1 addition & 1 deletion include/overlay021/struct_ov21_021D3208.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "trainer_info.h"

typedef struct {
const Pokedex *dexData;
const Pokedex *pokedex;
const TrainerInfo *unk_04;
int timeOfDay;
BOOL fullmoonIslandVisible;
Expand Down
2 changes: 1 addition & 1 deletion include/overlay021/struct_ov21_021D3320.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "strbuf.h"

typedef struct {
const Pokedex *dexData;
const Pokedex *pokedex;
SortedPokedex sortedPokedex;
int isNationalDex;
BOOL isNationalDexUnlocked;
Expand Down
66 changes: 33 additions & 33 deletions include/pokedex_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,41 @@ void Pokedex_Init(Pokedex *pokedex);
u16 Pokedex_CountCaught_National(const Pokedex *pokedex);
u16 Pokedex_CountSeen_National(const Pokedex *pokedex);
u16 Pokedex_CountSeen(const Pokedex *pokedex);
u16 PokedexData_CountCaught_Local(const Pokedex *pokedex);
u16 PokedexData_CountSeen_Local(const Pokedex *pokedex);
BOOL PokedexData_NationalDexCompleted(const Pokedex *pokedex);
BOOL PokedexData_LocalDexCompleted(const Pokedex *pokedex);
u16 PokedexData_NumCaught_National(const Pokedex *pokedex);
u16 PokedexData_NumCaught_Local(const Pokedex *pokedex);
BOOL PokedexData_HasCaughtSpecies(const Pokedex *pokedex, u16 species);
BOOL PokedexData_HasSeenSpecies(const Pokedex *pokedex, u16 species);
u32 PokedexData_GetForm_Spinda(const Pokedex *pokedex, u8 formIndex);
u32 PokedexData_DisplayedGender(const Pokedex *pokedex, u16 species, int displaySecondary);
u32 PokedexData_GetForm_Unown(const Pokedex *pokedex, int formIndex);
u32 PokedexData_NumFormsSeen_Unown(const Pokedex *pokedex);
u32 PokedexData_GetForm_Shellos(const Pokedex *pokedex, int formIndex);
u32 PokedexData_NumFormsSeen_Shellos(const Pokedex *pokedex);
u32 PokedexData_GetForm_Gastrodon(const Pokedex *pokedex, int formIndex);
u32 PokedexData_NumFormsSeen_Gastrodon(const Pokedex *pokedex);
u32 PokedexData_GetForm_Burmy(const Pokedex *pokedex, int formIndex);
u32 PokedexData_NumFormsSeen_Burmy(const Pokedex *pokedex);
u32 PokedexData_GetForm_Wormadam(const Pokedex *pokedex, int formIndex);
u32 PokedexData_NumFormsSeen_Wormadam(const Pokedex *pokedex);
u32 PokedexData_GetForm_Deoxys(const Pokedex *pokedex, int formIndex);
u32 PokedexData_NumFormsSeen_Deoxys(const Pokedex *pokedex);
u16 Pokedex_CountCaught_Local(const Pokedex *pokedex);
u16 Pokedex_CountSeen_Local(const Pokedex *pokedex);
BOOL Pokedex_NationalDexCompleted(const Pokedex *pokedex);
BOOL Pokedex_LocalDexCompleted(const Pokedex *pokedex);
u16 Pokedex_NumCaught_National(const Pokedex *pokedex);
u16 Pokedex_NumCaught_Local(const Pokedex *pokedex);
BOOL Pokedex_HasCaughtSpecies(const Pokedex *pokedex, u16 species);
BOOL Pokedex_HasSeenSpecies(const Pokedex *pokedex, u16 species);
u32 Pokedex_GetForm_Spinda(const Pokedex *pokedex, u8 formIndex);
u32 Pokedex_DisplayedGender(const Pokedex *pokedex, u16 species, int displaySecondary);
u32 Pokedex_GetForm_Unown(const Pokedex *pokedex, int formIndex);
u32 Pokedex_NumFormsSeen_Unown(const Pokedex *pokedex);
u32 Pokedex_GetForm_Shellos(const Pokedex *pokedex, int formIndex);
u32 Pokedex_NumFormsSeen_Shellos(const Pokedex *pokedex);
u32 Pokedex_GetForm_Gastrodon(const Pokedex *pokedex, int formIndex);
u32 Pokedex_NumFormsSeen_Gastrodon(const Pokedex *pokedex);
u32 Pokedex_GetForm_Burmy(const Pokedex *pokedex, int formIndex);
u32 Pokedex_NumFormsSeen_Burmy(const Pokedex *pokedex);
u32 Pokedex_GetForm_Wormadam(const Pokedex *pokedex, int formIndex);
u32 Pokedex_NumFormsSeen_Wormadam(const Pokedex *pokedex);
u32 Pokedex_GetForm_Deoxys(const Pokedex *pokedex, int formIndex);
u32 Pokedex_NumFormsSeen_Deoxys(const Pokedex *pokedex);
void Pokedex_Encounter(Pokedex *pokedex, Pokemon *pokemon);
void PokedexData_Capture(Pokedex *pokedex, Pokemon *pokemon);
void PokedexData_ObtainNationalDex(Pokedex *pokedex);
BOOL PokedexData_IsNationalDexObtained(const Pokedex *pokedex);
BOOL PokedexData_CanDetectForms(const Pokedex *pokedex);
void PokedexData_TurnOnFormDetection(Pokedex *pokedex);
BOOL PokedexData_IsLanguageObtained(const Pokedex *pokedex, u16 species, u32 languageIndex);
void PokedexData_TurnOnLanguageDetection(Pokedex *pokedex);
BOOL PokedexData_CanDetectLanguages(const Pokedex *pokedex);
void Pokedex_Capture(Pokedex *pokedex, Pokemon *pokemon);
void Pokedex_ObtainNationalDex(Pokedex *pokedex);
BOOL Pokedex_IsNationalDexObtained(const Pokedex *pokedex);
BOOL Pokedex_CanDetectForms(const Pokedex *pokedex);
void Pokedex_TurnOnFormDetection(Pokedex *pokedex);
BOOL Pokedex_IsLanguageObtained(const Pokedex *pokedex, u16 species, u32 languageIndex);
void Pokedex_TurnOnLanguageDetection(Pokedex *pokedex);
BOOL Pokedex_CanDetectLanguages(const Pokedex *pokedex);
BOOL Pokedex_IsObtained(const Pokedex *pokedex);
void PokedexData_ObtainPokedex(Pokedex *pokedex);
Pokedex *SaveData_Pokedex(SaveData *saveData);
void Pokedex_ObtainPokedex(Pokedex *pokedex);
Pokedex *SaveData_GetPokedex(SaveData *saveData);
u32 Pokedex_GetDisplayForm(const Pokedex *pokedex, int species, int formIndex);
u32 PokedexData_NumFormsSeen(const Pokedex *pokedex, int species);
u32 Pokedex_NumFormsSeen(const Pokedex *pokedex, int species);

#endif // POKEPLATINUM_POKEDEX_DATA_H
4 changes: 2 additions & 2 deletions res/field/scripts/scripts_pokemon_mansion_office.s
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ _0399:
_03C2:
Message 20
GoToIfSet 251, _0408
ScrCmd_337 0x1EA, 0x800C
ScrCmd_HasSeenSpecies SPECIES_MANAPHY, 0x800C
GoToIfEq 0x800C, 1, _03FC
ScrCmd_208 0x1EA, 0
ScrCmd_208 SPECIES_MANAPHY, 0
WaitABPress
ScrCmd_209
SetFlag 251
Expand Down
6 changes: 3 additions & 3 deletions src/battle/ov16_0223DF00.c
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ void BattleSystem_DexFlagSeen(BattleSystem *battleSystem, int param1)
}

if (((v0 & 0x1) == 0) && (Pokemon_GetValue(v1, MON_DATA_SPECIES_EGG, NULL) == 412)) {
PokedexData_Capture(battleSystem->pokedex, v1);
Pokedex_Capture(battleSystem->pokedex, v1);
}
}

Expand All @@ -1714,15 +1714,15 @@ void ov16_0223F9A0(BattleSystem *battleSystem, int param1)
v2 = BattleContext_Get(battleSystem, battleSystem->battleCtx, 2, param1);
v1 = BattleSystem_PartyPokemon(battleSystem, param1, v2);

PokedexData_Capture(battleSystem->pokedex, v1);
Pokedex_Capture(battleSystem->pokedex, v1);
}
}
}
}

BOOL BattleSystem_CaughtSpecies(BattleSystem *battleSys, int species)
{
return PokedexData_HasCaughtSpecies(battleSys->pokedex, species);
return Pokedex_HasCaughtSpecies(battleSys->pokedex, species);
}

void Battle_SetDefaultBlend(void)
Expand Down
10 changes: 5 additions & 5 deletions src/field_battle_data_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void FieldBattleDTO_InitFromGameState(FieldBattleDTO *dto, const FieldSystem *fi
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(save);
Party *party = Party_GetFromSavedata(save);
Bag *bag = SaveData_GetBag(save);
Pokedex *pokedex = SaveData_Pokedex(save);
Pokedex *pokedex = SaveData_GetPokedex(save);
ChatotCry *chatotCry = GetChatotCryDataFromSave(save);
Options *options = SaveData_Options(save);
FieldOverworldState *fieldOverworldState = SaveData_GetFieldOverworldState(save);
Expand Down Expand Up @@ -296,7 +296,7 @@ void FieldBattleDTO_InitWithNormalizedMonLevels(FieldBattleDTO *dto, const Field
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
Party *party = Party_GetFromSavedata(fieldSystem->saveData);
Bag *bag = SaveData_GetBag(fieldSystem->saveData);
Pokedex *pokedex = SaveData_Pokedex(fieldSystem->saveData);
Pokedex *pokedex = SaveData_GetPokedex(fieldSystem->saveData);
ChatotCry *chatotCry = GetChatotCryDataFromSave(fieldSystem->saveData);
Options *options = SaveData_Options(fieldSystem->saveData);

Expand Down Expand Up @@ -344,7 +344,7 @@ void FieldBattleDTO_InitWithPartyOrder(FieldBattleDTO *dto, const FieldSystem *f
{
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
Bag *bag = SaveData_GetBag(fieldSystem->saveData);
Pokedex *pokedex = SaveData_Pokedex(fieldSystem->saveData);
Pokedex *pokedex = SaveData_GetPokedex(fieldSystem->saveData);
ChatotCry *chatotCry = GetChatotCryDataFromSave(fieldSystem->saveData);
Options *options = SaveData_Options(fieldSystem->saveData);
const BattleRegulation *regulation = fieldSystem->unk_B0;
Expand Down Expand Up @@ -424,7 +424,7 @@ void FieldBattleDTO_UpdateFieldSystem(const FieldBattleDTO *dto, FieldSystem *fi
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
Party *party = Party_GetFromSavedata(fieldSystem->saveData);
Bag *bag = SaveData_GetBag(fieldSystem->saveData);
Pokedex *pokedex = SaveData_Pokedex(fieldSystem->saveData);
Pokedex *pokedex = SaveData_GetPokedex(fieldSystem->saveData);
u16 *fieldSysSafariBalls = FieldOverworldState_GetSafariBallCount(SaveData_GetFieldOverworldState(fieldSystem->saveData));

TrainerInfo_Copy(dto->trainerInfo[BATTLER_PLAYER_1], trainerInfo);
Expand All @@ -440,7 +440,7 @@ void FieldBattleDTO_UpdatePokedex(const FieldBattleDTO *dto, FieldSystem *fieldS
TrainerInfo *trainerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
Party *party = Party_GetFromSavedata(fieldSystem->saveData);
Bag *bag = SaveData_GetBag(fieldSystem->saveData);
Pokedex *pokedex = SaveData_Pokedex(fieldSystem->saveData);
Pokedex *pokedex = SaveData_GetPokedex(fieldSystem->saveData);

Pokedex_Copy(dto->pokedex, pokedex);
}
Expand Down
8 changes: 4 additions & 4 deletions src/field_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static u32 sub_0203ABD0(FieldSystem *fieldSystem)
{
u32 v0 = 0;

if (Pokedex_IsObtained(SaveData_Pokedex(fieldSystem->saveData)) == FALSE) {
if (Pokedex_IsObtained(SaveData_GetPokedex(fieldSystem->saveData)) == FALSE) {
v0 |= 0x1;
}

Expand Down Expand Up @@ -949,7 +949,7 @@ static BOOL FieldMenu_Pokedex(FieldTask *taskMan)
fieldSystem = FieldTask_GetFieldSystem(taskMan);
menu = FieldTask_GetEnv(taskMan);
v2 = Heap_AllocFromHeap(11, sizeof(UnkStruct_ov21_021D0D80));
pokedex = SaveData_Pokedex(fieldSystem->saveData);
pokedex = SaveData_GetPokedex(fieldSystem->saveData);
trainerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
varsFlags = SaveData_GetVarsFlags(fieldSystem->saveData);

Expand Down Expand Up @@ -1930,9 +1930,9 @@ static void FieldMenu_EvolveInit(FieldTask *taskMan)
v4 = Party_GetPokemonBySlotIndex(v3, v2->unk_00);

if (v2->unk_01 == 0) {
v5 = sub_0207AE68(v3, v4, v2->unk_04, SaveData_Options(fieldSystem->saveData), PokemonSummaryScreen_ShowContestData(fieldSystem->saveData), SaveData_Pokedex(fieldSystem->saveData), SaveData_GetBag(fieldSystem->saveData), SaveData_GetGameRecordsPtr(fieldSystem->saveData), SaveData_PoketchData(fieldSystem->saveData), v2->unk_08, 0x1, 73);
v5 = sub_0207AE68(v3, v4, v2->unk_04, SaveData_Options(fieldSystem->saveData), PokemonSummaryScreen_ShowContestData(fieldSystem->saveData), SaveData_GetPokedex(fieldSystem->saveData), SaveData_GetBag(fieldSystem->saveData), SaveData_GetGameRecordsPtr(fieldSystem->saveData), SaveData_PoketchData(fieldSystem->saveData), v2->unk_08, 0x1, 73);
} else {
v5 = sub_0207AE68(v3, v4, v2->unk_04, SaveData_Options(fieldSystem->saveData), PokemonSummaryScreen_ShowContestData(fieldSystem->saveData), SaveData_Pokedex(fieldSystem->saveData), SaveData_GetBag(fieldSystem->saveData), SaveData_GetGameRecordsPtr(fieldSystem->saveData), SaveData_PoketchData(fieldSystem->saveData), v2->unk_08, NULL, 73);
v5 = sub_0207AE68(v3, v4, v2->unk_04, SaveData_Options(fieldSystem->saveData), PokemonSummaryScreen_ShowContestData(fieldSystem->saveData), SaveData_GetPokedex(fieldSystem->saveData), SaveData_GetBag(fieldSystem->saveData), SaveData_GetGameRecordsPtr(fieldSystem->saveData), SaveData_PoketchData(fieldSystem->saveData), v2->unk_08, NULL, 73);
}

{
Expand Down
2 changes: 1 addition & 1 deletion src/game_records.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ u32 GameRecords_GetTrainerScore(GameRecords *records)

void GameRecords_IncrementTrainerScoreOnCatch(GameRecords *records, const Pokedex *pokedex, const u16 species)
{
if (!PokedexData_HasCaughtSpecies(pokedex, species)) {
if (!Pokedex_HasCaughtSpecies(pokedex, species)) {
GameRecords_IncrementTrainerScore(records, TRAINER_SCORE_EVENT_CAUGHT_SPECIES);
}
}
2 changes: 1 addition & 1 deletion src/overlay005/ov5_021F6454.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ BOOL ScrCmd_304(ScriptContext *param0)
v4 = Party_GetPokemonBySlotIndex(v5, v7);

Pokemon_SetRotomForm(v4, v10, v8);
PokedexData_Capture(SaveData_Pokedex(fieldSystem->saveData), v4);
Pokedex_Capture(SaveData_GetPokedex(fieldSystem->saveData), v4);

return 0;
}
Expand Down
43 changes: 21 additions & 22 deletions src/overlay005/ov5_021F77A8.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,48 +86,47 @@ static void ov5_021F819C(ListMenu *param0, u32 param1, u8 param2);
static void ov5_021F81A8(SysTask *param0, void *param1);
static void ov5_021F8250(UnkStruct_ov5_021F7ED8 *param0);

BOOL ScrCmd_337(ScriptContext *param0)
BOOL ScrCmd_HasSeenSpecies(ScriptContext *ctx)
{
u16 v0 = FieldSystem_TryGetVar(param0->fieldSystem, ScriptContext_ReadHalfWord(param0));
u16 *v1 = FieldSystem_GetVarPointer(param0->fieldSystem, ScriptContext_ReadHalfWord(param0));
Pokedex *v2 = SaveData_Pokedex(param0->fieldSystem->saveData);
u16 species = FieldSystem_TryGetVar(ctx->fieldSystem, ScriptContext_ReadHalfWord(ctx));
u16 *seen = FieldSystem_GetVarPointer(ctx->fieldSystem, ScriptContext_ReadHalfWord(ctx));

*v1 = PokedexData_HasSeenSpecies(v2, v0);
*seen = Pokedex_HasSeenSpecies(SaveData_GetPokedex(ctx->fieldSystem->saveData), species);
return 0;
}

BOOL ScrCmd_2E5(ScriptContext *param0)
BOOL ScrCmd_2E5(ScriptContext *ctx)
{
Pokemon *v0;
u16 v1 = ScriptContext_GetVar(param0);
u16 v2 = ScriptContext_GetVar(param0);
u16 *v3 = ScriptContext_GetVarPointer(param0);
u16 v1 = ScriptContext_GetVar(ctx);
u16 v2 = ScriptContext_GetVar(ctx);
u16 *v3 = ScriptContext_GetVarPointer(ctx);

v0 = Party_GetPokemonBySlotIndex(Party_GetFromSavedata(param0->fieldSystem->saveData), v1);
v0 = Party_GetPokemonBySlotIndex(Party_GetFromSavedata(ctx->fieldSystem->saveData), v1);
*v3 = ov5_021F7B60(v0, v2);

return 0;
}

BOOL ScrCmd_2E9(ScriptContext *param0)
BOOL ScrCmd_2E9(ScriptContext *ctx)
{
u16 v0 = ScriptContext_GetVar(param0);
u16 v1 = ScriptContext_GetVar(param0);
u16 v2 = ScriptContext_GetVar(param0);
u16 v0 = ScriptContext_GetVar(ctx);
u16 v1 = ScriptContext_GetVar(ctx);
u16 v2 = ScriptContext_GetVar(ctx);

sub_02054988(Party_GetFromSavedata(param0->fieldSystem->saveData), v0, v1, v2);
sub_02054988(Party_GetFromSavedata(ctx->fieldSystem->saveData), v0, v1, v2);
return 0;
}

BOOL ScrCmd_2EA(ScriptContext *param0)
BOOL ScrCmd_2EA(ScriptContext *ctx)
{
int v0;
u8 v1, v2, v3, v4;
Bag *v5;
u16 v6 = ScriptContext_GetVar(param0);
u16 *v7 = ScriptContext_GetVarPointer(param0);
u16 v6 = ScriptContext_GetVar(ctx);
u16 *v7 = ScriptContext_GetVarPointer(ctx);

v5 = SaveData_GetBag(param0->fieldSystem->saveData);
v5 = SaveData_GetBag(ctx->fieldSystem->saveData);

for (v0 = 0; v0 < (NELEMS(sTeachableMoves)); v0++) {
if (v6 == sTeachableMoves[v0].moveID) {
Expand Down Expand Up @@ -174,14 +173,14 @@ BOOL ScrCmd_2EA(ScriptContext *param0)
return 0;
}

BOOL ScrCmd_2EB(ScriptContext *param0)
BOOL ScrCmd_2EB(ScriptContext *ctx)
{
int v0;
u8 v1, v2, v3, v4;
Bag *v5;
u16 v6 = ScriptContext_GetVar(param0);
u16 v6 = ScriptContext_GetVar(ctx);

v5 = SaveData_GetBag(param0->fieldSystem->saveData);
v5 = SaveData_GetBag(ctx->fieldSystem->saveData);

for (v0 = 0; v0 < (NELEMS(sTeachableMoves)); v0++) {
if (v6 == sTeachableMoves[v0].moveID) {
Expand Down
2 changes: 1 addition & 1 deletion src/overlay005/save_info_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void SaveInfo_SetValues(SaveInfo *saveInfo, const FieldSystem *fieldSyste
{
SaveData *saveData = fieldSystem->saveData;
Location *curLocation = FieldOverworldState_GetPlayerLocation(SaveData_GetFieldOverworldState(saveData));
Pokedex *pokedex = SaveData_Pokedex(saveData);
Pokedex *pokedex = SaveData_GetPokedex(saveData);

saveInfo->mapLabelTextID = MapHeader_GetMapLabelTextID(curLocation->mapId);

Expand Down
6 changes: 3 additions & 3 deletions src/overlay006/ov6_02240C9C.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ BOOL ov6_02240D5C(FieldSystem *fieldSystem)
v13[i].minLevel = encounterData->grassEncounters.encounters[i].level;
}

BOOL nationalDexObtained = PokedexData_IsNationalDexObtained(SaveData_Pokedex(FieldSystem_GetSaveData(fieldSystem)));
BOOL nationalDexObtained = Pokedex_IsNationalDexObtained(SaveData_GetPokedex(FieldSystem_GetSaveData(fieldSystem)));

WildEncounters_ReplaceTimedEncounters(encounterData, &v13[2].species, &v13[3].species);
WildEncounters_ReplaceRadarEncounters(fieldSystem, encounterData, &v13[0].species, &v13[1].species);
Expand Down Expand Up @@ -513,7 +513,7 @@ BOOL ov6_022411C8(FieldSystem *fieldSystem, FieldTask *param1)
v12[i].minLevel = encounterData->grassEncounters.encounters[i].level;
}

BOOL nationalDexObtained = PokedexData_IsNationalDexObtained(SaveData_Pokedex(FieldSystem_GetSaveData(fieldSystem)));
BOOL nationalDexObtained = Pokedex_IsNationalDexObtained(SaveData_GetPokedex(FieldSystem_GetSaveData(fieldSystem)));

WildEncounters_ReplaceTimedEncounters(encounterData, &v12[2].species, &v12[3].species);
WildEncounters_ReplaceRadarEncounters(fieldSystem, encounterData, &v12[0].species, &v12[1].species);
Expand Down Expand Up @@ -642,7 +642,7 @@ BOOL ov6_022413E4(FieldSystem *fieldSystem, FieldBattleDTO **battleParams)
v12[i].minLevel = encounterData->grassEncounters.encounters[i].level;
}

BOOL nationalDexObtained = PokedexData_IsNationalDexObtained(SaveData_Pokedex(FieldSystem_GetSaveData(fieldSystem)));
BOOL nationalDexObtained = Pokedex_IsNationalDexObtained(SaveData_GetPokedex(FieldSystem_GetSaveData(fieldSystem)));

WildEncounters_ReplaceTimedEncounters(encounterData, &v12[2].species, &v12[3].species);
WildEncounters_ReplaceRadarEncounters(fieldSystem, encounterData, &v12[0].species, &v12[1].species);
Expand Down
2 changes: 1 addition & 1 deletion src/overlay006/ov6_02242984.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int ov6_02242984(FieldSystem *fieldSystem)
v2[i] = encounterData->grassEncounters.encounters[i].species;
}

BOOL v1 = PokedexData_IsNationalDexObtained(SaveData_Pokedex(FieldSystem_GetSaveData(fieldSystem)));
BOOL v1 = Pokedex_IsNationalDexObtained(SaveData_GetPokedex(FieldSystem_GetSaveData(fieldSystem)));

ov6_02242F74(sub_0202D814(sub_0202D834(fieldSystem->saveData), 1), v1, fieldSystem->location->mapId, &v2[6], &v2[7]);
WildEncounters_ReplaceTimedEncounters(encounterData, &v2[2], &v2[3]);
Expand Down
Loading

0 comments on commit 5a7b409

Please sign in to comment.