mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Second pass on documenting union room
This commit is contained in:
parent
35867f531b
commit
2859900ea9
@ -884,26 +884,26 @@ BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader:: @ 823F3F3
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader:: @ 823F430
|
||||
call CableClub_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryBecomeLeader
|
||||
compare VAR_RESULT, 11
|
||||
compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink
|
||||
release
|
||||
return
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup:: @ 823F463
|
||||
call CableClub_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_ChooseLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_TryJoinGroup
|
||||
compare VAR_RESULT, 11
|
||||
compare VAR_RESULT, LINKUP_FAILED_BATTLE_TOWER
|
||||
goto_if_eq BattleFrontier_BattleTowerLobby_EventScript_AbortLink
|
||||
release
|
||||
return
|
||||
|
@ -889,22 +889,22 @@ LilycoveCity_ContestLobby_EventScript_DecideLinkLeader:: @ 821ABA6
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_TryLeadGroup:: @ 821ABE3
|
||||
call LilycoveCity_ContestLobby_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_TryLeadGroup
|
||||
release
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_TryJoinGroup:: @ 821AC0B
|
||||
call LilycoveCity_ContestLobby_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_LinkLeaderDecided
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_DecideLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq LilycoveCity_ContestLobby_EventScript_TryJoinGroup
|
||||
release
|
||||
end
|
||||
|
@ -20,7 +20,7 @@ UnionRoom_OnResume: @ 823D1B1
|
||||
removeobject 5
|
||||
removeobject 4
|
||||
removeobject 3
|
||||
special UnionRoomSpecial
|
||||
special RunUnionRoom
|
||||
end
|
||||
|
||||
UnionRoom_OnTransition: @ 823D1E5
|
||||
@ -29,7 +29,7 @@ UnionRoom_OnTransition: @ 823D1E5
|
||||
UnionRoom_EventScript_Player1:: @ 823D1E6
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 1
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_1
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -37,7 +37,7 @@ UnionRoom_EventScript_Player1:: @ 823D1E6
|
||||
UnionRoom_EventScript_Player2:: @ 823D1F0
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 2
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_2
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -45,7 +45,7 @@ UnionRoom_EventScript_Player2:: @ 823D1F0
|
||||
UnionRoom_EventScript_Player3:: @ 823D1FA
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 3
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_3
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -53,7 +53,7 @@ UnionRoom_EventScript_Player3:: @ 823D1FA
|
||||
UnionRoom_EventScript_Player4:: @ 823D204
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 4
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_4
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -61,7 +61,7 @@ UnionRoom_EventScript_Player4:: @ 823D204
|
||||
UnionRoom_EventScript_Player5:: @ 823D20E
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 5
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_5
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -69,7 +69,7 @@ UnionRoom_EventScript_Player5:: @ 823D20E
|
||||
UnionRoom_EventScript_Player6:: @ 823D218
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 6
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_6
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -77,7 +77,7 @@ UnionRoom_EventScript_Player6:: @ 823D218
|
||||
UnionRoom_EventScript_Player7:: @ 823D222
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 7
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_7
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -85,7 +85,7 @@ UnionRoom_EventScript_Player7:: @ 823D222
|
||||
UnionRoom_EventScript_Player8:: @ 823D22C
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 8
|
||||
setvar VAR_RESULT, UR_INTERACT_PLAYER_8
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
@ -93,14 +93,14 @@ UnionRoom_EventScript_Player8:: @ 823D22C
|
||||
UnionRoom_EventScript_Attendant:: @ 823D236
|
||||
lock
|
||||
faceplayer
|
||||
setvar VAR_RESULT, 9
|
||||
setvar VAR_RESULT, UR_INTERACT_ATTENDANT
|
||||
waitstate
|
||||
release
|
||||
end
|
||||
|
||||
UnionRoom_EventScript_Unused:: @ 823D240
|
||||
lockall
|
||||
setvar VAR_RESULT, 10
|
||||
setvar VAR_RESULT, UR_INTERACT_UNUSED
|
||||
waitstate
|
||||
releaseall
|
||||
end
|
||||
|
@ -712,22 +712,22 @@ BerryBlender_EventScript_DecideLinkLeader: @ 82941F8
|
||||
|
||||
BerryBlender_EventScript_TryLeadGroup: @ 8294235
|
||||
call BerryBlender_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq BerryBlender_EventScript_LinkLeaderDecided
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq BerryBlender_EventScript_DecideLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq BerryBlender_EventScript_TryLeadGroup
|
||||
release
|
||||
end
|
||||
|
||||
BerryBlender_EventScript_TryJoinGroup: @ 829425D
|
||||
call BerryBlender_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq BerryBlender_EventScript_LinkLeaderDecided
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq BerryBlender_EventScript_DecideLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq BerryBlender_EventScript_TryJoinGroup
|
||||
release
|
||||
end
|
||||
|
@ -349,17 +349,17 @@ CableClub_EventScript_TryEnterColosseum:: @ 8276F60
|
||||
waitmessage
|
||||
special TryBattleLinkup
|
||||
waitstate
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterColosseum
|
||||
compare VAR_RESULT, 2
|
||||
compare VAR_RESULT, LINKUP_SOMEONE_NOT_READY
|
||||
goto_if_eq CableClub_EventScript_AbortLinkSomeoneNotReady
|
||||
compare VAR_RESULT, 3
|
||||
compare VAR_RESULT, LINKUP_DIFF_SELECTIONS
|
||||
goto_if_eq CableClub_EventScript_AbortLinkDifferentSelections
|
||||
compare VAR_RESULT, 4
|
||||
compare VAR_RESULT, LINKUP_WRONG_NUM_PLAYERS
|
||||
goto_if_eq CableClub_EventScript_AbortLinkIncorrectNumberOfBattlers
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_AbortLink
|
||||
compare VAR_RESULT, 6
|
||||
compare VAR_RESULT, LINKUP_CONNECTION_ERROR
|
||||
goto_if_eq CableClub_EventScript_AbortLinkConnectionError
|
||||
end
|
||||
|
||||
@ -972,7 +972,7 @@ CableClub_EventScript_EnterUnionRoom:: @ 827759F
|
||||
special SetCableClubWarp
|
||||
warpteleport2 MAP_UNION_ROOM, 255, 7, 11
|
||||
waitstate
|
||||
special UnionRoomSpecial
|
||||
special RunUnionRoom
|
||||
waitstate
|
||||
end
|
||||
|
||||
@ -1181,22 +1181,22 @@ CableClub_EventScript_ChooseLinkLeaderFrom2:: @ 8277989
|
||||
|
||||
CableClub_EventScript_TryLeadGroup2Players:: @ 82779C6
|
||||
call CableClub_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq CableClub_EventScript_TryLeadGroup2Players
|
||||
release
|
||||
return
|
||||
|
||||
CableClub_EventScript_TryJoinGroup2Players:: @ 82779EE
|
||||
call CableClub_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom2
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq CableClub_EventScript_TryJoinGroup2Players
|
||||
release
|
||||
return
|
||||
@ -1214,22 +1214,22 @@ CableClub_EventScript_ChooseLinkLeaderFrom4:: @ 8277A16
|
||||
|
||||
CableClub_EventScript_TryLeadGroup4Players:: @ 8277A53
|
||||
call CableClub_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq CableClub_EventScript_TryLeadGroup4Players
|
||||
release
|
||||
return
|
||||
|
||||
CableClub_EventScript_TryJoinGroup4Players:: @ 8277A7B
|
||||
call CableClub_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_ChooseLinkLeaderFrom4
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq CableClub_EventScript_TryJoinGroup4Players
|
||||
release
|
||||
return
|
||||
@ -1247,22 +1247,22 @@ CableClub_EventScript_ChooseLinkLeader:: @ 8277AA3
|
||||
|
||||
CableClub_EventScript_TryLeadGroupXPlayers:: @ 8277AE0
|
||||
call CableClub_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_ChooseLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq CableClub_EventScript_TryLeadGroupXPlayers
|
||||
release
|
||||
return
|
||||
|
||||
CableClub_EventScript_TryJoinGroupXPlayers:: @ 8277B08
|
||||
call CableClub_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq CableClub_EventScript_EnterWirelessLinkRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq CableClub_EventScript_ChooseLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq CableClub_EventScript_TryJoinGroupXPlayers
|
||||
release
|
||||
return
|
||||
@ -1453,22 +1453,22 @@ MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader:: @ 8277D81
|
||||
|
||||
MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader:: @ 8277DBE
|
||||
call CableClub_EventScript_TryBecomeLinkLeader
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryBecomeLinkLeader
|
||||
release
|
||||
return
|
||||
|
||||
MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup:: @ 8277DE6
|
||||
call CableClub_EventScript_TryJoinLinkGroup
|
||||
compare VAR_RESULT, 1
|
||||
compare VAR_RESULT, LINKUP_SUCCESS
|
||||
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_EnterMinigameRoom
|
||||
compare VAR_RESULT, 5
|
||||
compare VAR_RESULT, LINKUP_FAILED
|
||||
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_ChooseLinkLeader
|
||||
compare VAR_RESULT, 8
|
||||
compare VAR_RESULT, LINKUP_RETRY_ROLE_ASSIGN
|
||||
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_TryJoinLinkGroup
|
||||
release
|
||||
return
|
||||
|
@ -426,7 +426,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special IsWirelessAdapterConnected
|
||||
def_special TryBecomeLinkLeader
|
||||
def_special TryJoinLinkGroup
|
||||
def_special UnionRoomSpecial
|
||||
def_special RunUnionRoom
|
||||
def_special ShowWirelessCommunicationScreen
|
||||
def_special InitUnionRoom
|
||||
def_special BufferUnionRoomPlayerName
|
||||
|
@ -12,6 +12,8 @@
|
||||
#define USING_MINIGAME 8
|
||||
#define USING_BATTLE_TOWER 9
|
||||
|
||||
// Return states for the group of specials that use CreateLinkupTask
|
||||
// A few also used by TryBecomeLinkLeader and TryJoinLinkGroup
|
||||
#define LINKUP_ONGOING 0
|
||||
#define LINKUP_SUCCESS 1
|
||||
#define LINKUP_SOMEONE_NOT_READY 2
|
||||
@ -20,7 +22,7 @@
|
||||
#define LINKUP_FAILED 5
|
||||
#define LINKUP_CONNECTION_ERROR 6
|
||||
#define LINKUP_PLAYER_NOT_READY 7
|
||||
#define LINKUP_UNK8 8
|
||||
#define LINKUP_RETRY_ROLE_ASSIGN 8
|
||||
#define LINKUP_PARTNER_NOT_READY 9
|
||||
#define LINKUP_FAILED_CONTEST_GMODE 10
|
||||
#define LINKUP_FAILED_BATTLE_TOWER 11
|
||||
|
@ -44,7 +44,7 @@
|
||||
#define ACTIVITY_BATTLE_TOWER 28
|
||||
#define ACTIVITY_29 29
|
||||
|
||||
#define IN_UNION_ROOM 0x40
|
||||
#define IN_UNION_ROOM (1 << 6)
|
||||
|
||||
// Used in UR_AddTextPrinterParameterized
|
||||
#define UR_COLOR_DKE_WHT_LTE 0
|
||||
@ -83,4 +83,20 @@
|
||||
#define UR_TRADE_NOTYPE 1
|
||||
#define UR_TRADE_NOEGG 2
|
||||
|
||||
#define UR_TRADE_READY 0
|
||||
#define UR_TRADE_PLAYER_NOT_READY 1
|
||||
#define UR_TRADE_PARTNER_NOT_READY 2
|
||||
|
||||
#define UR_INTERACT_PLAYER_1 1
|
||||
#define UR_INTERACT_PLAYER_2 2
|
||||
#define UR_INTERACT_PLAYER_3 3
|
||||
#define UR_INTERACT_PLAYER_4 4
|
||||
#define UR_INTERACT_PLAYER_5 5
|
||||
#define UR_INTERACT_PLAYER_6 6
|
||||
#define UR_INTERACT_PLAYER_7 7
|
||||
#define UR_INTERACT_PLAYER_8 8
|
||||
#define UR_INTERACT_ATTENDANT 9
|
||||
#define UR_INTERACT_UNUSED 10
|
||||
#define UR_INTERACT_START_MENU 11
|
||||
|
||||
#endif //GUARD_CONSTANTS_UNION_ROOM_H
|
||||
|
@ -29,6 +29,20 @@
|
||||
#define BACKUP_QUEUE_NUM_SLOTS 2
|
||||
#define BACKUP_QUEUE_SLOT_LENGTH 14
|
||||
|
||||
#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
|
||||
#define RFU_STATUS_10 10
|
||||
#define RFU_STATUS_11 11
|
||||
#define RFU_STATUS_ACK_JOIN_GROUP 12
|
||||
|
||||
// RfuTgtData.gname is read as these structs.
|
||||
struct GFtgtGnameSub
|
||||
{
|
||||
@ -125,7 +139,7 @@ struct GFRfuManager
|
||||
/* 0x0ee */ vu8 errorState;
|
||||
/* 0x0ef */ bool8 isShuttingDown;
|
||||
/* 0x0f0 */ u8 linkLossRecoveryState;
|
||||
/* 0x0f1 */ u8 errorStatus;
|
||||
/* 0x0f1 */ u8 status;
|
||||
/* 0x0f2 */ u16 unk_f2[6];
|
||||
/* 0x0fe */ u16 unk_fe;
|
||||
/* 0x100 */ u16 unk_100;
|
||||
@ -142,14 +156,14 @@ struct GFRfuManager
|
||||
/* 0xc3e */ vu8 childSlot;
|
||||
/* 0xc3f */ u8 unk_c3f[70];
|
||||
/* 0xc85 */ u8 unk_c85;
|
||||
/* 0xc86 */ u8 unk_c86;
|
||||
/* 0xc86 */ u8 recvStatus;
|
||||
/* 0xc87 */ u8 recvCmds[5][7][2];
|
||||
/* 0xccd */ u8 parentId;
|
||||
/* 0xcce */ u8 multiplayerId;
|
||||
/* 0xccf */ u8 unk_ccf;
|
||||
/* 0xcd0 */ vu8 unk_cd0;
|
||||
/* 0xcd1 */ u8 unk_cd1[4];
|
||||
/* 0xcd5 */ u8 unk_cd5[4];
|
||||
/* 0xcd1 */ u8 partnerSendStatuses[RFU_CHILD_MAX];
|
||||
/* 0xcd5 */ u8 partnerRecvStatuses[RFU_CHILD_MAX];
|
||||
/* 0xcd9 */ u8 unk_cd9;
|
||||
/* 0xcda */ u8 unk_cda;
|
||||
/* 0xcdb */ vbool8 unk_cdb;
|
||||
@ -199,36 +213,36 @@ void UpdateWirelessStatusIndicatorSprite(void);
|
||||
void InitRFU(void);
|
||||
bool32 sub_8010EC0(void);
|
||||
bool32 sub_8010F1C(void);
|
||||
bool32 RfuIsErrorStatus1or2(void);
|
||||
bool32 RfuHasErrored(void);
|
||||
bool32 IsRfuRecvQueueEmpty(void);
|
||||
u32 GetRfuRecvQueueLength(void);
|
||||
void RfuVSync(void);
|
||||
void sub_80111B0(bool32 a0);
|
||||
u8 RfuGetErrorStatus(void);
|
||||
u8 RfuGetStatus(void);
|
||||
struct GFtgtGname *GetHostRFUtgtGname(void);
|
||||
void UpdateGameData_GroupLockedIn(u8 a0);
|
||||
void GetLinkmanErrorParams(u32 a0);
|
||||
void RfuSetErrorStatus(u8 a0, u16 a1);
|
||||
void RfuSetStatus(u8 a0, u16 a1);
|
||||
u8 sub_801048C(bool32 a0);
|
||||
void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *buff1, u8 *buff2);
|
||||
void SetHostRFUtgtGname(u8 a0, u32 a1, u32 a2);
|
||||
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started);
|
||||
void InitializeRfuLinkManager_LinkLeader(u32 a0);
|
||||
bool32 sub_8012240(void);
|
||||
void LinkRfu_StopManagerAndFinalizeSlots(void);
|
||||
bool32 sub_80105EC(void);
|
||||
bool32 TrainerIdAndNameStillInPartnersList(u16 a0, const u8 *a1);
|
||||
void SendByteToPartnerByIdAndName(u8 a0, u16 a1, const u8 *a2);
|
||||
u32 WaitSendByteToPartnerByIdAndName(u16 a0, const u8 *a1);
|
||||
bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name);
|
||||
void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name);
|
||||
u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name);
|
||||
void RequestDisconnectSlotByTrainerNameAndId(const u8 *a0, u16 a1);
|
||||
bool8 LmanAcceptSlotFlagIsNotZero(void);
|
||||
bool32 WaitRfuState(bool32 a0);
|
||||
void sub_801103C(void);
|
||||
void InitializeRfuLinkManager_JoinGroup(void);
|
||||
void LinkRfuNIsend8(void);
|
||||
void SendLeaveGroupNotice(void);
|
||||
void RecordMixTrainerNames(void);
|
||||
void LinkRfu_CreateConnectionAsParent(void);
|
||||
void LinkRfu_StopManagerBeforeEnteringChat(void);
|
||||
void UpdateGameDataWithActivitySpriteGendersFlag(u8 a0, u32 a1, u32 a2);
|
||||
void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started);
|
||||
void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId);
|
||||
void SetGnameBufferWonderFlags(bool32 a0, bool32 a1);
|
||||
void ClearAndInitHostRFUtgtGname(void);
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define GUARD_UNION_ROOM_H
|
||||
|
||||
#include "link_rfu.h"
|
||||
#include "link.h"
|
||||
#include "constants/union_room.h"
|
||||
|
||||
// Exported type declarations
|
||||
@ -12,22 +13,20 @@ struct WirelessGnameUnamePair
|
||||
u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1];
|
||||
};
|
||||
|
||||
struct UnkStruct_x1C // WirelessLink_Member?
|
||||
struct UnkStruct_x1C
|
||||
{
|
||||
struct WirelessGnameUnamePair gname_uname;
|
||||
u8 active:1;
|
||||
};
|
||||
|
||||
struct UnkStruct_x20 // WirelessLink_Member?
|
||||
struct UnkStruct_x20
|
||||
{
|
||||
struct WirelessGnameUnamePair gname_uname;
|
||||
u16 field_18;
|
||||
u16 timeoutCounter;
|
||||
u8 groupScheduledAnim:2;
|
||||
u8 field_1A_1:1;
|
||||
bool8 useRedText:1; // Never set
|
||||
u8 field_1B;
|
||||
u8 field_1D;
|
||||
u8 field_1E;
|
||||
u8 field_1F;
|
||||
u8 filler[3];
|
||||
};
|
||||
|
||||
struct UnkStruct_Main0
|
||||
@ -37,12 +36,12 @@ struct UnkStruct_Main0
|
||||
|
||||
struct UnkStruct_Main4
|
||||
{
|
||||
struct UnkStruct_x1C arr[5];
|
||||
struct UnkStruct_x1C arr[MAX_RFU_PLAYERS];
|
||||
};
|
||||
|
||||
struct UnkStruct_Main8
|
||||
{
|
||||
struct UnkStruct_x20 arr[5];
|
||||
struct UnkStruct_x20 arr[MAX_RFU_PLAYERS];
|
||||
};
|
||||
|
||||
struct WirelessLink_Leader
|
||||
@ -62,8 +61,8 @@ struct WirelessLink_Leader
|
||||
u8 field_16;
|
||||
u8 listenTaskId;
|
||||
u8 activity;
|
||||
u8 field_19;
|
||||
u16 field_1A;
|
||||
u8 joinRequestAnswer;
|
||||
u16 memberConfirmTimeout;
|
||||
};
|
||||
|
||||
struct WirelessLink_Group
|
||||
@ -100,32 +99,29 @@ struct WirelessLink_URoom
|
||||
struct UnkStruct_Main4 *field_4;
|
||||
struct UnkStruct_Main0 *field_8;
|
||||
struct UnkStruct_Main4 *field_C;
|
||||
u16 field_10;
|
||||
u16 unknown; // Never read
|
||||
u16 field_12;
|
||||
u8 state;
|
||||
u8 stateAfterPrint;
|
||||
u8 textState;
|
||||
u8 field_17;
|
||||
u8 field_18;
|
||||
u8 field_19;
|
||||
u8 field_1A;
|
||||
u8 filler[4];
|
||||
u8 topListMenuWindowId;
|
||||
u8 topListMenuId;
|
||||
u8 tradeBoardSelectWindowId;
|
||||
u8 tradeBoardDetailsWindowId;
|
||||
u8 field_1F;
|
||||
u8 field_20;
|
||||
u8 unused1;
|
||||
u8 searchTaskId;
|
||||
u8 spriteIds[40];
|
||||
u8 field_49;
|
||||
u8 field_4A;
|
||||
u8 unused2;
|
||||
u8 tradeBoardListMenuId;
|
||||
u16 playerSendBuffer[6];
|
||||
u8 activityRequestStrbufs[4][16];
|
||||
u16 partnerYesNoResponse;
|
||||
u16 recvActivityRequest[3];
|
||||
struct UnionRoomObject objects[MAX_UNION_ROOM_PLAYERS];
|
||||
u8 field_C0[12][15];
|
||||
u8 field_174[48];
|
||||
u8 field_1A4[200];
|
||||
u8 trainerCardStrBuffer[12][15];
|
||||
u8 trainerCardColorStrBuffer[48];
|
||||
u8 trainerCardMsgStrBuffer[200];
|
||||
};
|
||||
|
||||
union WirelessLink_Main
|
||||
@ -137,16 +133,16 @@ union WirelessLink_Main
|
||||
|
||||
struct UnionRoomTrade
|
||||
{
|
||||
u16 field_0;
|
||||
u16 state;
|
||||
u16 type;
|
||||
u32 playerPersonality;
|
||||
u8 field_8;
|
||||
u8 field_9;
|
||||
u8 offerPlayerId;
|
||||
u8 filler1;
|
||||
u16 playerSpecies;
|
||||
u16 playerLevel;
|
||||
u16 species;
|
||||
u16 level;
|
||||
u16 field_12;
|
||||
u16 filler2;
|
||||
u32 personality;
|
||||
};
|
||||
|
||||
@ -162,7 +158,7 @@ extern u8 gUnionRoomRequestedMonType;
|
||||
// Exported ROM declarations
|
||||
|
||||
u8 CreateTask_CreateTradeMenu(void);
|
||||
void var_800D_set_xB(void);
|
||||
void SetUsingUnionRoomStartMenu(void);
|
||||
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0);
|
||||
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0);
|
||||
void MEvent_CreateTask_Leader(u32 arg0);
|
||||
|
@ -8,7 +8,7 @@ void DestroyGroupMemberSprites(u8 *spriteIds);
|
||||
void SetTilesAroundUnionRoomPlayersPassable(void);
|
||||
void ScheduleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom);
|
||||
void HandleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom);
|
||||
bool32 TrySetUnionRoomMemberFacePlayer(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds);
|
||||
bool32 TryInteractWithUnionRoomMember(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds);
|
||||
void UpdateUnionRoomMemberFacing(u32 currDirection, u32 playerIdx, struct UnkStruct_Main0 *main0);
|
||||
|
||||
#endif //GUARD_UNION_ROOM_PLAYER_AVATAR_H
|
||||
|
@ -99,15 +99,15 @@ ALIGNED(4) const u8 sText_OtherTrainerUnavailableNow[] = _("The other TRAINER do
|
||||
ALIGNED(4) const u8 sText_CantTransmitTrainerTooFar[] = _("You can't transmit with a TRAINER\nwho is too far away.\p");
|
||||
ALIGNED(4) const u8 sText_TrainersNotReadyYet[] = _("The other TRAINER(S) is/are not\nready yet.\p");
|
||||
|
||||
const u8 *const sCantTransmitToTrainerTexts[] = {
|
||||
sText_CantTransmitTrainerTooFar,
|
||||
sText_TrainersNotReadyYet
|
||||
static const u8 *const sCantTransmitToTrainerTexts[] = {
|
||||
[UR_TRADE_PLAYER_NOT_READY - 1] = sText_CantTransmitTrainerTooFar,
|
||||
[UR_TRADE_PARTNER_NOT_READY - 1] = sText_TrainersNotReadyYet
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 sText_ModeWithTheseMembersWillBeCanceled[] = _("The {STR_VAR_1} MODE with\nthese members will be canceled.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 sText_MemberNoLongerAvailable[] = _("There is a member who can no\nlonger remain available.\p");
|
||||
|
||||
const u8 *const sPlayerUnavailableTexts[] = {
|
||||
static const u8 *const sPlayerUnavailableTexts[] = {
|
||||
sText_OtherTrainerUnavailableNow,
|
||||
sText_MemberNoLongerAvailable
|
||||
};
|
||||
@ -120,17 +120,17 @@ ALIGNED(4) const u8 sText_AwaitingOtherMembers[] = _("{STR_VAR_1}!\nAwaiting oth
|
||||
ALIGNED(4) const u8 sText_QuitBeingMember[] = _("Quit being a member?");
|
||||
ALIGNED(4) const u8 sText_StoppedBeingMember[] = _("You stopped being a member.\p");
|
||||
|
||||
const u8 *const sPlayerDisconnectedTexts[] = {
|
||||
NULL,
|
||||
sText_MemberNoLongerAvailable,
|
||||
sText_TrainerAppearsUnavailable,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
sText_PlayerRepliedNo,
|
||||
NULL,
|
||||
NULL,
|
||||
sText_StoppedBeingMember
|
||||
static const u8 *const sPlayerDisconnectedTexts[] = {
|
||||
[RFU_STATUS_OK] = NULL,
|
||||
[RFU_STATUS_FATAL_ERROR] = sText_MemberNoLongerAvailable,
|
||||
[RFU_STATUS_CONNECTION_ERROR] = sText_TrainerAppearsUnavailable,
|
||||
[RFU_STATUS_CHILD_SEND_COMPLETE] = NULL,
|
||||
[RFU_STATUS_NEW_CHILD_DETECTED] = NULL,
|
||||
[RFU_STATUS_JOIN_GROUP_OK] = NULL,
|
||||
[RFU_STATUS_JOIN_GROUP_NO] = sText_PlayerRepliedNo,
|
||||
[RFU_STATUS_WAIT_ACK_JOIN_GROUP] = NULL,
|
||||
[RFU_STATUS_LEAVE_GROUP_NOTICE] = NULL,
|
||||
[RFU_STATUS_LEAVE_GROUP] = sText_StoppedBeingMember
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 sText_WirelessLinkEstablished[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been established.");
|
||||
@ -139,16 +139,16 @@ ALIGNED(4) const u8 sText_LinkWithFriendDropped[] = _("The link with your friend
|
||||
ALIGNED(4) const u8 sText_PlayerRepliedNo2[] = _("{STR_VAR_1} replied, “No…”");
|
||||
|
||||
const u8 *const sLinkDroppedTexts[] = {
|
||||
NULL,
|
||||
sText_LinkWithFriendDropped,
|
||||
sText_LinkWithFriendDropped,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
sText_PlayerRepliedNo2,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
[RFU_STATUS_OK] = NULL,
|
||||
[RFU_STATUS_FATAL_ERROR] = sText_LinkWithFriendDropped,
|
||||
[RFU_STATUS_CONNECTION_ERROR] = sText_LinkWithFriendDropped,
|
||||
[RFU_STATUS_CHILD_SEND_COMPLETE] = NULL,
|
||||
[RFU_STATUS_NEW_CHILD_DETECTED] = NULL,
|
||||
[RFU_STATUS_JOIN_GROUP_OK] = NULL,
|
||||
[RFU_STATUS_JOIN_GROUP_NO] = sText_PlayerRepliedNo2,
|
||||
[RFU_STATUS_WAIT_ACK_JOIN_GROUP] = NULL,
|
||||
[RFU_STATUS_LEAVE_GROUP_NOTICE] = NULL,
|
||||
[RFU_STATUS_LEAVE_GROUP] = NULL
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 sText_DoYouWantXMode[] = _("Do you want the {STR_VAR_2}\nMODE?");
|
||||
@ -260,7 +260,7 @@ ALIGNED(4) const u8 sText_WaitForBattleFemale[] = _("A battle? Of course, but I
|
||||
ALIGNED(4) const u8 sText_WaitForChatFemale[] = _("Did you want to chat?\nOkay, but please wait a moment.");
|
||||
ALIGNED(4) const u8 sText_ShowTrainerCardFemale[] = _("As my introduction, I'll show you\nmy TRAINER CARD.");
|
||||
|
||||
const u8 *const sText_WaitOrShowCardTexts[GENDER_COUNT][4] = {
|
||||
static const u8 *const sText_WaitOrShowCardTexts[GENDER_COUNT][4] = {
|
||||
{
|
||||
sText_WaitForBattleMale,
|
||||
sText_WaitForChatMale,
|
||||
@ -283,7 +283,7 @@ ALIGNED(4) const u8 sText_TradeWillBeStarted[] = _("The trade will be started.{P
|
||||
ALIGNED(4) const u8 sText_BattleWillBeStarted[] = _("The battle will be started.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 sText_EnteringChat[] = _("Entering the chat…{PAUSE 60}");
|
||||
|
||||
const u8 *const sStartActivityTexts[][GENDER_COUNT][3] = {
|
||||
static const u8 *const sStartActivityTexts[][GENDER_COUNT][3] = {
|
||||
{
|
||||
{
|
||||
sText_BattleWillBeStarted,
|
||||
@ -334,18 +334,21 @@ const u8 *const sIfYouWantToDoSomethingTexts[GENDER_COUNT] = {
|
||||
ALIGNED(4) const u8 sText_TrainerBattleBusy[] = _("Whoops! Sorry, but I have to do\nsomething else.\lAnother time, okay?\p");
|
||||
ALIGNED(4) const u8 sText_NeedTwoMonsOfLevel30OrLower1[] = _("If you want to battle, you need\ntwo POKéMON that are below\lLv. 30.\p");
|
||||
ALIGNED(4) const u8 sText_NeedTwoMonsOfLevel30OrLower2[] = _("For a battle, you need two\nPOKéMON that are below Lv. 30.\p");
|
||||
ALIGNED(4) const u8 sText_DeclineBattleMale[] = _("Oh, all right.\nCome see me anytime, okay?\p");
|
||||
ALIGNED(4) const u8 stext_DeclineBattleFemale[] = _("Oh…\nPlease come by anytime.\p");
|
||||
|
||||
static const u8 *const sDeclineBattleTexts[GENDER_COUNT] = {
|
||||
sText_DeclineBattleMale,
|
||||
stext_DeclineBattleFemale
|
||||
ALIGNED(4) const u8 sText_DeclineChatMale[] = _("Oh, all right.\nCome see me anytime, okay?\p");
|
||||
ALIGNED(4) const u8 stext_DeclineChatFemale[] = _("Oh…\nPlease come by anytime.\p");
|
||||
|
||||
// Response from partner when player declines chat
|
||||
static const u8 *const sDeclineChatTexts[GENDER_COUNT] = {
|
||||
sText_DeclineChatMale,
|
||||
stext_DeclineChatFemale
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 sText_ChatDeclinedMale[] = _("Oh, sorry!\nI just can't right this instant.\lLet's chat another time.\p");
|
||||
ALIGNED(4) const u8 sText_ChatDeclinedFemale[] = _("Oh, I'm sorry.\nI have too much to do right now.\lLet's chat some other time.\p");
|
||||
|
||||
const u8 *const sChatDeclinedTexts[GENDER_COUNT] = {
|
||||
// Response from partner when they decline chat
|
||||
static const u8 *const sChatDeclinedTexts[GENDER_COUNT] = {
|
||||
sText_ChatDeclinedMale,
|
||||
sText_ChatDeclinedFemale
|
||||
};
|
||||
@ -576,36 +579,36 @@ const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = {
|
||||
|
||||
ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}");
|
||||
|
||||
const u8 *const sLinkGroupActivityTexts[] = {
|
||||
sText_EmptyString,
|
||||
sText_SingleBattle,
|
||||
sText_DoubleBattle,
|
||||
sText_MultiBattle,
|
||||
sText_PokemonTrades,
|
||||
sText_Chat,
|
||||
sText_WonderCards,
|
||||
sText_WonderNews,
|
||||
sText_Cards,
|
||||
sText_PokemonJump,
|
||||
sText_BerryCrush,
|
||||
sText_BerryPicking,
|
||||
sText_Search,
|
||||
sText_EmptyString,
|
||||
sText_BattleTowerOpenLv,
|
||||
sText_RecordCorner,
|
||||
sText_BerryBlender,
|
||||
sText_EmptyString,
|
||||
sText_EmptyString,
|
||||
sText_EmptyString,
|
||||
sText_EmptyString,
|
||||
sText_WonderCards,
|
||||
sText_WonderNews,
|
||||
sText_CoolContest,
|
||||
sText_BeautyContest,
|
||||
sText_CuteContest,
|
||||
sText_SmartContest,
|
||||
sText_ToughContest,
|
||||
sText_BattleTowerLv50
|
||||
static const u8 *const sLinkGroupActivityNameTexts[] = {
|
||||
[ACTIVITY_NONE] = sText_EmptyString,
|
||||
[ACTIVITY_BATTLE_SINGLE] = sText_SingleBattle,
|
||||
[ACTIVITY_BATTLE_DOUBLE] = sText_DoubleBattle,
|
||||
[ACTIVITY_BATTLE_MULTI] = sText_MultiBattle,
|
||||
[ACTIVITY_TRADE] = sText_PokemonTrades,
|
||||
[ACTIVITY_CHAT] = sText_Chat,
|
||||
[ACTIVITY_WONDER_CARD] = sText_WonderCards,
|
||||
[ACTIVITY_WONDER_NEWS] = sText_WonderNews,
|
||||
[ACTIVITY_CARD] = sText_Cards,
|
||||
[ACTIVITY_POKEMON_JUMP] = sText_PokemonJump,
|
||||
[ACTIVITY_BERRY_CRUSH] = sText_BerryCrush,
|
||||
[ACTIVITY_BERRY_PICK] = sText_BerryPicking,
|
||||
[ACTIVITY_SEARCH] = sText_Search,
|
||||
[ACTIVITY_SPIN_TRADE] = sText_EmptyString,
|
||||
[ACTIVITY_BATTLE_TOWER_OPEN] = sText_BattleTowerOpenLv,
|
||||
[ACTIVITY_RECORD_CORNER] = sText_RecordCorner,
|
||||
[ACTIVITY_BERRY_BLENDER] = sText_BerryBlender,
|
||||
[ACTIVITY_ACCEPT] = sText_EmptyString,
|
||||
[ACTIVITY_DECLINE] = sText_EmptyString,
|
||||
[ACTIVITY_NPCTALK] = sText_EmptyString,
|
||||
[ACTIVITY_PLYRTALK] = sText_EmptyString,
|
||||
[ACTIVITY_WONDER_CARD2] = sText_WonderCards,
|
||||
[ACTIVITY_WONDER_NEWS2] = sText_WonderNews,
|
||||
[ACTIVITY_CONTEST_COOL] = sText_CoolContest,
|
||||
[ACTIVITY_CONTEST_BEAUTY] = sText_BeautyContest,
|
||||
[ACTIVITY_CONTEST_CUTE] = sText_CuteContest,
|
||||
[ACTIVITY_CONTEST_SMART] = sText_SmartContest,
|
||||
[ACTIVITY_CONTEST_TOUGH] = sText_ToughContest,
|
||||
[ACTIVITY_BATTLE_TOWER] = sText_BattleTowerLv50
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_BButtonCancel = {
|
||||
@ -621,6 +624,9 @@ static const struct WindowTemplate sWindowTemplate_BButtonCancel = {
|
||||
// Minimum and maximum number of players for a link group
|
||||
// A minimum of 0 means the min and max are equal
|
||||
#define LINK_GROUP_CAPACITY(min, max)(((min) << 12) | ((max) << 8))
|
||||
#define GROUP_MAX(capacity)(capacity & 0x0F)
|
||||
#define GROUP_MIN(capacity)(capacity >> 4)
|
||||
#define GROUP_MIN2(capacity)(capacity & 0xF0) // Unnecessary to have both, but needed to match
|
||||
|
||||
static const u32 sLinkGroupToActivityAndCapacity[NUM_LINK_GROUP_TYPES] = {
|
||||
[LINK_GROUP_SINGLE_BATTLE] = ACTIVITY_BATTLE_SINGLE | LINK_GROUP_CAPACITY(0, 2),
|
||||
@ -647,37 +653,37 @@ static const u32 sLinkGroupToActivityAndCapacity[NUM_LINK_GROUP_TYPES] = {
|
||||
[LINK_GROUP_BATTLE_TOWER_OPEN] = ACTIVITY_BATTLE_TOWER_OPEN | LINK_GROUP_CAPACITY(0, 2)
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_082F011C = {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x01,
|
||||
.tilemapTop = 0x03,
|
||||
.width = 0x0d,
|
||||
.height = 0x08,
|
||||
.paletteNum = 0x0f,
|
||||
static const struct WindowTemplate sWindowTemplate_PlayerList = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 3,
|
||||
.width = 13,
|
||||
.height = 8,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0044
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_082F0124 = {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x01,
|
||||
.tilemapTop = 0x03,
|
||||
.width = 0x0d,
|
||||
.height = 0x0a,
|
||||
.paletteNum = 0x0f,
|
||||
static const struct WindowTemplate sWindowTemplate_5PlayerList = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 3,
|
||||
.width = 13,
|
||||
.height = 10,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x0044
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplate_NumPlayerMode = {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x10,
|
||||
.tilemapTop = 0x03,
|
||||
.width = 0x07,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0f,
|
||||
.bg = 0,
|
||||
.tilemapLeft = 16,
|
||||
.tilemapTop = 3,
|
||||
.width = 7,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x00c6
|
||||
};
|
||||
|
||||
const struct ListMenuItem gUnknown_082F0134[] = {
|
||||
static const struct ListMenuItem sPossibleGroupMembersListMenuItems[] = {
|
||||
{ sText_EmptyString, 0 },
|
||||
{ sText_EmptyString, 1 },
|
||||
{ sText_EmptyString, 2 },
|
||||
@ -686,10 +692,10 @@ const struct ListMenuItem gUnknown_082F0134[] = {
|
||||
};
|
||||
|
||||
static const struct ListMenuTemplate sListMenuTemplate_PossibleGroupMembers = {
|
||||
.items = gUnknown_082F0134,
|
||||
.items = sPossibleGroupMembersListMenuItems,
|
||||
.moveCursorFunc = NULL,
|
||||
.itemPrintFunc = ItemPrintFunc_PossibleGroupMembers,
|
||||
.totalItems = ARRAY_COUNT(gUnknown_082F0134),
|
||||
.totalItems = ARRAY_COUNT(sPossibleGroupMembersListMenuItems),
|
||||
.maxShowed = 5,
|
||||
.windowId = 0,
|
||||
.header_X = 0,
|
||||
@ -804,7 +810,7 @@ static const struct ListMenuTemplate sListMenuTemplate_InviteToActivity = {
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_082F025C = {
|
||||
static const struct WindowTemplate sWindowTemplate_RegisterForTrade = {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x12,
|
||||
.tilemapTop = 0x07,
|
||||
@ -814,17 +820,17 @@ const struct WindowTemplate gUnknown_082F025C = {
|
||||
.baseBlock = 0x0001
|
||||
};
|
||||
|
||||
const struct ListMenuItem gUnknown_082F0264[] = {
|
||||
static const struct ListMenuItem sRegisterForTradeListMenuItems[] = {
|
||||
{ gText_Register, 1 },
|
||||
{ sText_Info, 2 },
|
||||
{ sText_Exit, 3 }
|
||||
};
|
||||
|
||||
const struct ListMenuTemplate gUnknown_082F027C = {
|
||||
.items = gUnknown_082F0264,
|
||||
static const struct ListMenuTemplate sListMenuTemplate_RegisterForTrade = {
|
||||
.items = sRegisterForTradeListMenuItems,
|
||||
.moveCursorFunc = ListMenuDefaultCursorMoveFunc,
|
||||
.itemPrintFunc = NULL,
|
||||
.totalItems = ARRAY_COUNT(gUnknown_082F0264),
|
||||
.totalItems = ARRAY_COUNT(sRegisterForTradeListMenuItems),
|
||||
.maxShowed = 3,
|
||||
.windowId = 0,
|
||||
.header_X = 0,
|
||||
@ -872,7 +878,7 @@ static const struct ListMenuItem sTradingBoardTypes[NUMBER_OF_MON_TYPES] = {
|
||||
{ sText_Exit, NUMBER_OF_MON_TYPES }
|
||||
};
|
||||
|
||||
const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = {
|
||||
static const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = {
|
||||
.items = sTradingBoardTypes,
|
||||
.moveCursorFunc = ListMenuDefaultCursorMoveFunc,
|
||||
.itemPrintFunc = NULL,
|
||||
@ -893,7 +899,7 @@ const struct ListMenuTemplate sMenuTemplate_TradingBoardRequestType = {
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_082F0344 = {
|
||||
static const struct WindowTemplate sWindowTemplate_TradingBoard = {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x01,
|
||||
.tilemapTop = 0x01,
|
||||
|
197
src/link_rfu_2.c
197
src/link_rfu_2.c
@ -68,7 +68,7 @@ static void HandleBlockSend(void);
|
||||
static void SendNextBlock(void);
|
||||
static void SendLastBlock(void);
|
||||
static u8 GetPartnerIndexByNameAndTrainerID(const u8 *, u16);
|
||||
static void sub_8010750(void);
|
||||
static void UpdateChildStatuses(void);
|
||||
static s32 sub_80107A0(void);
|
||||
static void sub_801084C(u8);
|
||||
static void ClearSelectedLinkPlayerIds(u16);
|
||||
@ -278,7 +278,7 @@ void InitRFUAPI(void)
|
||||
|
||||
static void Task_LinkLeaderSearchForChildren(u8 taskId)
|
||||
{
|
||||
sub_8010750();
|
||||
UpdateChildStatuses();
|
||||
switch (Rfu.state)
|
||||
{
|
||||
case 0:
|
||||
@ -387,11 +387,11 @@ static void Task_JoinGroupSearchForParent(u8 taskId)
|
||||
case 11:
|
||||
switch (sub_80107A0())
|
||||
{
|
||||
case 5:
|
||||
case RFU_STATUS_JOIN_GROUP_OK:
|
||||
Rfu.state = 12;
|
||||
break;
|
||||
case 6:
|
||||
case 9:
|
||||
case RFU_STATUS_JOIN_GROUP_NO:
|
||||
case RFU_STATUS_LEAVE_GROUP:
|
||||
rfu_LMAN_requestChangeAgbClockMaster();
|
||||
Rfu.unk_ce4 = 2;
|
||||
DestroyTask(taskId);
|
||||
@ -444,11 +444,11 @@ static void sub_800EAFC(void)
|
||||
|
||||
static void Task_LinkRfu_UnionRoomListen(u8 taskId)
|
||||
{
|
||||
if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM) && RfuGetErrorStatus() == 4)
|
||||
if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM) && RfuGetStatus() == RFU_STATUS_NEW_CHILD_DETECTED)
|
||||
{
|
||||
rfu_REQ_disconnect(lman.acceptSlot_flag);
|
||||
rfu_waitREQComplete();
|
||||
RfuSetErrorStatus(0, 0);
|
||||
RfuSetStatus(RFU_STATUS_OK, 0);
|
||||
}
|
||||
switch (Rfu.state)
|
||||
{
|
||||
@ -743,7 +743,7 @@ static bool32 sub_800F0F8(void)
|
||||
Rfu.unk_ce3 = 0;
|
||||
if (Rfu.unk_ce4 == 1)
|
||||
{
|
||||
RfuSetErrorStatus(2, 0x8000);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x8000);
|
||||
GetLinkmanErrorParams(0x8000);
|
||||
return FALSE;
|
||||
}
|
||||
@ -883,7 +883,7 @@ static bool32 RfuProcessEnqueuedRecvBlock(void)
|
||||
u8 j;
|
||||
u8 sp00[MAX_RFU_PLAYERS * (2 * (CMD_LENGTH - 1))];
|
||||
u8 sp48[2 * (CMD_LENGTH - 1)];
|
||||
u8 switchval;
|
||||
u8 status;
|
||||
|
||||
RfuRecvQueue_Dequeue(&Rfu.recvQueue, sp00);
|
||||
for (i = 0; i < MAX_RFU_PLAYERS; i++)
|
||||
@ -898,15 +898,15 @@ static bool32 RfuProcessEnqueuedRecvBlock(void)
|
||||
{
|
||||
rfu_REQ_disconnect(gRfuLinkStatus->connSlotFlag | gRfuLinkStatus->linkLossSlotFlag);
|
||||
rfu_waitREQComplete();
|
||||
switchval = RfuGetErrorStatus();
|
||||
if (switchval != 1 && switchval != 6 && switchval != 9)
|
||||
RfuSetErrorStatus(2, 0x9000);
|
||||
status = RfuGetStatus();
|
||||
if (status != RFU_STATUS_FATAL_ERROR && status != RFU_STATUS_JOIN_GROUP_NO && status != RFU_STATUS_LEAVE_GROUP)
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000);
|
||||
rfu_clearAllSlot();
|
||||
gReceivedRemoteLinkPlayers = FALSE;
|
||||
Rfu.callback = NULL;
|
||||
if (Rfu.unk_ce4 == 1)
|
||||
{
|
||||
RfuSetErrorStatus(2, 0x9000);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x9000);
|
||||
GetLinkmanErrorParams(0x9000);
|
||||
}
|
||||
lman.state = lman.next_state = 0;
|
||||
@ -1231,7 +1231,7 @@ static void RfuPrepareSendBuffer(u16 command)
|
||||
|
||||
void sub_800FE50(void *a0)
|
||||
{
|
||||
if (gSendCmd[0] == 0 && !RfuIsErrorStatus1or2())
|
||||
if (gSendCmd[0] == 0 && !RfuHasErrored())
|
||||
{
|
||||
memcpy(Rfu.unk_f2, a0, sizeof(Rfu.unk_f2));
|
||||
RfuPrepareSendBuffer(RFU_COMMAND_0x2F00);
|
||||
@ -1535,7 +1535,7 @@ u8 Rfu_GetLinkPlayerCount(void)
|
||||
|
||||
bool8 IsLinkRfuTaskFinished(void)
|
||||
{
|
||||
if (Rfu.errorStatus == 2)
|
||||
if (Rfu.status == RFU_STATUS_CONNECTION_ERROR)
|
||||
return FALSE;
|
||||
return Rfu.callback ? FALSE : TRUE;
|
||||
}
|
||||
@ -1546,24 +1546,25 @@ static void CallRfuFunc(void)
|
||||
Rfu.callback();
|
||||
}
|
||||
|
||||
static bool8 sub_8010540(void)
|
||||
static bool8 CheckForLeavingGroupMembers(void)
|
||||
{
|
||||
s32 i;
|
||||
bool8 retval = FALSE;
|
||||
bool8 memberLeft = FALSE;
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
if (Rfu.unk_cd1[i] < 5 || Rfu.unk_cd1[i] > 6)
|
||||
if (Rfu.partnerSendStatuses[i] < RFU_STATUS_JOIN_GROUP_OK
|
||||
|| Rfu.partnerSendStatuses[i] > RFU_STATUS_JOIN_GROUP_NO)
|
||||
{
|
||||
if (gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS
|
||||
|| gRfuSlotStatusNI[i]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN)
|
||||
{
|
||||
if (Rfu.unk_cd5[i] == 8)
|
||||
if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_LEAVE_GROUP_NOTICE)
|
||||
{
|
||||
Rfu.unk_cd1[i] = 9;
|
||||
Rfu.unk_cd5[i] = 10;
|
||||
Rfu.partnerSendStatuses[i] = RFU_STATUS_LEAVE_GROUP;
|
||||
Rfu.partnerRecvStatuses[i] = RFU_STATUS_10;
|
||||
rfu_clearSlot(TYPE_NI_RECV, i);
|
||||
rfu_NI_setSendData(1 << i, 8, Rfu.unk_cd1 + i, 1);
|
||||
retval = TRUE;
|
||||
rfu_NI_setSendData(1 << i, 8, &Rfu.partnerSendStatuses[i], 1);
|
||||
memberLeft = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1574,7 +1575,7 @@ static bool8 sub_8010540(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
return memberLeft;
|
||||
}
|
||||
|
||||
bool32 sub_80105EC(void)
|
||||
@ -1583,10 +1584,10 @@ bool32 sub_80105EC(void)
|
||||
s32 i;
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
if (Rfu.unk_cd5[i] == 11)
|
||||
if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_11)
|
||||
{
|
||||
flags |= (1 << i);
|
||||
Rfu.unk_cd5[i] = 0;
|
||||
Rfu.partnerRecvStatuses[i] = RFU_STATUS_OK;
|
||||
}
|
||||
}
|
||||
if (flags)
|
||||
@ -1596,40 +1597,41 @@ bool32 sub_80105EC(void)
|
||||
}
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
if (Rfu.unk_cd5[i] == 10 || Rfu.unk_cd5[i] == 11)
|
||||
if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10
|
||||
|| Rfu.partnerRecvStatuses[i] == RFU_STATUS_11)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 TrainerIdAndNameStillInPartnersList(u16 id, const u8 *name)
|
||||
bool32 HasTrainerLeftPartnersList(u16 trainerId, const u8 *name)
|
||||
{
|
||||
u8 idx = GetPartnerIndexByNameAndTrainerID(name, id);
|
||||
u8 idx = GetPartnerIndexByNameAndTrainerID(name, trainerId);
|
||||
if (idx == 0xFF)
|
||||
return TRUE;
|
||||
if (Rfu.unk_cd1[idx] == 9)
|
||||
if (Rfu.partnerSendStatuses[idx] == RFU_STATUS_LEAVE_GROUP)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void SendByteToPartnerByIdAndName(u8 value, u16 id, const u8 *name)
|
||||
void SendRfuStatusToPartner(u8 status, u16 trainerId, const u8 *name)
|
||||
{
|
||||
u8 idx = GetPartnerIndexByNameAndTrainerID(name, id);
|
||||
Rfu.unk_cd1[idx] = value;
|
||||
u8 idx = GetPartnerIndexByNameAndTrainerID(name, trainerId);
|
||||
Rfu.partnerSendStatuses[idx] = status;
|
||||
rfu_clearSlot(TYPE_NI_SEND, idx);
|
||||
rfu_NI_setSendData(1 << idx, 8, Rfu.unk_cd1 + idx, 1);
|
||||
rfu_NI_setSendData(1 << idx, 8, &Rfu.partnerSendStatuses[idx], 1);
|
||||
}
|
||||
|
||||
void LinkRfuNIsend8(void)
|
||||
void SendLeaveGroupNotice(void)
|
||||
{
|
||||
Rfu.unk_c85 = 8;
|
||||
Rfu.unk_c85 = RFU_STATUS_LEAVE_GROUP_NOTICE;
|
||||
rfu_clearSlot(TYPE_NI_SEND, Rfu.childSlot);
|
||||
rfu_NI_setSendData(1 << Rfu.childSlot, 8, &Rfu.unk_c85, 1);
|
||||
}
|
||||
|
||||
u32 WaitSendByteToPartnerByIdAndName(u16 id, const u8 *name)
|
||||
u32 WaitSendRfuStatusToPartner(u16 trainerId, const u8 *name)
|
||||
{
|
||||
u8 idx = GetPartnerIndexByNameAndTrainerID(name, id);
|
||||
u8 idx = GetPartnerIndexByNameAndTrainerID(name, trainerId);
|
||||
if (idx == 0xFF)
|
||||
return 2;
|
||||
if (gRfuSlotStatusNI[idx]->send.state == 0)
|
||||
@ -1637,18 +1639,18 @@ u32 WaitSendByteToPartnerByIdAndName(u16 id, const u8 *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sub_8010750(void)
|
||||
static void UpdateChildStatuses(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
sub_8010540();
|
||||
CheckForLeavingGroupMembers();
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
if (gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_SUCCESS
|
||||
|| gRfuSlotStatusNI[i]->send.state == SLOT_STATE_SEND_FAILED)
|
||||
{
|
||||
if (Rfu.unk_cd5[i] == 10)
|
||||
Rfu.unk_cd5[i] = 11;
|
||||
if (Rfu.partnerRecvStatuses[i] == RFU_STATUS_10)
|
||||
Rfu.partnerRecvStatuses[i] = RFU_STATUS_11;
|
||||
rfu_clearSlot(TYPE_NI_SEND, i);
|
||||
}
|
||||
}
|
||||
@ -1656,7 +1658,7 @@ static void sub_8010750(void)
|
||||
|
||||
static s32 sub_80107A0(void)
|
||||
{
|
||||
s32 retval = 0;
|
||||
s32 status = RFU_STATUS_OK;
|
||||
if (Rfu.unk_c85 == 8)
|
||||
{
|
||||
if (gRfuSlotStatusNI[Rfu.childSlot]->send.state == SLOT_STATE_SEND_SUCCESS
|
||||
@ -1667,22 +1669,22 @@ static s32 sub_80107A0(void)
|
||||
|| gRfuSlotStatusNI[Rfu.childSlot]->recv.state == SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN)
|
||||
{
|
||||
rfu_clearSlot(TYPE_NI_RECV, Rfu.childSlot);
|
||||
RfuSetErrorStatus(Rfu.unk_c86, 0);
|
||||
retval = Rfu.unk_c86;
|
||||
RfuSetStatus(Rfu.recvStatus, 0);
|
||||
status = Rfu.recvStatus;
|
||||
}
|
||||
else if (gRfuSlotStatusNI[Rfu.childSlot]->recv.state == SLOT_STATE_RECV_FAILED)
|
||||
{
|
||||
rfu_clearSlot(TYPE_NI_RECV, Rfu.childSlot);
|
||||
retval = 6;
|
||||
status = RFU_STATUS_JOIN_GROUP_NO;
|
||||
}
|
||||
return retval;
|
||||
return status;
|
||||
}
|
||||
|
||||
static void sub_801084C(u8 taskId)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
if (Rfu.errorStatus == 1 || Rfu.errorStatus == 2)
|
||||
if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR)
|
||||
{
|
||||
Rfu.unk_ce8 = 0;
|
||||
DestroyTask(taskId);
|
||||
@ -1802,7 +1804,7 @@ static void Task_ExchangeLinkPlayers(u8 taskId)
|
||||
struct LinkPlayerBlock *r2;
|
||||
struct SioInfo *r5;
|
||||
u8 r4 = Rfu.linkPlayerIdx[sUnknown_082ED68C[Rfu.unk_ce9]];
|
||||
if (Rfu.errorStatus == 1 || Rfu.errorStatus == 2)
|
||||
if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR)
|
||||
{
|
||||
Rfu.unk_ce8 = 0;
|
||||
DestroyTask(taskId);
|
||||
@ -1876,7 +1878,7 @@ static void Task_ExchangeLinkPlayers(u8 taskId)
|
||||
|
||||
static void sub_8010D0C(u8 taskId)
|
||||
{
|
||||
if (Rfu.errorStatus == 1 || Rfu.errorStatus == 2)
|
||||
if (Rfu.status == RFU_STATUS_FATAL_ERROR || Rfu.status == RFU_STATUS_CONNECTION_ERROR)
|
||||
DestroyTask(taskId);
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
@ -1912,7 +1914,7 @@ static void RfuCheckErrorStatus(void)
|
||||
gWirelessCommType = 2;
|
||||
SetMainCallback2(CB2_LinkError);
|
||||
gMain.savedCallback = CB2_LinkError;
|
||||
BufferLinkErrorInfo((Rfu.linkmanMsg << 16) | (Rfu.unk_10 << 8) | Rfu.unk_12, Rfu.recvQueue.count, Rfu.sendQueue.count, RfuGetErrorStatus() == 2);
|
||||
BufferLinkErrorInfo((Rfu.linkmanMsg << 16) | (Rfu.unk_10 << 8) | Rfu.unk_12, Rfu.recvQueue.count, Rfu.sendQueue.count, RfuGetStatus() == RFU_STATUS_CONNECTION_ERROR);
|
||||
Rfu.errorState = 2;
|
||||
CloseLink();
|
||||
}
|
||||
@ -1920,7 +1922,7 @@ static void RfuCheckErrorStatus(void)
|
||||
{
|
||||
if (lman.childClockSlave_flag)
|
||||
rfu_LMAN_requestChangeAgbClockMaster();
|
||||
RfuSetErrorStatus(1, 0x7000);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, 0x7000);
|
||||
GetLinkmanErrorParams(0x7000);
|
||||
}
|
||||
}
|
||||
@ -1981,7 +1983,7 @@ void ClearAndInitHostRFUtgtGname(void)
|
||||
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, ACTIVITY_NONE, FALSE, 0);
|
||||
}
|
||||
|
||||
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, u32 started)
|
||||
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, bool32 started)
|
||||
{
|
||||
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, activity, started, child_sprite_genders);
|
||||
}
|
||||
@ -2016,16 +2018,16 @@ void sub_801103C(void)
|
||||
r5->child_sprite_gender[i - 1] = sub_801100C(i);
|
||||
}
|
||||
|
||||
void UpdateGameData_GroupLockedIn(u8 a0)
|
||||
void UpdateGameData_GroupLockedIn(bool8 started)
|
||||
{
|
||||
gHostRFUtgtGnameBuffer.started = a0;
|
||||
gHostRFUtgtGnameBuffer.started = started;
|
||||
rfu_REQ_configGameData(0, 2, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer);
|
||||
}
|
||||
|
||||
void UpdateGameDataWithActivitySpriteGendersFlag(u8 a0, u32 a1, u32 a2)
|
||||
void UpdateGameData_SetActivity(u8 activity, u32 flags, bool32 started)
|
||||
{
|
||||
if (a0)
|
||||
SetHostRFUtgtGname(a0, a1, a2);
|
||||
if (activity != ACTIVITY_NONE)
|
||||
SetHostRFUtgtGname(activity, flags, started);
|
||||
rfu_REQ_configGameData(0, 2, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer);
|
||||
}
|
||||
|
||||
@ -2051,7 +2053,7 @@ void sub_80110B8(u32 a0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
UpdateGameDataWithActivitySpriteGendersFlag((ACTIVITY_CHAT | IN_UNION_ROOM), child_sprite_genders, 0);
|
||||
UpdateGameData_SetActivity((ACTIVITY_CHAT | IN_UNION_ROOM), child_sprite_genders, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2110,9 +2112,9 @@ static void sub_801120C(u8 msg, u8 paramCount)
|
||||
struct GFtgtGname *structPtr = (void *)gRfuLinkStatus->partner[i].gname;
|
||||
if (structPtr->activity == GetHostRFUtgtGname()->activity)
|
||||
{
|
||||
Rfu.unk_cd1[i] = 0;
|
||||
Rfu.unk_cd5[i] = 0;
|
||||
rfu_setRecvBuffer(TYPE_NI, i, Rfu.unk_cd5 + i, 1);
|
||||
Rfu.partnerSendStatuses[i] = RFU_STATUS_OK;
|
||||
Rfu.partnerRecvStatuses[i] = RFU_STATUS_OK;
|
||||
rfu_setRecvBuffer(TYPE_NI, i, &Rfu.partnerRecvStatuses[i], 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2155,7 +2157,7 @@ static void sub_801120C(u8 msg, u8 paramCount)
|
||||
else
|
||||
sub_80111FC();
|
||||
}
|
||||
RfuSetErrorStatus(2, msg);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
break;
|
||||
case 0x34:
|
||||
break;
|
||||
@ -2164,7 +2166,7 @@ static void sub_801120C(u8 msg, u8 paramCount)
|
||||
case LMAN_MSG_MANAGER_FORCED_STOPPED_AND_RFU_RESET:
|
||||
break;
|
||||
case LMAN_MSG_LMAN_API_ERROR_RETURN:
|
||||
RfuSetErrorStatus(1, msg);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg);
|
||||
GetLinkmanErrorParams(msg);
|
||||
Rfu.isShuttingDown = TRUE;
|
||||
break;
|
||||
@ -2173,7 +2175,7 @@ static void sub_801120C(u8 msg, u8 paramCount)
|
||||
case LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA:
|
||||
case LMAN_MSG_RFU_FATAL_ERROR:
|
||||
GetLinkmanErrorParams(msg);
|
||||
RfuSetErrorStatus(1, msg);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg);
|
||||
Rfu.unk_cdb = TRUE;
|
||||
break;
|
||||
}
|
||||
@ -2195,27 +2197,27 @@ void sub_8011404(u8 msg, u8 unused1)
|
||||
Rfu.childSlot = lman.param[0];
|
||||
break;
|
||||
case LMAN_MSG_CONNECT_PARENT_FAILED:
|
||||
RfuSetErrorStatus(2, msg);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
break;
|
||||
case LMAN_MSG_CHILD_NAME_SEND_COMPLETED:
|
||||
Rfu.state = 11;
|
||||
Rfu.unk_c85 = 0;
|
||||
Rfu.unk_c86 = 0;
|
||||
rfu_setRecvBuffer(TYPE_NI, Rfu.childSlot, &Rfu.unk_c86, 1);
|
||||
Rfu.recvStatus = RFU_STATUS_OK;
|
||||
rfu_setRecvBuffer(TYPE_NI, Rfu.childSlot, &Rfu.recvStatus, 1);
|
||||
rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, 70);
|
||||
break;
|
||||
case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED:
|
||||
RfuSetErrorStatus(2, msg);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
break;
|
||||
case LMAN_MSG_LINK_LOSS_DETECTED_AND_DISCONNECTED:
|
||||
Rfu.linkLossRecoveryState = 2;
|
||||
if (Rfu.unk_c86 == 6)
|
||||
if (Rfu.recvStatus == RFU_STATUS_JOIN_GROUP_NO)
|
||||
break;
|
||||
case LMAN_MSG_LINK_RECOVERY_FAILED_AND_DISCONNECTED:
|
||||
if (Rfu.linkLossRecoveryState != 2)
|
||||
Rfu.linkLossRecoveryState = 4;
|
||||
if (Rfu.unk_c86 != 9)
|
||||
RfuSetErrorStatus(2, msg);
|
||||
if (Rfu.recvStatus != RFU_STATUS_LEAVE_GROUP)
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
Debug_PrintString(sASCII_LinkLossDisconnect, 5, 5);
|
||||
if (gReceivedRemoteLinkPlayers == 1)
|
||||
GetLinkmanErrorParams(msg);
|
||||
@ -2235,7 +2237,7 @@ void sub_8011404(u8 msg, u8 unused1)
|
||||
case LMAN_MSG_MANAGER_FORCED_STOPPED_AND_RFU_RESET:
|
||||
break;
|
||||
case LMAN_MSG_LMAN_API_ERROR_RETURN:
|
||||
RfuSetErrorStatus(1, msg);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg);
|
||||
GetLinkmanErrorParams(msg);
|
||||
Rfu.isShuttingDown = TRUE;
|
||||
break;
|
||||
@ -2243,7 +2245,7 @@ void sub_8011404(u8 msg, u8 unused1)
|
||||
case LMAN_MSG_WATCH_DOG_TIMER_ERROR:
|
||||
case LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA:
|
||||
case LMAN_MSG_RFU_FATAL_ERROR:
|
||||
RfuSetErrorStatus(1, msg);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg);
|
||||
GetLinkmanErrorParams(msg);
|
||||
Rfu.unk_cdb = TRUE;
|
||||
break;
|
||||
@ -2292,7 +2294,7 @@ static void sub_8011674(u8 msg, u8 paramCount)
|
||||
Rfu.state = 17;
|
||||
break;
|
||||
case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED:
|
||||
RfuSetErrorStatus(4, 0);
|
||||
RfuSetStatus(RFU_STATUS_NEW_CHILD_DETECTED, 0);
|
||||
break;
|
||||
case LMAN_MSG_NEW_CHILD_CONNECT_ACCEPTED:
|
||||
if (GetHostRFUtgtGname()->activity == (ACTIVITY_CHAT | IN_UNION_ROOM) && Rfu.unk_cd9 == 0)
|
||||
@ -2357,16 +2359,16 @@ static void sub_8011674(u8 msg, u8 paramCount)
|
||||
}
|
||||
else
|
||||
{
|
||||
RfuSetErrorStatus(2, msg);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
}
|
||||
break;
|
||||
case LMAN_MSG_CHILD_NAME_SEND_COMPLETED:
|
||||
Rfu.state = 13;
|
||||
RfuSetErrorStatus(3, 0);
|
||||
RfuSetStatus(RFU_STATUS_CHILD_SEND_COMPLETE, 0);
|
||||
rfu_setRecvBuffer(TYPE_UNI, Rfu.childSlot, Rfu.unk_c3f, 70);
|
||||
break;
|
||||
case LMAN_MSG_CHILD_NAME_SEND_FAILED_AND_DISCONNECTED:
|
||||
RfuSetErrorStatus(2, msg);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
break;
|
||||
case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY:
|
||||
if (lman.acceptSlot_flag & lman.param[0])
|
||||
@ -2402,7 +2404,7 @@ static void sub_8011674(u8 msg, u8 paramCount)
|
||||
if (gRfuLinkStatus->parentChild == MODE_NEUTRAL && lman.pcswitch_flag == 0 && FuncIsActiveTask(Task_LinkRfu_UnionRoomListen) == TRUE)
|
||||
Rfu.state = 17;
|
||||
|
||||
RfuSetErrorStatus(2, msg);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, msg);
|
||||
break;
|
||||
case LMAN_MSG_LINK_DISCONNECTED_BY_USER:
|
||||
Rfu.unk_ce3 = 0;
|
||||
@ -2412,7 +2414,7 @@ static void sub_8011674(u8 msg, u8 paramCount)
|
||||
case LMAN_MSG_MANAGER_FORCED_STOPPED_AND_RFU_RESET:
|
||||
break;
|
||||
case LMAN_MSG_LMAN_API_ERROR_RETURN:
|
||||
RfuSetErrorStatus(1, msg);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg);
|
||||
GetLinkmanErrorParams(msg);
|
||||
Rfu.isShuttingDown = TRUE;
|
||||
break;
|
||||
@ -2421,7 +2423,7 @@ static void sub_8011674(u8 msg, u8 paramCount)
|
||||
case LMAN_MSG_CLOCK_SLAVE_MS_CHANGE_ERROR_BY_DMA:
|
||||
case LMAN_MSG_RFU_FATAL_ERROR:
|
||||
GetLinkmanErrorParams(msg);
|
||||
RfuSetErrorStatus(1, msg);
|
||||
RfuSetStatus(RFU_STATUS_FATAL_ERROR, msg);
|
||||
Rfu.unk_cdb = FALSE;
|
||||
break;
|
||||
}
|
||||
@ -2432,21 +2434,22 @@ void sub_8011A50(void)
|
||||
Rfu.unk_ce4 = 2;
|
||||
}
|
||||
|
||||
void RfuSetErrorStatus(u8 status, u16 msg)
|
||||
void RfuSetStatus(u8 status, u16 msg)
|
||||
{
|
||||
Rfu.errorStatus = status;
|
||||
Rfu.status = status;
|
||||
Rfu.linkmanMsg = msg;
|
||||
}
|
||||
|
||||
u8 RfuGetErrorStatus(void)
|
||||
u8 RfuGetStatus(void)
|
||||
{
|
||||
return Rfu.errorStatus;
|
||||
return Rfu.status;
|
||||
}
|
||||
|
||||
bool32 RfuIsErrorStatus1or2(void)
|
||||
bool32 RfuHasErrored(void)
|
||||
{
|
||||
u32 var = RfuGetErrorStatus() - 1;
|
||||
if (var < 2)
|
||||
// RFU_STATUS_OK will underflow here intentionally
|
||||
u32 var = RfuGetStatus() - 1;
|
||||
if (var < RFU_STATUS_CONNECTION_ERROR)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@ -2673,7 +2676,7 @@ static void Task_RfuReconnectWithParent(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
RfuSetErrorStatus(2, 0x7000);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
@ -2690,7 +2693,7 @@ static void Task_RfuReconnectWithParent(u8 taskId)
|
||||
|
||||
if (data[15] > 240)
|
||||
{
|
||||
RfuSetErrorStatus(2, 0x7000);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
@ -2700,7 +2703,7 @@ void CreateTask_RfuReconnectWithParent(const u8 *name, u16 trainerId)
|
||||
u8 taskId;
|
||||
s16 *data;
|
||||
|
||||
Rfu.errorStatus = 0;
|
||||
Rfu.status = RFU_STATUS_OK;
|
||||
taskId = CreateTask(Task_RfuReconnectWithParent, 3);
|
||||
data = gTasks[taskId].data;
|
||||
StringCopy((u8*)(data), name);
|
||||
@ -2741,12 +2744,12 @@ static bool32 ShouldRejectPartnerConnectionBasedOnActivity(s16 activity, struct
|
||||
|
||||
static void sub_801209C(u8 taskId)
|
||||
{
|
||||
if (Rfu.errorStatus == 4)
|
||||
if (Rfu.status == RFU_STATUS_NEW_CHILD_DETECTED)
|
||||
DestroyTask(taskId);
|
||||
|
||||
if (++gTasks[taskId].data[0] > 300)
|
||||
{
|
||||
RfuSetErrorStatus(2, 0x7000);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
@ -2766,7 +2769,7 @@ static void sub_801209C(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
RfuSetErrorStatus(2, 0x7000);
|
||||
RfuSetStatus(RFU_STATUS_CONNECTION_ERROR, 0x7000);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
@ -2778,7 +2781,7 @@ void sub_8012188(const u8 *name, struct GFtgtGname *structPtr, u8 activity)
|
||||
u8 taskId, taskId2;
|
||||
|
||||
Rfu.unk_ccf = 0;
|
||||
Rfu.errorStatus = 0;
|
||||
Rfu.status = RFU_STATUS_OK;
|
||||
StringCopy(Rfu.playerName, name);
|
||||
memcpy(&Rfu.unk_10A, structPtr, RFU_GAME_NAME_LENGTH);
|
||||
rfu_LMAN_forceChangeSP();
|
||||
@ -2811,7 +2814,7 @@ bool32 sub_8012240(void)
|
||||
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
if ((lman.acceptSlot_flag >> i) & 1 && Rfu.unk_cd1[i] == 0)
|
||||
if ((lman.acceptSlot_flag >> i) & 1 && Rfu.partnerSendStatuses[i] == RFU_STATUS_OK)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -2846,7 +2849,7 @@ static void Debug_PrintStatus(void)
|
||||
}
|
||||
for (i = 0; i < RFU_CHILD_MAX; i++)
|
||||
{
|
||||
for (j = 0; j < 14; j++)
|
||||
for (j = 0; j < (int)ARRAY_COUNT(Rfu.unk_14[0]); j++)
|
||||
{
|
||||
Debug_PrintNum(Rfu.unk_14[i][j], j * 2, i + 11, 2);
|
||||
}
|
||||
|
@ -953,7 +953,7 @@ void UpdateWirelessStatusIndicatorSprite(void)
|
||||
gMain.oamBuffer[125].paletteNum = sprite->oam.paletteNum;
|
||||
gMain.oamBuffer[125].tileNum = sprite->sTileStart + sprite->anims[sprite->sCurrAnimNum][sprite->sFrameIdx].frame.imageValue;
|
||||
CpuCopy16(gMain.oamBuffer + 125, (struct OamData *)OAM + 125, sizeof(struct OamData));
|
||||
if (RfuGetErrorStatus() == 1)
|
||||
if (RfuGetStatus() == RFU_STATUS_FATAL_ERROR)
|
||||
{
|
||||
DestroyWirelessStatusIndicatorSprite();
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "link_rfu.h"
|
||||
#include "mevent_news.h"
|
||||
#include "mevent_server.h"
|
||||
#include "constants/cable_club.h"
|
||||
|
||||
void bgid_upload_textbox_1(u8 bgId);
|
||||
void task_add_00_mystery_gift(void);
|
||||
@ -1242,21 +1243,21 @@ void task00_mystery_gift(u8 taskId)
|
||||
case 0:
|
||||
if (data->source == 1)
|
||||
{
|
||||
MEvent_CreateTask_CardOrNewsWithFriend(0x15);
|
||||
MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_CARD2);
|
||||
}
|
||||
else if (data->source == 0)
|
||||
{
|
||||
MEvent_CreateTask_CardOrNewsOverWireless(0x15);
|
||||
MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_CARD2);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (data->source == 1)
|
||||
{
|
||||
MEvent_CreateTask_CardOrNewsWithFriend(0x16);
|
||||
MEvent_CreateTask_CardOrNewsWithFriend(ACTIVITY_WONDER_NEWS2);
|
||||
}
|
||||
else if (data->source == 0)
|
||||
{
|
||||
MEvent_CreateTask_CardOrNewsOverWireless(0x16);
|
||||
MEvent_CreateTask_CardOrNewsOverWireless(ACTIVITY_WONDER_NEWS2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1269,7 +1270,7 @@ void task00_mystery_gift(u8 taskId)
|
||||
data->state = 7;
|
||||
mevent_client_do_init(data->IsCardOrNews);
|
||||
}
|
||||
else if (gSpecialVar_Result == 5)
|
||||
else if (gSpecialVar_Result == LINKUP_FAILED)
|
||||
{
|
||||
ClearScreenInBg0(TRUE);
|
||||
data->state = 3;
|
||||
@ -1599,10 +1600,10 @@ void task00_mystery_gift(u8 taskId)
|
||||
switch (data->IsCardOrNews)
|
||||
{
|
||||
case 0:
|
||||
MEvent_CreateTask_Leader(21);
|
||||
MEvent_CreateTask_Leader(ACTIVITY_WONDER_CARD2);
|
||||
break;
|
||||
case 1:
|
||||
MEvent_CreateTask_Leader(22);
|
||||
MEvent_CreateTask_Leader(ACTIVITY_WONDER_NEWS2);
|
||||
break;
|
||||
}
|
||||
data->source = 1;
|
||||
@ -1615,7 +1616,7 @@ void task00_mystery_gift(u8 taskId)
|
||||
ClearScreenInBg0(1);
|
||||
data->state = 31;
|
||||
}
|
||||
else if (gSpecialVar_Result == 5)
|
||||
else if (gSpecialVar_Result == LINKUP_FAILED)
|
||||
{
|
||||
ClearScreenInBg0(1);
|
||||
data->state = 18;
|
||||
|
@ -525,7 +525,7 @@ void Task_ShowStartMenu(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
if (InUnionRoom() == TRUE)
|
||||
var_800D_set_xB();
|
||||
SetUsingUnionRoomStartMenu();
|
||||
|
||||
gMenuCallback = HandleStartMenuInput;
|
||||
task->data[0]++;
|
||||
|
1615
src/union_room.c
1615
src/union_room.c
File diff suppressed because it is too large
Load Diff
@ -78,7 +78,7 @@ static const u8 sNextFacingDirection[] = {
|
||||
[DIR_EAST] = DIR_NORTH
|
||||
};
|
||||
|
||||
// Local id 1 is the Nurse/Aide
|
||||
// Local id 1 is the Nurse/Attendant, 2-9 are link players
|
||||
static const u8 sUnionRoomLocalIds[] = { 9, 8, 7, 2, 6, 5, 4, 3 };
|
||||
|
||||
static const u16 sUnknown[] = {
|
||||
@ -102,9 +102,9 @@ static const u8 sMovement_UnionPlayerEnter[2] = {
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static bool32 is_walking_or_running(void)
|
||||
static bool32 IsPlayerStandingStill(void)
|
||||
{
|
||||
if (gPlayerAvatar.tileTransitionState == 2 || gPlayerAvatar.tileTransitionState == 0)
|
||||
if (gPlayerAvatar.tileTransitionState == T_TILE_CENTER || gPlayerAvatar.tileTransitionState == T_NOT_MOVING)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@ -251,7 +251,7 @@ static bool32 AnimateUnionRoomPlayerSpawn(s8 * state, u32 playerIdx, struct Unio
|
||||
switch (*state)
|
||||
{
|
||||
case 0:
|
||||
if (!is_walking_or_running())
|
||||
if (!IsPlayerStandingStill())
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -567,12 +567,12 @@ void HandleUnionRoomPlayerRefresh(struct WirelessLink_URoom *uroom)
|
||||
}
|
||||
}
|
||||
|
||||
bool32 TrySetUnionRoomMemberFacePlayer(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds)
|
||||
bool32 TryInteractWithUnionRoomMember(struct UnkStruct_Main0 *main0, s16 *directionPtr, s16 *playerIdxPtr, u8 *spriteIds)
|
||||
{
|
||||
s16 x, y;
|
||||
s32 i, direction;
|
||||
struct UnkStruct_x20 * r4;
|
||||
if (!is_walking_or_running())
|
||||
if (!IsPlayerStandingStill())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -602,6 +602,7 @@ bool32 TrySetUnionRoomMemberFacePlayer(struct UnkStruct_Main0 *main0, s16 *direc
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Face player
|
||||
SetUnionRoomObjectFacingDirection(direction, i, sOppositeFacingDirection[GetPlayerFacingDirection()]);
|
||||
*directionPtr = direction;
|
||||
*playerIdxPtr = i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user