port miscellaneous fr documentation
This commit is contained in:
@@ -125,14 +125,14 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion);
|
||||
static void GetLinkPlayerCoords(u8 linkPlayerId, u16 *x, u16 *y);
|
||||
static u8 GetLinkPlayerFacingDirection(u8 linkPlayerId);
|
||||
static u8 GetLinkPlayerElevation(u8 linkPlayerId);
|
||||
static s32 sub_80878E4(u8 linkPlayerId);
|
||||
static s32 GetLinkPlayerObjectStepTimer(u8 linkPlayerId);
|
||||
static u8 GetLinkPlayerIdAt(s16 x, s16 y);
|
||||
static void SetPlayerFacingDirection(u8 linkPlayerId, u8 a2);
|
||||
static void ZeroObjectEvent(struct ObjectEvent *objEvent);
|
||||
static void SpawnLinkPlayerObjectEvent(u8 linkPlayerId, s16 x, s16 y, u8 a4);
|
||||
static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s16 y);
|
||||
static void sub_80877DC(u8 linkPlayerId, u8 a2);
|
||||
static void sub_808780C(u8 linkPlayerId);
|
||||
static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 a2);
|
||||
static void DestroyLinkPlayerObject(u8 linkPlayerId);
|
||||
static u8 GetSpriteForLinkedPlayer(u8 linkPlayerId);
|
||||
static void RunTerminateLinkScript(void);
|
||||
static u32 GetLinkSendQueueLength(void);
|
||||
@@ -172,7 +172,7 @@ static u8 sPlayerTradingStates[MAX_LINK_PLAYERS];
|
||||
// adjusted key code, effectively intercepting the input before anything
|
||||
// can process it.
|
||||
static u16 (*sPlayerKeyInterceptCallback)(u32);
|
||||
static bool8 sUnknown_03000E18;
|
||||
static bool8 sReceivingFromLink;
|
||||
static u8 sRfuKeepAliveTimer;
|
||||
|
||||
// IWRAM common
|
||||
@@ -1626,7 +1626,7 @@ static void CB2_ReturnToFieldLocal(void)
|
||||
|
||||
static void CB2_ReturnToFieldLink(void)
|
||||
{
|
||||
if (!sub_8087598() && ReturnToFieldLink(&gMain.state))
|
||||
if (!Overworld_LinkRecvQueueLengthMoreThan2() && ReturnToFieldLink(&gMain.state))
|
||||
SetMainCallback2(CB2_Overworld);
|
||||
}
|
||||
|
||||
@@ -2823,18 +2823,18 @@ static void RunTerminateLinkScript(void)
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
bool32 sub_8087598(void)
|
||||
bool32 Overworld_LinkRecvQueueLengthMoreThan2(void)
|
||||
{
|
||||
if (!IsUpdateLinkStateCBActive())
|
||||
return FALSE;
|
||||
if (GetLinkRecvQueueLength() >= 3)
|
||||
sUnknown_03000E18 = TRUE;
|
||||
sReceivingFromLink = TRUE;
|
||||
else
|
||||
sUnknown_03000E18 = FALSE;
|
||||
return sUnknown_03000E18;
|
||||
sReceivingFromLink = FALSE;
|
||||
return sReceivingFromLink;
|
||||
}
|
||||
|
||||
bool32 sub_80875C8(void)
|
||||
bool32 Overworld_RecvKeysFromLinkIsRunning(void)
|
||||
{
|
||||
u8 temp;
|
||||
|
||||
@@ -2849,8 +2849,8 @@ bool32 sub_80875C8(void)
|
||||
else if (sPlayerKeyInterceptCallback != KeyInterCB_DeferToEventScript)
|
||||
return FALSE;
|
||||
|
||||
temp = sUnknown_03000E18;
|
||||
sUnknown_03000E18 = FALSE;
|
||||
temp = sReceivingFromLink;
|
||||
sReceivingFromLink = FALSE;
|
||||
|
||||
if (temp == TRUE)
|
||||
return TRUE;
|
||||
@@ -2860,7 +2860,7 @@ bool32 sub_80875C8(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_8087634(void)
|
||||
bool32 Overworld_SendKeysToLinkIsRunning(void)
|
||||
{
|
||||
if (GetLinkSendQueueLength() < 2)
|
||||
return FALSE;
|
||||
@@ -2874,7 +2874,7 @@ bool32 sub_8087634(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_808766C(void)
|
||||
bool32 IsSendingKeysOverCable(void)
|
||||
{
|
||||
if (gWirelessCommType != 0)
|
||||
return FALSE;
|
||||
@@ -2923,15 +2923,15 @@ static void SpawnLinkPlayerObjectEvent(u8 linkPlayerId, s16 x, s16 y, u8 gender)
|
||||
ZeroLinkPlayerObjectEvent(linkPlayerObjEvent);
|
||||
ZeroObjectEvent(objEvent);
|
||||
|
||||
linkPlayerObjEvent->active = 1;
|
||||
linkPlayerObjEvent->active = TRUE;
|
||||
linkPlayerObjEvent->linkPlayerId = linkPlayerId;
|
||||
linkPlayerObjEvent->objEventId = objEventId;
|
||||
linkPlayerObjEvent->movementMode = MOVEMENT_MODE_FREE;
|
||||
|
||||
objEvent->active = 1;
|
||||
objEvent->active = TRUE;
|
||||
linkGender(objEvent) = gender;
|
||||
linkDirection(objEvent) = DIR_NORTH;
|
||||
objEvent->spriteId = 64;
|
||||
objEvent->spriteId = MAX_SPRITES;
|
||||
|
||||
InitLinkPlayerObjectEventPos(objEvent, x, y);
|
||||
}
|
||||
@@ -2947,7 +2947,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1
|
||||
ObjectEventUpdateZCoord(objEvent);
|
||||
}
|
||||
|
||||
static void sub_80877DC(u8 linkPlayerId, u8 dir)
|
||||
static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir)
|
||||
{
|
||||
if (gLinkPlayerObjectEvents[linkPlayerId].active)
|
||||
{
|
||||
@@ -2957,7 +2957,7 @@ static void sub_80877DC(u8 linkPlayerId, u8 dir)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_808780C(u8 linkPlayerId)
|
||||
static void DestroyLinkPlayerObject(u8 linkPlayerId)
|
||||
{
|
||||
struct LinkPlayerObjectEvent *linkPlayerObjEvent = &gLinkPlayerObjectEvents[linkPlayerId];
|
||||
u8 objEventId = linkPlayerObjEvent->objEventId;
|
||||
@@ -2998,7 +2998,7 @@ static u8 GetLinkPlayerElevation(u8 linkPlayerId)
|
||||
return objEvent->currentElevation;
|
||||
}
|
||||
|
||||
static s32 sub_80878E4(u8 linkPlayerId)
|
||||
static s32 GetLinkPlayerObjectStepTimer(u8 linkPlayerId)
|
||||
{
|
||||
u8 objEventId = gLinkPlayerObjectEvents[linkPlayerId].objEventId;
|
||||
struct ObjectEvent *objEvent = &gObjectEvents[objEventId];
|
||||
|
||||
Reference in New Issue
Block a user