changed Color struct to 4 floats

GetRandomValue returns floats
added GetRandomInt
added Color4ub rgba 0-255
edited examples to work
colour palette values could bare a double check!
This commit is contained in:
Chris 2019-10-21 20:17:48 +01:00
commit b4d8f0b5d1

View file

@ -22,7 +22,7 @@ int main(void)
int framesCounter = 0; // Variable used to count frames
int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included)
int randValue = GetRandomInt(-8, 5); // Get a random integer number between -8 and 5 (both included)
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -37,7 +37,7 @@ int main(void)
// Every two seconds (120 frames) a new random value is generated
if (((framesCounter/120)%2) == 1)
{
randValue = GetRandomValue(-8, 5);
randValue = GetRandomInt(-8, 5);
framesCounter = 0;
}
//----------------------------------------------------------------------------------
@ -62,4 +62,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}