From fe709b6010fe128e3756648e3af14db7ecae5b86 Mon Sep 17 00:00:00 2001
From: Jonas Kulla <Nyocurio@gmail.com>
Date: Fri, 10 Jul 2015 04:51:29 +0200
Subject: [PATCH] Use vector math

---
 src/tilemapvx.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/tilemapvx.cpp b/src/tilemapvx.cpp
index 6291fd9..039bd2c 100644
--- a/src/tilemapvx.cpp
+++ b/src/tilemapvx.cpp
@@ -181,8 +181,7 @@ struct TilemapVXPrivate : public ViewportElement, TileAtlasVX::Reader
 
 	void updatePosition()
 	{
-		dispPos.x = -(offset.x - mapViewp.x * 32) + sceneOffset.x;
-		dispPos.y = -(offset.y - mapViewp.y * 32) + sceneOffset.y;
+		dispPos = -(offset - mapViewp.pos() * 32) + sceneOffset;
 	}
 
 	void updateMapViewport()