1.9.2 is out!

This commit is contained in:
Ryan Ward 2018-05-17 11:48:00 -04:00
parent e32720b687
commit 9b3b864740

View File

@ -33,20 +33,21 @@ function love.run()
if love.load then love.load(arg) end if love.load then love.load(arg) end
if love.timer then love.timer.step() end if love.timer then love.timer.step() end
local dt = 0 local dt = 0
local breakme=false
multi:newThread("MAIN-RUN",function()
while true do while true do
-- Process events. -- Process events.
if love.event then if love.event then
love.event.pump() love.event.pump()
for e,a,b,c,d in love.event.poll() do for name, a,b,c,d,e,f in love.event.poll() do
if e == "quit" then if name == "quit" then
if not love.quit or not love.quit() then if not love.quit or not love.quit() then
if love.audio then breakme=true
love.audio.stop() thread.kill()
end break
return
end end
end end
love.handlers[e](a,b,c,d) love.handlers[name](a,b,c,d,e,f)
end end
end end
if love.timer then if love.timer then
@ -54,12 +55,6 @@ function love.run()
dt = love.timer.getDelta() dt = love.timer.getDelta()
end end
if love.update then love.update(dt) end if love.update then love.update(dt) end
if multi.boost then
for i=1,multi.boost-1 do
multi:uManager(dt)
end
end
multi:uManager(dt)
if love.window and love.graphics and love.window.isCreated() then if love.window and love.graphics and love.window.isCreated() then
love.graphics.clear() love.graphics.clear()
love.graphics.origin() love.graphics.origin()
@ -69,7 +64,19 @@ function love.run()
if multi.draw then multi.draw() end if multi.draw then multi.draw() end
love.graphics.present() love.graphics.present()
end end
thread.sleep()
end end
end)
while not breakme do
love.timer.sleep(.005)
multi:uManager(dt)
if multi.boost then
for i=1,multi.boost-1 do
multi:uManager(dt)
end
end
end
return
end end
multi.drawF={} multi.drawF={}
function multi:dManager() function multi:dManager()
@ -81,34 +88,34 @@ function multi:onDraw(func,i)
i=i or 1 i=i or 1
table.insert(self.drawF,i,func) table.insert(self.drawF,i,func)
end end
function multi:lManager() --~ function multi:lManager()
if love.event then --~ if love.event then
love.event.pump() --~ love.event.pump()
for e,a,b,c,d in love.event.poll() do --~ for e,a,b,c,d in love.event.poll() do
if e == "quit" then --~ if e == "quit" then
if not love.quit or not love.quit() then --~ if not love.quit or not love.quit() then
if love.audio then --~ if love.audio then
love.audio.stop() --~ love.audio.stop()
end --~ end
return nil --~ return nil
end --~ end
end --~ end
love.handlers[e](a,b,c,d) --~ love.handlers[e](a,b,c,d)
end --~ end
end --~ end
if love.timer then --~ if love.timer then
love.timer.step() --~ love.timer.step()
dt = love.timer.getDelta() --~ dt = love.timer.getDelta()
end --~ end
if love.update then love.update(dt) end --~ if love.update then love.update(dt) end
multi:uManager(dt) --~ multi:uManager(dt)
if love.window and love.graphics and love.window.isCreated() then --~ if love.window and love.graphics and love.window.isCreated() then
love.graphics.clear() --~ love.graphics.clear()
love.graphics.origin() --~ love.graphics.origin()
if love.draw then love.draw() end --~ if love.draw then love.draw() end
multi.dManager() --~ multi.dManager()
love.graphics.setColor(255,255,255,255) --~ love.graphics.setColor(255,255,255,255)
if multi.draw then multi.draw() end --~ if multi.draw then multi.draw() end
love.graphics.present() --~ love.graphics.present()
end --~ end
end --~ end