43 lines
759 B
Lua
43 lines
759 B
Lua
-- Chuchu by Makaron
|
|
DEBUG_MODE = true
|
|
-- my own libs
|
|
Chu = require 'game'
|
|
|
|
assets = require('deps.cargo').init({
|
|
dir = 'data',
|
|
loaders = {
|
|
png = love.graphics.newImage
|
|
}--[[,
|
|
processors = {
|
|
['images/'] = function(image, filename)
|
|
image:setFilter('nearest', 'nearest')
|
|
end
|
|
}]]--
|
|
})
|
|
|
|
local game = nil
|
|
|
|
function love.load()
|
|
if DEBUG_MODE then
|
|
love.window.setMode(1024, 900)
|
|
game = Chu.new(200, 200, true)
|
|
else
|
|
love.window.setMode(512, 512)
|
|
game = Chu.new(0, 0, false)
|
|
end
|
|
end
|
|
|
|
function love.update(dt)
|
|
game:update(dt)
|
|
end
|
|
|
|
function love.draw()
|
|
game:draw()
|
|
|
|
if DEBUG_MODE then love.graphics.print('DEBUG MODE IS ENABLED', 850, 10) end
|
|
end
|
|
|
|
setmetatable(_G, {
|
|
__index = require('deps.cargo').init('/')
|
|
})
|