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

Documenting party.c and moving Party struct to party.h #346

Open
wants to merge 5 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 include/battle/ov16_0223DF00.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "struct_decls/struct_0200C6E4_decl.h"
#include "struct_decls/struct_0200C704_decl.h"
#include "struct_decls/struct_020797DC_decl.h"
#include "struct_decls/struct_party_decl.h"
#include "struct_defs/chatot_cry.h"
#include "struct_defs/trainer_data.h"

Expand All @@ -32,6 +31,7 @@
#include "game_options.h"
#include "message.h"
#include "palette.h"
#include "party.h"
#include "pokemon.h"
#include "strbuf.h"
#include "string_template.h"
Expand Down
3 changes: 1 addition & 2 deletions include/encounter.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#ifndef POKEPLATINUM_ENCOUNTER_H
#define POKEPLATINUM_ENCOUNTER_H

#include "struct_decls/struct_party_decl.h"

#include "field/field_system_decl.h"

#include "field_battle_data_transfer.h"
#include "field_task.h"
#include "party.h"

void Encounter_NewVsWild(FieldSystem *fieldSystem, FieldBattleDTO *dto);
void Encounter_StartVsWild(FieldSystem *fieldSystem, FieldTask *task, FieldBattleDTO *dto);
Expand Down
2 changes: 1 addition & 1 deletion include/field_battle_data_transfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "struct_decls/struct_0202C878_decl.h"
#include "struct_decls/struct_0206D140_decl.h"
#include "struct_decls/struct_020797DC_decl.h"
#include "struct_decls/struct_party_decl.h"
#include "struct_defs/chatot_cry.h"
#include "struct_defs/trainer_data.h"

Expand All @@ -19,6 +18,7 @@
#include "game_options.h"
#include "game_records.h"
#include "journal.h"
#include "party.h"
#include "poketch.h"
#include "rtc.h"
#include "savedata.h"
Expand Down
2 changes: 1 addition & 1 deletion include/functypes/funcptr_0205AB10.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef POKEPLATINUM_FUNCPTR_0205AB10_H
#define POKEPLATINUM_FUNCPTR_0205AB10_H

#include "struct_decls/struct_party_decl.h"
#include "party.h"

typedef void(UnkFuncPtr_0205AB10)(BOOL, const Party *);

Expand Down
2 changes: 1 addition & 1 deletion include/overlay005/ov5_021E622C.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include "struct_decls/struct_02026218_decl.h"
#include "struct_decls/struct_02026310_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "field/field_system_decl.h"

#include "party.h"
#include "pokemon.h"
#include "savedata.h"
#include "string_template.h"
Expand Down
3 changes: 1 addition & 2 deletions include/overlay010/struct_ov10_0221F800.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#ifndef POKEPLATINUM_STRUCT_OV10_0221F800_H
#define POKEPLATINUM_STRUCT_OV10_0221F800_H

#include "struct_decls/struct_party_decl.h"

#include "field_battle_data_transfer.h"
#include "party.h"
#include "strbuf.h"

typedef struct {
Expand Down
3 changes: 2 additions & 1 deletion include/overlay013/struct_ov13_0221FC20.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define POKEPLATINUM_STRUCT_OV13_0221FC20_H

#include "struct_decls/battle_system.h"
#include "struct_decls/struct_party_decl.h"

#include "party.h"

typedef struct {
Party *unk_00;
Expand Down
3 changes: 2 additions & 1 deletion include/overlay019/struct_ov19_021D4DF0.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define POKEPLATINUM_STRUCT_OV19_021D4DF0_H

#include "struct_decls/struct_020797DC_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay019/struct_ov19_021D3CFC.h"
#include "overlay019/struct_ov19_021D4DE4.h"
Expand All @@ -14,6 +13,8 @@
#include "overlay019/struct_ov19_021D5D20.h"
#include "overlay019/struct_ov19_021DF964.h"

#include "party.h"

typedef struct {
const PCBoxes *unk_00;
const Party *unk_04;
Expand Down
2 changes: 1 addition & 1 deletion include/overlay088/ov88_0223B140.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define POKEPLATINUM_OV88_0223B140_H

#include "struct_decls/struct_02095E80_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay_manager.h"
#include "party.h"

int ov88_0223B140(OverlayManager *param0, int *param1);
int ov88_0223B57C(OverlayManager *param0, int *param1);
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 @@ -4,13 +4,13 @@
#include "struct_decls/pokedexdata_decl.h"
#include "struct_decls/struct_02027F8C_decl.h"
#include "struct_decls/struct_0202C878_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "field/field_system_decl.h"

#include "game_options.h"
#include "game_records.h"
#include "journal.h"
#include "party.h"
#include "pokemon.h"
#include "savedata.h"
#include "trainer_info.h"
Expand Down
2 changes: 1 addition & 1 deletion include/overlay094/ov94_0223FB48.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#define POKEPLATINUM_OV94_0223FB48_H

#include "struct_decls/struct_020797DC_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay094/struct_ov94_0223FD4C_decl.h"

#include "party.h"
#include "pokemon.h"

int ov94_0223FB48(UnkStruct_ov94_0223FD4C *param0, int param1);
Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/ov104_0222DCE0.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef POKEPLATINUM_OV104_0222DCE0_H
#define POKEPLATINUM_OV104_0222DCE0_H

#include "struct_decls/struct_party_decl.h"
#include "struct_defs/struct_0204B184.h"
#include "struct_defs/struct_0204B1E8.h"

Expand All @@ -11,6 +10,7 @@

#include "cell_actor.h"
#include "field_battle_data_transfer.h"
#include "party.h"
#include "pokemon.h"
#include "savedata.h"
#include "string_template.h"
Expand Down
3 changes: 1 addition & 2 deletions include/overlay104/ov104_02237DD8.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#ifndef POKEPLATINUM_OV104_02237DD8_H
#define POKEPLATINUM_OV104_02237DD8_H

#include "struct_decls/struct_party_decl.h"

#include "overlay104/struct_ov104_0223BFFC.h"
#include "overlay104/struct_ov104_0223C4CC_decl.h"

#include "party.h"
#include "savedata.h"

UnkStruct_ov104_0223BFFC *ov104_02237DD8(SaveData *param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 *param6);
Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/ov104_0223B6F4.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#define POKEPLATINUM_OV104_0223B6F4_H

#include "struct_decls/struct_0203068C_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay104/struct_ov104_02230BE4.h"
#include "overlay104/struct_ov104_0223BA10.h"

#include "bg_window.h"
#include "field_battle_data_transfer.h"
#include "party.h"
#include "pokemon.h"

void ov104_0223B760(u8 param0, int param1, u16 param2[], u8 param3);
Expand Down
3 changes: 1 addition & 2 deletions include/overlay104/ov104_0223BCBC.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#ifndef POKEPLATINUM_OV104_0223BCBC_H
#define POKEPLATINUM_OV104_0223BCBC_H

#include "struct_decls/struct_party_decl.h"

#include "overlay104/struct_ov104_02230BE4.h"
#include "overlay104/struct_ov104_0223BFFC.h"

#include "field_battle_data_transfer.h"
#include "party.h"
#include "pokemon.h"

void ov104_0223BD28(u8 param0, int param1, u16 param2[], u8 param3);
Expand Down
3 changes: 1 addition & 2 deletions include/overlay104/struct_ov104_02234130.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#ifndef POKEPLATINUM_STRUCT_OV104_02234130_H
#define POKEPLATINUM_STRUCT_OV104_02234130_H

#include "struct_decls/struct_party_decl.h"

#include "party.h"
#include "savedata.h"

typedef struct {
Expand Down
3 changes: 1 addition & 2 deletions include/overlay104/struct_ov104_02235208.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#ifndef POKEPLATINUM_STRUCT_OV104_02235208_H
#define POKEPLATINUM_STRUCT_OV104_02235208_H

#include "struct_decls/struct_party_decl.h"

#include "party.h"
#include "savedata.h"

typedef struct {
Expand Down
3 changes: 1 addition & 2 deletions include/overlay104/struct_ov104_0223597C.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#ifndef POKEPLATINUM_STRUCT_OV104_0223597C_H
#define POKEPLATINUM_STRUCT_OV104_0223597C_H

#include "struct_decls/struct_party_decl.h"

#include "party.h"
#include "savedata.h"

typedef struct {
Expand Down
3 changes: 1 addition & 2 deletions include/overlay104/struct_ov104_02238240.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#ifndef POKEPLATINUM_STRUCT_OV104_02238240_H
#define POKEPLATINUM_STRUCT_OV104_02238240_H

#include "struct_decls/struct_party_decl.h"

#include "party.h"
#include "savedata.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/struct_ov104_0223ADA0.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef POKEPLATINUM_STRUCT_OV104_0223ADA0_H
#define POKEPLATINUM_STRUCT_OV104_0223ADA0_H

#include "struct_decls/struct_party_decl.h"
#include "struct_defs/struct_0202FF58.h"

#include "overlay104/struct_ov104_0223A348.h"
#include "overlay104/struct_ov104_0223A348_sub2.h"

#include "party.h"
#include "savedata.h"
#include "sys_task_manager.h"

Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/struct_ov104_0223B5C0.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#define POKEPLATINUM_STRUCT_OV104_0223B5C0_H

#include "struct_decls/struct_02030114_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay104/struct_ov104_0223A348.h"
#include "overlay104/struct_ov104_0223A348_sub2.h"

#include "party.h"
#include "pokemon.h"
#include "savedata.h"

Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/struct_ov104_0223BA10.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#define POKEPLATINUM_STRUCT_OV104_0223BA10_H

#include "struct_decls/struct_020302DC_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay104/struct_ov104_0223A348.h"
#include "overlay104/struct_ov104_0223A348_sub2.h"

#include "party.h"
#include "savedata.h"

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion include/overlay104/struct_ov104_0223BFFC.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#include "struct_decls/cell_actor_data.h"
#include "struct_decls/struct_020304A0_decl.h"
#include "struct_decls/struct_party_decl.h"

#include "overlay104/struct_ov104_0223A348.h"
#include "overlay104/struct_ov104_0223A348_sub2.h"

#include "party.h"
#include "savedata.h"

typedef struct {
Expand Down
3 changes: 1 addition & 2 deletions include/overlay107/ov107_02249604.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#ifndef POKEPLATINUM_OV107_02249604_H
#define POKEPLATINUM_OV107_02249604_H

#include "struct_decls/struct_party_decl.h"

#include "overlay107/struct_ov107_02249954.h"

#include "cell_actor.h"
#include "party.h"

void ov107_02249604(UnkStruct_ov107_02249954 *param0, Party *param1, u8 param2);
CellActor *ov107_022498A4(UnkStruct_ov107_02249954 *param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, int param6, u8 param7);
Expand Down
3 changes: 1 addition & 2 deletions include/overlay108/ov108_02243030.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#ifndef POKEPLATINUM_OV108_02243030_H
#define POKEPLATINUM_OV108_02243030_H

#include "struct_decls/struct_party_decl.h"

#include "overlay108/struct_ov108_02243030.h"

#include "cell_actor.h"
#include "party.h"

void ov108_02243030(UnkStruct_ov108_02243030 *param0, Party *param1, Party *param2, u8 param3);
CellActor *ov108_022430F0(UnkStruct_ov108_02243030 *param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, int param6, u8 param7);
Expand Down
23 changes: 14 additions & 9 deletions include/party.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
#ifndef POKEPLATINUM_UNK_02079FEC_H
#define POKEPLATINUM_UNK_02079FEC_H
#ifndef POKEPLATINUM_PARTY_H
#define POKEPLATINUM_PARTY_H

#include "struct_decls/struct_party_decl.h"
#include "struct_defs/pokemon.h"

#include "pokemon.h"
#include "savedata.h"

typedef struct Party {
int capacity;
int currentCount;
Pokemon pokemon[6];
} Party;

int Party_SaveSize(void);
Party *Party_New(u32 param0);
void Party_Init(Party *param0);
Party *Party_New(u32 heapID);
void Party_Init(Party *party);
void Party_InitWithCapacity(Party *party, int capacity);
BOOL Party_AddPokemon(Party *party, Pokemon *pokemon);
BOOL Party_RemovePokemonBySlotIndex(Party *party, int slot);
int Party_GetCapacity(const Party *party);
int Party_GetCurrentCount(const Party *party);
Pokemon *Party_GetPokemonBySlotIndex(const Party *party, int slot);
void sub_0207A128(Party *party, int slot, Pokemon *param2);
void sub_0207A128(Party *party, int slot, Pokemon *pokemon);
BOOL Party_SwapSlots(Party *party, int slotA, int slotB);
void Party_Copy(const Party *src, Party *dest);
BOOL Party_HasSpecies(const Party *party, int species);
Party *Party_GetFromSavedata(SaveData *party);
Party *Party_GetFromSavedata(SaveData *saveData);

#endif // POKEPLATINUM_UNK_02079FEC_H
#endif // POKEPLATINUM_PARTY_H
2 changes: 1 addition & 1 deletion include/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "struct_decls/struct_0200C6E4_decl.h"
#include "struct_decls/struct_0200C704_decl.h"
#include "struct_decls/struct_02078B40_decl.h"
#include "struct_decls/struct_party_decl.h"
#include "struct_defs/archived_sprite.h"
#include "struct_defs/chatot_cry.h"
#include "struct_defs/pokemon.h"
Expand All @@ -21,6 +20,7 @@

#include "narc.h"
#include "palette.h"
#include "party.h"
#include "string.h"
#include "trainer_info.h"

Expand Down
6 changes: 0 additions & 6 deletions include/struct_decls/struct_party_decl.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/struct_defs/battle_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "struct_decls/struct_02027F8C_decl.h"
#include "struct_decls/struct_0206D140_decl.h"
#include "struct_decls/struct_020797DC_decl.h"
#include "struct_decls/struct_party_decl.h"
#include "struct_defs/chatot_cry.h"
#include "struct_defs/struct_0207C690.h"
#include "struct_defs/trainer_data.h"
Expand All @@ -35,6 +34,7 @@
#include "game_options.h"
#include "message.h"
#include "palette.h"
#include "party.h"
#include "poketch.h"
#include "strbuf.h"
#include "string_template.h"
Expand Down
Loading
Loading