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() local last_buffer = love.graphics.getCanvas()
love.graphics.setCanvas(self.render_buffer) love.graphics.setCanvas(self.render_buffer)
print(s)
love.graphics.push() love.graphics.push()
love.graphics.scale(1/s) love.graphics.scale(1/s)
l, t, w, h = (l*s), (t*s), (w*s), (h*s) sl, st, sw, sh = (l*s), (t*s), (w*s), (h*s)
self.drawBackground( l,t,w,h,s) self.drawBackground( sl,st,sw,sh,s)
self:drawShadow( l,t,w,h,s) self:drawShadow( sl,st,sw,sh,s)
self.drawForground( l,t,w,h,s) self.drawForground( sl,st,sw,sh,s)
self:drawShine( l,t,w,h,s) self:drawShine( sl,st,sw,sh,s)
self:drawPixelShadow( l,t,w,h,s) self:drawPixelShadow( sl,st,sw,sh,s)
self:drawGlow( l,t,w,h,s) self:drawGlow( sl,st,sw,sh,s)
self:drawRefraction( l,t,w,h,s) self:drawRefraction( sl,st,sw,sh,s)
self:drawReflection( l,t,w,h,s) self:drawReflection( sl,st,sw,sh,s)
love.graphics.pop() love.graphics.pop()
love.graphics.setBackgroundColor(0, 0, 0) love.graphics.setBackgroundColor(0, 0, 0)