mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-15 19:05:34 +00:00
Fix VC warnings for examples (#2085)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user