2017-11-11 03:08:17 +00:00
|
|
|
#ifndef GUARD_LINK_RFU_H
|
|
|
|
#define GUARD_LINK_RFU_H
|
|
|
|
|
2018-12-02 10:58:50 +00:00
|
|
|
#include "librfu.h"
|
2018-12-13 03:55:39 +00:00
|
|
|
#include "link.h"
|
2020-02-16 18:49:36 +00:00
|
|
|
#include "AgbRfu_LinkManager.h"
|
2018-12-02 10:58:50 +00:00
|
|
|
|
2021-08-15 23:26:09 +01:00
|
|
|
#define RFUCMD_MASK 0xFF00
|
|
|
|
|
2020-08-24 19:52:33 +01:00
|
|
|
#define RFUCMD_SEND_PACKET 0x2F00
|
|
|
|
#define RFUCMD_BLENDER_SEND_KEYS 0x4400
|
|
|
|
#define RFUCMD_READY_CLOSE_LINK 0x5F00
|
|
|
|
#define RFUCMD_READY_EXIT_STANDBY 0x6600
|
2021-08-15 23:26:09 +01:00
|
|
|
#define RFUCMD_SEND_PLAYER_IDS 0x7700
|
|
|
|
#define RFUCMD_SEND_PLAYER_IDS_NEW 0x7800
|
|
|
|
#define RFUCMD_SEND_BLOCK_INIT 0x8800
|
|
|
|
#define RFUCMD_SEND_BLOCK 0x8900
|
2020-08-24 19:52:33 +01:00
|
|
|
#define RFUCMD_SEND_BLOCK_REQ 0xA100
|
|
|
|
#define RFUCMD_SEND_HELD_KEYS 0xBE00
|
2021-08-15 23:26:09 +01:00
|
|
|
#define RFUCMD_DISCONNECT 0xED00
|
|
|
|
#define RFUCMD_DISCONNECT_PARENT 0xEE00
|
2017-11-11 03:08:17 +00:00
|
|
|
|
2021-10-06 04:38:36 +01:00
|
|
|
#define RFU_SERIAL_GAME 0x0002 // Serial number for Pokémon game (FRLG or Emerald)
|
|
|
|
#define RFU_SERIAL_WONDER_DISTRIBUTOR 0x7F7D // Serial number for distributing Wonder Cards / News
|
|
|
|
#define RFU_SERIAL_UNKNOWN 0x0000 // Unreferenced acceptable serial number. Gamecube?
|
|
|
|
#define RFU_SERIAL_END 0xFFFF
|
2020-06-08 05:45:06 +01:00
|
|
|
|
|
|
|
#define RECV_QUEUE_NUM_SLOTS 32
|
|
|
|
#define RECV_QUEUE_SLOT_LENGTH (14 * MAX_RFU_PLAYERS)
|
|
|
|
|
|
|
|
#define SEND_QUEUE_NUM_SLOTS 40
|
|
|
|
#define SEND_QUEUE_SLOT_LENGTH 14
|
|
|
|
|
|
|
|
#define BACKUP_QUEUE_NUM_SLOTS 2
|
|
|
|
#define BACKUP_QUEUE_SLOT_LENGTH 14
|
|
|
|
|
2020-08-24 19:52:33 +01:00
|
|
|
#define RFU_PACKET_SIZE 6
|
|
|
|
|
2020-06-08 23:16:57 +01:00
|
|
|
#define RFU_STATUS_OK 0
|
|
|
|
#define RFU_STATUS_FATAL_ERROR 1
|
|
|
|
#define RFU_STATUS_CONNECTION_ERROR 2
|
|
|
|
#define RFU_STATUS_CHILD_SEND_COMPLETE 3
|
|
|
|
#define RFU_STATUS_NEW_CHILD_DETECTED 4
|
|
|
|
#define RFU_STATUS_JOIN_GROUP_OK 5
|
|
|
|
#define RFU_STATUS_JOIN_GROUP_NO 6
|
|
|
|
#define RFU_STATUS_WAIT_ACK_JOIN_GROUP 7
|
|
|
|
#define RFU_STATUS_LEAVE_GROUP_NOTICE 8
|
|
|
|
#define RFU_STATUS_LEAVE_GROUP 9
|
2021-07-12 01:42:05 +01:00
|
|
|
#define RFU_STATUS_CHILD_LEAVE_READY 10
|
|
|
|
#define RFU_STATUS_CHILD_LEAVE 11
|
2020-06-08 23:16:57 +01:00
|
|
|
#define RFU_STATUS_ACK_JOIN_GROUP 12
|
|
|
|
|
2021-08-15 23:26:09 +01:00
|
|
|
#define CHILD_DATA_LENGTH 14
|
|
|
|
|
|
|
|
// Values for disconnectMode
|
|
|
|
enum {
|
|
|
|
RFU_DISCONNECT_NONE,
|
|
|
|
RFU_DISCONNECT_ERROR,
|
|
|
|
RFU_DISCONNECT_NORMAL,
|
|
|
|
};
|
|
|
|
|
|
|
|
// Values for errorState
|
|
|
|
enum {
|
|
|
|
RFU_ERROR_STATE_NONE,
|
|
|
|
RFU_ERROR_STATE_1,
|
|
|
|
RFU_ERROR_STATE_2,
|
|
|
|
RFU_ERROR_STATE_3,
|
|
|
|
RFU_ERROR_STATE_IGNORE,
|
|
|
|
};
|
|
|
|
|
2021-10-06 04:38:36 +01:00
|
|
|
struct RfuGameCompatibilityData
|
2020-01-15 20:46:17 +00:00
|
|
|
{
|
2020-02-16 18:49:36 +00:00
|
|
|
u16 language:4;
|
|
|
|
u16 hasNews:1;
|
|
|
|
u16 hasCard:1;
|
2020-06-07 22:37:09 +01:00
|
|
|
u16 unknown:1; // Never read
|
2020-01-15 20:46:17 +00:00
|
|
|
u16 isChampion:1;
|
|
|
|
u16 hasNationalDex:1;
|
2020-02-16 18:49:36 +00:00
|
|
|
u16 gameClear:1;
|
|
|
|
u16 version:4;
|
2021-10-06 04:38:36 +01:00
|
|
|
u16 unused:2;
|
2020-01-15 20:46:17 +00:00
|
|
|
u8 playerTrainerId[2];
|
|
|
|
};
|
|
|
|
|
2021-10-06 04:38:36 +01:00
|
|
|
// This struct is sent via the Wireless Adapter as the game name or "gname" data.
|
|
|
|
// Gname is only applicable during Wireless Single Game Pak Multiplay, when the
|
|
|
|
// adapter needs this data for connection. Per the RFU manual, during "normal"
|
|
|
|
// wireless play (the kind the Pokémon games use) the gname data can be used for
|
|
|
|
// anything the developers want. This struct is what GF decided to use it for.
|
|
|
|
// It can be up to 13 bytes in size (RFU_GAME_NAME_LENGTH).
|
|
|
|
// The player's name is sent separately as the username ("uname"), and does not
|
|
|
|
// use a struct (gHostRfuUsername).
|
|
|
|
struct __attribute__((packed, aligned(2))) RfuGameData
|
2020-01-15 20:46:17 +00:00
|
|
|
{
|
2021-10-06 04:38:36 +01:00
|
|
|
struct RfuGameCompatibilityData compatibility;
|
|
|
|
u8 partnerInfo[RFU_CHILD_MAX];
|
|
|
|
u16 tradeSpecies:10;
|
|
|
|
u16 tradeType:6;
|
2020-02-16 18:49:36 +00:00
|
|
|
u8 activity:7;
|
2021-10-06 04:38:36 +01:00
|
|
|
u8 startedActivity:1;
|
2020-01-15 20:46:17 +00:00
|
|
|
u8 playerGender:1;
|
2021-10-06 04:38:36 +01:00
|
|
|
u8 tradeLevel:7;
|
2020-02-16 18:49:36 +00:00
|
|
|
u8 padding;
|
2021-10-06 04:38:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// Constants for getting/setting information in 'partnerInfo' of RfuGameData.
|
|
|
|
// This data is used to determine what the link partners look like from
|
|
|
|
// the host's perspective.
|
|
|
|
// Bits 0-2 are a shortened trainerId
|
|
|
|
// Bit 3 is the player's gender
|
|
|
|
// Bits 4-6 are unknown/unused
|
|
|
|
// Bit 7 is an 'active' flag
|
|
|
|
#define PINFO_TID_MASK 0x7
|
|
|
|
#define PINFO_GENDER_SHIFT 3
|
|
|
|
#define PINFO_ACTIVE_FLAG (1 << 7)
|
2020-01-15 20:46:17 +00:00
|
|
|
|
2020-06-06 21:46:19 +01:00
|
|
|
struct RfuBlockSend
|
2018-12-01 17:54:59 +00:00
|
|
|
{
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x00 */ u16 next;
|
|
|
|
/* 0x02 */ u16 count;
|
|
|
|
/* 0x04 */ const u8 *payload;
|
|
|
|
/* 0x08 */ u32 receivedFlags;
|
|
|
|
/* 0x0c */ u32 failedFlags;
|
|
|
|
/* 0x10 */ bool8 sending;
|
|
|
|
/* 0x11 */ u8 owner;
|
|
|
|
/* 0x12 */ u8 receiving;
|
2017-12-05 00:51:26 +00:00
|
|
|
};
|
|
|
|
|
2020-06-06 21:46:19 +01:00
|
|
|
struct RfuRecvQueue
|
2018-12-01 17:54:59 +00:00
|
|
|
{
|
2020-06-08 05:45:06 +01:00
|
|
|
/* 0x000 */ u8 slots[RECV_QUEUE_NUM_SLOTS][RECV_QUEUE_SLOT_LENGTH];
|
2020-06-07 22:37:09 +01:00
|
|
|
/* 0x8c0 */ vu8 recvSlot;
|
|
|
|
/* 0x8c1 */ vu8 sendSlot;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x8c2 */ vu8 count;
|
|
|
|
/* 0x8c3 */ vu8 full;
|
2017-12-01 03:56:56 +00:00
|
|
|
};
|
|
|
|
|
2020-06-06 21:46:19 +01:00
|
|
|
struct RfuSendQueue
|
2018-12-01 17:54:59 +00:00
|
|
|
{
|
2020-06-08 05:45:06 +01:00
|
|
|
/* 0x000 */ u8 slots[SEND_QUEUE_NUM_SLOTS][SEND_QUEUE_SLOT_LENGTH];
|
2020-06-07 22:37:09 +01:00
|
|
|
/* 0x230 */ vu8 recvSlot;
|
|
|
|
/* 0x231 */ vu8 sendSlot;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x232 */ vu8 count;
|
|
|
|
/* 0x233 */ vu8 full;
|
2017-12-01 03:56:56 +00:00
|
|
|
};
|
|
|
|
|
2020-06-07 22:37:09 +01:00
|
|
|
struct RfuBackupQueue
|
2018-12-01 17:54:59 +00:00
|
|
|
{
|
2020-06-08 05:45:06 +01:00
|
|
|
/* 0x00 */ u8 slots[BACKUP_QUEUE_NUM_SLOTS][BACKUP_QUEUE_SLOT_LENGTH];
|
2020-06-07 22:37:09 +01:00
|
|
|
/* 0x1c */ vu8 recvSlot;
|
|
|
|
/* 0x1d */ vu8 sendSlot;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x1e */ vu8 count;
|
2017-12-02 02:51:06 +00:00
|
|
|
};
|
|
|
|
|
2021-10-06 04:38:36 +01:00
|
|
|
// Stores data needed for the RFU on GF's end
|
|
|
|
struct RfuManager
|
2018-12-01 17:54:59 +00:00
|
|
|
{
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x000 */ void (*callback)(void);
|
|
|
|
/* 0x004 */ u16 state;
|
2018-01-20 23:43:58 +00:00
|
|
|
/* 0x006 */ u8 filler_06[4];
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x00a */ u16 linkmanMsg;
|
|
|
|
/* 0x00c */ u8 parentChild;
|
2017-11-19 05:02:15 +00:00
|
|
|
/* 0x00d */ u8 playerCount;
|
2020-06-08 05:45:06 +01:00
|
|
|
/* 0x00e */ bool8 unk_0e;
|
2018-01-20 23:43:58 +00:00
|
|
|
/* 0x00f */ u8 unk_0f;
|
|
|
|
/* 0x010 */ u16 unk_10;
|
|
|
|
/* 0x012 */ u16 unk_12;
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0x014 */ u8 childRecvBuffer[RFU_CHILD_MAX][CHILD_DATA_LENGTH];
|
|
|
|
/* 0x04c */ u8 childSendBuffer[CHILD_DATA_LENGTH];
|
2020-08-13 08:09:47 +01:00
|
|
|
/* 0x05a */ u8 blockRequestType;
|
2021-10-06 04:38:36 +01:00
|
|
|
/* 0x05b */ u8 blockSendAttempts;
|
2020-06-07 22:37:09 +01:00
|
|
|
/* 0x05c */ bool8 blockReceived[MAX_RFU_PLAYERS];
|
|
|
|
/* 0x061 */ bool8 numBlocksReceived[MAX_RFU_PLAYERS];
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x066 */ u8 idleTaskId;
|
|
|
|
/* 0x067 */ u8 searchTaskId;
|
2017-12-07 05:28:12 +00:00
|
|
|
/* 0x068 */ u8 filler_68[4];
|
2020-06-08 05:45:06 +01:00
|
|
|
/* 0x06c */ struct RfuBlockSend sendBlock;
|
|
|
|
/* 0x080 */ struct RfuBlockSend recvBlock[MAX_RFU_PLAYERS];
|
2020-08-13 08:09:47 +01:00
|
|
|
/* 0x0e4 */ bool8 readyCloseLink[MAX_RFU_PLAYERS];
|
|
|
|
/* 0x0e9 */ bool8 readyExitStandby[MAX_RFU_PLAYERS];
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x0ee */ vu8 errorState;
|
|
|
|
/* 0x0ef */ bool8 isShuttingDown;
|
|
|
|
/* 0x0f0 */ u8 linkLossRecoveryState;
|
2020-06-08 23:16:57 +01:00
|
|
|
/* 0x0f1 */ u8 status;
|
2020-08-24 19:52:33 +01:00
|
|
|
/* 0x0f2 */ u16 packet[RFU_PACKET_SIZE];
|
2020-08-13 08:09:47 +01:00
|
|
|
/* 0x0fe */ u16 resendExitStandbyTimer;
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0x100 */ u16 allReadyNum;
|
2018-01-18 18:18:24 +00:00
|
|
|
/* 0x102 */ u8 unk_102;
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0x103 */ u8 filler_103[7];
|
2021-10-06 04:38:36 +01:00
|
|
|
/* 0x10A */ struct RfuGameData parent;
|
2018-12-02 10:58:50 +00:00
|
|
|
u8 filler_;
|
2021-10-06 04:38:36 +01:00
|
|
|
u8 parentName[RFU_USER_NAME_LENGTH];
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0x124 */ struct RfuRecvQueue recvQueue;
|
|
|
|
/* 0x9e8 */ struct RfuSendQueue sendQueue;
|
2020-06-07 22:37:09 +01:00
|
|
|
/* 0xc1c */ struct RfuBackupQueue backupQueue;
|
|
|
|
/* 0xc3c */ vu8 linkRecovered;
|
2017-12-10 15:23:43 +00:00
|
|
|
/* 0xc3d */ u8 unk_c3d;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0xc3e */ vu8 childSlot;
|
2017-12-07 13:48:49 +00:00
|
|
|
/* 0xc3f */ u8 unk_c3f[70];
|
2021-10-06 04:38:36 +01:00
|
|
|
/* 0xc85 */ u8 leaveGroupStatus;
|
2020-06-08 23:16:57 +01:00
|
|
|
/* 0xc86 */ u8 recvStatus;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0xc87 */ u8 recvCmds[5][7][2];
|
|
|
|
/* 0xccd */ u8 parentId;
|
|
|
|
/* 0xcce */ u8 multiplayerId;
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0xccf */ u8 connectParentFailures;
|
|
|
|
/* 0xcd0 */ vu8 childSendCount;
|
2020-06-08 23:16:57 +01:00
|
|
|
/* 0xcd1 */ u8 partnerSendStatuses[RFU_CHILD_MAX];
|
|
|
|
/* 0xcd5 */ u8 partnerRecvStatuses[RFU_CHILD_MAX];
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0xcd9 */ bool8 stopNewConnections;
|
2017-12-08 01:21:30 +00:00
|
|
|
/* 0xcda */ u8 unk_cda;
|
2020-06-08 05:45:06 +01:00
|
|
|
/* 0xcdb */ vbool8 unk_cdb;
|
|
|
|
/* 0xcdc */ vbool8 unk_cdc;
|
2017-12-16 17:07:20 +00:00
|
|
|
/* 0xcdd */ u8 unk_cdd;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0xcde */ u8 linkPlayerIdx[RFU_CHILD_MAX];
|
2017-12-07 13:48:49 +00:00
|
|
|
/* 0xce2 */ u8 unk_ce2;
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0xce2 */ u8 disconnectSlots;
|
|
|
|
/* 0xce4 */ u8 disconnectMode;
|
2021-10-06 04:38:36 +01:00
|
|
|
/* 0xce5 */ u8 nextChildBits;
|
|
|
|
/* 0xce5 */ u8 newChildQueue;
|
2020-06-06 21:46:19 +01:00
|
|
|
/* 0xce7 */ u8 acceptSlot_flag;
|
2021-08-15 23:26:09 +01:00
|
|
|
/* 0xce8 */ bool8 unk_ce8;
|
2021-10-06 04:38:36 +01:00
|
|
|
/* 0xce9 */ u8 incomingChild;
|
2018-01-18 13:46:17 +00:00
|
|
|
/* 0xcea */ u8 unk_cea[4];
|
|
|
|
/* 0xcee */ u8 unk_cee[4];
|
2017-12-05 00:51:26 +00:00
|
|
|
}; // size = 0xcf4
|
2017-11-17 04:37:09 +00:00
|
|
|
|
2021-10-06 04:38:36 +01:00
|
|
|
extern struct RfuGameData gHostRfuGameData;
|
|
|
|
extern u8 gHostRfuUsername[];
|
|
|
|
extern struct RfuManager gRfu;
|
2019-01-04 22:55:03 +00:00
|
|
|
extern u8 gWirelessStatusIndicatorSpriteId;
|
2017-11-17 04:37:09 +00:00
|
|
|
|
2019-02-15 08:40:57 +00:00
|
|
|
void WipeTrainerNameRecords(void);
|
2020-06-08 05:45:06 +01:00
|
|
|
void InitRFUAPI(void);
|
2020-05-30 09:09:21 +01:00
|
|
|
void LinkRfu_Shutdown(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
void Rfu_SetBlockReceivedFlag(u8 who);
|
|
|
|
void Rfu_ResetBlockReceivedFlag(u8 who);
|
2019-02-10 08:54:50 +00:00
|
|
|
bool32 IsSendingKeysToRfu(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
void StartSendingKeysToRfu(void);
|
2020-08-24 19:52:33 +01:00
|
|
|
void Rfu_SetBerryBlenderLinkCallback(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
u8 Rfu_GetBlockReceivedStatus(void);
|
|
|
|
bool32 Rfu_InitBlockSend(const u8 *src, size_t size);
|
2019-10-05 15:41:37 +01:00
|
|
|
void ClearLinkRfuCallback(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
u8 Rfu_GetLinkPlayerCount(void);
|
|
|
|
u8 Rfu_GetMultiplayerId(void);
|
2020-08-13 08:09:47 +01:00
|
|
|
bool8 Rfu_SendBlockRequest(u8 type);
|
2019-10-09 10:56:44 +01:00
|
|
|
bool8 IsLinkRfuTaskFinished(void);
|
2017-11-13 03:09:11 +00:00
|
|
|
bool8 Rfu_IsMaster(void);
|
2020-08-13 08:09:47 +01:00
|
|
|
void Rfu_SetCloseLinkCallback(void);
|
|
|
|
void Rfu_SetLinkStandbyCallback(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
void ResetLinkRfuGFLayer(void);
|
2020-06-07 22:37:09 +01:00
|
|
|
void UpdateWirelessStatusIndicatorSprite(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
void InitRFU(void);
|
2021-07-12 01:42:05 +01:00
|
|
|
bool32 RfuMain1(void);
|
|
|
|
bool32 RfuMain2(void);
|
2020-06-08 23:16:57 +01:00
|
|
|
bool32 RfuHasErrored(void);
|
2019-02-10 08:54:50 +00:00
|
|
|
bool32 IsRfuRecvQueueEmpty(void);
|
|
|
|
u32 GetRfuRecvQueueLength(void);
|
2017-11-14 13:44:32 +00:00
|
|
|
void RfuVSync(void);
|
2021-08-15 23:26:09 +01:00
|
|
|
void RfuSetIgnoreError(bool32 enable);
|
2020-06-08 23:16:57 +01:00
|
|
|
u8 RfuGetStatus(void);
|
2021-10-06 04:38:36 +01:00
|
|
|
struct RfuGameData *GetHostRfuGameData(void);
|
|
|
|
void UpdateGameData_GroupLockedIn(u8 startedActivity);
|
2021-08-15 23:26:09 +01:00
|
|
|
void GetLinkmanErrorParams(u32 msg);
|
|
|
|
void RfuSetStatus(u8 status, u16 msg);
|
|
|
|
u8 Rfu_SetLinkRecovery(bool32 enable);
|
2021-10-06 04:38:36 +01:00
|
|
|
void CopyHostRfuGameDataAndUsername(struct RfuGameData *buff1, u8 *buff2);
|
|
|
|
void SetHostRfuGameData(u8 activity, u32 partnerInfo, bool32 startedActivity);
|
2020-05-30 09:09:21 +01:00
|
|
|
void InitializeRfuLinkManager_LinkLeader(u32 a0);
|
2021-07-12 01:42:05 +01:00
|
|
|
bool32 IsRfuCommunicatingWithAllChildren(void);
|
2020-05-30 09:09:21 +01:00
|
|
|
void LinkRfu_StopManagerAndFinalizeSlots(void);
|
2021-07-12 01:42:05 +01:00
|
|
|
bool32 RfuTryDisconnectLeavingChildren(void);
|
2020-06-08 23:16:57 +01:00
|
|
|
bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name);
|
|
|
|
void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name);
|
|
|
|
u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name);
|
2021-08-15 23:26:09 +01:00
|
|
|
void RequestDisconnectSlotByTrainerNameAndId(const u8 *name, u16 id);
|
2020-05-30 09:09:21 +01:00
|
|
|
bool8 LmanAcceptSlotFlagIsNotZero(void);
|
2021-08-15 23:26:09 +01:00
|
|
|
bool32 WaitRfuState(bool32 force);
|
|
|
|
void GetOtherPlayersInfoFlags(void);
|
2020-05-30 09:09:21 +01:00
|
|
|
void InitializeRfuLinkManager_JoinGroup(void);
|
2020-06-08 23:16:57 +01:00
|
|
|
void SendLeaveGroupNotice(void);
|
2019-02-15 08:40:57 +00:00
|
|
|
void RecordMixTrainerNames(void);
|
2020-05-30 09:09:21 +01:00
|
|
|
void LinkRfu_CreateConnectionAsParent(void);
|
|
|
|
void LinkRfu_StopManagerBeforeEnteringChat(void);
|
2021-10-06 04:38:36 +01:00
|
|
|
void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 startedActivity);
|
2020-05-30 09:09:21 +01:00
|
|
|
void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId);
|
2021-10-06 04:38:36 +01:00
|
|
|
void SetHostRfuWonderFlags(bool32 hasNews, bool32 hasCard);
|
|
|
|
void ResetHostRfuGameData(void);
|
2020-06-06 21:46:19 +01:00
|
|
|
void SetTradeBoardRegisteredMonInfo(u32 type, u32 species, u32 level);
|
2020-05-30 09:09:21 +01:00
|
|
|
void InitializeRfuLinkManager_EnterUnionRoom(void);
|
2021-10-06 04:38:36 +01:00
|
|
|
void TryConnectToUnionRoomParent(const u8 *name, struct RfuGameData *structPtr, u8 a2);
|
2020-05-30 09:09:21 +01:00
|
|
|
bool32 IsUnionRoomListenTaskActive(void);
|
2020-08-24 19:52:33 +01:00
|
|
|
void Rfu_SendPacket(void *data);
|
2020-05-30 09:09:21 +01:00
|
|
|
bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name);
|
2021-08-15 23:26:09 +01:00
|
|
|
void Rfu_DisconnectPlayerById(u32 playerIdx);
|
|
|
|
u8 GetLinkPlayerInfoFlags(s32 playerId);
|
2018-06-10 17:28:37 +01:00
|
|
|
void sub_800EF7C(void);
|
2021-10-06 04:38:36 +01:00
|
|
|
bool8 Rfu_GetCompatiblePlayerData(struct RfuGameData *player, u8 *username, u8 idx);
|
|
|
|
bool8 Rfu_GetWonderDistributorPlayerData(struct RfuGameData *player, u8 *username, u8 idx);
|
|
|
|
s32 Rfu_GetIndexOfNewestChild(u8 bits);
|
2020-06-06 21:46:19 +01:00
|
|
|
void CreateTask_RfuIdle(void);
|
|
|
|
void DestroyTask_RfuIdle(void);
|
2021-03-01 06:54:51 +00:00
|
|
|
void ClearRecvCommands(void);
|
2019-04-03 14:55:17 +01:00
|
|
|
void LinkRfu_FatalError(void);
|
2019-03-27 00:03:46 +00:00
|
|
|
bool32 sub_8011A9C(void);
|
2021-08-15 23:26:09 +01:00
|
|
|
void Rfu_StopPartnerSearch(void);
|
|
|
|
void RfuSetNormalDisconnectMode(void);
|
|
|
|
void SetUnionRoomChatPlayerData(u32 numPlayers);
|
2020-06-07 22:37:09 +01:00
|
|
|
bool32 IsRfuSerialNumberValid(u32 serialNo);
|
|
|
|
bool8 IsRfuRecoveringFromLinkLoss(void);
|
|
|
|
void RfuRecvQueue_Reset(struct RfuRecvQueue *queue);
|
|
|
|
void RfuSendQueue_Reset(struct RfuSendQueue *queue);
|
|
|
|
void RfuRecvQueue_Enqueue(struct RfuRecvQueue *queue, u8 *data);
|
|
|
|
void RfuSendQueue_Enqueue(struct RfuSendQueue *queue, u8 *data);
|
|
|
|
bool8 RfuRecvQueue_Dequeue(struct RfuRecvQueue *queue, u8 *dest);
|
|
|
|
bool8 RfuSendQueue_Dequeue(struct RfuSendQueue *queue, u8 *dest);
|
|
|
|
void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *q2);
|
|
|
|
bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *q2);
|
2021-10-06 04:38:36 +01:00
|
|
|
void InitHostRfuGameData(struct RfuGameData *data, u8 activity, bool32 startedActivity, s32 partnerInfo);
|
2020-02-16 18:49:36 +00:00
|
|
|
void CreateWirelessStatusIndicatorSprite(u8 x, u8 y);
|
|
|
|
void DestroyWirelessStatusIndicatorSprite(void);
|
|
|
|
void LoadWirelessStatusIndicatorSpriteGfx(void);
|
2017-11-11 03:08:17 +00:00
|
|
|
|
|
|
|
#endif //GUARD_LINK_RFU_H
|