summaryrefslogtreecommitdiffhomepage
path: root/examples/textures/textures_rectangle.c
diff options
context:
space:
mode:
authorDavid Reid <[email protected]>2018-07-01 20:52:50 +1000
committerDavid Reid <[email protected]>2018-07-01 20:52:50 +1000
commitfec0a4f2e37e63cdbc531f6914a55442d520a104 (patch)
tree546a30f60fbe76abb24a2514ba824ec210674c36 /examples/textures/textures_rectangle.c
parentbce7a7b5765defcfb5692dc73e7251c8dd3e9fe2 (diff)
parent7dedb84fd07f81cbe3f7c299b7e6e3f4e9959391 (diff)
downloadraylib-fec0a4f2e37e63cdbc531f6914a55442d520a104.tar.gz
raylib-fec0a4f2e37e63cdbc531f6914a55442d520a104.zip
Merge branch 'master' of https://github.com/raysan5/raylib into dr/mini_al
Diffstat (limited to 'examples/textures/textures_rectangle.c')
-rw-r--r--examples/textures/textures_rectangle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/textures/textures_rectangle.c b/examples/textures/textures_rectangle.c
index c90db8ac..e1247746 100644
--- a/examples/textures/textures_rectangle.c
+++ b/examples/textures/textures_rectangle.c
@@ -27,7 +27,7 @@ int main()
Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
Vector2 position = { 350.0f, 280.0f };
- Rectangle frameRec = { 0, 0, scarfy.width/6, scarfy.height };
+ Rectangle frameRec = { 0.0f, 0.0f, (float)scarfy.width/6, (float)scarfy.height };
int currentFrame = 0;
int framesCounter = 0;
@@ -50,7 +50,7 @@ int main()
if (currentFrame > 5) currentFrame = 0;
- frameRec.x = currentFrame*scarfy.width/6;
+ frameRec.x = (float)currentFrame*(float)scarfy.width/6;
}
if (IsKeyPressed(KEY_RIGHT)) framesSpeed++;