summaryrefslogtreecommitdiff
path: root/include/link.h
diff options
context:
space:
mode:
authorDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-06-03 12:45:59 -0400
committerDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-06-03 12:45:59 -0400
commit8e4320cc211da9d0ccd14a2b9c220cf85c05aeef (patch)
treedd73557d5f392e337696200898f5e86e56833917 /include/link.h
parent753b19d0ea79b9637c0eb08b3f1b04b543fe90a0 (diff)
Sync LinkPlayer Struct with pokeemerald
In pokefirered, the `LinkPlayer` struct used an 11-byte name field and puts extra link-related info in the last three bytes. pokeemerald separates these last three bytes into their own fields. This commit replicates how pokeemerald handles those fields. Also renamed `IntlConvertLinkPlayerName` to pokeemerald's `ConvertLinkPlayerName` because I was there and noticed it.
Diffstat (limited to 'include/link.h')
-rw-r--r--include/link.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/link.h b/include/link.h
index 564180b2b..7747bd7a9 100644
--- a/include/link.h
+++ b/include/link.h
@@ -127,7 +127,10 @@ struct LinkPlayer
/* 0x00 */ u16 version;
/* 0x02 */ u16 lp_field_2;
/* 0x04 */ u32 trainerId;
- /* 0x08 */ u8 name[11];
+ /* 0x08 */ u8 name[PLAYER_NAME_LENGTH + 1];
+ /* 0x10 */ u8 progressFlags; // (& 0x0F) is hasNationalDex, (& 0xF0) is hasClearedGame
+ /* 0x11 */ u8 neverRead;
+ /* 0x12 */ u8 progressFlagsCopy;
/* 0x13 */ u8 gender;
/* 0x14 */ u32 linkType;
/* 0x18 */ u16 id; // battle bank in battles
@@ -277,7 +280,7 @@ void CreateWirelessStatusIndicatorSprite(u8, u8);
void sub_8009FE8(void);
void ClearLinkCallback_2(void);
void Rfu_SetLinkStandbyCallback(void);
-void IntlConvertLinkPlayerName(struct LinkPlayer * linkPlayer);
+void ConvertLinkPlayerName(struct LinkPlayer * linkPlayer);
bool8 IsWirelessAdapterConnected(void);
bool8 Link_PrepareCmd0xCCCC_Rfu0xA100(u8 blockRequestType);
void LinkVSync(void);