fix calls to GetRandomValue
This commit is contained in:
parent
9057c47904
commit
0bfc37450c
1 changed files with 58 additions and 58 deletions
|
|
@ -43,7 +43,7 @@ int main(void)
|
|||
SetTextureFilter(target.texture, TEXTURE_FILTER_BILINEAR); // Texture scale filter to use
|
||||
|
||||
Color colors[10] = { 0 };
|
||||
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
|
||||
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomRangeInt(100, 250), GetRandomRangeInt(50, 150), GetRandomRangeInt(10, 100), 255 };
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
@ -59,7 +59,7 @@ int main(void)
|
|||
if (IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
// Recalculate random colors for the bars
|
||||
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
|
||||
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomRangeInt(100, 250), GetRandomRangeInt(50, 150), GetRandomRangeInt(10, 100), 255 };
|
||||
}
|
||||
|
||||
// Update virtual mouse (clamped mouse value behind game screen)
|
||||
|
|
|
|||
Loading…
Reference in a new issue