Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/HeadlessWrapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@
-- bodies intended for headless use.
dofile("_SimpleGraphic.def.lua")

-- Callbacks
local callbackTable = { }
local mainObject
function runCallback(name, ...)
if callbackTable[name] then
return callbackTable[name](...)
elseif mainObject and mainObject[name] then
return mainObject[name](mainObject, ...)
end
end
function SetCallback(name, func)
callbackTable[name] = func
end
function GetCallback(name)
return callbackTable[name]
end
function SetMainObject(obj)
mainObject = obj
end

-- https://stackoverflow.com/questions/19326368/iterate-over-lines-including-blank-lines
function splitLines(s)
if s:sub(-1)~="\n" then s=s.."\n" end
Expand Down