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.
This commit is contained in:
Deokishisu
2021-06-03 12:45:59 -04:00
parent 753b19d0ea
commit 8e4320cc21
5 changed files with 20 additions and 17 deletions
+3 -3
View File
@@ -2623,7 +2623,7 @@ static u32 TestWhetherSelectedMonCanBeTraded(struct Pokemon * party, int partyCo
if ((player->version & 0xFF) != VERSION_RUBY &&
(player->version & 0xFF) != VERSION_SAPPHIRE)
{
if ((player->name[10] & 0xF) == 0)
if ((player->progressFlagsCopy & 0xF) == 0)
{
if (species2[cursorPos] == SPECIES_EGG)
{
@@ -2697,11 +2697,11 @@ s32 Trade_CalcLinkPlayerCompatibilityParam(void)
if (val > 0)
{
if (gLinkPlayers[GetMultiplayerId()].name[10] & 0xF0)
if (gLinkPlayers[GetMultiplayerId()].progressFlagsCopy & 0xF0)
{
if (val == 2)
{
if (gLinkPlayers[GetMultiplayerId() ^ 1].name[10] & 0xF0)
if (gLinkPlayers[GetMultiplayerId() ^ 1].progressFlagsCopy & 0xF0)
{
return 0;
}