summaryrefslogtreecommitdiffhomepage
path: root/examples/textures/textures_srcrec_dstrec.c
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2021-02-20 14:37:32 -0800
committerGitHub <[email protected]>2021-02-20 23:37:32 +0100
commit48a7cd3c8788799505b4fa9f84cb8f5979397c29 (patch)
treef9cbed3827f8855d0e3c27916930b9d82de3e423 /examples/textures/textures_srcrec_dstrec.c
parent82cdd88ffe6cb9d2f97e34bd0724d791030372bf (diff)
downloadraylib-48a7cd3c8788799505b4fa9f84cb8f5979397c29.tar.gz
raylib-48a7cd3c8788799505b4fa9f84cb8f5979397c29.zip
[Examples] Fix typecast warnings in examples. (#1601)
* Fixing typecast warnings generated by visual studio 2019 in examples. * Changes to fixes based on feedback Co-authored-by: Jeffery Myers <[email protected]>
Diffstat (limited to 'examples/textures/textures_srcrec_dstrec.c')
-rw-r--r--examples/textures/textures_srcrec_dstrec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/textures/textures_srcrec_dstrec.c b/examples/textures/textures_srcrec_dstrec.c
index e86b729d..3fdb689c 100644
--- a/examples/textures/textures_srcrec_dstrec.c
+++ b/examples/textures/textures_srcrec_dstrec.c
@@ -28,13 +28,13 @@ int main(void)
int frameHeight = scarfy.height;
// Source rectangle (part of the texture to use for drawing)
- Rectangle sourceRec = { 0.0f, 0.0f, frameWidth, frameHeight };
+ Rectangle sourceRec = { 0.0f, 0.0f, (float)frameWidth, (float)frameHeight };
// Destination rectangle (screen rectangle where drawing part of texture)
- Rectangle destRec = { screenWidth/2, screenHeight/2, frameWidth*2, frameHeight*2 };
+ Rectangle destRec = { screenWidth/2.0f, screenHeight/2.0f, frameWidth*2.0f, frameHeight*2.0f };
// Origin of the texture (rotation/scale point), it's relative to destination rectangle size
- Vector2 origin = { frameWidth, frameHeight };
+ Vector2 origin = { (float)frameWidth, (float)frameHeight };
int rotation = 0;