summaryrefslogtreecommitdiffhomepage
path: root/examples/shapes
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2023-11-06 11:31:07 -0800
committerGitHub <[email protected]>2023-11-06 20:31:07 +0100
commit6cd37e57a6b38bb06cc54ecf6aa7659d4895723b (patch)
treed3dee9e7f62fc74ee06caa51b99b684292bb3f24 /examples/shapes
parentfc21a8e552c452804838bfbbbaadaf044a74b81e (diff)
downloadraylib-6cd37e57a6b38bb06cc54ecf6aa7659d4895723b.tar.gz
raylib-6cd37e57a6b38bb06cc54ecf6aa7659d4895723b.zip
Fix warnings in visual studio (#3512)
Diffstat (limited to 'examples/shapes')
-rw-r--r--examples/shapes/raygui.h2
-rw-r--r--examples/shapes/shapes_bouncing_ball.c4
-rw-r--r--examples/shapes/shapes_draw_circle_sector.c2
-rw-r--r--examples/shapes/shapes_lines_bezier.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/shapes/raygui.h b/examples/shapes/raygui.h
index 4ae0a26d..91277102 100644
--- a/examples/shapes/raygui.h
+++ b/examples/shapes/raygui.h
@@ -2653,7 +2653,7 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode)
if (GetMousePosition().x >= (textBounds.x + textEndWidth - glyphWidth/2))
{
mouseCursor.x = textBounds.x + textEndWidth;
- mouseCursorIndex = strlen(text);
+ mouseCursorIndex = (int)strlen(text);
}
// Place cursor at required index on mouse click
diff --git a/examples/shapes/shapes_bouncing_ball.c b/examples/shapes/shapes_bouncing_ball.c
index 203d88a5..16273b65 100644
--- a/examples/shapes/shapes_bouncing_ball.c
+++ b/examples/shapes/shapes_bouncing_ball.c
@@ -67,8 +67,8 @@ int main(void)
// On pause, we draw a blinking message
if (pause && ((framesCounter/30)%2)) DrawText("PAUSED", 350, 200, 30, GRAY);
- DrawCircle(400.5, 300.5, 50, BLACK);
- DrawCircle(528.0, 172.0, 26, BLACK);
+ DrawCircle(400.5f, 300.5f, 50.0f, BLACK);
+ DrawCircle(528.0f, 172.0f, 26.0f, BLACK);
DrawFPS(10, 10);
diff --git a/examples/shapes/shapes_draw_circle_sector.c b/examples/shapes/shapes_draw_circle_sector.c
index 1c283e15..90e8e6a5 100644
--- a/examples/shapes/shapes_draw_circle_sector.c
+++ b/examples/shapes/shapes_draw_circle_sector.c
@@ -70,7 +70,7 @@ int main(void)
GuiSliderBar((Rectangle){ 600, 170, 120, 20}, "Segments", NULL, &segments, 0, 100);
//------------------------------------------------------------------------------
- minSegments = (int)ceilf((endAngle - startAngle) / 90);
+ minSegments = truncf(ceilf((endAngle - startAngle) / 90));
DrawText(TextFormat("MODE: %s", (segments >= minSegments)? "MANUAL" : "AUTO"), 600, 200, 10, (segments >= minSegments)? MAROON : DARKGRAY);
DrawFPS(10, 10);
diff --git a/examples/shapes/shapes_lines_bezier.c b/examples/shapes/shapes_lines_bezier.c
index f0157685..7d7bdb0c 100644
--- a/examples/shapes/shapes_lines_bezier.c
+++ b/examples/shapes/shapes_lines_bezier.c
@@ -30,7 +30,7 @@ int main(void)
Vector2 end = { (float)screenWidth, (float)screenHeight };
Vector2 startControl = { 100, 0 };
- Vector2 endControl = { GetScreenWidth() - 100, GetScreenHeight() };
+ Vector2 endControl = { (float)GetScreenWidth() - 100, (float)GetScreenHeight() };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------