From a78293bf92a8af671fcc0662c346a537ed8d1c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Mon, 26 May 2014 02:46:57 +0000 Subject: [PATCH] tileset zoom fix -sowwwwy- --- src/tileset.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tileset.cpp b/src/tileset.cpp index a044323f..8594e433 100644 --- a/src/tileset.cpp +++ b/src/tileset.cpp @@ -279,9 +279,9 @@ void TileSet::BlitTile(uint32_t id, vec3 pos, int o, vec2 scale, float angle, float tx = texels.A.x; float ty = texels.A.y; - int dx = (pixels.B.x - pixels.A.x) * (int)scale.x; - int dy = o ? 0 : (pixels.B.y - pixels.A.y) * (int)scale.y; - int dz = o ? (pixels.B.y - pixels.A.y) * (int)scale.y : 0; + int dx = (int)((float)(pixels.B.x - pixels.A.x) * scale.x); + int dy = o ? 0 : (int)((float)(pixels.B.y - pixels.A.y) * scale.y); + int dz = o ? (int)((float)(pixels.B.y - pixels.A.y) * scale.y) : 0; /* If scaling is negative, switch triangle winding */ if (scale.x * scale.y < 0.0f)