mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
make union room compile i guess
This commit is contained in:
parent
377280ac3b
commit
c9d486a5d3
1849
asm/rom_8011DC0.s
1849
asm/rom_8011DC0.s
File diff suppressed because it is too large
Load Diff
@ -32,7 +32,7 @@ LilycoveCity_ContestLobby_MapWarps: @ 853178C
|
||||
warp_def 21, 1, 0, 1, LILYCOVE_CITY_CONTEST_HALL
|
||||
|
||||
LilycoveCity_ContestLobby_MapBGEvents: @ 85317AC
|
||||
bg_event 23, 5, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_294055
|
||||
bg_event 23, 5, 0, 0, 0, EventScript_PblockLink
|
||||
bg_event 23, 9, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_293E1E
|
||||
bg_event 23, 1, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_21A753
|
||||
bg_event 25, 1, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_21A75A
|
||||
@ -41,7 +41,7 @@ LilycoveCity_ContestLobby_MapBGEvents: @ 85317AC
|
||||
bg_event 3, 1, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_21A73E
|
||||
bg_event 5, 1, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_21A745
|
||||
bg_event 7, 1, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_21A74C
|
||||
bg_event 27, 5, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_293C3E
|
||||
bg_event 27, 5, 0, 0, 0, EventScript_Pblock1_Ask
|
||||
bg_event 27, 9, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_293D4D
|
||||
bg_event 18, 3, 0, 0, 0, LilycoveCity_ContestLobby_EventScript_21A784
|
||||
|
||||
|
@ -245,7 +245,7 @@ LilycoveCity_ContestLobby_Text_293BB4: @ 8293BB4
|
||||
.string "But, I don’t have any to spare today.\n"
|
||||
.string "Sorry about that.$"
|
||||
|
||||
EventScript_Pblock1_Ask: @ 8293C3E
|
||||
EventScript_Pblock1_Ask:: @ 8293C3E
|
||||
lockall
|
||||
checkflag FLAG_0x340
|
||||
goto_if 0, LilycoveCity_ContestLobby_EventScript_293EFB
|
||||
@ -332,7 +332,7 @@ EventScript_Pblock1_NoPokeblock: @ 8293D43
|
||||
releaseall
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_293D4D: @ 8293D4D
|
||||
LilycoveCity_ContestLobby_EventScript_293D4D:: @ 8293D4D
|
||||
lockall
|
||||
setvar VAR_0x8009, 2
|
||||
applymovement 10, LilycoveCity_ContestLobby_Movement_2725A2
|
||||
@ -396,7 +396,7 @@ LilycoveCity_ContestLobby_EventScript_293E14: @ 8293E14
|
||||
releaseall
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_293E1E: @ 8293E1E
|
||||
LilycoveCity_ContestLobby_EventScript_293E1E:: @ 8293E1E
|
||||
lockall
|
||||
setvar VAR_0x8008, 15
|
||||
setvar VAR_0x8009, 3
|
||||
@ -513,19 +513,19 @@ LilycoveCity_ContestLobby_EventScript_293F98: @ 8293F98
|
||||
releaseall
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_293FA2: @ 8293FA2
|
||||
LilycoveCity_ContestLobby_EventScript_293FA2:: @ 8293FA2
|
||||
msgbox LilycoveCity_ContestLobby_Text_2937F9, 2
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_293FAB: @ 8293FAB
|
||||
LilycoveCity_ContestLobby_EventScript_293FAB:: @ 8293FAB
|
||||
msgbox LilycoveCity_ContestLobby_Text_293842, 2
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_293FB4: @ 8293FB4
|
||||
LilycoveCity_ContestLobby_EventScript_293FB4:: @ 8293FB4
|
||||
msgbox LilycoveCity_ContestLobby_Text_29388F, 2
|
||||
end
|
||||
|
||||
LilycoveCity_ContestLobby_EventScript_293FBD: @ 8293FBD
|
||||
LilycoveCity_ContestLobby_EventScript_293FBD:: @ 8293FBD
|
||||
setvar VAR_0x8008, 15
|
||||
goto LilycoveCity_ContestLobby_EventScript_293FC8
|
||||
end
|
||||
@ -576,7 +576,7 @@ LilycoveCity_ContestLobby_Movement_294053: @ 8294053
|
||||
step_28
|
||||
step_end
|
||||
|
||||
EventScript_PblockLink: @ 8294055
|
||||
EventScript_PblockLink:: @ 8294055
|
||||
lockall
|
||||
specialvar VAR_RESULT, PlayerHasBerries
|
||||
compare VAR_RESULT, 0
|
||||
|
@ -81,7 +81,7 @@ struct UnkLinkRfuStruct_02022B14Substruct
|
||||
u8 playerTrainerId[2];
|
||||
};
|
||||
|
||||
struct UnkLinkRfuStruct_02022B14
|
||||
struct __attribute__((packed)) UnkLinkRfuStruct_02022B14
|
||||
{
|
||||
struct UnkLinkRfuStruct_02022B14Substruct unk_00;
|
||||
u8 unk_04[4];
|
||||
|
@ -278,7 +278,7 @@ static void sub_8035C4C(void)
|
||||
{
|
||||
if (gBattleOutcome == B_OUTCOME_WON)
|
||||
{
|
||||
switch (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18)
|
||||
switch (gLinkPlayers[gBattleScripting.multiplayerId].id)
|
||||
{
|
||||
case 0:
|
||||
BattleHandleAddTextPrinter(gText_Win, 0x16);
|
||||
@ -300,7 +300,7 @@ static void sub_8035C4C(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18)
|
||||
switch (gLinkPlayers[gBattleScripting.multiplayerId].id)
|
||||
{
|
||||
case 0:
|
||||
BattleHandleAddTextPrinter(gText_Win, 0x17);
|
||||
@ -323,7 +323,7 @@ static void sub_8035C4C(void)
|
||||
}
|
||||
else if (gBattleOutcome == B_OUTCOME_WON)
|
||||
{
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 != 0)
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0)
|
||||
{
|
||||
BattleHandleAddTextPrinter(gText_Win, 0x17);
|
||||
BattleHandleAddTextPrinter(gText_Loss, 0x16);
|
||||
@ -336,7 +336,7 @@ static void sub_8035C4C(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 != 0)
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0)
|
||||
{
|
||||
BattleHandleAddTextPrinter(gText_Win, 0x16);
|
||||
BattleHandleAddTextPrinter(gText_Loss, 0x17);
|
||||
@ -365,23 +365,23 @@ void sub_8035D74(u8 taskId)
|
||||
name = gLinkPlayers[i].name;
|
||||
linkPlayer = &gLinkPlayers[i];
|
||||
|
||||
switch (linkPlayer->lp_field_18)
|
||||
switch (linkPlayer->id)
|
||||
{
|
||||
case 0:
|
||||
BattleHandleAddTextPrinter(name, 0x11);
|
||||
sub_8035AE4(taskId, linkPlayer->lp_field_18, 1, 2, 4);
|
||||
sub_8035AE4(taskId, linkPlayer->id, 1, 2, 4);
|
||||
break;
|
||||
case 1:
|
||||
BattleHandleAddTextPrinter(name, 0x12);
|
||||
sub_8035AE4(taskId, linkPlayer->lp_field_18, 2, 2, 4);
|
||||
sub_8035AE4(taskId, linkPlayer->id, 2, 2, 4);
|
||||
break;
|
||||
case 2:
|
||||
BattleHandleAddTextPrinter(name, 0x13);
|
||||
sub_8035AE4(taskId, linkPlayer->lp_field_18, 1, 2, 8);
|
||||
sub_8035AE4(taskId, linkPlayer->id, 1, 2, 8);
|
||||
break;
|
||||
case 3:
|
||||
BattleHandleAddTextPrinter(name, 0x14);
|
||||
sub_8035AE4(taskId, linkPlayer->lp_field_18, 2, 2, 8);
|
||||
sub_8035AE4(taskId, linkPlayer->id, 2, 2, 8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -392,7 +392,7 @@ void sub_8035D74(u8 taskId)
|
||||
u8 opponentId = playerId ^ BIT_SIDE;
|
||||
u8 opponentId_copy = opponentId;
|
||||
|
||||
if (gLinkPlayers[playerId].lp_field_18 != 0)
|
||||
if (gLinkPlayers[playerId].id != 0)
|
||||
opponentId = playerId, playerId = opponentId_copy;
|
||||
|
||||
name = gLinkPlayers[playerId].name;
|
||||
|
@ -264,67 +264,67 @@ static void InitSinglePlayerBtlControllers(void)
|
||||
|
||||
for (var = gUnknown_0203C7B4, i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
sub_81B8D64(gLinkPlayers[i].lp_field_18, 0);
|
||||
sub_81B8D64(gLinkPlayers[i].id, 0);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
sub_81B8D64(gLinkPlayers[i].lp_field_18, 1);
|
||||
sub_81B8D64(gLinkPlayers[i].id, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == var)
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_LEFT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_LEFT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_RIGHT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_RIGHT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[var].lp_field_18 & 1))
|
||||
|| ((gLinkPlayers[i].lp_field_18 & 1) && (gLinkPlayers[var].lp_field_18 & 1)))
|
||||
else if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[var].id & 1))
|
||||
|| ((gLinkPlayers[i].id & 1) && (gLinkPlayers[var].id & 1)))
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_LEFT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_LEFT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_RIGHT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_RIGHT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToRecordedOpponent;
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedOpponent;
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_OPPONENT_LEFT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_OPPONENT_LEFT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_OPPONENT_RIGHT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_OPPONENT_RIGHT;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -506,69 +506,69 @@ static void InitLinkBtlControllers(void)
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
sub_81B8D64(gLinkPlayers[i].lp_field_18, 0);
|
||||
sub_81B8D64(gLinkPlayers[i].id, 0);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
sub_81B8D64(gLinkPlayers[i].lp_field_18, 1);
|
||||
sub_81B8D64(gLinkPlayers[i].id, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == multiplayerId)
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToPlayer;
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToPlayer;
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = 0;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 2;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = 2;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[multiplayerId].lp_field_18 & 1))
|
||||
|| ((gLinkPlayers[i].lp_field_18 & 1) && (gLinkPlayers[multiplayerId].lp_field_18 & 1)))
|
||||
if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[multiplayerId].id & 1))
|
||||
|| ((gLinkPlayers[i].id & 1) && (gLinkPlayers[multiplayerId].id & 1)))
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToLinkPartner;
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToLinkPartner;
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = 0;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 2;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = 2;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToLinkOpponent;
|
||||
switch (gLinkPlayers[i].lp_field_18)
|
||||
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToLinkOpponent;
|
||||
switch (gLinkPlayers[i].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 1;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = 1;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
|
||||
gBattlerPositions[gLinkPlayers[i].id] = 3;
|
||||
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -821,7 +821,7 @@ static void SetAllPlayersBerryData(void)
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
{
|
||||
src = (struct BattleEnigmaBerry *)(gBlockRecvBuffer[i] + 2);
|
||||
r4 = gLinkPlayers[i].lp_field_18;
|
||||
r4 = gLinkPlayers[i].id;
|
||||
|
||||
for (j = 0; j < BERRY_NAME_COUNT - 1; j++)
|
||||
gEnigmaBerries[r4].name[j] = src->name[j];
|
||||
@ -958,8 +958,8 @@ static void CB2_HandleStartBattle(void)
|
||||
|
||||
if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00)
|
||||
{
|
||||
gLinkPlayers[0].lp_field_18 = 0;
|
||||
gLinkPlayers[1].lp_field_18 = 1;
|
||||
gLinkPlayers[0].id = 0;
|
||||
gLinkPlayers[1].id = 1;
|
||||
}
|
||||
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
||||
@ -1146,10 +1146,10 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
{
|
||||
u8 language;
|
||||
|
||||
gLinkPlayers[0].lp_field_18 = 0;
|
||||
gLinkPlayers[1].lp_field_18 = 2;
|
||||
gLinkPlayers[2].lp_field_18 = 1;
|
||||
gLinkPlayers[3].lp_field_18 = 3;
|
||||
gLinkPlayers[0].id = 0;
|
||||
gLinkPlayers[1].id = 2;
|
||||
gLinkPlayers[2].id = 1;
|
||||
gLinkPlayers[3].id = 3;
|
||||
GetFrontierTrainerName(gLinkPlayers[2].name, gTrainerBattleOpponent_A);
|
||||
GetFrontierTrainerName(gLinkPlayers[3].name, gTrainerBattleOpponent_B);
|
||||
sub_8165B88(&language, gTrainerBattleOpponent_A);
|
||||
@ -1207,7 +1207,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
if ((GetBlockReceivedStatus() & 3) == 3)
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
if (gLinkPlayers[playerMultiplayerId].lp_field_18 != 0)
|
||||
if (gLinkPlayers[playerMultiplayerId].id != 0)
|
||||
{
|
||||
memcpy(gPlayerParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2);
|
||||
memcpy(gPlayerParty + 3, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2);
|
||||
@ -1231,7 +1231,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
if ((GetBlockReceivedStatus() & 3) == 3)
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
if (gLinkPlayers[playerMultiplayerId].lp_field_18 != 0)
|
||||
if (gLinkPlayers[playerMultiplayerId].id != 0)
|
||||
{
|
||||
memcpy(gPlayerParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon));
|
||||
memcpy(gPlayerParty + 5, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon));
|
||||
@ -1422,8 +1422,8 @@ static void CB2_PreInitMultiBattle(void)
|
||||
|
||||
if (numPlayers == 4)
|
||||
{
|
||||
if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplierId].lp_field_18 & 1))
|
||||
|| (gLinkPlayers[i].lp_field_18 & 1 && gLinkPlayers[playerMultiplierId].lp_field_18 & 1))
|
||||
if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[playerMultiplierId].id & 1))
|
||||
|| (gLinkPlayers[i].id & 1 && gLinkPlayers[playerMultiplierId].id & 1))
|
||||
{
|
||||
memcpy(gUnknown_02022FF8, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * 3);
|
||||
}
|
||||
@ -1583,7 +1583,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
for (id = 0; id < MAX_LINK_PLAYERS; id++)
|
||||
{
|
||||
sub_8185F90(gBlockRecvBuffer[id][1]);
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
gTasks[var].data[3] |= gBlockRecvBuffer[id][1] & 0x3F;
|
||||
@ -1620,7 +1620,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
{
|
||||
if (id == playerMultiplayerId)
|
||||
{
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -1634,10 +1634,10 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((!(gLinkPlayers[id].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplayerId].lp_field_18 & 1))
|
||||
|| ((gLinkPlayers[id].lp_field_18 & 1) && (gLinkPlayers[playerMultiplayerId].lp_field_18 & 1)))
|
||||
if ((!(gLinkPlayers[id].id & 1) && !(gLinkPlayers[playerMultiplayerId].id & 1))
|
||||
|| ((gLinkPlayers[id].id & 1) && (gLinkPlayers[playerMultiplayerId].id & 1)))
|
||||
{
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -1651,7 +1651,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -1683,7 +1683,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
{
|
||||
if (id == playerMultiplayerId)
|
||||
{
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -1697,10 +1697,10 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((!(gLinkPlayers[id].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplayerId].lp_field_18 & 1))
|
||||
|| ((gLinkPlayers[id].lp_field_18 & 1) && (gLinkPlayers[playerMultiplayerId].lp_field_18 & 1)))
|
||||
if ((!(gLinkPlayers[id].id & 1) && !(gLinkPlayers[playerMultiplayerId].id & 1))
|
||||
|| ((gLinkPlayers[id].id & 1) && (gLinkPlayers[playerMultiplayerId].id & 1)))
|
||||
{
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -1714,7 +1714,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -2088,7 +2088,7 @@ static void sub_8038B94(u8 taskId)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
switch (gLinkPlayers[r2].lp_field_18)
|
||||
switch (gLinkPlayers[r2].id)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
|
@ -1843,25 +1843,25 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_PLAYER_MON1_NAME: // link first player poke name
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18]],
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_OPPONENT_MON1_NAME: // link first opponent poke name
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18 ^ 1]],
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 1]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_PLAYER_MON2_NAME: // link second player poke name
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18 ^ 2]],
|
||||
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 2]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
break;
|
||||
case B_TXT_LINK_OPPONENT_MON2_NAME: // link second opponent poke name
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18 ^ 3]],
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 3]],
|
||||
MON_DATA_NICKNAME, text);
|
||||
StringGetEnd10(text);
|
||||
toCpy = text;
|
||||
@ -1927,7 +1927,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 == gPotentialItemEffectBattler)
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler)
|
||||
{
|
||||
StringCopy(text, gEnigmaBerries[gPotentialItemEffectBattler].name);
|
||||
StringAppend(text, sText_BerrySuffix);
|
||||
@ -2022,13 +2022,13 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
|
||||
toCpy = gLinkPlayers[multiplayerID].name;
|
||||
break;
|
||||
case B_TXT_1F: // link partner name?
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(2 ^ gLinkPlayers[multiplayerID].lp_field_18)].name;
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(2 ^ gLinkPlayers[multiplayerID].id)].name;
|
||||
break;
|
||||
case B_TXT_20: // link opponent 1 name?
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(1 ^ gLinkPlayers[multiplayerID].lp_field_18)].name;
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(1 ^ gLinkPlayers[multiplayerID].id)].name;
|
||||
break;
|
||||
case B_TXT_21: // link opponent 2 name?
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(3 ^ gLinkPlayers[multiplayerID].lp_field_18)].name;
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(3 ^ gLinkPlayers[multiplayerID].id)].name;
|
||||
break;
|
||||
case B_TXT_22: // link scripting active name
|
||||
toCpy = gLinkPlayers[GetBattlerMultiplayerId(gBattleScripting.battler)].name;
|
||||
@ -2296,7 +2296,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst)
|
||||
{
|
||||
if (hword == ITEM_ENIGMA_BERRY)
|
||||
{
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 == gPotentialItemEffectBattler)
|
||||
if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler)
|
||||
{
|
||||
StringCopy(dst, gEnigmaBerries[gPotentialItemEffectBattler].name);
|
||||
StringAppend(dst, sText_BerrySuffix);
|
||||
|
@ -304,7 +304,7 @@ void LinkTestScreen(void)
|
||||
|
||||
void sub_8009628(u8 a0)
|
||||
{
|
||||
gLocalLinkPlayer.lp_field_18 = a0;
|
||||
gLocalLinkPlayer.id = a0;
|
||||
}
|
||||
|
||||
static void InitLocalLinkPlayer(void)
|
||||
|
@ -1752,7 +1752,7 @@ bool8 sub_80688F8(u8 caseId, u8 battlerId)
|
||||
return FALSE;
|
||||
if (!gMain.inBattle)
|
||||
return FALSE;
|
||||
if (gLinkPlayers[GetMultiplayerId()].lp_field_18 == battlerId)
|
||||
if (gLinkPlayers[GetMultiplayerId()].id == battlerId)
|
||||
return FALSE;
|
||||
break;
|
||||
case 2:
|
||||
@ -1774,7 +1774,7 @@ bool8 sub_80688F8(u8 caseId, u8 battlerId)
|
||||
return FALSE;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
if (gLinkPlayers[GetMultiplayerId()].lp_field_18 == battlerId)
|
||||
if (gLinkPlayers[GetMultiplayerId()].id == battlerId)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@ -4805,7 +4805,7 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies)
|
||||
bool8 sub_806D7EC(void)
|
||||
{
|
||||
bool8 retVal = FALSE;
|
||||
switch (gLinkPlayers[GetMultiplayerId()].lp_field_18)
|
||||
switch (gLinkPlayers[GetMultiplayerId()].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -4822,7 +4822,7 @@ bool8 sub_806D7EC(void)
|
||||
bool16 sub_806D82C(u8 id)
|
||||
{
|
||||
bool16 retVal = FALSE;
|
||||
switch (gLinkPlayers[id].lp_field_18)
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
case 3:
|
||||
@ -4840,7 +4840,7 @@ s32 GetBattlerMultiplayerId(u16 a1)
|
||||
{
|
||||
s32 id;
|
||||
for (id = 0; id < MAX_LINK_PLAYERS; id++)
|
||||
if (gLinkPlayers[id].lp_field_18 == a1)
|
||||
if (gLinkPlayers[id].id == a1)
|
||||
break;
|
||||
return id;
|
||||
}
|
||||
@ -5691,7 +5691,7 @@ const u8 *GetTrainerPartnerName(void)
|
||||
else
|
||||
{
|
||||
u8 id = GetMultiplayerId();
|
||||
return gLinkPlayers[GetBattlerMultiplayerId(gLinkPlayers[id].lp_field_18 ^ 2)].name;
|
||||
return gLinkPlayers[GetBattlerMultiplayerId(gLinkPlayers[id].id ^ 2)].name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5821,7 +5821,7 @@ u8 sub_806EF08(u8 arg0)
|
||||
s32 i;
|
||||
s32 var = 0;
|
||||
u8 multiplayerId = GetMultiplayerId();
|
||||
switch (gLinkPlayers[multiplayerId].lp_field_18)
|
||||
switch (gLinkPlayers[multiplayerId].id)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
@ -5834,7 +5834,7 @@ u8 sub_806EF08(u8 arg0)
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (gLinkPlayers[i].lp_field_18 == (s16)(var))
|
||||
if (gLinkPlayers[i].id == (s16)(var))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
@ -5844,7 +5844,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
|
||||
{
|
||||
s32 i;
|
||||
s32 var = 0;
|
||||
switch (gLinkPlayers[arg1].lp_field_18)
|
||||
switch (gLinkPlayers[arg1].id)
|
||||
{
|
||||
case 0:
|
||||
case 2:
|
||||
@ -5857,7 +5857,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (gLinkPlayers[i].lp_field_18 == (s16)(var))
|
||||
if (gLinkPlayers[i].id == (s16)(var))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
|
@ -159,7 +159,7 @@ void sub_8184E58(void)
|
||||
{
|
||||
sRecordedBattle_Players[i].trainerId = gLinkPlayers[i].trainerId;
|
||||
sRecordedBattle_Players[i].gender = gLinkPlayers[i].gender;
|
||||
sRecordedBattle_Players[i].battlerId = gLinkPlayers[i].lp_field_18;
|
||||
sRecordedBattle_Players[i].battlerId = gLinkPlayers[i].id;
|
||||
sRecordedBattle_Players[i].language = gLinkPlayers[i].language;
|
||||
|
||||
if (i < linkPlayersCount)
|
||||
@ -1340,7 +1340,7 @@ static void SetRecordedBattleVarsFromSave(struct RecordedBattleSave *src)
|
||||
}
|
||||
gLinkPlayers[i].gender = src->playersGender[i];
|
||||
gLinkPlayers[i].language = src->playersLanguage[i];
|
||||
gLinkPlayers[i].lp_field_18 = src->playersBattlers[i];
|
||||
gLinkPlayers[i].id = src->playersBattlers[i];
|
||||
gLinkPlayers[i].trainerId = src->playersTrainerId[i];
|
||||
|
||||
if (var)
|
||||
@ -1453,7 +1453,7 @@ u8 GetActiveBattlerLinkPlayerGender(void)
|
||||
|
||||
for (i = 0; i < MAX_LINK_PLAYERS; i++)
|
||||
{
|
||||
if (gLinkPlayers[i].lp_field_18 == gActiveBattler)
|
||||
if (gLinkPlayers[i].id == gActiveBattler)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@ extern void HealPlayerParty(void);
|
||||
struct UnkStruct_Shared
|
||||
{
|
||||
struct UnkLinkRfuStruct_02022B14 field_0;
|
||||
u8 needingPadding[3];
|
||||
u8 playerName[PLAYER_NAME_LENGTH];
|
||||
};
|
||||
|
||||
@ -2508,6 +2509,8 @@ void sub_80156C8(struct UnkStruct_URoom *data)
|
||||
memcpy(data->field_0, &gDecompressionBuffer[0x3F00], 0x100);
|
||||
}
|
||||
|
||||
// Cannot match, please fix later.
|
||||
/*
|
||||
void sub_80156E0(u8 taskId)
|
||||
{
|
||||
u32 id = 0;
|
||||
@ -3257,3 +3260,5 @@ void var_800D_set_xB(void)
|
||||
if (InUnionRoom() == TRUE)
|
||||
gSpecialVar_Result = 11;
|
||||
}
|
||||
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user