Fix more Windows issues

This commit is contained in:
Empathic Qubit 2021-04-28 04:33:52 -04:00
parent c591641233
commit 689c680be8
4 changed files with 11 additions and 4 deletions

View file

@ -36,7 +36,7 @@ _M.StartPowerup = 0
_M.NeatConfig = {
Threads = 2,
ThreadDontQuit = true,
ThreadDontQuit = false,
--Filename = "DP1.state",
SaveFile = _M.Filename .. ".pool",
Filename = _M.Filename,

View file

@ -19,7 +19,7 @@ for i=1,#temps,1 do
end
end
local tmpFileName = tempDir.."donk_runner"
local tmpFileName = tempDir.."/donk_runner"
local function message(_M, msg, color)
if color == nil then

View file

@ -256,6 +256,11 @@ function displayForm(_M)
gui.rectangle(0, 0, 500, guiHeight, 1, 0x00ffffff, 0xbb000000)
--gui.circle(game.screenX-84, game.screenY-84, 192 / 2, 1, 0x50000000)
local rightmost = _M.rightmost[_M.currentArea]
if rightmost == nil then
rightmost = 0
end
gui.text(5, 30, "Timeout: " .. _M.timeout)
gui.text(5, 5, "Generation: " .. _M.currentGenerationIndex)
gui.text(130, 5, "Species: " .. _M.currentSpecies.id)
@ -271,7 +276,7 @@ function displayForm(_M)
gui.text(230, 65, "Damage: " .. _M.partyHitCounter)
gui.text(230, 80, "PowerUp: " .. _M.powerUpCounter)
gui.text(320, 65, string.format("Current Area: %04x", _M.currentArea))
gui.text(320, 80, "Rightmost: ".._M.rightmost[_M.currentArea])
gui.text(320, 80, "Rightmost: "..rightmost)
displayButtons()
formCtx:set()
@ -631,7 +636,7 @@ local function generateNetwork(genome)
end
local function elapsed(_M)
if config.StartPowerup ~= NIL then
if config.StartPowerup ~= nil then
game.writePowerup(config.StartPowerup)
end
_M.currentFrame = 0

View file

@ -1,5 +1,7 @@
local _M = {}
_M.isWin = package.config:sub(1, 1) == '\\'
function _M.table_to_string(tbl)
local result = "{"
local keys = {}