almost got scaling working

This commit is contained in:
Tim Anema 2014-10-03 15:41:16 -04:00
parent b1c366e236
commit b2b6a97f54

View File

@ -238,14 +238,18 @@ function light_world:draw(l,t,w,h,s)
local last_buffer = love.graphics.getCanvas()
love.graphics.setCanvas(self.render_buffer)
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,scale)
self:drawShadow( l,t,w,h,s)
self.drawForground( l,t,w,h,s)
self:drawShine(l,t,w,h,scale)
self:drawPixelShadow(l,t,w,h,scale)
self:drawGlow(l,t,w,h,scale)
self:drawRefraction(l,t,w,h,scale)
self:drawReflection(l,t,w,h,scale)
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)
love.graphics.pop()
love.graphics.setBackgroundColor(0, 0, 0)
love.graphics.setBlendMode("alpha")