Name remaining funcs in union_room.c

This commit is contained in:
PikalaxALT
2020-02-06 10:44:22 -05:00
parent 6af7391add
commit 78caeff45b
26 changed files with 428 additions and 401 deletions
+1 -1
View File
@@ -1655,7 +1655,7 @@ _0814C77A:
movs r2, 0xC
bl memcpy
adds r0, r4, 0
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
_0814C7AC:
pop {r3}
mov r8, r3
+5 -5
View File
@@ -1955,7 +1955,7 @@ _080816BC: .4byte gLocalLinkPlayerId
_080816C0: .4byte gWirelessCommType
_080816C4: .4byte gBattleOutcome
_080816C8:
@ sub_8144714(0, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId);
@ MEvent_RecordIdOfWonderCardSenderByEventType(0, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId);
ldr r4, _080816E8 @ =gLinkPlayers
bl GetMultiplayerId
eors r0, r5
@@ -1968,12 +1968,12 @@ _080816C8:
adds r1, r4
ldr r1, [r1]
movs r0, 0
bl sub_8144714
bl MEvent_RecordIdOfWonderCardSenderByEventType
b _0808170A
.align 2, 0
_080816E8: .4byte gLinkPlayers
_080816EC:
@ sub_8144714(1, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId);
@ MEvent_RecordIdOfWonderCardSenderByEventType(1, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId);
ldr r4, _08081718 @ =gLinkPlayers
bl GetMultiplayerId
eors r0, r5
@@ -1986,7 +1986,7 @@ _080816EC:
adds r1, r4
ldr r1, [r1]
movs r0, 0x1
bl sub_8144714
bl MEvent_RecordIdOfWonderCardSenderByEventType
_0808170A:
bl InUnionRoom
cmp r0, 0x1
@@ -2289,7 +2289,7 @@ _0808195C:
lsls r0, 24
cmp r0, 0
beq _08081970
bl sub_8117118
bl UnionRoom_CreateTask_CallBC2ReturnFromLinkTrade
adds r0, r5, 0
bl DestroyTask
_08081970:
+3 -3
View File
@@ -407,7 +407,7 @@ sub_815A61C: @ 815A61C
ands r5, r7
orrs r5, r4
strb r5, [r0, 0xB]
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0x20
pop {r3-r5}
mov r8, r3
@@ -637,7 +637,7 @@ sub_815AAD8: @ 815AAD8
orrs r1, r0
str r1, [sp, 0x4]
mov r0, sp
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0x8
pop {r0}
bx r0
@@ -692,7 +692,7 @@ sub_815AB3C: @ 815AB3C
str r1, [sp]
str r0, [sp, 0x4]
mov r0, sp
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0x8
pop {r0}
bx r0
+1 -1
View File
@@ -1839,7 +1839,7 @@ _08106478:
bl FillWindowPixelBuffer
movs r0, 0xB0
movs r1, 0x1
bl sub_8107D38
bl ListMenuLoadStdPalAt
mov r0, r10
cmp r0, 0
beq _08106504
+1 -1
View File
@@ -621,7 +621,7 @@ _08147A5C:
ldrh r0, [r4, 0x18]
strh r0, [r1, 0x2]
mov r0, sp
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
b _08147A9E
.align 2, 0
_08147A88: .4byte gTasks+0x8
+4 -4
View File
@@ -4302,7 +4302,7 @@ sub_8149A6C: @ 8149A6C
ldr r0, [r0, 0x8]
str r0, [sp, 0x4]
mov r0, sp
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0xC
pop {r0}
bx r0
@@ -4363,7 +4363,7 @@ sub_8149AE0: @ 8149AE0
strb r1, [r2]
str r0, [sp, 0x4]
mov r0, sp
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0xC
pop {r0}
bx r0
@@ -4425,7 +4425,7 @@ sub_8149AF8: @ 8149AF8
ldrh r0, [r0, 0xE]
strh r0, [r1, 0x4]
mov r0, sp
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0xC
pop {r3}
mov r8, r3
@@ -4520,7 +4520,7 @@ sub_8149BF4: @ 8149BF4
mov r0, sp
strb r1, [r0, 0x6]
strh r2, [r0, 0x8]
bl sub_80F9E2C
bl RfuPrepareSend0x2f00
add sp, 0xC
pop {r4}
pop {r0}
+1 -1
View File
@@ -3187,7 +3187,7 @@ _08135FC8: .4byte gUnknown_8E9B310
_08135FCC:
movs r0, 0x60
movs r1, 0x1
bl sub_8107D38
bl ListMenuLoadStdPalAt
ldr r0, _08135FE0 @ =gUnknown_84636C0
movs r1, 0x70
_08135FD8:
+3
View File
@@ -25,6 +25,9 @@
#define ACTIVITY_ACCEPT 17
#define ACTIVITY_DECLINE 18
#define ACTIVITY_NPCTALK 19
#define ACTIVITY_PLYRTALK 20
// Duplicate IDs?
#define ACTIVITY_WCARD2 21
#define ACTIVITY_WNEWS2 22
+1 -1
View File
@@ -11,6 +11,6 @@ void sub_8098630(void);
bool8 sub_8098734(void);
void sub_80696C0(void);
bool8 walkrun_is_standing_still(void);
void sub_80696F0(void);
void UnionRoom_UnlockPlayerAndChatPartner(void);
#endif // GUARD_EVENT_OBJECT_LOCK_H
+16 -16
View File
@@ -124,11 +124,11 @@ struct __attribute__((packed, aligned(2))) GFtgtGname
u16 species:10;
u16 type:6;
u8 activity:7;
u8 unk_0a_7:1;
u8 started:1;
u8 playerGender:1;
u8 level:7;
u8 unk_0c;
};
u8 padding;
}; // size: RFU_GNAME_SIZE
struct Padded_U8
{
@@ -333,7 +333,7 @@ typedef struct UnkRfuStruct_2
/* 0x99c */ u8 unk_ce4;
/* 0x99d */ u8 unk_ce5;
/* 0x99e */ u8 unk_ce6;
/* 0x99f */ u8 unk_ce7;
/* 0x99f */ u8 acceptSlot_flag;
/* 0x9a0 */ bool8 unk_ce8;
/* 0x9a1 */ u8 unk_ce9;
/* 0x9a2 */ u8 unk_cea[RFU_CHILD_MAX];
@@ -371,7 +371,7 @@ void DestroyWirelessStatusIndicatorSprite(void);
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0);
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0);
void MEvent_CreateTask_Leader(u32 arg0);
void sub_80F9E2C(void * data);
void RfuPrepareSend0x2f00(void * data);
u8 CreateTask_ListenToWireless(void);
void sub_80FBB4C(void);
void sub_80F86F4(void);
@@ -412,26 +412,26 @@ bool8 RFU_queue_2_14_send(struct UnkRfuStruct_2_Sub_c1c *q1, u8 *q2);
void RFU_queue_2_14_recv(struct UnkRfuStruct_2_Sub_c1c *q1, const u8 *q2);
bool8 RFU_queue_20_70_send(struct UnkRfuStruct_2_Sub_124 * a0, u8 *a1);
void RFU_queue_40_14_recv(struct UnkRfuStruct_2_Sub_9e8 * a0, u8 *a1);
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 r2, s32 r3);
void sub_80FAFE0(bool8 unk_0a_7);
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders);
void UpdateGameData_GroupLockedIn(bool8 started);
bool32 RfuSerialNumberIsValid(u32 a0);
bool8 sub_80FC1B0(void);
bool8 sub_80F8F40(void);
bool8 LmanAcceptSlotFlagIsNotZero(void);
void sub_80F8F5C(void);
bool32 sub_80FA5D4(void);
bool32 sub_80FC1CC(void);
bool32 sub_80F8F7C(bool32 a0);
bool32 sub_80FA634(u16 trainerId, const u8 *trainerName);
void sub_80FA670(u8 a0, u16 a1, const u8 *a2);
u32 sub_80FA6FC(u16 a0, const u8 *a1);
bool32 WaitRfuState(bool32 a0);
bool32 TrainerIdAndNameStillInPartnersList(u16 trainerId, const u8 *trainerName);
void SendByteToPartnerByIdAndName(u8 a0, u16 a1, const u8 *a2);
u32 WaitSendByteToPartnerByIdAndName(u16 a0, const u8 *a1);
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, u32 a2);
void InitializeRfuLinkManager_LinkLeader(u32 availSlots);
void sub_80FBD4C(const u8 *trainerName, u16 trainerId);
void RequestDisconnectSlotByTrainerNameAndId(const u8 *trainerName, u16 trainerId);
void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *gname, u8 *uname);
void InitializeRfuLinkManager_JoinGroup(void);
void sub_80FA6BC(void);
void sub_80FBF54(const u8 *src, u16 trainerId);
void sub_80FB008(u8 activity, u32 child_sprite_genders, u32 a2);
void LinkRfuNIsend8(void);
void CreateTask_sub_80FBE80(const u8 *src, u16 trainerId);
void UpdateGameDataWithActivitySpriteGendersFlag(u8 activity, u32 child_sprite_genders, u32 started);
void RecordMixTrainerNames(void);
void LinkRfu_CreateConnectionAsParent();
void LinkRfu_StopManagerBeforeEnteringChat();
+1 -1
View File
@@ -30,7 +30,7 @@ s8 sub_812EAE4(u16 species, u32 personality, u8 a2);
// list_menu
void sub_8107CD8(u8 palOffset, u16 speciesId);
void sub_8107CF8(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y);
void sub_8107D38(u8 palOffset, u8 palId);
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId);
void BlitMoveInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
// menu
+2 -2
View File
@@ -85,10 +85,10 @@ bool32 WonderCard_Test_Unk_08_6(void);
u32 MENews_GetInput(u16 input);
void InitMEventData(void);
u16 MEvent_GetBattleCardCount(u32 command);
void sub_8144714(u32 a0, u32 a1);
void MEvent_RecordIdOfWonderCardSenderByEventType(u32 eventId, u32 trainerId);
u16 *GetMEventProfileECWordsMaybe(void);
void ResetReceivedWonderCardFlag(void);
bool32 sub_81446D0(u16 a0);
bool32 MEventHandleReceivedWonderCard(u16 cardId);
u16 GetWonderCardFlagId(void);
#endif //GUARD_MEVENT_H
+9 -11
View File
@@ -29,11 +29,9 @@ struct UnkStruct_x20
struct UnionGnameUnamePair gname_uname;
u16 field_18;
u8 groupScheduledAnim:2;
u8 field_1A_1:1;
bool8 field_1A_1:1;
u8 field_1B;
u8 field_1D;
u8 field_1E;
u8 field_1F;
u32 field_1C; // unused
};
// These arrays are dynamically allocated but must be
@@ -80,17 +78,17 @@ struct UnkStruct_Group
struct UnkStruct_Main4 * field_4;
u8 state;
u8 textState;
u8 field_A;
u8 field_A; // unused
u8 listWindowId;
u8 field_C;
u8 field_D;
u8 bButtonCancelWindowId;
u8 playerNameAndIdWindowId;
u8 listTaskId;
u8 field_F;
u8 leaderId;
u8 field_10;
u8 listenTaskId;
u8 cardOrNews;
u8 field_13;
u8 field_14;
u8 field_13; // referenced but never set
u8 refreshTimer;
u8 delayBeforePrint;
};
@@ -164,6 +162,6 @@ extern struct GFtgtGnameSub gPartnerTgtGnameSub;
extern u16 gUnionRoomOfferedSpecies;
extern u8 gUnionRoomRequestedMonType;
void sub_81173C0(u16 battleFlags);
void StartUnionRoomBattle(u16 battleFlags);
#endif //GUARD_UNION_ROOM_H
+1 -1
View File
@@ -7,7 +7,7 @@ void sub_815A5BC(s32 a0)
struct Padded_U8 data[2];
data[0].value = 1;
data[1].value = a0;
sub_80F9E2C(data);
RfuPrepareSend0x2f00(data);
}
u8 sub_815A5E8(s32 a0)
+1 -1
View File
@@ -93,7 +93,7 @@ void sub_80696C0(void)
UnfreezeObjectEvents();
}
void sub_80696F0(void)
void UnionRoom_UnlockPlayerAndChatPartner(void)
{
u8 objectEventId;
if (gObjectEvents[gSelectedObjectEvent].active)
+1 -1
View File
@@ -309,7 +309,7 @@ static void MoveRelearnerLoadBgGfx(void)
FillBgTilemapBufferRect(0, 0x000, 0, 0, 30, 20, 0xF);
SetBgTilemapBuffer(1, sMoveRelearner->bg1TilemapBuffer);
TextWindow_SetUserSelectedFrame(0, 1, 0xE0);
sub_8107D38(0xD0, 1);
ListMenuLoadStdPalAt(0xD0, 1);
LoadPalette(gUnknown_8E97DDC, 0x00, 0x20);
DecompressAndLoadBgGfxUsingHeap(1, gUnknown_8E97DFC, 0, 0, 0);
CopyToBgTilemapBuffer(1, gUnknown_8E97EC4, 0, 0);
+39 -39
View File
@@ -398,7 +398,7 @@ static void sub_80F8AEC(void)
static void sub_80F8B34(u8 taskId)
{
if (GetHostRFUtgtGname()->activity == (0x14 | IN_UNION_ROOM) && RfuGetErrorStatus() == 4)
if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM) && RfuGetErrorStatus() == 4)
{
rfu_REQ_disconnect(lman.acceptSlot_flag);
rfu_waitREQComplete();
@@ -444,7 +444,7 @@ static void sub_80F8B34(u8 taskId)
case 16:
Rfu.unk_cdb = 0;
rfu_LMAN_setMSCCallback(sub_80F8DA8);
sub_80FAFE0(1);
UpdateGameData_GroupLockedIn(1);
sub_80F8AA4();
sub_80F8AEC();
Rfu.state = 20;
@@ -542,7 +542,7 @@ static void CreateTask_LinkLeaderSearchForChildren(void)
Rfu.unk_67 = CreateTask(Task_LinkLeaderSearchForChildren, 1);
}
static bool8 sub_80F8EA4(void)
static bool8 RfuStateIs7AndPlayerIsChild(void)
{
if (Rfu.state == 7 && Rfu.parentId)
{
@@ -551,7 +551,7 @@ static bool8 sub_80F8EA4(void)
return FALSE;
}
static bool32 sub_80F8ECC(void)
static bool32 IsParentSuccessfullyReconnected(void)
{
if (Rfu.state == 7 && !rfu_LMAN_CHILD_connectParent(gRfuLinkStatus->partner[Rfu.unk_c3d].id, 240))
{
@@ -568,7 +568,7 @@ static void CreateTask_JoinGroupSearchForParent(void)
Rfu.unk_67 = CreateTask(Task_JoinGroupSearchForParent, 1);
}
bool8 sub_80F8F40(void)
bool8 LmanAcceptSlotFlagIsNotZero(void)
{
if (lman.acceptSlot_flag)
{
@@ -580,12 +580,12 @@ bool8 sub_80F8F40(void)
void sub_80F8F5C(void)
{
Rfu.state = 4;
Rfu.unk_ce7 = lman.acceptSlot_flag;
Rfu.acceptSlot_flag = lman.acceptSlot_flag;
}
bool32 sub_80F8F7C(bool32 a0)
bool32 WaitRfuState(bool32 force)
{
if (Rfu.state == 17 || a0)
if (Rfu.state == 17 || force)
{
Rfu.state = 18;
return TRUE;
@@ -1175,7 +1175,7 @@ static void RfuPrepareSendBuffer(u16 command)
}
}
void sub_80F9E2C(void * data)
void RfuPrepareSend0x2f00(void * data)
{
if (gSendCmd[0] == 0 && !RfuIsErrorStatus1or2())
{
@@ -1544,7 +1544,7 @@ bool32 sub_80FA5D4(void)
return FALSE;
}
bool32 sub_80FA634(u16 trainerId, const u8 *trainerName)
bool32 TrainerIdAndNameStillInPartnersList(u16 trainerId, const u8 *trainerName)
{
u8 r1 = GetPartnerIndexByNameAndTrainerID(trainerName, trainerId);
if (r1 == 0xFF)
@@ -1554,27 +1554,27 @@ bool32 sub_80FA634(u16 trainerId, const u8 *trainerName)
return FALSE;
}
void sub_80FA670(u8 a0, u16 a1, const u8 *a2)
void SendByteToPartnerByIdAndName(u8 value, u16 trainerId, const u8 *trainerName)
{
u8 r4 = GetPartnerIndexByNameAndTrainerID(a2, a1);
Rfu.unk_cd1[r4] = a0;
rfu_clearSlot(TYPE_NI_SEND, r4);
rfu_NI_setSendData(1 << r4, 8, Rfu.unk_cd1 + r4, 1);
u8 slotNo = GetPartnerIndexByNameAndTrainerID(trainerName, trainerId);
Rfu.unk_cd1[slotNo] = value;
rfu_clearSlot(TYPE_NI_SEND, slotNo);
rfu_NI_setSendData(1 << slotNo, 8, Rfu.unk_cd1 + slotNo, 1);
}
void sub_80FA6BC(void)
void LinkRfuNIsend8(void)
{
Rfu.unk_c85 = 8;
rfu_clearSlot(TYPE_NI_SEND, Rfu.child_slot);
rfu_NI_setSendData(1 << Rfu.child_slot, 8, &Rfu.unk_c85, 1);
}
u32 sub_80FA6FC(u16 trainerId, const u8 *trainerName)
u32 WaitSendByteToPartnerByIdAndName(u16 trainerId, const u8 *trainerName)
{
u8 r0 = GetPartnerIndexByNameAndTrainerID(trainerName, trainerId);
if (r0 == 0xFF)
return 2;
if (gRfuSlotStatusNI[r0]->send.state == 0)
if (gRfuSlotStatusNI[r0]->send.state == SLOT_STATE_READY)
return 1;
return 0;
}
@@ -1917,12 +1917,12 @@ static void CopyPlayerNameToUnameBuffer(void)
void ClearAndInitHostRFUtgtGname(void)
{
memset(&gHostRFUtgtGnameBuffer, 0, RFU_GAME_NAME_LENGTH);
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, 0, 0, 0);
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, 0, FALSE, 0);
}
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, u32 a2)
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, u32 started)
{
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, activity, a2, child_sprite_genders);
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, activity, started, child_sprite_genders);
}
void SetGnameBufferWonderFlags(bool32 hasNews, bool32 hasCard)
@@ -1938,16 +1938,16 @@ void RfuUpdatePlayerGnameStateAndSend(u32 type, u32 species, u32 level)
gHostRFUtgtGnameBuffer.level = level;
}
void sub_80FAFE0(bool8 unk_0a_7)
void UpdateGameData_GroupLockedIn(bool8 started)
{
gHostRFUtgtGnameBuffer.unk_0a_7 = unk_0a_7;
gHostRFUtgtGnameBuffer.started = started;
rfu_REQ_configGameData(0, 0x0002, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer);
}
void sub_80FB008(u8 activity, u32 child_sprite_genders, u32 a2)
void UpdateGameDataWithActivitySpriteGendersFlag(u8 activity, u32 child_sprite_genders, u32 started)
{
if (activity)
SetHostRFUtgtGname(activity, child_sprite_genders, a2);
SetHostRFUtgtGname(activity, child_sprite_genders, started);
rfu_REQ_configGameData(0, 0x0002, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer);
}
@@ -1976,7 +1976,7 @@ void sub_80FB030(u32 linkPlayerCount)
break;
}
}
sub_80FB008(ACTIVITY_CHAT | IN_UNION_ROOM, child_sprite_genders, 0);
UpdateGameDataWithActivitySpriteGendersFlag(ACTIVITY_CHAT | IN_UNION_ROOM, child_sprite_genders, 0);
}
}
@@ -2056,12 +2056,12 @@ static void LmanCallback_Parent2(u8 msg, u8 param_count)
case LMAN_MSG_SEARCH_CHILD_PERIOD_EXPIRED:
break;
case LMAN_MSG_END_WAIT_CHILD_NAME:
if (Rfu.unk_ce7 != lman.acceptSlot_flag)
if (Rfu.acceptSlot_flag != lman.acceptSlot_flag)
{
rfu_REQ_disconnect(Rfu.unk_ce7 ^ lman.acceptSlot_flag);
rfu_REQ_disconnect(Rfu.acceptSlot_flag ^ lman.acceptSlot_flag);
rfu_waitREQComplete();
}
Rfu.state = 0x11;
Rfu.state = 17;
break;
case LMAN_MSG_LINK_LOSS_DETECTED_AND_START_RECOVERY:
Rfu.linkLossRecoveryState = 1;
@@ -2216,7 +2216,7 @@ static void LmanCallback_Parent(u8 msg, u8 param_count)
switch (msg)
{
case LMAN_MSG_INITIALIZE_COMPLETED:
Rfu.state = 0x11;
Rfu.state = 17;
break;
case LMAN_MSG_NEW_CHILD_CONNECT_DETECTED:
RfuSetErrorStatus(4, 0);
@@ -2245,7 +2245,7 @@ static void LmanCallback_Parent(u8 msg, u8 param_count)
Rfu.unk_ce4 = 2;
}
}
else if (GetHostRFUtgtGname()->activity == (0x40 | 20))
else if (GetHostRFUtgtGname()->activity == (ACTIVITY_PLYRTALK | IN_UNION_ROOM))
{
rfu_REQ_disconnect(lman.acceptSlot_flag);
rfu_waitREQComplete();
@@ -2264,7 +2264,7 @@ static void LmanCallback_Parent(u8 msg, u8 param_count)
rfu_waitREQComplete();
}
if (Rfu.state == 0xF)
Rfu.state = 0x10;
Rfu.state = 16;
break;
case LMAN_MSG_PARENT_FOUND:
Rfu.parentId = lman.param[0];
@@ -2275,7 +2275,7 @@ static void LmanCallback_Parent(u8 msg, u8 param_count)
Rfu.child_slot = lman.param[0];
break;
case LMAN_MSG_CONNECT_PARENT_FAILED:
Rfu.state = 0x12;
Rfu.state = 18;
if (Rfu.unk_ccf < 2)
{
Rfu.unk_ccf++;
@@ -2287,7 +2287,7 @@ static void LmanCallback_Parent(u8 msg, u8 param_count)
}
break;
case LMAN_MSG_CHILD_NAME_SEND_COMPLETED:
Rfu.state = 0xD;
Rfu.state = 13;
RfuSetErrorStatus(3, 0);
rfu_setRecvBuffer(TYPE_UNI, Rfu.child_slot, Rfu.unk_c3f, sizeof(Rfu.unk_c3f));
break;
@@ -2534,7 +2534,7 @@ static void RfuReqDisconnectSlot(u32 bmDisconnectSlot)
Rfu.unk_cda = sub_80F886C(Rfu.bm_PartnerFlags);
}
void sub_80FBD4C(const u8 *trainerName, u16 trainerId)
void RequestDisconnectSlotByTrainerNameAndId(const u8 *trainerName, u16 trainerId)
{
u8 var = GetPartnerIndexByNameAndTrainerID(trainerName, trainerId);
if (var != 0xFF)
@@ -2591,7 +2591,7 @@ static void sub_80FBE80(u8 taskId)
{
s16 *data = gTasks[taskId].data;
if (sub_80F8EA4())
if (RfuStateIs7AndPlayerIsChild())
{
u8 id = GetPartnerIndexByNameAndTrainerID((u8*)data, ReadU16(&data[8]));
if (id != 0xFF)
@@ -2599,7 +2599,7 @@ static void sub_80FBE80(u8 taskId)
if (gRfuLinkStatus->partner[id].slot != 0xFF)
{
Rfu.unk_c3d = id;
if (sub_80F8ECC())
if (IsParentSuccessfullyReconnected())
DestroyTask(taskId);
}
else if (GetHostRFUtgtGname()->activity == ACTIVITY_WCARD2 || GetHostRFUtgtGname()->activity == ACTIVITY_WNEWS2)
@@ -2630,7 +2630,7 @@ static void sub_80FBE80(u8 taskId)
}
}
void sub_80FBF54(const u8 *src, u16 trainerId)
void CreateTask_sub_80FBE80(const u8 *trainerName, u16 trainerId)
{
u8 taskId;
s16 *data;
@@ -2638,7 +2638,7 @@ void sub_80FBF54(const u8 *src, u16 trainerId)
Rfu.unk_f1 = 0;
taskId = CreateTask(sub_80FBE80, 3);
data = gTasks[taskId].data;
StringCopy((u8*)(data), src);
StringCopy((u8*)(data), trainerName);
data[8] = trainerId;
}
+2 -2
View File
@@ -603,7 +603,7 @@ static u8 GetConnectedChildStrength(u8 maxFlags)
}
#endif
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 r2, s32 child_sprite_genders)
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders)
{
s32 i;
@@ -618,7 +618,7 @@ void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 r2, s32 ch
}
data->playerGender = gSaveBlock2Ptr->playerGender;
data->activity = activity;
data->unk_0a_7 = r2;
data->started = started;
data->unk_00.language = GAME_LANGUAGE;
data->unk_00.version = GAME_VERSION;
data->unk_00.hasNews = FALSE;
+1 -1
View File
@@ -763,7 +763,7 @@ void sub_8107CF8(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y)
BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality, 1), x, y, 32, 32);
}
void sub_8107D38(u8 palOffset, u8 palId)
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId)
{
const u16 *palette;
+5 -5
View File
@@ -952,7 +952,7 @@ void ResetReceivedWonderCardFlag(void)
sReceivedWonderCardIsValid = FALSE;
}
bool32 sub_81446D0(u16 cardId)
bool32 MEventHandleReceivedWonderCard(u16 cardId)
{
sReceivedWonderCardIsValid = FALSE;
if (cardId == 0)
@@ -965,19 +965,19 @@ bool32 sub_81446D0(u16 cardId)
return TRUE;
}
void sub_8144714(u32 eventId, u32 trainerId)
void MEvent_RecordIdOfWonderCardSenderByEventType(u32 eventId, u32 trainerId)
{
if (sReceivedWonderCardIsValid)
{
switch (eventId)
{
case 2:
case 2: // trade
RecordIdOfWonderCardSender(2, trainerId, gSaveBlock1Ptr->mysteryEventBuffers.unk_344[1], 5);
break;
case 0:
case 0: // link win
RecordIdOfWonderCardSender(0, trainerId, gSaveBlock1Ptr->mysteryEventBuffers.unk_344[0], 5);
break;
case 1:
case 1: // link loss
RecordIdOfWonderCardSender(1, trainerId, gSaveBlock1Ptr->mysteryEventBuffers.unk_344[0], 5);
break;
default:
+4 -4
View File
@@ -562,8 +562,8 @@ void sub_8102F80(u8 taskId)
switch (gUnknown_203ACF0->field_01)
{
case 0:
sub_8107D38(0x10, 0);
sub_8107D38(0x20, 1);
ListMenuLoadStdPalAt(0x10, 0);
ListMenuLoadStdPalAt(0x20, 1);
gUnknown_203ACF0->field_48 = sub_8103518(gUnknown_203ACF0->field_42);
gUnknown_203ACF0->field_01 = 2;
break;
@@ -648,8 +648,8 @@ void sub_8103238(u8 taskId)
switch (gUnknown_203ACF0->field_01)
{
case 0:
sub_8107D38(0x10, 0);
sub_8107D38(0x20, 1);
ListMenuLoadStdPalAt(0x10, 0);
ListMenuLoadStdPalAt(0x20, 1);
gUnknown_203ACF0->field_48 = sub_8103518(gUnknown_203ACF0->field_42);
gUnknown_203ACF0->field_01 = 2;
break;
+1 -1
View File
@@ -1304,7 +1304,7 @@ static void InitWindowTemplatesAndPals(void)
LoadPalette(gTMCaseMainWindowPalette, 0xA0, 0x20);
LoadPalette(sPal3Override, 0xF6, 0x04);
LoadPalette(sPal3Override, 0xD6, 0x04);
sub_8107D38(0xc0, 0x01);
ListMenuLoadStdPalAt(0xc0, 0x01);
for (i = 0; i < 9; i++)
FillWindowPixelBuffer(i, 0x00);
PutWindowTilemap(0);
+1 -1
View File
@@ -2594,7 +2594,7 @@ static void sub_8053E8C(void)
}
if (gWirelessCommType)
{
sub_8144714(2, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId);
MEvent_RecordIdOfWonderCardSenderByEventType(2, gLinkPlayers[GetMultiplayerId() ^ 1].trainerId);
}
SetContinueGameWarpStatusToDynamicWarp();
sub_80DA3AC();
+322 -296
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -47,7 +47,7 @@ static const u8 gUnknown_84571A8[] = {1, 2, 3};
static void SetUpPartiesAndStartBattle(void)
{
s32 i;
sub_81173C0(BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER);
StartUnionRoomBattle(BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER);
for (i = 0; i < 2; i++)
{
gEnemyParty[i] = gPlayerParty[gSelectedOrderFromParty[i] - 1];
+1 -1
View File
@@ -5,7 +5,7 @@
ALIGNED(4) const u8 gUnionRoomActivity_Blank[] = _("");
ALIGNED(4) const u8 gUnknown_84571B0[] = _(":");
ALIGNED(4) const u8 gUnknown_84571B4[] = _("{EXTRA 7}");
ALIGNED(4) const u8 gUnknown_84571B4[] = _("{ID}");
ALIGNED(4) const u8 gUnknown_84571B8[] = _("Please start over from the beginning.");
ALIGNED(4) const u8 gUnknown_84571E0[] = _("The WIRELESS COMMUNICATION\nSYSTEM search has been canceled.");
ALIGNED(4) const u8 gUnref_845721C[] = _("ともだちからの れんらくを\nまっています");