[Examples] Warning fixes (pt 1) (#1668)

* Fix some warnings in examples.

* cleanups from review

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
This commit is contained in:
Jeffery Myers 2021-03-22 23:51:52 -07:00 committed by GitHub
parent c6dd41495b
commit e48b9a6da1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 104 additions and 103 deletions

View file

@ -39,9 +39,9 @@ int main(void)
//SetConfigFlags(FLAG_VSYNC_HINT | FLAG_MSAA_4X_HINT | FLAG_WINDOW_HIGHDPI);
InitWindow(screenWidth, screenHeight, "raylib [core] example - window flags");
Vector2 ballPosition = { GetScreenWidth() / 2, GetScreenHeight() / 2 };
Vector2 ballPosition = { GetScreenWidth() / 2.0f, GetScreenHeight() / 2.0f };
Vector2 ballSpeed = { 5.0f, 4.0f };
int ballRadius = 20;
float ballRadius = 20;
int framesCounter = 0;
@ -139,7 +139,7 @@ int main(void)
else ClearBackground(RAYWHITE);
DrawCircleV(ballPosition, ballRadius, MAROON);
DrawRectangleLinesEx((Rectangle) { 0, 0, GetScreenWidth(), GetScreenHeight() }, 4, RAYWHITE);
DrawRectangleLinesEx((Rectangle) { 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, 4, RAYWHITE);
DrawCircleV(GetMousePosition(), 10, DARKBLUE);