Cleanup and documentation
This commit is contained in:
@@ -869,7 +869,7 @@ static void sub_80586F8(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
m4aSongNumStop(SE_HINSI);
|
||||
gMain.inBattle = 0;
|
||||
@@ -888,7 +888,7 @@ void sub_80587B0(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
if (gWirelessCommType == 0)
|
||||
sub_800AC34();
|
||||
|
||||
@@ -800,7 +800,7 @@ static void Task_HandleSendLinkBuffersData(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
blockSize = gLinkBattleSendBuffer[gTasks[taskId].data[15] + LINK_BUFF_SIZE_LO] | (gLinkBattleSendBuffer[gTasks[taskId].data[15] + LINK_BUFF_SIZE_HI] << 8);
|
||||
gTasks[taskId].data[13] = 1;
|
||||
|
||||
@@ -986,7 +986,7 @@ static void CB2_HandleStartBattle(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
{
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
*(&gBattleStruct->field_180) = 0;
|
||||
*(&gBattleStruct->field_181) = 3;
|
||||
@@ -1035,7 +1035,7 @@ static void CB2_HandleStartBattle(void)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1050,7 +1050,7 @@ static void CB2_HandleStartBattle(void)
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1065,7 +1065,7 @@ static void CB2_HandleStartBattle(void)
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 4, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1107,7 +1107,7 @@ static void CB2_HandleStartBattle(void)
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1194,7 +1194,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
GetBattleTowerTrainerLanguage(&language, gTrainerBattleOpponent_B);
|
||||
gLinkPlayers[3].language = language;
|
||||
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
*(&gBattleStruct->field_180) = 0;
|
||||
*(&gBattleStruct->field_181) = 3;
|
||||
@@ -1234,7 +1234,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1258,7 +1258,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1282,7 +1282,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gEnemyParty, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1300,7 +1300,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 2, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1318,7 +1318,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 4, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1360,7 +1360,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1440,7 +1440,7 @@ static void CB2_PreInitMultiBattle(void)
|
||||
switch (gBattleCommunication[MULTIUSE_STATE])
|
||||
{
|
||||
case 0:
|
||||
if (gReceivedRemoteLinkPlayers != 0 && sub_800A520())
|
||||
if (gReceivedRemoteLinkPlayers != 0 && IsLinkTaskFinished())
|
||||
{
|
||||
gUnknown_02023058 = Alloc(sizeof(struct UnknownPokemonStruct4) * 3);
|
||||
sub_80379F8(0);
|
||||
@@ -1478,7 +1478,7 @@ static void CB2_PreInitMultiBattle(void)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (sub_800A520() && !gPaletteFade.active)
|
||||
if (IsLinkTaskFinished() && !gPaletteFade.active)
|
||||
{
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
if (gWirelessCommType)
|
||||
@@ -1581,7 +1581,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
{
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
*(&gBattleStruct->field_180) = 0;
|
||||
*(&gBattleStruct->field_181) = 3;
|
||||
@@ -1643,7 +1643,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
break;
|
||||
// fall through
|
||||
case 3:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1706,7 +1706,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -1802,7 +1802,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
u32* ptr = (u32*)(&gBattleStruct->field_180);
|
||||
ptr[0] = gBattleTypeFlags;
|
||||
@@ -2361,7 +2361,7 @@ static void sub_8038F34(void)
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
case 6:
|
||||
if (sub_800A520() == TRUE)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
sub_800ADF8();
|
||||
BattlePutTextOnWindow(gText_LinkStandby3, 0);
|
||||
@@ -2371,7 +2371,7 @@ static void sub_8038F34(void)
|
||||
case 7:
|
||||
if (!IsTextPrinterActive(0))
|
||||
{
|
||||
if (sub_800A520() == TRUE)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@@ -2546,7 +2546,7 @@ static void sub_803939C(void)
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (sub_800A520() == TRUE)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
if (gMain.field_439_x4)
|
||||
@@ -2596,7 +2596,7 @@ static void sub_803939C(void)
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (sub_800A520() == TRUE && !IsTextPrinterActive(0) && --gBattleCommunication[1] == 0)
|
||||
if (IsLinkTaskFinished() == TRUE && !IsTextPrinterActive(0) && --gBattleCommunication[1] == 0)
|
||||
{
|
||||
if (gMain.field_439_x4)
|
||||
{
|
||||
@@ -2612,7 +2612,7 @@ static void sub_803939C(void)
|
||||
{
|
||||
if (gMain.field_439_x4)
|
||||
{
|
||||
if (sub_800A520() == TRUE)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattleCommunication[1] = 0x20;
|
||||
|
||||
@@ -2799,7 +2799,7 @@ static void sub_8164B74(void)
|
||||
if (battleMode == FRONTIER_MODE_LINK_MULTIS)
|
||||
{
|
||||
challengeNum = gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode] / 7;
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), &challengeNum, sizeof(challengeNum));
|
||||
gSpecialVar_Result = 1;
|
||||
@@ -2836,7 +2836,7 @@ static void sub_8164B74(void)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gSaveBlock2Ptr->frontier.field_CB4, sizeof(gSaveBlock2Ptr->frontier.field_CB4));
|
||||
gSpecialVar_Result = 3;
|
||||
|
||||
@@ -1240,7 +1240,7 @@ static void sub_8080018(void)
|
||||
sBerryBlenderData->framesToWait = 0;
|
||||
break;
|
||||
case 9:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
if (GetMultiplayerId() == 0)
|
||||
@@ -1297,7 +1297,7 @@ static void sub_8080018(void)
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sBerryBlenderData->mainState++;
|
||||
sub_8082CB4(&sBerryBlenderData->bgAffineSrc);
|
||||
@@ -1342,7 +1342,7 @@ static void sub_8080018(void)
|
||||
sBerryBlenderData->mainState++;
|
||||
break;
|
||||
case 20:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sub_800A418();
|
||||
sBerryBlenderData->mainState++;
|
||||
@@ -2412,7 +2412,7 @@ static void CB2_HandleBlenderEndGame(void)
|
||||
{
|
||||
sBerryBlenderData->gameEndState++;
|
||||
}
|
||||
else if (sub_800A520())
|
||||
else if (IsLinkTaskFinished())
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers != 0 && gWirelessCommType)
|
||||
{
|
||||
@@ -2593,7 +2593,7 @@ static bool8 LinkPlayAgainHandleSaving(void)
|
||||
sBerryBlenderData->framesToWait = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sBerryBlenderData->field_1A0++;
|
||||
gSoftResetDisabled = TRUE;
|
||||
@@ -2612,7 +2612,7 @@ static bool8 LinkPlayAgainHandleSaving(void)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
if (sub_8153474())
|
||||
{
|
||||
@@ -2687,7 +2687,7 @@ static void CB2_HandlePlayerLinkPlayAgainChoice(void)
|
||||
sBerryBlenderData->gameEndState++;
|
||||
break;
|
||||
case 6:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sBerryBlenderData->framesToWait = 0;
|
||||
sBerryBlenderData->gameEndState++;
|
||||
@@ -2706,7 +2706,7 @@ static void CB2_HandlePlayerLinkPlayAgainChoice(void)
|
||||
sub_800ADF8();
|
||||
break;
|
||||
case 9:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
|
||||
sBerryBlenderData->gameEndState++;
|
||||
|
||||
@@ -898,7 +898,7 @@ static void sub_80B33BC(u8 taskId)
|
||||
data[0] = 6;
|
||||
break;
|
||||
case 6:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
data[0] = 7;
|
||||
}
|
||||
@@ -1123,7 +1123,7 @@ static void sub_80B3894(u8 taskId)
|
||||
data[0]++;
|
||||
break;
|
||||
case 3:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sub_8013F78();
|
||||
DestroyTask(taskId);
|
||||
|
||||
@@ -473,14 +473,14 @@ void sub_80D7CB4(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
// fallthrough
|
||||
case 1:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sub_800ADF8();
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
return;
|
||||
case 2:
|
||||
if (sub_800A520() != TRUE)
|
||||
if (IsLinkTaskFinished() != TRUE)
|
||||
return;
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
|
||||
@@ -215,7 +215,7 @@ static void sub_80AF234(u8 taskId)
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
if (!sub_800A520())
|
||||
if (!IsLinkTaskFinished())
|
||||
{
|
||||
if (++task->data[1] > 1800)
|
||||
sub_8011170(0x6000);
|
||||
@@ -248,7 +248,7 @@ void sub_80AF2B4(u8 taskId)
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
task->data[0]++;
|
||||
}
|
||||
|
||||
@@ -3616,7 +3616,7 @@ static void sub_813B57C(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_800A520() == TRUE)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
if (GetMultiplayerId() == 0)
|
||||
{
|
||||
@@ -3657,7 +3657,7 @@ static void sub_813B57C(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (sub_800A520() == TRUE)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
if (GetMultiplayerId() != 0)
|
||||
{
|
||||
@@ -3709,14 +3709,14 @@ static void sub_813B57C(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (sub_800A520() == 1)
|
||||
if (IsLinkTaskFinished() == 1)
|
||||
{
|
||||
sub_800ADF8();
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (sub_800A520() == 1)
|
||||
if (IsLinkTaskFinished() == 1)
|
||||
{
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
|
||||
@@ -1080,7 +1080,7 @@ bool8 sub_800A4D8(u8 a0)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_800A520(void)
|
||||
bool8 IsLinkTaskFinished(void)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
|
||||
@@ -4123,7 +4123,7 @@ void sub_8010AAC(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 5:
|
||||
if (sub_800A520() && GetBlockReceivedStatus() & 1)
|
||||
if (IsLinkTaskFinished() && GetBlockReceivedStatus() & 1)
|
||||
{
|
||||
CpuFill16(0, gBlockRecvBuffer, sizeof(struct UnkRfuStruct_8010A14));
|
||||
ResetBlockReceivedFlag(0);
|
||||
@@ -4162,7 +4162,7 @@ void sub_8010D0C(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -1530,7 +1530,7 @@ static void sub_80E7FF8(u8 taskId)
|
||||
task->data[0] ++;
|
||||
break;
|
||||
case 9:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1838,7 +1838,7 @@ void sub_8014790(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
sub_80149D8();
|
||||
@@ -2095,7 +2095,7 @@ void sub_8014A40(u8 taskId)
|
||||
data->state++;
|
||||
break;
|
||||
case 17:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
@@ -2264,7 +2264,7 @@ void sub_8014F48(u8 taskId)
|
||||
sub_800ADF8();
|
||||
break;
|
||||
case 12:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
@@ -2443,7 +2443,7 @@ void sub_80152F4(u8 taskId)
|
||||
sub_800ADF8();
|
||||
break;
|
||||
case 14:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
@@ -2836,7 +2836,7 @@ void sub_80156E0(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 41:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
if (GetMultiplayerId() == 0)
|
||||
{
|
||||
@@ -3033,7 +3033,7 @@ void sub_80156E0(u8 taskId)
|
||||
data->state = 15;
|
||||
break;
|
||||
case 15:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
data->state = 16;
|
||||
break;
|
||||
case 16:
|
||||
|
||||
@@ -77,7 +77,7 @@ extern void DoSaveFailedScreen(u8); // save_failed_screen
|
||||
extern bool32 ProgramFlashSectorAndVerify(u8 sector, u8 *data);
|
||||
extern void save_serialize_map(void);
|
||||
extern void sub_800ADF8(void);
|
||||
extern bool8 sub_800A520(void);
|
||||
extern bool8 IsLinkTaskFinished(void);
|
||||
|
||||
// iwram common
|
||||
u16 gLastWrittenSector;
|
||||
@@ -914,7 +914,7 @@ void sub_8153688(u8 taskId)
|
||||
taskData[0] = 2;
|
||||
break;
|
||||
case 2:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
if (taskData[2] == 0)
|
||||
save_serialize_map();
|
||||
@@ -951,7 +951,7 @@ void sub_8153688(u8 taskId)
|
||||
taskData[0] = 8;
|
||||
break;
|
||||
case 8:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sub_8153408();
|
||||
taskData[0] = 9;
|
||||
@@ -962,7 +962,7 @@ void sub_8153688(u8 taskId)
|
||||
taskData[0] = 10;
|
||||
break;
|
||||
case 10:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
taskData[0]++;
|
||||
break;
|
||||
case 11:
|
||||
|
||||
@@ -451,7 +451,7 @@ static void sub_80F9088(u8 taskId)
|
||||
switch (gTasks[taskId].data[0])
|
||||
{
|
||||
case 0:
|
||||
if (sub_800A520())
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
sub_800ADF8();
|
||||
gTasks[taskId].data[0]++;
|
||||
@@ -461,7 +461,7 @@ static void sub_80F9088(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
default:
|
||||
if (sub_800A520() == 1)
|
||||
if (IsLinkTaskFinished() == 1)
|
||||
{
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
|
||||
560
src/trade.c
560
src/trade.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user