From ee0438e346d17be68a4b57dec62e7279f40bfefd Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 13 Sep 2017 12:56:07 +0200 Subject: I think this should properly place animated backgrounds --- not/World.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/not/World.lua b/not/World.lua index 92e9ae0..07843fe 100644 --- a/not/World.lua +++ b/not/World.lua @@ -103,9 +103,8 @@ function World:buildMap () local bg = self:createDecoration(x, y, op.background) if op.animations then bg:setAnimationsList(op.animations) - _,_,width,height = bg:getAnimation()[1]:getViewport() - width = width * getScale() - height = height * getScale() + _,_,x,y = bg:getAnimation()[1]:getViewport() + bg:setPosition(x / -2, y / -2) end bg.layer = self:addLayer(width, height) bg.layer.transformRatio = op.ratio -- cgit v1.1