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_box_anim.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_box_anim.c')
| -rw-r--r-- | examples/shapes/shapes_easings_box_anim.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/shapes/shapes_easings_box_anim.c b/examples/shapes/shapes_easings_box_anim.c index 7812bd53..e7024f41 100644 --- a/examples/shapes/shapes_easings_box_anim.c +++ b/examples/shapes/shapes_easings_box_anim.c @@ -23,7 +23,7 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings box anim"); // Box variables to be animated with easings - Rectangle rec = { GetScreenWidth()/2, -100, 100, 100 }; + Rectangle rec = { GetScreenWidth()/2.0f, -100, 100, 100 }; float rotation = 0.0f; float alpha = 1.0f; @@ -46,7 +46,7 @@ int main(void) // NOTE: Remember that 3rd parameter of easing function refers to // desired value variation, do not confuse it with expected final value! - rec.y = EaseElasticOut(framesCounter, -100, GetScreenHeight()/2 + 100, 120); + rec.y = EaseElasticOut((float)framesCounter, -100, GetScreenHeight()/2.0f + 100, 120); if (framesCounter >= 120) { @@ -57,8 +57,8 @@ int main(void) case 1: // Scale box to an horizontal bar { framesCounter++; - rec.height = EaseBounceOut(framesCounter, 100, -90, 120); - rec.width = EaseBounceOut(framesCounter, 100, GetScreenWidth(), 120); + rec.height = EaseBounceOut((float)framesCounter, 100, -90, 120); + rec.width = EaseBounceOut((float)framesCounter, 100, (float)GetScreenWidth(), 120); if (framesCounter >= 120) { @@ -69,7 +69,7 @@ int main(void) case 2: // Rotate horizontal bar rectangle { framesCounter++; - rotation = EaseQuadOut(framesCounter, 0.0f, 270.0f, 240); + rotation = EaseQuadOut((float)framesCounter, 0.0f, 270.0f, 240); if (framesCounter >= 240) { @@ -80,7 +80,7 @@ int main(void) case 3: // Increase bar size to fill all screen { framesCounter++; - rec.height = EaseCircOut(framesCounter, 10, GetScreenWidth(), 120); + rec.height = EaseCircOut((float)framesCounter, 10, (float)GetScreenWidth(), 120); if (framesCounter >= 120) { @@ -91,7 +91,7 @@ int main(void) case 4: // Fade out animation { framesCounter++; - alpha = EaseSineOut(framesCounter, 1.0f, -1.0f, 160); + alpha = EaseSineOut((float)framesCounter, 1.0f, -1.0f, 160); if (framesCounter >= 160) { @@ -105,7 +105,7 @@ int main(void) // Reset animation at any moment if (IsKeyPressed(KEY_SPACE)) { - rec = (Rectangle){ GetScreenWidth()/2, -100, 100, 100 }; + rec = (Rectangle){ GetScreenWidth()/2.0f, -100, 100, 100 }; rotation = 0.0f; alpha = 1.0f; state = 0; |
