ecco7777

terminal glasses hex picture displayer

Sep 23rd, 2017 (edited)
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. args={...}
  2. l=4
  3. br=1
  4. xOff=200
  5. yOff=0
  6. file=args[1]
  7. shell.run(file)
  8. t=peripheral.wrap("top")
  9. t.clear()
  10.  
  11. fp=fs.open(file,"r")
  12. xMax=#color
  13. yMax=#color[1]
  14. for y=1,xMax do
  15. for x=1,yMax do
  16. --t.addText(i*1,y*1,"*",color[string.sub(line,i,i)])
  17. t.addBox(y*l+xOff,xMax*l-x*l+yOff,l,l,color[x][y],br)
  18.  
  19. end
  20. end
  21. t.sync()
Add Comment
Please, Sign In to add comment