--Record demos.
local love = love
local recorder = {}
recorder.isLoaded = false
local ddxs, ddys
local i = 0
function recorder.Reset()
i = 1
for k, _ in ipairs( recorder ) do recorder[k] = nil end
end
function recorder.Update( ddx, ddy )
i = i + 1
recorder[i] = love.data.pack( "string", "!16
0.5 then byte = byte + 1 end
if ddy > 0.5 then byte = byte + 2 end
if ddx < -0.5 then byte = byte + 4 end
if ddy < -0.5 then byte = byte + 8 end
i = i + 1
recorder[i] = string.char( byte + 48 )
end]]
function recorder.Load( filename )
ddxs, ddys = {}, {}
local s = love.filesystem.read( filename )
if not s then return end
local j = 1
local score, ticks, k = love.data.unpack( "!16