Fix VC warnings for examples (#2085)

This commit is contained in:
Jeffery Myers
2021-10-25 01:21:16 -07:00
committed by GitHub
parent 086f76ba7a
commit daeccd03ac
21 changed files with 104 additions and 104 deletions

View File

@@ -22,11 +22,11 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - collision area");
// Box A: Moving box
Rectangle boxA = { 10, GetScreenHeight()/2 - 50, 200, 100 };
Rectangle boxA = { 10, GetScreenHeight()/2.0f - 50, 200, 100 };
int boxASpeedX = 4;
// Box B: Mouse moved box
Rectangle boxB = { GetScreenWidth()/2 - 30, GetScreenHeight()/2 - 30, 60, 60 };
Rectangle boxB = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 60, 60 };
Rectangle boxCollision = { 0 }; // Collision rectangle
@@ -58,7 +58,7 @@ int main(void)
else if (boxB.x <= 0) boxB.x = 0;
if ((boxB.y + boxB.height) >= GetScreenHeight()) boxB.y = GetScreenHeight() - boxB.height;
else if (boxB.y <= screenUpperLimit) boxB.y = screenUpperLimit;
else if (boxB.y <= screenUpperLimit) boxB.y = (float)screenUpperLimit;
// Check boxes collision
collision = CheckCollisionRecs(boxA, boxB);