mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
scaling works mostly now but needs to resize the canvases as well
This commit is contained in:
parent
b2b6a97f54
commit
01aa79e819
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user