fix calls to GetRandomValue

This commit is contained in:
Bigfoot71 2025-05-10 21:45:42 +02:00
commit 0bfc37450c

View file

@ -313,18 +313,18 @@ int main(void)
static void RandomizeEmoji(void)
{
hovered = selected = -1;
int start = GetRandomValue(45, 360);
int start = GetRandomRangeInt(45, 360);
for (int i = 0; i < SIZEOF(emoji); ++i)
{
// 0-179 emoji codepoints (from emoji char array) each 4bytes + null char
emoji[i].index = GetRandomValue(0, 179)*5;
emoji[i].index = GetRandomRangeInt(0, 179)*5;
// Generate a random color for this emoji
emoji[i].color = Fade(ColorFromHSV((float)((start*(i + 1))%360), 0.6f, 0.85f), 0.8f);
// Set a random message for this emoji
emoji[i].message = GetRandomValue(0, SIZEOF(messages) - 1);
emoji[i].message = GetRandomRangeInt(0, SIZEOF(messages) - 1);
}
}