Merge master into ObjEvent rename and prune accidental inclusions
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "wallclock.h"
|
||||
#include "window.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/battle_tower.h"
|
||||
#include "constants/decorations.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/event_object_movement.h"
|
||||
@@ -83,7 +84,7 @@ static EWRAM_DATA u8 sScrollableMultichoice_ItemSpriteId = 0;
|
||||
static EWRAM_DATA u8 sBattlePointsWindowId = 0;
|
||||
static EWRAM_DATA u8 sFrontierExchangeCorner_ItemIconWindowId = 0;
|
||||
static EWRAM_DATA u8 sPCBoxToSendMon = 0;
|
||||
static EWRAM_DATA u32 sUnknown_0203AB70 = 0;
|
||||
static EWRAM_DATA u32 sBattleTowerMultiBattleTypeFlags = 0;
|
||||
|
||||
struct ListMenuTemplate gScrollableMultichoice_ListMenuTemplate;
|
||||
|
||||
@@ -128,7 +129,7 @@ static void ShowFrontierExchangeCornerItemIcon(u16 item);
|
||||
static void Task_DeoxysRockInteraction(u8 taskId);
|
||||
static void ChangeDeoxysRockLevel(u8 a0);
|
||||
static void WaitForDeoxysRockMovement(u8 taskId);
|
||||
static void sub_813B57C(u8 taskId);
|
||||
static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId);
|
||||
static void Task_LoopWingFlapSE(u8 taskId);
|
||||
static void Task_CloseBattlePikeCurtain(u8 taskId);
|
||||
static u8 DidPlayerGetFirstFans(void);
|
||||
@@ -1701,10 +1702,10 @@ bool8 IsBadEggInParty(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 InMultiBattleRoom(void)
|
||||
bool8 InMultiPartnerRoom(void)
|
||||
{
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM)
|
||||
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM) &&
|
||||
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM)
|
||||
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM) &&
|
||||
VarGet(VAR_FRONTIER_BATTLE_MODE) == FRONTIER_MODE_MULTIS)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
@@ -3746,7 +3747,7 @@ bool32 ShouldDistributeEonTicket(void)
|
||||
|
||||
void sub_813B534(void)
|
||||
{
|
||||
sUnknown_0203AB70 = gBattleTypeFlags;
|
||||
sBattleTowerMultiBattleTypeFlags = gBattleTypeFlags;
|
||||
gBattleTypeFlags = 0;
|
||||
if (!gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
@@ -3754,12 +3755,12 @@ void sub_813B534(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_813B568(void)
|
||||
void LinkRetireStatusWithBattleTowerPartner(void)
|
||||
{
|
||||
CreateTask(sub_813B57C, 5);
|
||||
CreateTask(Task_LinkRetireStatusWithBattleTowerPartner, 5);
|
||||
}
|
||||
|
||||
static void sub_813B57C(u8 taskId)
|
||||
static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId)
|
||||
{
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
@@ -3790,21 +3791,24 @@ static void sub_813B57C(u8 taskId)
|
||||
{
|
||||
gSpecialVar_0x8005 = gBlockRecvBuffer[1][0];
|
||||
ResetBlockReceivedFlag(1);
|
||||
if (gSpecialVar_0x8004 == 1 && gSpecialVar_0x8005 == 1)
|
||||
if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE
|
||||
&& gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE)
|
||||
{
|
||||
gSpecialVar_Result = 1;
|
||||
gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_BOTH_RETIRE;
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 0 && gSpecialVar_0x8005 == 1)
|
||||
else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_CONTINUE
|
||||
&& gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE)
|
||||
{
|
||||
gSpecialVar_Result = 2;
|
||||
gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_PARTNER_RETIRE;
|
||||
}
|
||||
else if (gSpecialVar_0x8004 == 1 && gSpecialVar_0x8005 == 0)
|
||||
else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE
|
||||
&& gSpecialVar_0x8005 == BATTLE_TOWER_LINK_CONTINUE)
|
||||
{
|
||||
gSpecialVar_Result = 3;
|
||||
gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_PLAYER_RETIRE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_Result = 0;
|
||||
gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_CONTINUE;
|
||||
}
|
||||
}
|
||||
gTasks[taskId].data[0]++;
|
||||
@@ -3842,14 +3846,14 @@ static void sub_813B57C(u8 taskId)
|
||||
case 5:
|
||||
if (GetMultiplayerId() == 0)
|
||||
{
|
||||
if (gSpecialVar_Result == 2)
|
||||
if (gSpecialVar_Result == BATTLE_TOWER_LINKSTAT_PARTNER_RETIRE)
|
||||
{
|
||||
ShowFieldAutoScrollMessage(gText_YourPartnerHasRetired);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gSpecialVar_Result == 3)
|
||||
if (gSpecialVar_Result == BATTLE_TOWER_LINKSTAT_PLAYER_RETIRE)
|
||||
{
|
||||
ShowFieldAutoScrollMessage(gText_YourPartnerHasRetired);
|
||||
}
|
||||
@@ -3880,7 +3884,7 @@ static void sub_813B57C(u8 taskId)
|
||||
{
|
||||
sub_800AC34();
|
||||
}
|
||||
gBattleTypeFlags = sUnknown_0203AB70;
|
||||
gBattleTypeFlags = sBattleTowerMultiBattleTypeFlags;
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user