Reorganize some config

main
mat ess 2022-09-11 00:38:08 -04:00
parent eb480f903b
commit 94d39cafb1
2 changed files with 8 additions and 6 deletions

4
ants/conf.lua Normal file
View File

@ -0,0 +1,4 @@
function love.conf(t)
t.window.highdpi = false
t.window.title = "ants"
end

View File

@ -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