Address review comments

This commit is contained in:
PikalaxALT
2020-02-12 17:02:45 -05:00
parent aa4a979334
commit 57c2ea74a8
4 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ static void rfu_LMAN_PARENT_stopWaitLinkRecoveryAndDisconnect(u8 bm_targetSlot)
rfu_LMAN_occureCallback(LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED, i);
}
void rfu_LMAN_stopManager(bool8 forced_stop_and_RFU_reset_flag)
void rfu_LMAN_stopManager(u8 forced_stop_and_RFU_reset_flag)
{
u8 msg = 0;
lman.pcswitch_flag = 0;
+3 -3
View File
@@ -88,8 +88,8 @@ bool8 gLinkCommand2FFEAck[MAX_LINK_PLAYERS];
bool8 gLinkCommand5FFFAck[MAX_LINK_PLAYERS];
u16 gLinkCmd5FFFparam;
u8 gSuppressLinkErrorMessage;
bool8 gWirelessCommType;
bool8 gSavedLinkPlayerCount;
u8 gWirelessCommType;
u8 gSavedLinkPlayerCount;
u16 gSendCmd[CMD_LENGTH];
u8 gSavedMultiplayerId;
bool8 gReceivedRemoteLinkPlayers;
@@ -1480,7 +1480,7 @@ void CB2_LinkError(void)
ResetLinkRfuGFLayer();
}
SetVBlankCallback(sub_800978C);
ResetBgsAndClearDma3BusyFlags(0);
ResetBgsAndClearDma3BusyFlags(FALSE);
InitBgsFromTemplates(0, sLinkErrorBgTemplates, 2);
sLinkErrorBgTilemapBuffer = tilemapBuffer = malloc(0x800);
SetBgTilemapBuffer(1, tilemapBuffer);
+3 -3
View File
@@ -251,7 +251,7 @@ static void Task_LinkLeaderSearchForChildren(u8 taskId)
case 3:
break;
case 4:
rfu_LMAN_stopManager(FALSE);
rfu_LMAN_stopManager(0);
Rfu.state = 5;
break;
case 5:
@@ -465,7 +465,7 @@ void LinkRfu_CreateConnectionAsParent(void)
void LinkRfu_StopManagerBeforeEnteringChat(void)
{
rfu_LMAN_stopManager(FALSE);
rfu_LMAN_stopManager(0);
}
static void MscCallback_Child(u16 unused)
@@ -1465,7 +1465,7 @@ u8 sub_80FA484(bool32 a0)
void sub_80FA4A8(void)
{
Rfu.unk_cd9 = 1;
rfu_LMAN_stopManager(FALSE);
rfu_LMAN_stopManager(0);
}
u8 LinkRfu_GetMultiplayerId(void)
+20 -20
View File
@@ -2740,30 +2740,30 @@ static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isObedientBitSet)
return FALSE;
}
int GetUnionRoomTradeMessageId(struct GFtgtGnameSub a0, struct GFtgtGnameSub a1, u16 species1, u16 species2, u8 type, u16 species3, u8 isObedientBitSet)
int GetUnionRoomTradeMessageId(struct GFtgtGnameSub playerSub, struct GFtgtGnameSub partnerSub, u16 species1, u16 species2, u8 type, u16 species3, u8 isObedientBitSet)
{
u8 r9 = a0.hasNationalDex;
u8 r4 = a0.isChampion;
u8 r10 = a1.hasNationalDex;
u8 r0 = a1.isChampion;
u8 r1 = a1.version;
u8 r2;
u8 playerHasNationalDex = playerSub.hasNationalDex;
u8 playerIsChampion = playerSub.isChampion;
u8 partnerHasNationalDex = partnerSub.hasNationalDex;
u8 partnerIsChampion = partnerSub.isChampion;
u8 partnerVersion = partnerSub.version;
u8 isNotFRLG;
if (r1 == VERSION_FIRE_RED || r1 == VERSION_LEAF_GREEN)
if (partnerVersion == VERSION_FIRE_RED || partnerVersion == VERSION_LEAF_GREEN)
{
r2 = 0;
isNotFRLG = 0;
}
else
{
r2 = 1;
isNotFRLG = 1;
}
if (r2)
if (isNotFRLG)
{
if (!r4)
if (!playerIsChampion)
{
return 8;
}
else if (!r0)
else if (!partnerIsChampion)
{
return 9;
}
@@ -2794,7 +2794,7 @@ int GetUnionRoomTradeMessageId(struct GFtgtGnameSub a0, struct GFtgtGnameSub a1,
return 3;
}
if (!r9)
if (!playerHasNationalDex)
{
if (species1 == SPECIES_EGG)
{
@@ -2812,7 +2812,7 @@ int GetUnionRoomTradeMessageId(struct GFtgtGnameSub a0, struct GFtgtGnameSub a1,
}
}
if (!r10 && species1 > SPECIES_MEW)
if (!partnerHasNationalDex && species1 > SPECIES_MEW)
{
return 7;
}
@@ -2820,11 +2820,11 @@ int GetUnionRoomTradeMessageId(struct GFtgtGnameSub a0, struct GFtgtGnameSub a1,
return 0;
}
int CanRegisterMonForTradingBoard(struct GFtgtGnameSub a0, u16 species, u16 a2, u8 a3)
int CanRegisterMonForTradingBoard(struct GFtgtGnameSub playerSub, u16 species2, u16 species, u8 obedience)
{
u8 canTradeEggAndNational = a0.hasNationalDex;
u8 canTradeEggAndNational = playerSub.hasNationalDex;
if (IsDeoxysOrMewUntradable(a2, a3))
if (IsDeoxysOrMewUntradable(species, obedience))
{
return 1;
}
@@ -2834,12 +2834,12 @@ int CanRegisterMonForTradingBoard(struct GFtgtGnameSub a0, u16 species, u16 a2,
return 0;
}
if (species == SPECIES_EGG)
if (species2 == SPECIES_EGG)
{
return 2;
}
if (species > SPECIES_MEW && species != SPECIES_EGG)
if (species2 > SPECIES_MEW && species2 != SPECIES_EGG)
{
return 1;
}