From 9c1f5e6e6f018c75ea2ce19f8a49d85a0bada87b Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sun, 24 Feb 2008 23:59:31 +0000 Subject: [PATCH] - fixed graphics bug with paralax layers SVN-Revision: 5339 --- src/object/tilemap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/object/tilemap.cpp b/src/object/tilemap.cpp index d24cacab9..88def1853 100644 --- a/src/object/tilemap.cpp +++ b/src/object/tilemap.cpp @@ -182,7 +182,8 @@ TileMap::draw(DrawingContext& context) float trans_x = roundf(context.get_translation().x); float trans_y = roundf(context.get_translation().y); - context.set_translation(Vector(trans_x * speed_x, trans_y * speed_y)); + context.set_translation(Vector(int(trans_x * speed_x), + int(trans_y * speed_y))); /** if we don't round here, we'll have a 1 pixel gap on screen sometimes. * I have no idea why */ -- 2.11.0