scaling works mostly now but needs to resize the canvases as well

This commit is contained in:
Tim Anema 2014-10-03 20:09:52 -04:00
parent b2b6a97f54
commit 01aa79e819

View File

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