summaryrefslogtreecommitdiffhomepage
path: root/examples/core
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/core
parentfc21a8e552c452804838bfbbbaadaf044a74b81e (diff)
downloadraylib-6cd37e57a6b38bb06cc54ecf6aa7659d4895723b.tar.gz
raylib-6cd37e57a6b38bb06cc54ecf6aa7659d4895723b.zip
Fix warnings in visual studio (#3512)
Diffstat (limited to 'examples/core')
-rw-r--r--examples/core/core_2d_camera_split_screen.c8
-rw-r--r--examples/core/core_drop_files.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/core/core_2d_camera_split_screen.c b/examples/core/core_2d_camera_split_screen.c
index 57a0dfd3..60b5a2e5 100644
--- a/examples/core/core_2d_camera_split_screen.c
+++ b/examples/core/core_2d_camera_split_screen.c
@@ -85,12 +85,12 @@ int main(void)
// Draw full scene with first camera
for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++)
{
- DrawLineV((Vector2){PLAYER_SIZE*i, 0}, (Vector2){PLAYER_SIZE*i, screenHeight}, LIGHTGRAY);
+ DrawLineV((Vector2){(float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY);
}
for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++)
{
- DrawLineV((Vector2){0, PLAYER_SIZE*i}, (Vector2){screenWidth, PLAYER_SIZE*i}, LIGHTGRAY);
+ DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY);
}
for (int i = 0; i < screenWidth/PLAYER_SIZE; i++)
@@ -118,12 +118,12 @@ int main(void)
// Draw full scene with second camera
for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++)
{
- DrawLineV((Vector2){PLAYER_SIZE*i, 0}, (Vector2){PLAYER_SIZE*i, screenHeight}, LIGHTGRAY);
+ DrawLineV((Vector2){ (float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY);
}
for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++)
{
- DrawLineV((Vector2){0, PLAYER_SIZE*i}, (Vector2){screenWidth, PLAYER_SIZE*i}, LIGHTGRAY);
+ DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY);
}
for (int i = 0; i < screenWidth/PLAYER_SIZE; i++)
diff --git a/examples/core/core_drop_files.c b/examples/core/core_drop_files.c
index 9f622039..d4ddd9ed 100644
--- a/examples/core/core_drop_files.c
+++ b/examples/core/core_drop_files.c
@@ -53,7 +53,7 @@ int main(void)
{
FilePathList droppedFiles = LoadDroppedFiles();
- for (int i = 0, offset = filePathCounter; i < droppedFiles.count; i++)
+ for (int i = 0, offset = filePathCounter; i < (int)droppedFiles.count; i++)
{
if (filePathCounter < (MAX_FILEPATH_RECORDED - 1))
{
@@ -77,7 +77,7 @@ int main(void)
{
DrawText("Dropped files:", 100, 40, 20, DARKGRAY);
- for (unsigned int i = 0; i < filePathCounter; i++)
+ for (int i = 0; i < filePathCounter; i++)
{
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));