summaryrefslogtreecommitdiffhomepage
path: root/src/textures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-24 00:41:01 +0100
committerRay <[email protected]>2021-03-24 00:41:01 +0100
commit9047025ab74c0c60559c73272eb6d0ba486c6d63 (patch)
tree28102d2e48529655fb68ad7e5ceacef7542326af /src/textures.c
parentc2bc3d22a15d3a05084b9ab9706ba1f43a25be6d (diff)
downloadraylib-9047025ab74c0c60559c73272eb6d0ba486c6d63.tar.gz
raylib-9047025ab74c0c60559c73272eb6d0ba486c6d63.zip
Update textures.c
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textures.c b/src/textures.c
index 2e844f45..875f736c 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -3111,10 +3111,10 @@ void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangl
// NOTE: For tilling a whole texture DrawTextureQuad() is better
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint)
{
- if (texture.id <= 0 || scale <= 0.0f) return; // Wanna see a infinite loop?!...just delete this line!
+ if ((texture.id <= 0) || (scale <= 0.0f)) return; // Wanna see a infinite loop?!...just delete this line!
int tileWidth = (int)(source.width*scale), tileHeight = (int)(source.height*scale);
- if (dest.width < tileWidth && dest.height < tileHeight)
+ if ((dest.width < tileWidth) && (dest.height < tileHeight))
{
// Can fit only one tile
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height},