made compatible with Löve 0.8.0

This commit is contained in:
headchant 2012-05-25 12:38:05 +02:00
parent c01b254c16
commit 1f917a13f9

View File

@ -9,6 +9,7 @@ lick.file = "main.lua"
lick.debug = false lick.debug = false
lick.reset = false lick.reset = false
lick.clearFlag = false lick.clearFlag = false
lick.sleepTime = (love.canvas) and (0.001) or 1
function handle(err) function handle(err)
return "ERROR: " .. err return "ERROR: " .. err
@ -96,11 +97,11 @@ function love.run()
dt = love.timer.getDelta() dt = love.timer.getDelta()
end end
-- if love.update then love.update(dt) end -- will pass 0 if love.timer is disabled -- if love.update then love.update(dt) end -- will pass 0 if love.timer is disabled
lick.update(dt) lick.update(dt)
if love.graphics then if love.graphics then
if not lick.clearFlag then love.graphics.clear() end if not lick.clearFlag then love.graphics.clear() end
-- if love.draw then love.draw() end -- if love.draw then love.draw() end
lick.draw() lick.draw()
end end
-- Process events. -- Process events.
@ -118,7 +119,7 @@ function love.run()
end end
end end
if love.timer then love.timer.sleep(1) end if love.timer then love.timer.sleep(lick.sleepTime) end
if love.graphics then love.graphics.present() end if love.graphics then love.graphics.present() end
end end