32 lines
803 B
Lua
32 lines
803 B
Lua
_G.CONFIG = require("conf").properties
|
|
local log = require("log")
|
|
_G.pal = require("palette").getPalette("CADE-15")
|
|
local getSandboxEnv = require("sandbox")
|
|
local api = require("api")
|
|
function _G.sandbox(f)
|
|
local glob = getSandboxEnv()
|
|
for k,v in pairs(api) do
|
|
glob[k]=v
|
|
end
|
|
if f then setfenv(f,glob) else return glob end
|
|
end
|
|
local Cart = require("cart").Cart
|
|
local cart
|
|
function love.load()
|
|
require("cindy").applyPatch()
|
|
_G.scr = love.graphics.newCanvas(256,240)
|
|
cart = Cart:loadCart("test.lua")
|
|
end
|
|
|
|
function love.update(dt)
|
|
if love.keyboard.isDown("escape") then love.event.quit() end
|
|
cart.update()
|
|
end
|
|
|
|
function love.draw()
|
|
cart.draw()
|
|
love.graphics.setBackgroundColor(0,0,0)
|
|
love.graphics.setColor(255,255,255)
|
|
love.graphics.draw(scr,0,0,0,CONFIG.scalefactor,CONFIG.scalefactor)
|
|
end
|