summaryrefslogtreecommitdiff
path: root/src/lottery_corner.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lottery_corner.c')
-rw-r--r--src/lottery_corner.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lottery_corner.c b/src/lottery_corner.c
index 3d456f372..66e1238ef 100644
--- a/src/lottery_corner.c
+++ b/src/lottery_corner.c
@@ -38,7 +38,7 @@ void SetRandomLotteryNumber(u16 i)
{
u32 var = Random();
- while(--i != 0xFFFF)
+ while (--i != 0xFFFF)
var = var * 1103515245 + 12345;
SetLotteryNumber(var);
@@ -60,20 +60,20 @@ void PickLotteryCornerTicket(void)
gSpecialVar_0x8004 = 0;
slot = 0;
box = 0;
- for(i = 0; i < 6; i++)
+ for (i = 0; i < 6; i++)
{
struct Pokemon *pkmn = &gPlayerParty[i];
// UB: Too few arguments for function GetMonData
- if(GetMonData(pkmn, MON_DATA_SPECIES) != SPECIES_NONE)
+ if (GetMonData(pkmn, MON_DATA_SPECIES) != SPECIES_NONE)
{
// do not calculate ticket values for eggs.
- if(!GetMonData(pkmn, MON_DATA_IS_EGG))
+ if (!GetMonData(pkmn, MON_DATA_IS_EGG))
{
u32 otId = GetMonData(pkmn, MON_DATA_OT_ID);
u8 numMatchingDigits = GetMatchingDigits(gScriptResult, otId);
- if(numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
+ if (numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
{
gSpecialVar_0x8004 = numMatchingDigits - 1;
box = 14;
@@ -86,21 +86,21 @@ void PickLotteryCornerTicket(void)
}
// player has 14 boxes.
- for(i = 0; i < 14; i++)
+ for (i = 0; i < 14; i++)
{
// player has 30 slots per box.
- for(j = 0; j < 30; j++)
+ for (j = 0; j < 30; j++)
{
struct BoxPokemon *pkmn = &gPokemonStorage.boxes[i][j];
// UB: Too few arguments for function GetMonData
- if(GetBoxMonData(pkmn, MON_DATA_SPECIES) != SPECIES_NONE &&
+ if (GetBoxMonData(pkmn, MON_DATA_SPECIES) != SPECIES_NONE &&
!GetBoxMonData(pkmn, MON_DATA_IS_EGG))
{
u32 otId = GetBoxMonData(pkmn, MON_DATA_OT_ID);
u8 numMatchingDigits = GetMatchingDigits(gScriptResult, otId);
- if(numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
+ if (numMatchingDigits > gSpecialVar_0x8004 && numMatchingDigits > 1)
{
gSpecialVar_0x8004 = numMatchingDigits - 1;
box = i;
@@ -110,11 +110,11 @@ void PickLotteryCornerTicket(void)
}
}
- if(gSpecialVar_0x8004 != 0)
+ if (gSpecialVar_0x8004 != 0)
{
gSpecialVar_0x8005 = sLotteryPrizes[gSpecialVar_0x8004 - 1];
- if(box == 14)
+ if (box == 14)
{
gSpecialVar_0x8006 = 0;
GetMonData(&gPlayerParty[slot], MON_DATA_NICKNAME, gStringVar1);
@@ -133,12 +133,12 @@ static u8 GetMatchingDigits(u16 winNumber, u16 otId)
u8 i;
u8 matchingDigits = 0;
- for(i = 0; i < 5; i++)
+ for (i = 0; i < 5; i++)
{
sWinNumberDigit = winNumber % 10;
sOtIdDigit = otId % 10;
- if(sWinNumberDigit == sOtIdDigit)
+ if (sWinNumberDigit == sOtIdDigit)
{
winNumber = winNumber / 10;
otId = otId / 10;