Port librfu from firered
This commit is contained in:
+8
-8
@@ -236,7 +236,7 @@ static bool8 SendLinkData(const void *linkData, u32 size)
|
||||
{
|
||||
if (gUnknown_02022C2C == 29)
|
||||
{
|
||||
rfu_NI_setSendData(gUnknown_03004140.unk_00, 84, linkData, size);
|
||||
rfu_NI_setSendData(lman.acceptSlot_flag, 84, linkData, size);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@@ -254,7 +254,7 @@ static bool32 sub_80771BC(void)
|
||||
{
|
||||
if (gUnknown_02022C2C == 29)
|
||||
{
|
||||
if (gRfuSlotStatusNI[sub_800E87C(gUnknown_03004140.unk_00)]->send.state == 0)
|
||||
if (gRfuSlotStatusNI[sub_800E87C(lman.acceptSlot_flag)]->send.state == 0)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@@ -273,7 +273,7 @@ static u32 _GetBlockReceivedStatus(void)
|
||||
static void TradeResetReceivedFlags(void)
|
||||
{
|
||||
if (IsWirelessTrade())
|
||||
rfu_clearSlot(12, gUnknown_03004140.unk_00);
|
||||
rfu_clearSlot(12, lman.acceptSlot_flag);
|
||||
else
|
||||
ResetBlockReceivedFlags();
|
||||
}
|
||||
@@ -281,7 +281,7 @@ static void TradeResetReceivedFlags(void)
|
||||
static void TradeResetReceivedFlag(u32 who)
|
||||
{
|
||||
if (IsWirelessTrade())
|
||||
rfu_clearSlot(12, gUnknown_03004140.unk_00);
|
||||
rfu_clearSlot(12, lman.acceptSlot_flag);
|
||||
else
|
||||
ResetBlockReceivedFlag(who);
|
||||
}
|
||||
@@ -2405,15 +2405,15 @@ static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isObedientBitSet)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int GetUnionRoomTradeMessageId(struct UnkLinkRfuStruct_02022B14Substruct rfuPlayer, struct UnkLinkRfuStruct_02022B14Substruct rfuPartner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, u8 isObedientBitSet)
|
||||
int GetUnionRoomTradeMessageId(struct GFtgtGnameSub rfuPlayer, struct GFtgtGnameSub rfuPartner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, u8 isObedientBitSet)
|
||||
{
|
||||
bool8 playerHasNationalDex = rfuPlayer.hasNationalDex;
|
||||
bool8 playerIsChampion = rfuPlayer.isChampion;
|
||||
bool8 partnerHasNationalDex = rfuPartner.hasNationalDex;
|
||||
bool8 partnerIsChampion = rfuPartner.isChampion;
|
||||
u8 r1 = rfuPartner.unk_01_2;
|
||||
u8 r1 = rfuPartner.version;
|
||||
|
||||
if (r1 != 3)
|
||||
if (r1 != VERSION_EMERALD)
|
||||
{
|
||||
if (!playerIsChampion)
|
||||
{
|
||||
@@ -2476,7 +2476,7 @@ int GetUnionRoomTradeMessageId(struct UnkLinkRfuStruct_02022B14Substruct rfuPlay
|
||||
return UR_TRADE_MSG_NONE;
|
||||
}
|
||||
|
||||
int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct rfuPlayer, u16 species2, u16 species, u8 isObedientBitSet)
|
||||
int CanRegisterMonForTradingBoard(struct GFtgtGnameSub rfuPlayer, u16 species2, u16 species, u8 isObedientBitSet)
|
||||
{
|
||||
bool8 hasNationalDex = rfuPlayer.hasNationalDex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user