funk/src/main.lua

26 lines
689 B
Lua
Raw Normal View History

2018-07-23 11:51:34 +00:00
_G.CONFIG = require("conf").properties
local log = require("log")
local pal = require("palette").getPalette("CADE-15")
local getSandboxEnv = require("sandbox")
function sandbox(f)
setfenv(f,getSandboxEnv())
end
2018-07-23 11:51:34 +00:00
function love.load()
require("cindy").applyPatch()
2018-07-23 12:56:13 +00:00
scr = love.graphics.newCanvas(256,240)
2018-07-23 11:51:34 +00:00
love.graphics.setCanvas(scr)
pal.setColor(10)
love.graphics.rectangle("fill",0,0,5,5)
love.graphics.setCanvas()
end
function love.update(dt)
if love.keyboard.isDown("escape") then love.event.quit() end
end
function love.draw()
love.graphics.setBackgroundColor(0,0,0)
love.graphics.setColor(255,255,255)
2018-07-23 12:56:13 +00:00
love.graphics.draw(scr,0,0,0,CONFIG.scalefactor,CONFIG.scalefactor)
2018-07-23 11:51:34 +00:00
end