diff options
| author | Jeffery Myers <[email protected]> | 2021-10-25 01:21:16 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-25 10:21:16 +0200 |
| commit | daeccd03ace3eacf7907ecca1a697c7d00961cf4 (patch) | |
| tree | 0be2045a1003eed50c1456fd1a380ff970837233 /examples/shapes/shapes_easings_rectangle_array.c | |
| parent | 086f76ba7abefb1b34e1baa353c5f69dfc5dafdc (diff) | |
| download | raylib-daeccd03ace3eacf7907ecca1a697c7d00961cf4.tar.gz raylib-daeccd03ace3eacf7907ecca1a697c7d00961cf4.zip | |
Fix VC warnings for examples (#2085)
Diffstat (limited to 'examples/shapes/shapes_easings_rectangle_array.c')
| -rw-r--r-- | examples/shapes/shapes_easings_rectangle_array.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/shapes/shapes_easings_rectangle_array.c b/examples/shapes/shapes_easings_rectangle_array.c index eb782cd1..bdd45949 100644 --- a/examples/shapes/shapes_easings_rectangle_array.c +++ b/examples/shapes/shapes_easings_rectangle_array.c @@ -39,8 +39,8 @@ int main(void) { for (int x = 0; x < MAX_RECS_X; x++) { - recs[y*MAX_RECS_X + x].x = RECS_WIDTH/2 + RECS_WIDTH*x; - recs[y*MAX_RECS_X + x].y = RECS_HEIGHT/2 + RECS_HEIGHT*y; + recs[y*MAX_RECS_X + x].x = RECS_WIDTH/2.0f + RECS_WIDTH*x; + recs[y*MAX_RECS_X + x].y = RECS_HEIGHT/2.0f + RECS_HEIGHT*y; recs[y*MAX_RECS_X + x].width = RECS_WIDTH; recs[y*MAX_RECS_X + x].height = RECS_HEIGHT; } @@ -64,15 +64,15 @@ int main(void) for (int i = 0; i < MAX_RECS_X*MAX_RECS_Y; i++) { - recs[i].height = EaseCircOut(framesCounter, RECS_HEIGHT, -RECS_HEIGHT, PLAY_TIME_IN_FRAMES); - recs[i].width = EaseCircOut(framesCounter, RECS_WIDTH, -RECS_WIDTH, PLAY_TIME_IN_FRAMES); + recs[i].height = EaseCircOut((float)framesCounter, RECS_HEIGHT, -RECS_HEIGHT, PLAY_TIME_IN_FRAMES); + recs[i].width = EaseCircOut((float)framesCounter, RECS_WIDTH, -RECS_WIDTH, PLAY_TIME_IN_FRAMES); if (recs[i].height < 0) recs[i].height = 0; if (recs[i].width < 0) recs[i].width = 0; if ((recs[i].height == 0) && (recs[i].width == 0)) state = 1; // Finish playing - rotation = EaseLinearIn(framesCounter, 0.0f, 360.0f, PLAY_TIME_IN_FRAMES); + rotation = EaseLinearIn((float)framesCounter, 0.0f, 360.0f, PLAY_TIME_IN_FRAMES); } } else if ((state == 1) && IsKeyPressed(KEY_SPACE)) |
