Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start Syncing HGSS Battle Loading - Preliminary cleanup #314

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

polish: Rename the ASM macros without the ScrCmd_ prefix.

Also, if you could document the arguments on the macro, that would be much appreciated. 🙏

.short 823
.short \arg0
.short \arg1
Expand Down
2 changes: 1 addition & 1 deletion docs/bugs_and_glitches.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ or Uproar is in effect.
**Fix:** Edit [`res/battle/res/scripts/subscript_pursuit.s`](https://github.com/pret/pokeplatinum/blob/main/res/battle/scripts/subscripts/subscript_pursuit.s)

```diff
UpdateVar OPCODE_ADD, BTLVAR_FAINTED_MON, BATTLER_ENEMY_SLOT_1
UpdateVar OPCODE_ADD, BTLVAR_FAINTED_MON, BATTLER_ENEMY_1
UpdateVar OPCODE_RIGHT_SHIFT, BTLVAR_CALC_TEMP, 0x00000001
CompareVarToValue OPCODE_NEQ, BTLVAR_CALC_TEMP, 0x00000000, _208
- // BUG: Acid Rain (see docs/bugs_and_glitches.md)
Expand Down
228 changes: 114 additions & 114 deletions include/battle/ov16_0223DF00.h

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions include/constants/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ enum BattlerBootState {
*
* PLAYER_SLOT_1 PLAYER_SLOT_2
*/
#define BATTLER_PLAYER_SLOT_1 0
#define BATTLER_ENEMY_SLOT_1 1
#define BATTLER_PLAYER_SLOT_2 2
#define BATTLER_ENEMY_SLOT_2 3
#define BATTLER_NONE 0xFF
#define BATTLER_PLAYER_1 0
#define BATTLER_ENEMY_1 1
#define BATTLER_PLAYER_2 2
#define BATTLER_ENEMY_2 3
#define BATTLER_NONE 0xFF

#define BATTLER_TYPE_SOLO_PLAYER 0
#define BATTLER_TYPE_SOLO_ENEMY 1
Expand Down
6 changes: 3 additions & 3 deletions include/field_battle_data_transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ typedef struct FieldBattleDTO {
Party *parties[MAX_BATTLERS];
int resultMask;
int trainerIDs[MAX_BATTLERS];
TrainerData trainerData[MAX_BATTLERS];
Trainer trainer[MAX_BATTLERS];
TrainerInfo *trainerInfo[MAX_BATTLERS];
Bag *bag;
BagCursor *bagCursor;
PokedexData *pokedex;
Pokedex *pokedex;
PCBoxes *pcBoxes;
ChatotCry *chatotCries[MAX_BATTLERS];
PoketchData *poketchData;
Poketch *poketch;
UnkStruct_0202C878 *unk_104;
Options *options;
UnkStruct_0206D140 *unk_10C;
Expand Down
2 changes: 1 addition & 1 deletion include/game_records.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ u32 GameRecords_AddToRecordValue(GameRecords *records, int id, u32 toAdd);
u32 GameRecords_GetRecordValue(GameRecords *records, int id);
void GameRecords_IncrementTrainerScore(GameRecords *records, int scoreID);
u32 GameRecords_GetTrainerScore(GameRecords *records);
void GameRecords_IncrementTrainerScoreOnCatch(GameRecords *records, const PokedexData *pokedex, const u16 species);
void GameRecords_IncrementTrainerScoreOnCatch(GameRecords *records, const Pokedex *pokedex, const u16 species);

#endif // POKEPLATINUM_GAME_RECORDS_H
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
4 changes: 2 additions & 2 deletions include/overlay021/struct_ov21_021D0D80.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "trainer_info.h"

typedef struct {
const PokedexData *unk_00;
const TrainerInfo *unk_04;
const Pokedex *pokedex;
const TrainerInfo *trainerInfo;
int timeOfDay;
BOOL fullmoonIslandVisible;
BOOL newmoonIslandVisible;
Expand Down
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 PokedexData *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 PokedexData *dexData;
const Pokedex *pokedex;
SortedPokedex sortedPokedex;
int isNationalDex;
BOOL isNationalDexUnlocked;
Expand Down
4 changes: 2 additions & 2 deletions include/overlay025/poketch_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct PoketchSystem {
NNSG2dOamManagerInstance *oamManager;

SaveData *saveData;
PoketchData *poketchData;
Poketch *poketch;
FieldSystem *fieldSystem;
enum ButtonDir buttonDir;
};
Expand All @@ -135,7 +135,7 @@ void ov25_02254518(const PoketchSystem *poketchSys, PoketchButtonManager *button
BOOL PoketchSystem_IsPlayerMoving(const PoketchSystem *poketchSys);
BOOL PoketchSystem_PedometerUpdated(const PoketchSystem *poketchSys);
FieldSystem *PoketchSystem_GetFieldSystem(const PoketchSystem *poketchSys);
PoketchData *PoketchSystem_GetPoketchData(const PoketchSystem *poketchSys);
Poketch *PoketchSystem_GetPoketchData(const PoketchSystem *poketchSys);
SaveData *PoketchSystem_GetSaveData(const PoketchSystem *poketchSys);
int PoketchSystem_GetBorderColor(const PoketchSystem *poketchSys);

Expand Down
2 changes: 1 addition & 1 deletion include/overlay088/struct_ov88_0223C370.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef struct {
Options *unk_18;
JournalEntry *unk_1C;
GameRecords *records;
PokedexData *unk_24;
Pokedex *unk_24;
int unk_28;
int unk_2C;
int unk_30;
Expand Down
2 changes: 1 addition & 1 deletion include/overlay094/ov94_022414B8.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ u16 *ov94_Pokedex_Alphabetical(int heapID, int unused, int *pokedexLength);
u8 *ov94_02242548(int param0);
void ov94_022425A8(UnkStruct_ov94_0223BA88 *param0, UnkStruct_ov94_0223FD4C *param1);
ListMenu *ov94_022426A8(UnkStruct_ov94_0223FD4C *param0, StringList **param1, Window *param2, MessageLoader *param3);
ListMenu *ov94_022427C0(UnkStruct_ov94_0223FD4C *param0, StringList **param1, Window *param2, MessageLoader *param3, MessageLoader *param4, UnkStruct_ov94_0223FD4C_sub3 *param5, PokedexData *param6);
ListMenu *ov94_022427C0(UnkStruct_ov94_0223FD4C *param0, StringList **param1, Window *param2, MessageLoader *param3, MessageLoader *param4, UnkStruct_ov94_0223FD4C_sub3 *param5, Pokedex *param6);
ListMenu *ov94_02242840(StringList **param0, Window *param1, MessageLoader *param2);
ListMenu *ov94_022428B0(StringList **param0, Window *param1, MessageLoader *param2, int param3);
void ov94_02242934(UnkStruct_ov94_0223BA88_sub3 *param0, int param1, int param2);
Expand Down
2 changes: 1 addition & 1 deletion include/party.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int Party_GetCurrentCount(const Party *party);
Pokemon *Party_GetPokemonBySlotIndex(const Party *party, int slot);
void sub_0207A128(Party *party, int slot, Pokemon *param2);
BOOL Party_SwapSlots(Party *party, int slotA, int slotB);
void Party_cpy(const Party *src, Party *dest);
void Party_Copy(const Party *src, Party *dest);
BOOL Party_HasSpecies(const Party *party, int species);
Party *Party_GetFromSavedata(SaveData *party);

Expand Down
86 changes: 43 additions & 43 deletions include/pokedex_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,48 @@
#include "pokemon.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Should we rename the files to pokedex.{c,h}?

#include "savedata.h"

int PokedexData_SaveSize(void);
PokedexData *PokedexData_Alloc(u32 heapID);
void PokedexData_Copy(const PokedexData *src, PokedexData *dest);
void PokedexData_Init(PokedexData *pokedexData);
u16 PokedexData_CountCaught_National(const PokedexData *pokedexData);
u16 PokedexData_CountSeen_National(const PokedexData *pokedexData);
u16 PokedexData_CountSeen(const PokedexData *pokedexData);
u16 PokedexData_CountCaught_Local(const PokedexData *pokedexData);
u16 PokedexData_CountSeen_Local(const PokedexData *pokedexData);
BOOL PokedexData_NationalDexCompleted(const PokedexData *pokedexData);
BOOL PokedexData_LocalDexCompleted(const PokedexData *pokedexData);
u16 PokedexData_NumCaught_National(const PokedexData *pokedexData);
u16 PokedexData_NumCaught_Local(const PokedexData *pokedexData);
BOOL PokedexData_HasCaughtSpecies(const PokedexData *pokedexData, u16 species);
BOOL PokedexData_HasSeenSpecies(const PokedexData *pokedexData, u16 species);
u32 PokedexData_GetForm_Spinda(const PokedexData *pokedexData, u8 formIndex);
u32 PokedexData_DisplayedGender(const PokedexData *pokedexData, u16 species, int displaySecondary);
u32 PokedexData_GetForm_Unown(const PokedexData *pokedexData, int formIndex);
u32 PokedexData_NumFormsSeen_Unown(const PokedexData *pokedexData);
u32 PokedexData_GetForm_Shellos(const PokedexData *pokedexData, int formIndex);
u32 PokedexData_NumFormsSeen_Shellos(const PokedexData *pokedexData);
u32 PokedexData_GetForm_Gastrodon(const PokedexData *pokedexData, int formIndex);
u32 PokedexData_NumFormsSeen_Gastrodon(const PokedexData *pokedexData);
u32 PokedexData_GetForm_Burmy(const PokedexData *pokedexData, int formIndex);
u32 PokedexData_NumFormsSeen_Burmy(const PokedexData *pokedexData);
u32 PokedexData_GetForm_Wormadam(const PokedexData *pokedexData, int formIndex);
u32 PokedexData_NumFormsSeen_Wormadam(const PokedexData *pokedexData);
u32 PokedexData_GetForm_Deoxys(const PokedexData *pokedexData, int formIndex);
u32 PokedexData_NumFormsSeen_Deoxys(const PokedexData *pokedexData);
void PokedexData_Encounter(PokedexData *pokedexData, Pokemon *pokemon);
void PokedexData_Capture(PokedexData *pokedexData, Pokemon *pokemon);
void PokedexData_ObtainNationalDex(PokedexData *pokedexData);
BOOL PokedexData_IsNationalDexObtained(const PokedexData *pokedexData);
BOOL PokedexData_CanDetectForms(const PokedexData *pokedexData);
void PokedexData_TurnOnFormDetection(PokedexData *pokedexData);
BOOL PokedexData_IsLanguageObtained(const PokedexData *pokedexData, u16 species, u32 languageIndex);
void PokedexData_TurnOnLanguageDetection(PokedexData *pokedexData);
BOOL PokedexData_CanDetectLanguages(const PokedexData *pokedexData);
BOOL PokedexData_IsObtained(const PokedexData *pokedexData);
void PokedexData_ObtainPokedex(PokedexData *pokedexData);
PokedexData *SaveData_PokedexData(SaveData *saveData);
u32 PokedexData_GetDisplayForm(const PokedexData *pokedexData, int species, int formIndex);
u32 PokedexData_NumFormsSeen(const PokedexData *pokedexData, int species);
int Pokedex_SaveSize(void);
Pokedex *Pokedex_New(u32 heapID);
void Pokedex_Copy(const Pokedex *src, Pokedex *dest);
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 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 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 Pokedex_ObtainPokedex(Pokedex *pokedex);
Pokedex *SaveData_GetPokedex(SaveData *saveData);
u32 Pokedex_GetDisplayForm(const Pokedex *pokedex, int species, int formIndex);
u32 Pokedex_NumFormsSeen(const Pokedex *pokedex, int species);

#endif // POKEPLATINUM_POKEDEX_DATA_H
60 changes: 30 additions & 30 deletions include/poketch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum PoketchScreenColor {
/**
* @brief All of the Poketch's internally tracked data including settings, registered apps, and the data for some apps (eg. pedometer, alarm clock).
*/
typedef struct PoketchData {
typedef struct Poketch {
u8 poketchEnabled : 1;
u8 pedometerEnabled : 1; //!< Whether or not the pedometer is registered and will take step count updates.
u8 dotArtModifiedByPlayer : 1; //!< Whether or not the dot art data has ever been modified by the user. This flag can never be set to FALSE.
Expand Down Expand Up @@ -67,106 +67,106 @@ typedef struct PoketchData {
u16 icon;
u32 form;
} pokemonHistoryQueue[POKETCH_POKEMONHISTORY_MAX]; //!< The pokemon to display in the Pokemon History app
} PoketchData;
} Poketch;

int Poketch_SaveSize(void);

void Poketch_Init(PoketchData *poketchData);
void Poketch_Init(Poketch *poketch);

void PoketchData_Enable(PoketchData *poketchData);
void PoketchData_Enable(Poketch *poketch);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Rename PoketchData -> Poketch. (and the file from poketch_data.c to poketch.c)


BOOL PoketchData_IsEnabled(PoketchData *poketchData);
BOOL PoketchData_IsEnabled(Poketch *poketch);

BOOL PoketchData_IsAppRegistered(PoketchData *poketchData, enum PoketchAppID appID);
BOOL PoketchData_IsAppRegistered(Poketch *poketch, enum PoketchAppID appID);

BOOL PoketchData_RegisterApp(PoketchData *poketchData, enum PoketchAppID appID);
BOOL PoketchData_RegisterApp(Poketch *poketch, enum PoketchAppID appID);

enum PoketchAppID PoketchData_CurrentAppID(const PoketchData *poketchData);
enum PoketchAppID PoketchData_CurrentAppID(const Poketch *poketch);

/**
* Sets the current Poketch app to the next registered app, skipping unregistered App IDs and wrapping around if necessary.
*/
int PoketchData_IncrementAppID(PoketchData *poketchData);
int PoketchData_IncrementAppID(Poketch *poketch);

/**
* Sets the current Poketch app to the previous registered app, skipping unregistered App IDs and wrapping around if necessary.
*/
int PoketchData_DecrementAppID(PoketchData *poketchData);
int PoketchData_DecrementAppID(Poketch *poketch);

u32 PoketchData_CurrentScreenColor(const PoketchData *poketchData);
u32 PoketchData_CurrentScreenColor(const Poketch *poketch);

/**
* Sets the Poketch's color setting with values from the PoketchScreenColor enum above.
* This function asserts that the given value is less than POKETCH_SCREEN_COLOR_MAX.
*/
void PoketchData_SetScreenColor(PoketchData *poketchData, u32 screenColor);
void PoketchData_SetScreenColor(Poketch *poketch, u32 screenColor);

u32 PoketchData_StepCount(const PoketchData *poketchData);
u32 PoketchData_StepCount(const Poketch *poketch);

/**
* Overwrites the current step count. This function will not do anything unless the Pedometer app is registered.
*/
void PoketchData_SetStepCount(PoketchData *poketchData, u32 value);
void PoketchData_SetStepCount(Poketch *poketch, u32 value);

BOOL PoketchData_IsAlarmSet(const PoketchData *poketchData);
BOOL PoketchData_IsAlarmSet(const Poketch *poketch);

void PoketchData_AlarmTime(const PoketchData *poketchData, u32 *hour, u32 *minute);
void PoketchData_AlarmTime(const Poketch *poketch, u32 *hour, u32 *minute);

void PoketchData_SetAlarm(PoketchData *poketchData, BOOL enabled, u32 hour, u32 minute);
void PoketchData_SetAlarm(Poketch *poketch, BOOL enabled, u32 hour, u32 minute);

/**
* Marks the given date on the Calendar app as highlighted.
* Passing this function a new month will change the month on the calendar and clear all days except the given one.
*/
void PoketchData_SetCalendarMark(PoketchData *poketchData, u32 month, u32 day);
void PoketchData_SetCalendarMark(Poketch *poketch, u32 month, u32 day);

/**
* Clears the mark on the given date on the Calendar app.
* Passing this function a new month will change the month on the calendar and clear every day.
*/
void PoketchData_ClearCalendarMark(PoketchData *poketchData, u32 month, u32 day);
void PoketchData_ClearCalendarMark(Poketch *poketch, u32 month, u32 day);

BOOL PoketchData_CalendarMarked(const PoketchData *poketchData, u32 month, u32 day);
BOOL PoketchData_CalendarMarked(const Poketch *poketch, u32 month, u32 day);

/**
* Sets the location of a map marker. Asserts that index is less than POKETCH_MAPMARKER_COUNT.
*/
void PoketchData_SetMapMarker(PoketchData *poketchData, int index, u8 x, u8 y);
void PoketchData_SetMapMarker(Poketch *poketch, int index, u8 x, u8 y);

/**
* Gets the location of a map marker. Asserts that index is less than POKETCH_MAPMARKER_COUNT.
*/
void PoketchData_MapMarkerPos(const PoketchData *poketchData, int index, u8 *x, u8 *y);
void PoketchData_MapMarkerPos(const Poketch *poketch, int index, u8 *x, u8 *y);

/**
* Checks whether or not the Dot Art data has been modified at any point.
* This will return FALSE until PoketchData_ModifyDotArtData is called, at which point it will always return TRUE.
*/
BOOL PoketchData_DotArtModified(const PoketchData *poketchData);
BOOL PoketchData_DotArtModified(const Poketch *poketch);

void PoketchData_CopyDotArtData(const PoketchData *poketchData, u8 *dst);
void PoketchData_CopyDotArtData(const Poketch *poketch, u8 *dst);

void PoketchData_ModifyDotArtData(PoketchData *poketchData, const u8 *src);
void PoketchData_ModifyDotArtData(Poketch *poketch, const u8 *src);

/**
* Adds a new Pokemon to the end of the Pokemon History list.
*/
void PoketchData_PokemonHistoryEnqueue(PoketchData *poketchData, const BoxPokemon *boxPokemon);
void PoketchData_PokemonHistoryEnqueue(Poketch *poketch, const BoxPokemon *boxPokemon);

int PoketchData_PokemonHistorySize(const PoketchData *poketchData);
int PoketchData_PokemonHistorySize(const Poketch *poketch);

/**
* Gets the species and icon info of a given index in the Pokemon History.
* This function asserts that index is less than POKETCH_POKEMONHISTORY_MAX.
*/
void PoketchData_PokemonHistorySpeciesAndIcon(const PoketchData *poketchData, int index, int *species, int *icon);
void PoketchData_PokemonHistorySpeciesAndIcon(const Poketch *poketch, int index, int *species, int *icon);

/**
* Gets the form info of a given index in the pokemon history.
* This function asserts that index is less than POKETCH_POKEMONHISTORY_MAX.
*/
u32 PoketchData_PokemonHistoryForm(const PoketchData *poketchData, int index);
u32 PoketchData_PokemonHistoryForm(const Poketch *poketch, int index);

PoketchData *SaveData_PoketchData(SaveData *saveData);
Poketch *SaveData_PoketchData(SaveData *saveData);

#endif // POKEPLATINUM_POKETCH_DATA_H
Loading
Loading