Use macro for randomization with ISO value

This commit is contained in:
GriffinR
2020-02-14 16:12:35 -05:00
committed by huderlem
parent 6eb44dc507
commit faf0ba8662
9 changed files with 13 additions and 18 deletions

View File

@@ -434,7 +434,7 @@ void ScriptRandom(void)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
gContestRngValue = 1103515245 * gContestRngValue + 24691;
gContestRngValue = ISO_RANDOMIZE1(gContestRngValue);
random = gContestRngValue >> 16;
scriptPtr = &gSpecialVar_Result;
}
@@ -448,7 +448,7 @@ void ScriptRandom(void)
u16 GetContestRand(void)
{
gContestRngValue = 1103515245 * gContestRngValue + 24691;
gContestRngValue = ISO_RANDOMIZE1(gContestRngValue);
return gContestRngValue >> 16;
}