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:
parent
ea70c47a1a
commit
b4d8f0b5d1
1 changed files with 475 additions and 359 deletions
|
|
@ -30,14 +30,14 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < MAX_BUILDINGS; i++)
|
||||
{
|
||||
buildings[i].width = GetRandomValue(50, 200);
|
||||
buildings[i].height = GetRandomValue(100, 800);
|
||||
buildings[i].width = GetRandomInt(50, 200);
|
||||
buildings[i].height = GetRandomInt(100, 800);
|
||||
buildings[i].y = screenHeight - 130 - buildings[i].height;
|
||||
buildings[i].x = -6000 + spacing;
|
||||
|
||||
spacing += buildings[i].width;
|
||||
|
||||
buildColors[i] = (Color){ GetRandomValue(200, 240), GetRandomValue(200, 240), GetRandomValue(200, 250), 255 };
|
||||
buildColors[i] = (Color){ GetRandomValue(.8, .95), GetRandomValue(.8, .95), GetRandomValue(.8, .95), 1 };
|
||||
}
|
||||
|
||||
Camera2D camera = { 0 };
|
||||
|
|
|
|||
Loading…
Reference in a new issue