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
|
||||
|
||||
local function initScreen(width, height)
|
||||
love.window.setMode(width, height, { highdpi = true })
|
||||
local function initScreen()
|
||||
local width, height = love.graphics.getDimensions()
|
||||
WIDTH, HEIGHT = round2even(width), round2even(height)
|
||||
CANVAS = love.graphics.newCanvas(WIDTH, HEIGHT)
|
||||
CANVAS:renderTo(function()
|
||||
|
@ -79,11 +79,9 @@ local function initGrid()
|
|||
end
|
||||
|
||||
function love.load(args)
|
||||
local width = args[1] or 800
|
||||
local height = args[2] or 600
|
||||
local rules = args[3] or "RL"
|
||||
local rules = args[1] or "RL"
|
||||
initColors(rules)
|
||||
initScreen(width, height)
|
||||
initScreen()
|
||||
initAnt()
|
||||
initGrid()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue