Compare commits

..

No commits in common. "179ee35985649e1a64e7c8e8018dd31fec9e940d" and "aefdfeb99c8e8862559fb6bbfa601ac623c1cec5" have entirely different histories.

View File

@ -38,39 +38,6 @@ function cycle(tbl,period)
return tbl[t()%period*#tbl\period+1]
end
-- fake sprintf function
-- %~ for literal "%"
-- %v for param
-- %! for tostring(param)
-- which dumps tables
function fmt(f, ...)
local out, i = "", 0
for s in all(split(f,"%")) do
if i == 0 then
-- before first format directive
out ..= s
i = 1
else
local m = s[1]
if m == "~" then
out ..= "%"
else
local p = select(i,...)
i+=1
if m == "v" then
out ..= p
elseif m == "!" then
out ..= tostring(p)
else
out ..= "(?!:"..m..":"..tostring(p)..")"
end
end
out ..=sub(s,2)
end
end
return out
end
mnames={}
function names(root)
local n=mnames[root]
@ -302,7 +269,7 @@ function title:draw()
print("pyrex",32,73,7)
print("[nyeogmi]",62,73,7)
print("kistaro",32,79,7)
local lvlstr = fmt("⬅️ %v ➡️",start_level)
local lvlstr = "⬅️ "..start_level.." ➡️"
print(lvlstr,50,91,1)
print(lvlstr,51,90,blinkcol)
end