mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-30 10:49:18 -05:00
Cleanup warnings in examples (#5467)
This commit is contained in:
@ -46,12 +46,12 @@ int main(void)
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - ball physics");
|
||||
|
||||
Ball balls[MAX_BALLS] = {{
|
||||
.pos = { GetScreenWidth()/2, GetScreenHeight()/2 },
|
||||
.pos = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f },
|
||||
.vel = { 200, 200 },
|
||||
.ppos = { 0 },
|
||||
.radius = 40,
|
||||
.friction = 0.99,
|
||||
.elasticity = 0.9,
|
||||
.friction = 0.99f,
|
||||
.elasticity = 0.9f,
|
||||
.color = BLUE,
|
||||
.grabbed = false
|
||||
}};
|
||||
@ -110,11 +110,11 @@ int main(void)
|
||||
{
|
||||
balls[ballCount++] = (Ball){
|
||||
.pos = mousePos,
|
||||
.vel = { GetRandomValue(-300, 300), GetRandomValue(-300, 300) },
|
||||
.vel = { (float)GetRandomValue(-300, 300), (float)GetRandomValue(-300, 300) },
|
||||
.ppos = { 0 },
|
||||
.radius = 20 + GetRandomValue(0, 30),
|
||||
.friction = 0.99,
|
||||
.elasticity = 0.9,
|
||||
.radius = 20.0f + (float)GetRandomValue(0, 30),
|
||||
.friction = 0.99f,
|
||||
.elasticity = 0.9f,
|
||||
.color = { GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 },
|
||||
.grabbed = false
|
||||
};
|
||||
@ -126,7 +126,7 @@ int main(void)
|
||||
{
|
||||
for (int i = 0; i < ballCount; i++)
|
||||
{
|
||||
if (!balls[i].grabbed) balls[i].vel = (Vector2){ GetRandomValue(-2000, 2000), GetRandomValue(-2000, 2000) };
|
||||
if (!balls[i].grabbed) balls[i].vel = (Vector2){ (float)GetRandomValue(-2000, 2000), (float)GetRandomValue(-2000, 2000) };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user