Reorganize some config
parent
eb480f903b
commit
94d39cafb1
|
@ -0,0 +1,4 @@
|
||||||
|
function love.conf(t)
|
||||||
|
t.window.highdpi = false
|
||||||
|
t.window.title = "ants"
|
||||||
|
end
|
|
@ -41,8 +41,8 @@ local function initColors(rules)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function initScreen(width, height)
|
local function initScreen()
|
||||||
love.window.setMode(width, height, { highdpi = true })
|
local width, height = love.graphics.getDimensions()
|
||||||
WIDTH, HEIGHT = round2even(width), round2even(height)
|
WIDTH, HEIGHT = round2even(width), round2even(height)
|
||||||
CANVAS = love.graphics.newCanvas(WIDTH, HEIGHT)
|
CANVAS = love.graphics.newCanvas(WIDTH, HEIGHT)
|
||||||
CANVAS:renderTo(function()
|
CANVAS:renderTo(function()
|
||||||
|
@ -79,11 +79,9 @@ local function initGrid()
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.load(args)
|
function love.load(args)
|
||||||
local width = args[1] or 800
|
local rules = args[1] or "RL"
|
||||||
local height = args[2] or 600
|
|
||||||
local rules = args[3] or "RL"
|
|
||||||
initColors(rules)
|
initColors(rules)
|
||||||
initScreen(width, height)
|
initScreen()
|
||||||
initAnt()
|
initAnt()
|
||||||
initGrid()
|
initGrid()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue