From 01aa79e819169eaa184853fd2d6f4b2f211960a2 Mon Sep 17 00:00:00 2001 From: Tim Anema Date: Fri, 3 Oct 2014 20:09:52 -0400 Subject: [PATCH] scaling works mostly now but needs to resize the canvases as well --- lib/light_world.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/light_world.lua b/lib/light_world.lua index aad5031..95f7212 100644 --- a/lib/light_world.lua +++ b/lib/light_world.lua @@ -238,17 +238,18 @@ function light_world:draw(l,t,w,h,s) local last_buffer = love.graphics.getCanvas() love.graphics.setCanvas(self.render_buffer) + print(s) love.graphics.push() love.graphics.scale(1/s) - l, t, w, h = (l*s), (t*s), (w*s), (h*s) - self.drawBackground( l,t,w,h,s) - self:drawShadow( l,t,w,h,s) - self.drawForground( l,t,w,h,s) - self:drawShine( l,t,w,h,s) - self:drawPixelShadow( l,t,w,h,s) - self:drawGlow( l,t,w,h,s) - self:drawRefraction( l,t,w,h,s) - self:drawReflection( l,t,w,h,s) + sl, st, sw, sh = (l*s), (t*s), (w*s), (h*s) + self.drawBackground( sl,st,sw,sh,s) + self:drawShadow( sl,st,sw,sh,s) + self.drawForground( sl,st,sw,sh,s) + self:drawShine( sl,st,sw,sh,s) + self:drawPixelShadow( sl,st,sw,sh,s) + self:drawGlow( sl,st,sw,sh,s) + self:drawRefraction( sl,st,sw,sh,s) + self:drawReflection( sl,st,sw,sh,s) love.graphics.pop() love.graphics.setBackgroundColor(0, 0, 0)