Use vector math

This commit is contained in:
Jonas Kulla 2015-07-10 04:51:29 +02:00
parent 54c1107f19
commit fe709b6010
1 changed files with 1 additions and 2 deletions

View File

@ -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()