diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/pokemon.h | 2 | ||||
-rw-r--r-- | include/proto.h | 3 | ||||
-rw-r--r-- | include/sav_system_info.h | 48 |
3 files changed, 51 insertions, 2 deletions
diff --git a/include/pokemon.h b/include/pokemon.h index ed62c18e..b76bf145 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -294,7 +294,7 @@ BOOL FUN_02069E74(struct Pokemon * pokemon); BOOL FUN_02069E94(struct Pokemon * pokemon); void FUN_02069EC4(struct Pokemon * pokemon); void FUN_02069FB0(u32 r7, u32 r5, u32 r4, u32 r6, u32 sp18, u32 sp1C, u32 sp20); -void FUN_0206A014(struct Pokemon * pokemon, u32 a1, u32 pokeball, u32 a3, u32 encounterType, u32 a5); +void FUN_0206A014(struct Pokemon * pokemon, struct PlayerData * a1, u32 pokeball, u32 a3, u32 encounterType, u32 heap_id); void FUN_0206A094(struct Pokemon * pokemon, u32 a1, u32 a2); BOOL FUN_0206A13C(struct Pokemon * pokemon, u32 a1); void FUN_0206A1C4(struct Pokemon * pokemon); diff --git a/include/proto.h b/include/proto.h index fb2f8a78..67a295ac 100644 --- a/include/proto.h +++ b/include/proto.h @@ -5,6 +5,7 @@ #include "pokemon.h" // for struct definitions #include "string16.h" // for struct definitions +#include "player_data.h" // for struct definitions int FUN_0206AE00(int x); u32 GetItemAttr(u16 item, u32 a1, u32 a2); @@ -15,7 +16,7 @@ int FUN_02005F14(int); void FUN_02005E80(int); void FUN_02005E90(int, int, int, int); void FUN_020056AC(int, int, int, int, int); -void FUN_020808AC(struct BoxPokemon *, int, int, int, int); +void FUN_020808AC(struct BoxPokemon *, struct PlayerData *, int, u32, u32); void StringExpandPlaceholders(u32 *, struct String *, struct String *); #endif //POKEDIAMOND_PROTO_H diff --git a/include/sav_system_info.h b/include/sav_system_info.h new file mode 100644 index 00000000..696cfe07 --- /dev/null +++ b/include/sav_system_info.h @@ -0,0 +1,48 @@ +#ifndef POKEDIAMOND_SAV_SYSTEM_INFO_H +#define POKEDIAMOND_SAV_SYSTEM_INFO_H + +#include "RTC_api.h" + +struct UnkSaveStruct_0202376C_sub +{ + /* 0x00 */ u32 field_00; + /* 0x04 */ RTCDate date; + /* 0x14 */ RTCTime time; + /* 0x20 */ s32 daysSinceNitroEpoch; + /* 0x24 */ s64 secondsSinceNitroEpoch; + /* 0x2C */ s64 field_2C; + /* 0x34 */ u32 field_34; +}; + +struct SavSysInfo +{ + /* 0x00 */ s64 rtcOffset; + /* 0x08 */ u8 macAddr[6]; + /* 0x0E */ u8 birthMonth; + /* 0x0F */ u8 birthDay; + /* 0x10 */ struct UnkSaveStruct_0202376C_sub rtcInfo; + /* 0x48 */ u8 field_48; + u8 filler_49[3]; + /* 0x4C */ u32 field_4C; + u8 padding_50[12]; +}; + +u32 Sav2_SysInfo_sizeof(void); +void Sav2_SysInfo_init(struct SavSysInfo * unk); +struct SavSysInfo * Sav2_SysInfo_get(struct SaveBlock2 * sav2); +struct UnkSaveStruct_0202376C_sub * Sav2_SysInfo_RTC_get(struct SaveBlock2 * sav2); +void Sav2_SysInfo_InitFromSystem(struct SavSysInfo * unk); +BOOL Sav2_SysInfo_MacAddressIsMine(struct SavSysInfo * unk); +BOOL Sav2_SysInfo_RTCOffsetIsMine(struct SavSysInfo * unk); +u8 Sav2_SysInfo_GetBirthMonth(struct SavSysInfo * unk); +u8 Sav2_SysInfo_GetBirthDay(struct SavSysInfo * unk); +u8 FUN_02023820(struct SavSysInfo * unk); +void FUN_02023828(struct SavSysInfo * unk, u8 val); +u32 FUN_02023830(struct SavSysInfo * unk); +void FUN_02023834(struct SavSysInfo * unk, u32 val); +void Sav2_SysInfo_RTC_init(struct UnkSaveStruct_0202376C_sub * sub); +BOOL FUN_02023874(struct UnkSaveStruct_0202376C_sub * sub); +void FUN_02023884(struct UnkSaveStruct_0202376C_sub * sub, u32 a1); +void FUN_020238A4(struct UnkSaveStruct_0202376C_sub * sub); + +#endif //POKEDIAMOND_SAV_SYSTEM_INFO_H |