mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 11:43:37 +01:00
Remove register variable mention
This commit is contained in:
parent
aa45c05a3e
commit
56afdee7fc
@ -7127,14 +7127,8 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 battler1PartyId = 0;
|
s32 battler1PartyId = 0;
|
||||||
s32 battler2PartyId = 0;
|
s32 battler2PartyId = 0;
|
||||||
|
|
||||||
#ifdef NONMATCHING
|
|
||||||
s32 lastMonId = 0; // + 1
|
|
||||||
#else
|
|
||||||
register s32 lastMonId asm("r8") = 0; // + 1
|
|
||||||
#endif // NONMATCHING
|
|
||||||
|
|
||||||
s32 firstMonId;
|
s32 firstMonId;
|
||||||
|
s32 lastMonId = 0; // + 1
|
||||||
s32 monsCount;
|
s32 monsCount;
|
||||||
struct Pokemon* party = NULL;
|
struct Pokemon* party = NULL;
|
||||||
s32 validMons = 0;
|
s32 validMons = 0;
|
||||||
@ -7248,16 +7242,14 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
{
|
{
|
||||||
if (TryDoForceSwitchOut())
|
if (TryDoForceSwitchOut())
|
||||||
{
|
{
|
||||||
do{
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
i = Random() % monsCount;
|
do
|
||||||
i += firstMonId;
|
{
|
||||||
}
|
i = Random() % monsCount;
|
||||||
while (i == battler2PartyId
|
i += firstMonId;
|
||||||
|| i == battler1PartyId);
|
} while (i == battler2PartyId || i == battler1PartyId);
|
||||||
|
} while (GetMonData(&party[i], MON_DATA_SPECIES) == SPECIES_NONE
|
||||||
}while(GetMonData(&party[i], MON_DATA_SPECIES) == SPECIES_NONE
|
|
||||||
|| GetMonData(&party[i], MON_DATA_IS_EGG) == TRUE
|
|| GetMonData(&party[i], MON_DATA_IS_EGG) == TRUE
|
||||||
|| GetMonData(&party[i], MON_DATA_HP) == 0); // Should be one while loop, conjoined by an ||, but that doesn't match. Equivalent logic though
|
|| GetMonData(&party[i], MON_DATA_HP) == 0); // Should be one while loop, conjoined by an ||, but that doesn't match. Equivalent logic though
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user