diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-04 18:50:53 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-04 18:50:53 -0500 |
commit | eff6795887cc27f2c5139df9a6da70f4f02338b4 (patch) | |
tree | f91be2b0b7194b4ddff13f4935a0edafc4284a43 /src/field/lottery_corner.c | |
parent | 3ea9cff2c67b3db195c3326afc56fa0662c2327a (diff) | |
parent | b1a7733c1cead8ed3d4a58c42d638afd0ead8ab0 (diff) |
Merge branch 'master' into unk_text_8095904
Diffstat (limited to 'src/field/lottery_corner.c')
-rw-r--r-- | src/field/lottery_corner.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/field/lottery_corner.c b/src/field/lottery_corner.c index 83febc56e..03de26054 100644 --- a/src/field/lottery_corner.c +++ b/src/field/lottery_corner.c @@ -30,7 +30,7 @@ void ResetLotteryCorner(void) u16 rand = Random(); SetLotteryNumber((Random() << 16) | rand); - VarSet(VAR_POKELOT_PRIZE, 0); + VarSet(VAR_LOTTERY_PRIZE, 0); } void SetRandomLotteryNumber(u16 i) @@ -152,19 +152,19 @@ static u8 GetMatchingDigits(u16 winNumber, u16 otId) // lottery numbers go from 0 to 99999, not 65535 (0xFFFF). interestingly enough, the function that calls GetLotteryNumber shifts to u16, so it cant be anything above 65535 anyway. void SetLotteryNumber(u32 lotteryNum) { - u16 lowNum = lotteryNum >> 16; - u16 highNum = lotteryNum; + u16 high = lotteryNum >> 16; + u16 low = lotteryNum; - VarSet(VAR_POKELOT_RND1, highNum); - VarSet(VAR_POKELOT_RND2, lowNum); + VarSet(VAR_LOTTERY_RND_L, low); + VarSet(VAR_LOTTERY_RND_H, high); } u32 GetLotteryNumber(void) { - u16 highNum = VarGet(VAR_POKELOT_RND1); - u16 lowNum = VarGet(VAR_POKELOT_RND2); + u16 low = VarGet(VAR_LOTTERY_RND_L); + u16 high = VarGet(VAR_LOTTERY_RND_H); - return (lowNum << 16) | highNum; + return (high << 16) | low; } // interestingly, this may have been the original lottery number set function, but GF tried to change it to 32-bit later but didnt finish changing all calls as one GetLotteryNumber still shifts to u16. |