empty template for autobrake test cart
This commit is contained in:
parent
34af172ca5
commit
5b668cf9c9
50
autobrake_test.p8
Normal file
50
autobrake_test.p8
Normal file
@ -0,0 +1,50 @@
|
||||
pico-8 cartridge // http://www.pico-8.com
|
||||
version 41
|
||||
__lua__
|
||||
|
||||
-- vacuum gambit automatic brake test
|
||||
-- by kistaro windrider
|
||||
|
||||
function usplit(str)
|
||||
return unpack(split(str))
|
||||
end
|
||||
function csv(s)
|
||||
local ret = split(s, "\n")
|
||||
for i, v in ipairs(ret) do
|
||||
ret[i] = type(v) == "string" and split(v) or { v }
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
-- generate standard "overlay"
|
||||
-- constructor for type tt.
|
||||
-- if more is defined, generated
|
||||
-- new calls more(ret) after
|
||||
-- ret is definitely not nil
|
||||
-- before calling setmetatable.
|
||||
-- use to initialize mutables.
|
||||
--
|
||||
-- if there was a previous new,
|
||||
-- it is invoked on the new
|
||||
-- object *after* more, because
|
||||
-- this works better with the
|
||||
-- `more` impls i use.
|
||||
function mknew(tt, more)
|
||||
local mt, oldnew = { __index = tt }, tt.new
|
||||
tt.new = function(ret)
|
||||
if (not ret) ret = {}
|
||||
if (more) more(ret)
|
||||
if (oldnew) oldnew(ret)
|
||||
setmetatable(ret, mt)
|
||||
return ret
|
||||
end
|
||||
end
|
||||
|
||||
function init()
|
||||
end
|
||||
|
||||
function _update60()
|
||||
end
|
||||
|
||||
function _draw()
|
||||
end
|
Loading…
Reference in New Issue
Block a user