Improvements...II
parent
6fbccc1123
commit
ae1bb53004
@ -1,3 +1,5 @@
|
||||
# graphed
|
||||
|
||||
Paint in your terminal
|
||||
graphed is a simple tool to create _ascii art_
|
||||
It is very rudimentary for now...
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
-- Simple functions for graphed
|
||||
|
||||
function printul(s)
|
||||
nc.setunderline(true)
|
||||
print(s)
|
||||
nc.setunderline(false)
|
||||
end
|
||||
|
||||
function mkmat()
|
||||
local mt
|
||||
mt = {} -- create the matrix
|
||||
for i=1,MSIZE_X do
|
||||
mt[i] = {} -- create a new row
|
||||
for j=1,MSIZE_Y do
|
||||
mt[i][j] = " "
|
||||
end
|
||||
end
|
||||
return mt
|
||||
end
|
||||
|
||||
function showmesg(msg)
|
||||
nc.gotoxy(1,1)
|
||||
print(msg)
|
||||
nc.wait()
|
||||
end
|
||||
|
||||
function at(s,p)
|
||||
return string.sub(s,p,p)
|
||||
end
|
||||
|
||||
function mkpointer(pn)
|
||||
local p
|
||||
p={}
|
||||
p.x=5
|
||||
p.y=5
|
||||
p.glyph="X"
|
||||
return p
|
||||
end
|
||||
|
||||
function dispmesg(m)
|
||||
for i=1,150 do
|
||||
nc.gotoxy(1,1)
|
||||
print(m)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue