From 3d0b5624ef10926c471ec1495cda947ac3df837c Mon Sep 17 00:00:00 2001 From: usysrc Date: Sat, 27 Nov 2021 21:07:03 +0100 Subject: [PATCH] updated love.run to 11.3 --- lick.lua | 6 ++++-- main.lua | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lick.lua b/lick.lua index ab63025..8eacbbb 100644 --- a/lick.lua +++ b/lick.lua @@ -1,6 +1,7 @@ -- lick.lua -- --- simple LIVECODING environment with löve, overwrites love.run, pressing all errors to the terminal/console +-- simple LIVECODING environment for Löve +-- overwrites love.run, pressing all errors to the terminal/console local lick = {} lick.file = "main.lua" @@ -123,7 +124,8 @@ function love.run() -- Call update and draw if update then update(dt) end -- will pass 0 if love.timer is disabled if love.graphics then - love.graphics.clear() + love.graphics.origin() + love.graphics.clear(love.graphics.getBackgroundColor()) if draw then draw() end end diff --git a/main.lua b/main.lua index 67ec071..abba4ad 100644 --- a/main.lua +++ b/main.lua @@ -11,5 +11,6 @@ function love.update(dt) end function love.draw(dt) + love.graphics.setColor(1,1,0) love.graphics.circle("fill", 400+100*math.sin(circle.x), 300, 16,16) end