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