diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-04-04 09:59:40 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-04-04 09:59:40 -0400 |
commit | c99894bc60e73f303500d604cf852ee7afc46abb (patch) | |
tree | 6959fc90bc4b28e054dd4dc8f822e2f3761857e7 /src/pokemon.c | |
parent | 0ecc1876a9cb8e31b1aa0879bf2b9e9c87271858 (diff) |
Document Pokemon Summary Screen, 1
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index 563073237..c59fd226e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -5416,7 +5416,7 @@ void RandomlyGivePartyPokerus(struct Pokemon *party) &foo; } -u8 CheckPartyPokerus(struct Pokemon *party, u8 selection) +u8 CheckPartyPokerus(struct Pokemon *party, u8 party_bm) { u8 retVal; @@ -5424,23 +5424,25 @@ u8 CheckPartyPokerus(struct Pokemon *party, u8 selection) unsigned curBit = 1; retVal = 0; - if (selection) + if (party_bm != 0) // Check mons in party based on bitmask, LSB = first mon { do { - if ((selection & 1) && (GetMonData(&party[partyIndex], MON_DATA_POKERUS, NULL) & 0xF)) + if ((party_bm & 1) && (GetMonData(&party[partyIndex], MON_DATA_POKERUS, NULL) & 0xF)) retVal |= curBit; partyIndex++; curBit <<= 1; - selection >>= 1; + party_bm >>= 1; } - while (selection); + while (party_bm); } - else if (GetMonData(&party[0], MON_DATA_POKERUS, NULL) & 0xF) + else // Single Pokemon { - retVal = 1; + if (GetMonData(&party[0], MON_DATA_POKERUS, NULL) & 0xF) + { + retVal = 1; + } } - return retVal; } |