diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-12-21 11:43:24 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-12-21 11:43:24 -0500 |
commit | a7ab82a948cdbbe30da4307d2245369980440bea (patch) | |
tree | 359fd6bbdff8196aa0e31d0777ee79cf012bb729 /include | |
parent | 7f5addc626584ab24c8da1760d64ef3b8e5c24b7 (diff) |
Guess a small struct in save block 2
Diffstat (limited to 'include')
-rw-r--r-- | include/global.h | 49 | ||||
-rw-r--r-- | include/link.h | 2 |
2 files changed, 37 insertions, 14 deletions
diff --git a/include/global.h b/include/global.h index 1d2152af7..c47bd2d15 100644 --- a/include/global.h +++ b/include/global.h @@ -224,6 +224,23 @@ struct BerryCrush #define PLAYER_NAME_LENGTH 8 +#define LINK_B_RECORDS_COUNT 5 + +struct LinkBattleRecord +{ + u8 name[PLAYER_NAME_LENGTH]; + u16 trainerId; + u16 wins; + u16 losses; + u16 draws; +}; + +struct LinkBattleRecords +{ + struct LinkBattleRecord entries[LINK_B_RECORDS_COUNT]; + u8 languages[LINK_B_RECORDS_COUNT]; +}; + struct UnknownSaveBlock2Struct { u8 field_0; @@ -244,6 +261,21 @@ struct UnknownSaveBlock2Struct u8 field_EB; }; // sizeof = 0xEC +struct UnkSaveBlock2Substruct_55C +{ + /* 0x000:0x55C */ u8 unk_00_0:1; + u8 unk_00_1:1; + /* 0x001:0x55D */ u8 unk_01; + /* 0x002:0x55E */ u8 unk_02[2]; + /* 0x004:0x560 */ u16 unk_04[2]; + /* 0x008:0x564 */ u16 unk_08[2]; + /* 0x00C:0x568 */ u16 unk_0C[2]; + /* 0x010:0x56C */ u8 unk_10; + /* 0x011:0x56D */ u8 unk_11[3]; + /* 0x014:0x570 */ u16 unk_14; + /* 0x016:0x572 */ u8 unk_16; +}; // size: 0x018 + struct SaveBlock2 { /*0x000*/ u8 playerName[PLAYER_NAME_LENGTH]; @@ -268,9 +300,11 @@ struct SaveBlock2 /*0x0A8*/ u32 field_A8; /*0x0AC*/ u8 filler_AC[0x3F4]; /*0x4A0*/ u32 unk_4A0[0x2F]; - /*0x55c*/ u8 filler_55C[0x53C]; - /*0xA98*/ u8 unk_A98[2][16]; - /*0xAB8*/ u8 filler_AB8[0x468]; + /*0x55c*/ struct UnkSaveBlock2Substruct_55C unk_55C; + /*0x574*/ u8 filler_574[0x524]; + /*0xA98*/ struct LinkBattleRecords linkBattleRecords; + /*0xAF0*/ struct BerryCrush berryCrush; + /*0xB00*/ u8 filler_B00[0x420]; /*0xF20*/ u32 encryptionKey; }; @@ -438,15 +472,6 @@ struct RecordMixing_UnknownStruct u16 unk74[0x2]; }; -struct LinkBattleRecord -{ - u8 name[8]; - u16 trainerId; - u16 wins; - u16 losses; - u16 draws; -}; - struct RecordMixingGiftData { u8 unk0; diff --git a/include/link.h b/include/link.h index ef8776c64..93ad9dfe1 100644 --- a/include/link.h +++ b/include/link.h @@ -146,10 +146,8 @@ extern u16 word_3002910[]; extern bool8 gReceivedRemoteLinkPlayers; extern bool8 gLinkVSyncDisabled; -extern u8 gUnknown_3003F64; extern u8 gUnknown_3003F84; extern u64 gUnknown_3003FB4; -extern u16 gLinkType; void Task_DestroySelf(u8); void OpenLink(void); |