Skip to content

Commit

Permalink
Merge pull request #172 from adrienntindall/main
Browse files Browse the repository at this point in the history
Document communication_information
  • Loading branch information
lhearachel authored Apr 1, 2024
2 parents 6010f54 + a89a1a2 commit 8185c23
Show file tree
Hide file tree
Showing 202 changed files with 2,258 additions and 2,248 deletions.
43 changes: 43 additions & 0 deletions include/communication_information.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#ifndef POKEPLATINUM_COMMUNICATION_INFORMATION_H
#define POKEPLATINUM_COMMUNICATION_INFORMATION_H

#include "trainer_info.h"
#include "struct_defs/struct_0202610C.h"
#include "savedata.h"

#include <dwc.h>

void CommInfo_Init(SaveData * saveData, const BattleRegulation * regulation);
void CommInfo_Delete(void);
BOOL CommInfo_IsInitialized(void);
void CommInfo_SendBattleRegulation(void);
int CommPlayerData_Size(void);
void CommunicatitonInformaion_FinishReading(int param0, int param1, void * param2, void * param3);
BOOL CommInfo_IsDataFinishedReading(void);
void CommInfo_RecvPlayerDataArray(int netId, int unused1, void * src, void * unused3);
void CommInfo_RecvPlayerData(int netId, int unused1, void * src, void * unused3);
BOOL CommInfo_ServerSendArray(void);
BOOL CommInfo_IsReceivingData(void);
void CommInfo_InitPlayer(int netId);
BOOL sub_02032DC4(int netId);
BOOL sub_02032DE0(int netId);
BOOL sub_02032E00(int netId);
void sub_02032E1C(int netId);
void CommInfo_SetReceiveEnd(int netId);
int CommInfo_NewNetworkId(void);
int CommInfo_CountReceived(void);
BOOL sub_02032E90(void);
TrainerInfo * CommInfo_TrainerInfo(int netId);
DWCFriendData * CommInfo_DWCFriendData(int netId);
int sub_02032F40(int param0);
u16 * sub_02032F54(int netId);
int CommInfo_PlayerCountry(int netId);
int CommInfo_PlayerRegion(int netId);
int sub_02032FC0(int param0);
BOOL CommInfo_CheckBattleRegulation(void);
void CommInfo_SavePlayerRecord(SaveData * saveData);
void sub_020331B4(SaveData * saveData, int param1);
void CommInfo_SetTradeResult(SaveData * saveData, int val);
void CommInfo_SetPersonalTrainerInfo(TrainerInfo * trainerInfo);

#endif // POKEPLATINUM_COMMUNICATION_INFORMATION_H
19 changes: 10 additions & 9 deletions include/unk_02034198.h → include/communication_system.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#ifndef POKEPLATINUM_UNK_02034198_H
#define POKEPLATINUM_UNK_02034198_H

#ifndef POKEPLATINUM_COMMUNICATION_SYSTEM_H
#define POKEPLATINUM_COMMUNICATION_SYSTEM_H

#include <nitro/math.h>

#define MAX_CONNECTED_PLAYERS 8

BOOL sub_02034778(BOOL param0, BOOL param1, int param2, BOOL param3);
BOOL sub_020347B4(BOOL param0, BOOL param1, int param2);
void sub_02034878(void);
Expand All @@ -24,12 +25,12 @@ void sub_0203568C(void);
void sub_0203572C(void);
void sub_02035938(u8 param0);
BOOL sub_0203597C(int param0, const void * param1, int param2);
BOOL sub_020359DC(int param0, const void * param1, int param2);
BOOL CommSys_SendData(int param0, const void * param1, int param2);
BOOL sub_02035A3C(int param0, const void * param1, int param2);
BOOL sub_02035AC4(int param0, const void * param1, int param2);
BOOL sub_02035B48(int param0, const void * param1);
int sub_02035B54(void);
BOOL sub_02035D78(u16 param0);
BOOL CommSys_IsPlayerConnected(u16 param0);
int sub_02035E18(void);
BOOL sub_02035E38(void);
void sub_02035E5C(u8 param0);
Expand All @@ -38,12 +39,12 @@ u16 sub_02035E84(int param0);
void sub_02035EA8(void);
void sub_02035EC8(void);
BOOL sub_02035EE0(void);
BOOL sub_02035F00(int param0, const void * param1, int param2);
BOOL CommSys_ServerSetSendQueue(int param0, const void * param1, int param2);
BOOL sub_02035F58(int param0, const void * param1, int param2);
void sub_02036008(int param0, int param1, void * param2, void * param3);
void sub_02036030(int param0, int param1, void * param2, void * param3);
void sub_02036058(int param0, int param1, void * param2, void * param3);
u16 sub_0203608C(void);
u16 CommSys_CurNetId(void);
BOOL sub_020360D0(int param0, const void * param1);
BOOL Link_Message(int param0);
BOOL sub_020360E8(void);
Expand All @@ -54,7 +55,7 @@ int sub_02036158(int param0);
void sub_02036168(BOOL param0);
BOOL sub_02036180(void);
void sub_0203619C(int param0, int param1, void * param2, void * param3);
void sub_020361BC(MATHRandContext32 * param0);
void CommSys_Seed(MATHRandContext32 * param0);
BOOL sub_02036254(int param0);
BOOL sub_0203626C(int param0);
BOOL sub_02036284(void);
Expand All @@ -70,4 +71,4 @@ BOOL sub_020363A0(void);
void sub_020363BC(void);
void sub_020363D0(void);

#endif // POKEPLATINUM_UNK_02034198_H
#endif // POKEPLATINUM_COMMUNICATION_SYSTEM_H
1 change: 1 addition & 0 deletions include/constants/heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ enum HeapId {
HEAP_ID_APPLICATION,

HEAP_ID_BATTLE = 5,
HEAP_ID_COMMUNICATION = 15,
};

#endif // POKEPLATINUM_CONSTANTS_HEAP_H
2 changes: 1 addition & 1 deletion include/struct_defs/struct_02026030_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "struct_defs/struct_0202610C.h"

struct UnkStruct_02026030_t {
UnkStruct_0202610C unk_00[1];
BattleRegulation unk_00[1];
};

#endif // POKEPLATINUM_STRUCT_02026030_T_H
2 changes: 1 addition & 1 deletion include/struct_defs/struct_0202610C.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ typedef struct {
u8 unk_1E_2 : 1;
u8 unk_1E_3 : 1;
u8 unk_1E_4 : 1;
} UnkStruct_0202610C;
} BattleRegulation;

#endif // POKEPLATINUM_STRUCT_0202610C_H
2 changes: 1 addition & 1 deletion include/struct_defs/struct_0202F41C.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ typedef struct UnkStruct_0202F41C_t {
u16 unk_24;
u8 unk_26;
u8 unk_27;
UnkStruct_0202610C unk_28;
BattleRegulation unk_28;
u16 unk_48;
u8 unk_4A[14];
u64 unk_58;
Expand Down
2 changes: 1 addition & 1 deletion include/struct_defs/struct_0203CDB0.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ typedef struct UnkStruct_0203CDB0_t {
UnkStruct_ov5_021E1608 * unk_A4;
UnkStruct_ov5_021EFB30 * unk_A8;
UnkStruct_0204AFC4 * unk_AC;
const UnkStruct_0202610C * unk_B0;
const BattleRegulation * unk_B0;
UnkStruct_0209ACBC * unk_B4;
BOOL unk_B8;
UnkStruct_0209C370 * unk_BC;
Expand Down
2 changes: 1 addition & 1 deletion include/unk_02025E08.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

int Player_SaveSize(void);
void Player_Init(UnkStruct_02025E0C * param0);
TrainerInfo * sub_02025E38(SaveData * param0);
TrainerInfo * SaveData_GetTrainerInfo(SaveData * param0);
Options * sub_02025E44(SaveData * param0);
u16 * sub_02025E50(SaveData * param0);
UnkStruct_02025E5C * sub_02025E5C(SaveData * param0);
Expand Down
12 changes: 6 additions & 6 deletions include/unk_0202602C.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

int sub_0202602C(void);
int RegulationBattles_SaveSize(void);
void sub_02026034(const UnkStruct_0202610C * param0, UnkStruct_0202610C * param1);
void BattleRegulation_Copy(const BattleRegulation * param0, BattleRegulation * param1);
void RegulationBattles_Init(UnkStruct_02026030 * param0);
void sub_0202604C(const UnkStruct_0202610C * param0, Strbuf *param1);
Strbuf* sub_0202605C(const UnkStruct_0202610C * param0, int param1);
int sub_02026074(const UnkStruct_0202610C * param0, int param1);
UnkStruct_0202610C * sub_0202610C(SaveData * param0, int param1);
void sub_0202613C(SaveData * param0, const UnkStruct_0202610C * param1);
void sub_0202604C(const BattleRegulation * param0, Strbuf *param1);
Strbuf* sub_0202605C(const BattleRegulation * param0, int param1);
int sub_02026074(const BattleRegulation * param0, int param1);
BattleRegulation * sub_0202610C(SaveData * param0, int param1);
void sub_0202613C(SaveData * param0, const BattleRegulation * param1);

#endif // POKEPLATINUM_UNK_0202602C_H
6 changes: 3 additions & 3 deletions include/unk_02026150.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "struct_defs/struct_0202610C.h"
#include "savedata.h"

const UnkStruct_0202610C * sub_02026150(SaveData * param0, int param1);
const BattleRegulation * sub_02026150(SaveData * param0, int param1);
void sub_0202616C(SaveData * param0, int param1, Strbuf *param2, int param3);
const UnkStruct_0202610C * sub_020261A8(void);
int sub_020261B0(const UnkStruct_0202610C * param0);
const BattleRegulation * sub_020261A8(void);
int sub_020261B0(const BattleRegulation * param0);

#endif // POKEPLATINUM_UNK_02026150_H
43 changes: 0 additions & 43 deletions include/unk_020329E0.h

This file was deleted.

4 changes: 2 additions & 2 deletions include/unk_020366A0.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ BOOL sub_02036834(void);
void sub_02036884(void);
void sub_02036894(void);
void sub_020368A4(void);
void sub_020368B8(SaveData * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4);
void sub_02036900(SaveData * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4);
void sub_020368B8(SaveData * param0, int param1, int param2, const BattleRegulation * param3, BOOL param4);
void sub_02036900(SaveData * param0, int param1, int param2, const BattleRegulation * param3, BOOL param4);
void sub_02036948(int param0);
void sub_02036964(void);
void sub_02036978(void);
Expand Down
6 changes: 3 additions & 3 deletions include/unk_0207A2A8.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

HeightWeightData * sub_0207A2A8(int param0);
void sub_0207A2C0(HeightWeightData * param0);
BOOL sub_0207A2D0(const UnkStruct_0202610C * param0, Pokemon * param1, const HeightWeightData * param2);
int sub_0207A3AC(const UnkStruct_0202610C * param0, Party * param1, const HeightWeightData * param2, u8 * param3);
int sub_0207A594(const UnkStruct_0202610C * param0, Party * param1, const HeightWeightData * param2);
BOOL sub_0207A2D0(const BattleRegulation * param0, Pokemon * param1, const HeightWeightData * param2);
int sub_0207A3AC(const BattleRegulation * param0, Party * param1, const HeightWeightData * param2, u8 * param3);
int sub_0207A594(const BattleRegulation * param0, Party * param1, const HeightWeightData * param2);

#endif // POKEPLATINUM_UNK_0207A2A8_H
4 changes: 2 additions & 2 deletions platinum.us/main.lsf
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ Static main
Object main.nef.p/src_unk_020322D8.c.o
Object main.nef.p/src_unk_0203266C.c.o
Object main.nef.p/src_unk_02032798.c.o
Object main.nef.p/src_unk_020329E0.c.o
Object main.nef.p/src_communication_information.c.o
Object main.nef.p/src_unk_02033200.c.o
Object main.nef.p/src_unk_02034198.c.o
Object main.nef.p/src_communication_system.c.o
Object main.nef.p/src_unk_020363E8.c.o
Object main.nef.p/src_unk_020366A0.c.o
Object main.nef.p/src_unk_02038ED4.c.o
Expand Down
Loading

0 comments on commit 8185c23

Please sign in to comment.