Advertisement
LDDestroier

Sonar X Grayscale Sign (not original, sorry)

Oct 22nd, 2017
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. false
  2. {
  3.   render = {
  4.     "local mon = peripheral.find(\"monitor\") if mon then mon.setTextScale(0.5) end",
  5.     "local sx,sy = term.getSize()",
  6.     "letters = {}",
  7.     "letters[1] = {",
  8.     "  path = \"/S\", --path to paint file",
  9.     "  x = -8,      --start x",
  10.     "  xsize = 17,  --horizontal size of paint file",
  11.     "  xmult = 1    --multiplies the x coord",
  12.     "}",
  13.     "letters[2] = {",
  14.     "  path = \"/o\",",
  15.     "  x = letters[1].x+letters[1].xsize,",
  16.     "  xsize = 17,",
  17.     "  xmult = 1",
  18.     "}",
  19.     "letters[3] = {",
  20.     "  path = \"/n\",",
  21.     "  x = letters[2].x+letters[2].xsize,",
  22.     "  xsize = 17,",
  23.     "  xmult = 1",
  24.     "}",
  25.     "letters[4] = {",
  26.     "  path = \"/a\",",
  27.     "  x = letters[3].x+letters[3].xsize,",
  28.     "  xsize = 17,",
  29.     "  xmult = 1",
  30.     "}",
  31.     "letters[5] = {",
  32.     "  path = \"/r\",",
  33.     "  x = letters[4].x+letters[4].xsize,",
  34.     "  xsize = 17,",
  35.     "  xmult = 1",
  36.     "}",
  37.     "letters[6] = {",
  38.     "  path = \"/X\",",
  39.     "  x = letters[5].x+letters[5].xsize+10,",
  40.     "  xsize = 33,",
  41.     "  xmult = 1.23",
  42.     "}",
  43.     "--letters[8].x = (sx/2)-(letters[8].xsize/2)",
  44.     "local totalWidth = 0",
  45.     "for a = 1, #letters do",
  46.     "  totalWidth = totalWidth + letters[a].xsize",
  47.     "  if a > 1 then",
  48.     "    totalWidth = totalWidth + letters[a].x-letters[a-1].x",
  49.     "  end",
  50.     "end",
  51.     "",
  52.     "clearLines = function(start,stop)",
  53.     "  local cx,cy = term.getCursorPos()",
  54.     "  for y = start,stop do",
  55.     "    term.setCursorPos(1,y)",
  56.     "    term.clearLine()",
  57.     "  end",
  58.     "  term.setCursorPos(cx,cy)",
  59.     "end",
  60.     "p = {}",
  61.     "l = {}",
  62.     "for a = 1, #letters do",
  63.     "  p[a] = paintutils.loadImage(letters[a].path)",
  64.     "  l[a] = letters[a]",
  65.     "end",
  66.     "",
  67.     "_G.render = function(x,spacing,reverse)",
  68.     "  term.setBackgroundColor(colors.black)",
  69.     "  clearLines(1,35)",
  70.     "  for a = reverse and #p or 1, reverse and 1 or #p, reverse and -1 or 1 do",
  71.     "    local drawX = (x+l[a].x)-((spacing*l[a].xmult)*(a-(#letters/2)))",
  72.     "    if a == 8 then --draw \"X\"",
  73.     "--      drawX = 1",
  74.     "    end",
  75.     "    paintutils.drawImage(p[a],drawX,l[a].y or 2)",
  76.     "  end",
  77.     "end",
  78.     "--render(1,1)",
  79.   },
  80.   o = {
  81.     "",
  82.     "",
  83.     "         000000000000000",
  84.     "         077777777777770",
  85.     "         078888888888880",
  86.     "         078800000007880",
  87.     "         07880     07880",
  88.     "         07880     07880",
  89.     "         07880     07880",
  90.     "         07880     07880",
  91.     "         07880     07880",
  92.     "         07880     07880",
  93.     "         07880     07880",
  94.     "         07880     07880",
  95.     "         078800000007880",
  96.     "         078877777777880",
  97.     "         078888888888880",
  98.     "         000000000000000",
  99.   },
  100.   S = {
  101.     "",
  102.     "",
  103.     "         000000000000000",
  104.     "         077777777777770",
  105.     "         078888888888880",
  106.     "         078800000008880",
  107.     "         07880     00000",
  108.     "         07880          ",
  109.     "         078800000000000",
  110.     "         078877777777770",
  111.     "         078888888888880",
  112.     "         000000000007880",
  113.     "                   07880",
  114.     "         00000     07880",
  115.     "         077700000007880",
  116.     "         078877777777880",
  117.     "         078888888888880",
  118.     "         000000000000000",
  119.   },
  120.   n = {
  121.     "",
  122.     "",
  123.     "         000000000 00000",
  124.     "         077777770 07770",
  125.     "         078888880 07880",
  126.     "         078888880 07880",
  127.     "         078800070 07880",
  128.     "         07880 070 07880",
  129.     "         07880 070 07880",
  130.     "         07880 070 07880",
  131.     "         07880 070 07880",
  132.     "         07880 070 07880",
  133.     "         07880 070 07880",
  134.     "         07880 070007880",
  135.     "         07880 078777880",
  136.     "         07880 078888880",
  137.     "         07880 078888880",
  138.     "         00000 000000000",
  139.   },
  140.   a = {
  141.     "",
  142.     "",
  143.     "         000000000000000",
  144.     "         077777777777770",
  145.     "         078888888888880",
  146.     "         078800000007880",
  147.     "         07880     07880",
  148.     "         07880     07880",
  149.     "         078800000007880",
  150.     "         078877777777880",
  151.     "         078888888888880",
  152.     "         078800000007880",
  153.     "         07880     07880",
  154.     "         07880     07880",
  155.     "         07880     07880",
  156.     "         07880     07880",
  157.     "         07880     07880",
  158.     "         00000     00000",
  159.   },
  160.   sonarx = {
  161.     "{{{m=1,x=10,t=128,c=\" \",b=1,y=3},{m=1,x=11,t=128,c=\" \",b=1,y=3},{m=1,x=12,t=128,c=\" \",b=1,y=3},{m=1,x=13,t=128,c=\" \",b=1,y=3},{m=1,x=14,t=128,c=\" \",b=1,y=3},{m=1,x=15,t=128,c=\" \",b=1,y=3},{m=1,x=16,t=128,c=\" \",b=1,y=3},{m=1,x=17,t=128,c=\" \",b=1,y=3},{m=1,x=18,t=128,c=\" \",b=1,y=3},{m=1,x=19,t=128,c=\" \",b=1,y=3},{m=1,x=20,t=128,c=\" \",b=1,y=3},{m=1,x=21,t=128,c=\" \",b=1,y=3},{m=1,x=22,t=128,c=\" \",b=1,y=3},{m=1,x=23,t=128,c=\" \",b=1,y=3},{m=1,x=24,t=128,c=\" \",b=1,y=3},{m=1,x=10,t=128,c=\" \",b=1,y=4},{m=1,x=11,t=128,c=\" \",b=128,y=4},{m=1,x=12,t=128,c=\" \",b=128,y=4},{m=1,x=13,t=128,c=\" \",b=128,y=4},{m=1,x=14,t=128,c=\" \",b=128,y=4},{m=1,x=15,t=128,c=\" \",b=128,y=4},{m=1,x=16,t=128,c=\" \",b=128,y=4},{m=1,x=17,t=128,c=\" \",b=128,y=4},{m=1,x=18,t=128,c=\" \",b=128,y=4},{m=1,x=19,t=128,c=\" \",b=128,y=4},{m=1,x=20,t=128,c=\" \",b=128,y=4},{m=1,x=21,t=128,c=\" \",b=128,y=4},{m=1,x=22,t=128,c=\" \",b=128,y=4},{m=1,x=23,t=128,c=\" \",b=128,y=4},{m=1,x=24,t=128,c=\" \",b=1,y=4},{m=1,x=10,t=128,c=\" \",b=1,y=5},{m=1,x=11,t=128,c=\" \",b=128,y=5},{m=1,x=12,t=128,c=\" \",b=256,y=5},{m=1,x=13,t=128,c=\" \",b=256,y=5},{m=1,x=14,t=128,c=\" \",b=256,y=5},{m=1,x=15,t=128,c=\" \",b=256,y=5},{m=1,x=16,t=128,c=\" \",b=256,y=5},{m=1,x=17,t=128,c=\" \",b=256,y=5},{m=1,x=18,t=128,c=\" \",b=256,y=5},{m=1,x=19,t=128,c=\" \",b=256,y=5},{m=1,x=20,t=128,c=\" \",b=256,y=5},{m=1,x=21,t=128,c=\" \",b=256,y=5},{m=1,x=22,t=128,c=\" \",b=256,y=5},{m=1,x=23,t=128,c=\" \",b=256,y=5},{m=1,x=24,t=128,c=\" \",b=1,y=5},{m=1,x=10,t=128,c=\" \",b=1,y=6},{m=1,x=11,t=128,c=\" \",b=128,y=6},{m=1,x=12,t=128,c=\" \",b=256,y=6},{m=1,x=13,t=128,c=\" \",b=256,y=6},{m=1,x=14,t=128,c=\" \",b=1,y=6},{m=1,x=15,t=128,c=\" \",b=1,y=6},{m=1,x=16,t=128,c=\" \",b=1,y=6},{m=1,x=17,t=128,c=\" \",b=1,y=6},{m=1,x=18,t=128,c=\" \",b=1,y=6},{m=1,x=19,t=128,c=\" \",b=1,y=6},{m=1,x=20,t=128,c=\" \",b=1,y=6},{m=1,x=21,t=128,c=\" \",b=256,y=6},{m=1,x=22,t=128,c=\" \",b=256,y=6},{m=1,x=23,t=128,c=\" \",b=256,y=6},{m=1,x=24,t=128,c=\" \",b=1,y=6},{m=1,x=10,t=128,c=\" \",b=1,y=7},{m=1,x=11,t=128,c=\" \",b=128,y=7},{m=1,x=12,t=128,c=\" \",b=256,y=7},{m=1,x=13,t=128,c=\" \",b=256,y=7},{m=1,x=14,t=128,c=\" \",b=1,y=7},{m=1,x=20,t=128,c=\" \",b=1,y=7},{m=1,x=21,t=128,c=\" \",b=1,y=7},{m=1,x=22,t=128,c=\" \",b=1,y=7},{m=1,x=23,t=128,c=\" \",b=1,y=7},{m=1,x=24,t=128,c=\" \",b=1,y=7},{m=1,x=10,t=128,c=\" \",b=1,y=8},{m=1,x=11,t=128,c=\" \",b=128,y=8},{m=1,x=12,t=128,c=\" \",b=256,y=8},{m=1,x=13,t=128,c=\" \",b=256,y=8},{m=1,x=14,t=128,c=\" \",b=1,y=8},{m=1,x=10,t=128,c=\" \",b=1,y=9},{m=1,x=11,t=128,c=\" \",b=128,y=9},{m=1,x=12,t=128,c=\" \",b=256,y=9},{m=1,x=13,t=128,c=\" \",b=256,y=9},{m=1,x=14,t=128,c=\" \",b=1,y=9},{m=1,x=15,t=128,c=\" \",b=1,y=9},{m=1,x=16,t=128,c=\" \",b=1,y=9},{m=1,x=17,t=128,c=\" \",b=1,y=9},{m=1,x=18,t=128,c=\" \",b=1,y=9},{m=1,x=19,t=128,c=\" \",b=1,y=9},{m=1,x=20,t=128,c=\" \",b=1,y=9},{m=1,x=21,t=128,c=\" \",b=1,y=9},{m=1,x=22,t=128,c=\" \",b=1,y=9},{m=1,x=23,t=128,c=\" \",b=1,y=9},{m=1,x=24,t=128,c=\" \",b=1,y=9},{m=1,x=10,t=128,c=\" \",b=1,y=10},{m=1,x=11,t=128,c=\" \",b=128,y=10},{m=1,x=12,t=128,c=\" \",b=256,y=10},{m=1,x=13,t=128,c=\" \",b=256,y=10},{m=1,x=14,t=128,c=\" \",b=128,y=10},{m=1,x=15,t=128,c=\" \",b=128,y=10},{m=1,x=16,t=128,c=\" \",b=128,y=10},{m=1,x=17,t=128,c=\" \",b=128,y=10},{m=1,x=18,t=128,c=\" \",b=128,y=10},{m=1,x=19,t=128,c=\" \",b=128,y=10},{m=1,x=20,t=128,c=\" \",b=128,y=10},{m=1,x=21,t=128,c=\" \",b=128,y=10},{m=1,x=22,t=128,c=\" \",b=128,y=10},{m=1,x=23,t=128,c=\" \",b=128,y=10},{m=1,x=24,t=128,c=\" \",b=1,y=10},{m=1,x=10,t=128,c=\" \",b=1,y=11},{m=1,x=11,t=128,c=\" \",b=128,y=11},{m=1,x=12,t=128,c=\" \",b=256,y=11},{m=1,x=13,t=128,c=\" \",b=256,y=11},{m=1,x=14,t=128,c=\" \",b=256,y=11},{m=1,x=15,t=128,c=\" \",b=256,y=11},{m=1,x=16,t=128,c=\" \",b=256,y=11},{m=1,x=17,t=128,c=\" \",b=256,y=11},{m=1,x=18,t=128,c=\" \",b=256,y=11},{m=1,x=19,t=128,c=\" \",b=256,y=11},{m=1,x=20,t=128,c=\" \",b=256,y=11},{m=1,x=21,t=128,c=\" \",b=256,y=11},{m=1,x=22,t=128,c=\" \",b=256,y=11},{m=1,x=23,t=128,c=\" \",b=256,y=11},{m=1,x=24,t=128,c=\" \",b=1,y=11},{m=1,x=10,t=128,c=\" \",b=1,y=12},{m=1,x=11,t=128,c=\" \",b=1,y=12},{m=1,x=12,t=128,c=\" \",b=1,y=12},{m=1,x=13,t=128,c=\" \",b=1,y=12},{m=1,x=14,t=128,c=\" \",b=1,y=12},{m=1,x=15,t=128,c=\" \",b=1,y=12},{m=1,x=16,t=128,c=\" \",b=1,y=12},{m=1,x=17,t=128,c=\" \",b=1,y=12},{m=1,x=18,t=128,c=\" \",b=1,y=12},{m=1,x=19,t=128,c=\" \",b=1,y=12},{m=1,x=20,t=128,c=\" \",b=1,y=12},{m=1,x=21,t=128,c=\" \",b=128,y=12},{m=1,x=22,t=128,c=\" \",b=256,y=12},{m=1,x=23,t=128,c=\" \",b=256,y=12},{m=1,x=24,t=128,c=\" \",b=1,y=12},{m=1,x=20,t=128,c=\" \",b=1,y=13},{m=1,x=21,t=128,c=\" \",b=128,y=13},{m=1,x=22,t=128,c=\" \",b=256,y=13},{m=1,x=23,t=128,c=\" \",b=256,y=13},{m=1,x=24,t=128,c=\" \",b=1,y=13},{m=1,x=10,t=128,c=\" \",b=1,y=14},{m=1,x=11,t=128,c=\" \",b=1,y=14},{m=1,x=12,t=128,c=\" \",b=1,y=14},{m=1,x=13,t=128,c=\" \",b=1,y=14},{m=1,x=14,t=128,c=\" \",b=1,y=14},{m=1,x=20,t=128,c=\" \",b=1,y=14},{m=1,x=21,t=128,c=\" \",b=128,y=14},{m=1,x=22,t=128,c=\" \",b=256,y=14},{m=1,x=23,t=128,c=\" \",b=256,y=14},{m=1,x=24,t=128,c=\" \",b=1,y=14},{m=1,x=10,t=128,c=\" \",b=1,y=15},{m=1,x=11,t=128,c=\" \",b=128,y=15},{m=1,x=12,t=128,c=\" \",b=128,y=15},{m=1,x=13,t=128,c=\" \",b=128,y=15},{m=1,x=14,t=128,c=\" \",b=1,y=15},{m=1,x=15,t=128,c=\" \",b=1,y=15},{m=1,x=16,t=128,c=\" \",b=1,y=15},{m=1,x=17,t=128,c=\" \",b=1,y=15},{m=1,x=18,t=128,c=\" \",b=1,y=15},{m=1,x=19,t=128,c=\" \",b=1,y=15},{m=1,x=20,t=128,c=\" \",b=1,y=15},{m=1,x=21,t=128,c=\" \",b=128,y=15},{m=1,x=22,t=128,c=\" \",b=256,y=15},{m=1,x=23,t=128,c=\" \",b=256,y=15},{m=1,x=24,t=128,c=\" \",b=1,y=15},{m=1,x=10,t=128,c=\" \",b=1,y=16},{m=1,x=11,t=128,c=\" \",b=128,y=16},{m=1,x=12,t=128,c=\" \",b=256,y=16},{m=1,x=13,t=128,c=\" \",b=256,y=16},{m=1,x=14,t=128,c=\" \",b=128,y=16},{m=1,x=15,t=128,c=\" \",b=128,y=16},{m=1,x=16,t=128,c=\" \",b=128,y=16},{m=1,x=17,t=128,c=\" \",b=128,y=16},{m=1,x=18,t=128,c=\" \",b=128,y=16},{m=1,x=19,t=128,c=\" \",b=128,y=16},{m=1,x=20,t=128,c=\" \",b=128,y=16},{m=1,x=21,t=128,c=\" \",b=128,y=16},{m=1,x=22,t=128,c=\" \",b=256,y=16},{m=1,x=23,t=128,c=\" \",b=256,y=16},{m=1,x=24,t=128,c=\" \",b=1,y=16},{m=1,x=10,t=128,c=\" \",b=1,y=17},{m=1,x=11,t=128,c=\" \",b=128,y=17},{m=1,x=12,t=128,c=\" \",b=256,y=17},{m=1,x=13,t=128,c=\" \",b=256,y=17},{m=1,x=14,t=128,c=\" \",b=256,y=17},{m=1,x=15,t=128,c=\" \",b=256,y=17},{m=1,x=16,t=128,c=\" \",b=256,y=17},{m=1,x=17,t=128,c=\" \",b=256,y=17},{m=1,x=18,t=128,c=\" \",b=256,y=17},{m=1,x=19,t=128,c=\" \",b=256,y=17},{m=1,x=20,t=128,c=\" \",b=256,y=17},{m=1,x=21,t=128,c=\" \",b=256,y=17},{m=1,x=22,t=128,c=\" \",b=256,y=17},{m=1,x=23,t=128,c=\" \",b=256,y=17},{m=1,x=24,t=128,c=\" \",b=1,y=17},{m=1,x=10,t=128,c=\" \",b=1,y=18},{m=1,x=11,t=128,c=\" \",b=1,y=18},{m=1,x=12,t=128,c=\" \",b=1,y=18},{m=1,x=13,t=128,c=\" \",b=1,y=18},{m=1,x=14,t=128,c=\" \",b=1,y=18},{m=1,x=15,t=128,c=\" \",b=1,y=18},{m=1,x=16,t=128,c=\" \",b=1,y=18},{m=1,x=17,t=128,c=\" \",b=1,y=18},{m=1,x=18,t=128,c=\" \",b=1,y=18},{m=1,x=19,t=128,c=\" \",b=1,y=18},{m=1,x=20,t=128,c=\" \",b=1,y=18},{m=1,x=21,t=128,c=\" \",b=1,y=18},{m=1,x=22,t=128,c=\" \",b=1,y=18},{m=1,x=23,t=128,c=\" \",b=1,y=18},{m=1,x=24,t=128,c=\" \",b=1,y=18}},{{m=1,x=10,t=128,c=\" \",y=3,b=1},{m=1,x=11,t=128,c=\" \",y=3,b=1},{m=1,x=12,t=128,c=\" \",y=3,b=1},{m=1,x=13,t=128,c=\" \",y=3,b=1},{m=1,x=14,t=128,c=\" \",y=3,b=1},{m=1,x=15,t=128,c=\" \",y=3,b=1},{m=1,x=16,t=128,c=\" \",y=3,b=1},{m=1,x=17,t=128,c=\" \",y=3,b=1},{m=1,x=18,t=128,c=\" \",y=3,b=1},{m=1,x=19,t=128,c=\" \",y=3,b=1},{m=1,x=20,t=128,c=\" \",y=3,b=1},{m=1,x=21,t=128,c=\" \",y=3,b=1},{m=1,x=22,t=128,c=\" \",y=3,b=1},{m=1,x=23,t=128,c=\" \",y=3,b=1},{m=1,x=24,t=128,c=\" \",y=3,b=1},{m=1,x=10,t=128,c=\" \",y=4,b=1},{m=1,x=11,t=128,c=\" \",y=4,b=128},{m=1,x=12,t=128,c=\" \",y=4,b=128},{m=1,x=13,t=128,c=\" \",y=4,b=128},{m=1,x=14,t=128,c=\" \",y=4,b=128},{m=1,x=15,t=128,c=\" \",y=4,b=128},{m=1,x=16,t=128,c=\" \",y=4,b=128},{m=1,x=17,t=128,c=\" \",y=4,b=128},{m=1,x=18,t=128,c=\" \",y=4,b=128},{m=1,x=19,t=128,c=\" \",y=4,b=128},{m=1,x=20,t=128,c=\" \",y=4,b=128},{m=1,x=21,t=128,c=\" \",y=4,b=128},{m=1,x=22,t=128,c=\" \",y=4,b=128},{m=1,x=23,t=128,c=\" \",y=4,b=128},{m=1,x=24,t=128,c=\" \",y=4,b=1},{m=1,x=10,t=128,c=\" \",y=5,b=1},{m=1,x=11,t=128,c=\" \",y=5,b=128},{m=1,x=12,t=128,c=\" \",y=5,b=256},{m=1,x=13,t=128,c=\" \",y=5,b=256},{m=1,x=14,t=128,c=\" \",y=5,b=256},{m=1,x=15,t=128,c=\" \",y=5,b=256},{m=1,x=16,t=128,c=\" \",y=5,b=256},{m=1,x=17,t=128,c=\" \",y=5,b=256},{m=1,x=18,t=128,c=\" \",y=5,b=256},{m=1,x=19,t=128,c=\" \",y=5,b=256},{m=1,x=20,t=128,c=\" \",y=5,b=256},{m=1,x=21,t=128,c=\" \",y=5,b=256},{m=1,x=22,t=128,c=\" \",y=5,b=256},{m=1,x=23,t=128,c=\" \",y=5,b=256},{m=1,x=24,t=128,c=\" \",y=5,b=1},{m=1,x=10,t=128,c=\" \",y=6,b=1},{m=1,x=11,t=128,c=\" \",y=6,b=128},{m=1,x=12,t=128,c=\" \",y=6,b=256},{m=1,x=13,t=128,c=\" \",y=6,b=256},{m=1,x=14,t=128,c=\" \",y=6,b=1},{m=1,x=15,t=128,c=\" \",y=6,b=1},{m=1,x=16,t=128,c=\" \",y=6,b=1},{m=1,x=17,t=128,c=\" \",y=6,b=1},{m=1,x=18,t=128,c=\" \",y=6,b=1},{m=1,x=19,t=128,c=\" \",y=6,b=1},{m=1,x=20,t=128,c=\" \",y=6,b=1},{m=1,x=21,t=128,c=\" \",y=6,b=128},{m=1,x=22,t=128,c=\" \",y=6,b=256},{m=1,x=23,t=128,c=\" \",y=6,b=256},{m=1,x=24,t=128,c=\" \",y=6,b=1},{m=1,x=10,t=128,c=\" \",y=7,b=1},{m=1,x=11,t=128,c=\" \",y=7,b=128},{m=1,x=12,t=128,c=\" \",y=7,b=256},{m=1,x=13,t=128,c=\" \",y=7,b=256},{m=1,x=14,t=128,c=\" \",y=7,b=1},{m=1,x=20,t=128,c=\" \",y=7,b=1},{m=1,x=21,t=128,c=\" \",y=7,b=128},{m=1,x=22,t=128,c=\" \",y=7,b=256},{m=1,x=23,t=128,c=\" \",y=7,b=256},{m=1,x=24,t=128,c=\" \",y=7,b=1},{m=1,x=10,t=128,c=\" \",y=8,b=1},{m=1,x=11,t=128,c=\" \",y=8,b=128},{m=1,x=12,t=128,c=\" \",y=8,b=256},{m=1,x=13,t=128,c=\" \",y=8,b=256},{m=1,x=14,t=128,c=\" \",y=8,b=1},{m=1,x=20,t=128,c=\" \",y=8,b=1},{m=1,x=21,t=128,c=\" \",y=8,b=128},{m=1,x=22,t=128,c=\" \",y=8,b=256},{m=1,x=23,t=128,c=\" \",y=8,b=256},{m=1,x=24,t=128,c=\" \",y=8,b=1},{m=1,x=10,t=128,c=\" \",y=9,b=1},{m=1,x=11,t=128,c=\" \",y=9,b=128},{m=1,x=12,t=128,c=\" \",y=9,b=256},{m=1,x=13,t=128,c=\" \",y=9,b=256},{m=1,x=14,t=128,c=\" \",y=9,b=1},{m=1,x=20,t=128,c=\" \",y=9,b=1},{m=1,x=21,t=128,c=\" \",y=9,b=128},{m=1,x=22,t=128,c=\" \",y=9,b=256},{m=1,x=23,t=128,c=\" \",y=9,b=256},{m=1,x=24,t=128,c=\" \",y=9,b=1},{m=1,x=10,t=128,c=\" \",y=10,b=1},{m=1,x=11,t=128,c=\" \",y=10,b=128},{m=1,x=12,t=128,c=\" \",y=10,b=256},{m=1,x=13,t=128,c=\" \",y=10,b=256},{m=1,x=14,t=128,c=\" \",y=10,b=1},{m=1,x=20,t=128,c=\" \",y=10,b=1},{m=1,x=21,t=128,c=\" \",y=10,b=128},{m=1,x=22,t=128,c=\" \",y=10,b=256},{m=1,x=23,t=128,c=\" \",y=10,b=256},{m=1,x=24,t=128,c=\" \",y=10,b=1},{m=1,x=10,t=128,c=\" \",y=11,b=1},{m=1,x=11,t=128,c=\" \",y=11,b=128},{m=1,x=12,t=128,c=\" \",y=11,b=256},{m=1,x=13,t=128,c=\" \",y=11,b=256},{m=1,x=14,t=128,c=\" \",y=11,b=1},{m=1,x=20,t=128,c=\" \",y=11,b=1},{m=1,x=21,t=128,c=\" \",y=11,b=128},{m=1,x=22,t=128,c=\" \",y=11,b=256},{m=1,x=23,t=128,c=\" \",y=11,b=256},{m=1,x=24,t=128,c=\" \",y=11,b=1},{m=1,x=10,t=128,c=\" \",y=12,b=1},{m=1,x=11,t=128,c=\" \",y=12,b=128},{m=1,x=12,t=128,c=\" \",y=12,b=256},{m=1,x=13,t=128,c=\" \",y=12,b=256},{m=1,x=14,t=128,c=\" \",y=12,b=1},{m=1,x=20,t=128,c=\" \",y=12,b=1},{m=1,x=21,t=128,c=\" \",y=12,b=128},{m=1,x=22,t=128,c=\" \",y=12,b=256},{m=1,x=23,t=128,c=\" \",y=12,b=256},{m=1,x=24,t=128,c=\" \",y=12,b=1},{m=1,x=10,t=128,c=\" \",y=13,b=1},{m=1,x=11,t=128,c=\" \",y=13,b=128},{m=1,x=12,t=128,c=\" \",y=13,b=256},{m=1,x=13,t=128,c=\" \",y=13,b=256},{m=1,x=14,t=128,c=\" \",y=13,b=1},{m=1,x=20,t=128,c=\" \",y=13,b=1},{m=1,x=21,t=128,c=\" \",y=13,b=128},{m=1,x=22,t=128,c=\" \",y=13,b=256},{m=1,x=23,t=128,c=\" \",y=13,b=256},{m=1,x=24,t=128,c=\" \",y=13,b=1},{m=1,x=10,t=128,c=\" \",y=14,b=1},{m=1,x=11,t=128,c=\" \",y=14,b=128},{m=1,x=12,t=128,c=\" \",y=14,b=256},{m=1,x=13,t=128,c=\" \",y=14,b=256},{m=1,x=14,t=128,c=\" \",y=14,b=1},{m=1,x=20,t=128,c=\" \",y=14,b=1},{m=1,x=21,t=128,c=\" \",y=14,b=128},{m=1,x=22,t=128,c=\" \",y=14,b=256},{m=1,x=23,t=128,c=\" \",y=14,b=256},{m=1,x=24,t=128,c=\" \",y=14,b=1},{m=1,x=10,t=128,c=\" \",y=15,b=1},{m=1,x=11,t=128,c=\" \",y=15,b=128},{m=1,x=12,t=128,c=\" \",y=15,b=256},{m=1,x=13,t=128,c=\" \",y=15,b=256},{m=1,x=14,t=128,c=\" \",y=15,b=1},{m=1,x=15,t=128,c=\" \",y=15,b=1},{m=1,x=16,t=128,c=\" \",y=15,b=1},{m=1,x=17,t=128,c=\" \",y=15,b=1},{m=1,x=18,t=128,c=\" \",y=15,b=1},{m=1,x=19,t=128,c=\" \",y=15,b=1},{m=1,x=20,t=128,c=\" \",y=15,b=1},{m=1,x=21,t=128,c=\" \",y=15,b=128},{m=1,x=22,t=128,c=\" \",y=15,b=256},{m=1,x=23,t=128,c=\" \",y=15,b=256},{m=1,x=24,t=128,c=\" \",y=15,b=1},{m=1,x=10,t=128,c=\" \",y=16,b=1},{m=1,x=11,t=128,c=\" \",y=16,b=128},{m=1,x=12,t=128,c=\" \",y=16,b=256},{m=1,x=13,t=128,c=\" \",y=16,b=256},{m=1,x=14,t=128,c=\" \",y=16,b=128},{m=1,x=15,t=128,c=\" \",y=16,b=128},{m=1,x=16,t=128,c=\" \",y=16,b=128},{m=1,x=17,t=128,c=\" \",y=16,b=128},{m=1,x=18,t=128,c=\" \",y=16,b=128},{m=1,x=19,t=128,c=\" \",y=16,b=128},{m=1,x=20,t=128,c=\" \",y=16,b=128},{m=1,x=21,t=128,c=\" \",y=16,b=128},{m=1,x=22,t=128,c=\" \",y=16,b=256},{m=1,x=23,t=128,c=\" \",y=16,b=256},{m=1,x=24,t=128,c=\" \",y=16,b=1},{m=1,x=10,t=128,c=\" \",y=17,b=1},{m=1,x=11,t=128,c=\" \",y=17,b=128},{m=1,x=12,t=128,c=\" \",y=17,b=256},{m=1,x=13,t=128,c=\" \",y=17,b=256},{m=1,x=14,t=128,c=\" \",y=17,b=256},{m=1,x=15,t=128,c=\" \",y=17,b=256},{m=1,x=16,t=128,c=\" \",y=17,b=256},{m=1,x=17,t=128,c=\" \",y=17,b=256},{m=1,x=18,t=128,c=\" \",y=17,b=256},{m=1,x=19,t=128,c=\" \",y=17,b=256},{m=1,x=20,t=128,c=\" \",y=17,b=256},{m=1,x=21,t=128,c=\" \",y=17,b=256},{m=1,x=22,t=128,c=\" \",y=17,b=256},{m=1,x=23,t=128,c=\" \",y=17,b=256},{m=1,x=24,t=128,c=\" \",y=17,b=1},{m=1,x=10,t=128,c=\" \",y=18,b=1},{m=1,x=11,t=128,c=\" \",y=18,b=1},{m=1,x=12,t=128,c=\" \",y=18,b=1},{m=1,x=13,t=128,c=\" \",y=18,b=1},{m=1,x=14,t=128,c=\" \",y=18,b=1},{m=1,x=15,t=128,c=\" \",y=18,b=1},{m=1,x=16,t=128,c=\" \",y=18,b=1},{m=1,x=17,t=128,c=\" \",y=18,b=1},{m=1,x=18,t=128,c=\" \",y=18,b=1},{m=1,x=19,t=128,c=\" \",y=18,b=1},{m=1,x=20,t=128,c=\" \",y=18,b=1},{m=1,x=21,t=128,c=\" \",y=18,b=1},{m=1,x=22,t=128,c=\" \",y=18,b=1},{m=1,x=23,t=128,c=\" \",y=18,b=1},{m=1,x=24,t=128,c=\" \",y=18,b=1}},{{m=1,x=10,t=128,c=\" \",y=3,b=1},{m=1,x=11,t=128,c=\" \",y=3,b=1},{m=1,x=12,t=128,c=\" \",y=3,b=1},{m=1,x=13,t=128,c=\" \",y=3,b=1},{m=1,x=14,t=128,c=\" \",y=3,b=1},{m=1,x=15,t=128,c=\" \",y=3,b=1},{m=1,x=16,t=128,c=\" \",y=3,b=1},{m=1,x=17,t=128,c=\" \",y=3,b=1},{m=1,x=18,t=128,c=\" \",y=3,b=1},{m=1,x=20,t=128,c=\" \",y=3,b=1},{m=1,x=21,t=128,c=\" \",y=3,b=1},{m=1,x=22,t=128,c=\" \",y=3,b=1},{m=1,x=23,t=128,c=\" \",y=3,b=1},{m=1,x=24,t=128,c=\" \",y=3,b=1},{m=1,x=10,t=128,c=\" \",y=4,b=1},{m=1,x=11,t=128,c=\" \",y=4,b=128},{m=1,x=12,t=128,c=\" \",y=4,b=128},{m=1,x=13,t=128,c=\" \",y=4,b=128},{m=1,x=14,t=128,c=\" \",y=4,b=128},{m=1,x=15,t=128,c=\" \",y=4,b=128},{m=1,x=16,t=128,c=\" \",y=4,b=128},{m=1,x=17,t=128,c=\" \",y=4,b=128},{m=1,x=18,t=128,c=\" \",y=4,b=1},{m=1,x=20,t=128,c=\" \",y=4,b=1},{m=1,x=21,t=128,c=\" \",y=4,b=128},{m=1,x=22,t=128,c=\" \",y=4,b=128},{m=1,x=23,t=128,c=\" \",y=4,b=128},{m=1,x=24,t=128,c=\" \",y=4,b=1},{m=1,x=10,t=128,c=\" \",y=5,b=1},{m=1,x=11,t=128,c=\" \",y=5,b=128},{m=1,x=12,t=128,c=\" \",y=5,b=256},{m=1,x=13,t=128,c=\" \",y=5,b=256},{m=1,x=14,t=128,c=\" \",y=5,b=256},{m=1,x=15,t=128,c=\" \",y=5,b=256},{m=1,x=16,t=128,c=\" \",y=5,b=256},{m=1,x=17,t=128,c=\" \",y=5,b=256},{m=1,x=18,t=128,c=\" \",y=5,b=1},{m=1,x=20,t=128,c=\" \",y=5,b=1},{m=1,x=21,t=128,c=\" \",y=5,b=128},{m=1,x=22,t=128,c=\" \",y=5,b=256},{m=1,x=23,t=128,c=\" \",y=5,b=256},{m=1,x=24,t=128,c=\" \",y=5,b=1},{m=1,x=10,t=128,c=\" \",y=6,b=1},{m=1,x=11,t=128,c=\" \",y=6,b=128},{m=1,x=12,t=128,c=\" \",y=6,b=256},{m=1,x=13,t=128,c=\" \",y=6,b=256},{m=1,x=14,t=128,c=\" \",y=6,b=256},{m=1,x=15,t=128,c=\" \",y=6,b=256},{m=1,x=16,t=128,c=\" \",y=6,b=256},{m=1,x=17,t=128,c=\" \",y=6,b=256},{m=1,x=18,t=128,c=\" \",y=6,b=1},{m=1,x=20,t=128,c=\" \",y=6,b=1},{m=1,x=21,t=128,c=\" \",y=6,b=128},{m=1,x=22,t=128,c=\" \",y=6,b=256},{m=1,x=23,t=128,c=\" \",y=6,b=256},{m=1,x=24,t=128,c=\" \",y=6,b=1},{m=1,x=10,t=128,c=\" \",y=7,b=1},{m=1,x=11,t=128,c=\" \",y=7,b=128},{m=1,x=12,t=128,c=\" \",y=7,b=256},{m=1,x=13,t=128,c=\" \",y=7,b=256},{m=1,x=14,t=128,c=\" \",y=7,b=1},{m=1,x=15,t=128,c=\" \",y=7,b=1},{m=1,x=16,t=128,c=\" \",y=7,b=1},{m=1,x=17,t=128,c=\" \",y=7,b=128},{m=1,x=18,t=128,c=\" \",y=7,b=1},{m=1,x=20,t=128,c=\" \",y=7,b=1},{m=1,x=21,t=128,c=\" \",y=7,b=128},{m=1,x=22,t=128,c=\" \",y=7,b=256},{m=1,x=23,t=128,c=\" \",y=7,b=256},{m=1,x=24,t=128,c=\" \",y=7,b=1},{m=1,x=10,t=128,c=\" \",y=8,b=1},{m=1,x=11,t=128,c=\" \",y=8,b=128},{m=1,x=12,t=128,c=\" \",y=8,b=256},{m=1,x=13,t=128,c=\" \",y=8,b=256},{m=1,x=14,t=128,c=\" \",y=8,b=1},{m=1,x=16,t=128,c=\" \",y=8,b=1},{m=1,x=17,t=128,c=\" \",y=8,b=128},{m=1,x=18,t=128,c=\" \",y=8,b=1},{m=1,x=20,t=128,c=\" \",y=8,b=1},{m=1,x=21,t=128,c=\" \",y=8,b=128},{m=1,x=22,t=128,c=\" \",y=8,b=256},{m=1,x=23,t=128,c=\" \",y=8,b=256},{m=1,x=24,t=128,c=\" \",y=8,b=1},{m=1,x=10,t=128,c=\" \",y=9,b=1},{m=1,x=11,t=128,c=\" \",y=9,b=128},{m=1,x=12,t=128,c=\" \",y=9,b=256},{m=1,x=13,t=128,c=\" \",y=9,b=256},{m=1,x=14,t=128,c=\" \",y=9,b=1},{m=1,x=16,t=128,c=\" \",y=9,b=1},{m=1,x=17,t=128,c=\" \",y=9,b=128},{m=1,x=18,t=128,c=\" \",y=9,b=1},{m=1,x=20,t=128,c=\" \",y=9,b=1},{m=1,x=21,t=128,c=\" \",y=9,b=128},{m=1,x=22,t=128,c=\" \",y=9,b=256},{m=1,x=23,t=128,c=\" \",y=9,b=256},{m=1,x=24,t=128,c=\" \",y=9,b=1},{m=1,x=10,t=128,c=\" \",y=10,b=1},{m=1,x=11,t=128,c=\" \",y=10,b=128},{m=1,x=12,t=128,c=\" \",y=10,b=256},{m=1,x=13,t=128,c=\" \",y=10,b=256},{m=1,x=14,t=128,c=\" \",y=10,b=1},{m=1,x=16,t=128,c=\" \",y=10,b=1},{m=1,x=17,t=128,c=\" \",y=10,b=128},{m=1,x=18,t=128,c=\" \",y=10,b=1},{m=1,x=20,t=128,c=\" \",y=10,b=1},{m=1,x=21,t=128,c=\" \",y=10,b=128},{m=1,x=22,t=128,c=\" \",y=10,b=256},{m=1,x=23,t=128,c=\" \",y=10,b=256},{m=1,x=24,t=128,c=\" \",y=10,b=1},{m=1,x=10,t=128,c=\" \",y=11,b=1},{m=1,x=11,t=128,c=\" \",y=11,b=128},{m=1,x=12,t=128,c=\" \",y=11,b=256},{m=1,x=13,t=128,c=\" \",y=11,b=256},{m=1,x=14,t=128,c=\" \",y=11,b=1},{m=1,x=16,t=128,c=\" \",y=11,b=1},{m=1,x=17,t=128,c=\" \",y=11,b=128},{m=1,x=18,t=128,c=\" \",y=11,b=1},{m=1,x=20,t=128,c=\" \",y=11,b=1},{m=1,x=21,t=128,c=\" \",y=11,b=128},{m=1,x=22,t=128,c=\" \",y=11,b=256},{m=1,x=23,t=128,c=\" \",y=11,b=256},{m=1,x=24,t=128,c=\" \",y=11,b=1},{m=1,x=10,t=128,c=\" \",y=12,b=1},{m=1,x=11,t=128,c=\" \",y=12,b=128},{m=1,x=12,t=128,c=\" \",y=12,b=256},{m=1,x=13,t=128,c=\" \",y=12,b=256},{m=1,x=14,t=128,c=\" \",y=12,b=1},{m=1,x=16,t=128,c=\" \",y=12,b=1},{m=1,x=17,t=128,c=\" \",y=12,b=128},{m=1,x=18,t=128,c=\" \",y=12,b=1},{m=1,x=20,t=128,c=\" \",y=12,b=1},{m=1,x=21,t=128,c=\" \",y=12,b=128},{m=1,x=22,t=128,c=\" \",y=12,b=256},{m=1,x=23,t=128,c=\" \",y=12,b=256},{m=1,x=24,t=128,c=\" \",y=12,b=1},{m=1,x=10,t=128,c=\" \",y=13,b=1},{m=1,x=11,t=128,c=\" \",y=13,b=128},{m=1,x=12,t=128,c=\" \",y=13,b=256},{m=1,x=13,t=128,c=\" \",y=13,b=256},{m=1,x=14,t=128,c=\" \",y=13,b=1},{m=1,x=16,t=128,c=\" \",y=13,b=1},{m=1,x=17,t=128,c=\" \",y=13,b=128},{m=1,x=18,t=128,c=\" \",y=13,b=1},{m=1,x=20,t=128,c=\" \",y=13,b=1},{m=1,x=21,t=128,c=\" \",y=13,b=128},{m=1,x=22,t=128,c=\" \",y=13,b=256},{m=1,x=23,t=128,c=\" \",y=13,b=256},{m=1,x=24,t=128,c=\" \",y=13,b=1},{m=1,x=10,t=128,c=\" \",y=14,b=1},{m=1,x=11,t=128,c=\" \",y=14,b=128},{m=1,x=12,t=128,c=\" \",y=14,b=256},{m=1,x=13,t=128,c=\" \",y=14,b=256},{m=1,x=14,t=128,c=\" \",y=14,b=1},{m=1,x=16,t=128,c=\" \",y=14,b=1},{m=1,x=17,t=128,c=\" \",y=14,b=128},{m=1,x=18,t=128,c=\" \",y=14,b=1},{m=1,x=19,t=128,c=\" \",y=14,b=1},{m=1,x=20,t=128,c=\" \",y=14,b=1},{m=1,x=21,t=128,c=\" \",y=14,b=128},{m=1,x=22,t=128,c=\" \",y=14,b=256},{m=1,x=23,t=128,c=\" \",y=14,b=256},{m=1,x=24,t=128,c=\" \",y=14,b=1},{m=1,x=10,t=128,c=\" \",y=15,b=1},{m=1,x=11,t=128,c=\" \",y=15,b=128},{m=1,x=12,t=128,c=\" \",y=15,b=256},{m=1,x=13,t=128,c=\" \",y=15,b=256},{m=1,x=14,t=128,c=\" \",y=15,b=1},{m=1,x=16,t=128,c=\" \",y=15,b=1},{m=1,x=17,t=128,c=\" \",y=15,b=128},{m=1,x=18,t=128,c=\" \",y=15,b=256},{m=1,x=19,t=128,c=\" \",y=15,b=128},{m=1,x=20,t=128,c=\" \",y=15,b=128},{m=1,x=21,t=128,c=\" \",y=15,b=128},{m=1,x=22,t=128,c=\" \",y=15,b=256},{m=1,x=23,t=128,c=\" \",y=15,b=256},{m=1,x=24,t=128,c=\" \",y=15,b=1},{m=1,x=10,t=128,c=\" \",y=16,b=1},{m=1,x=11,t=128,c=\" \",y=16,b=128},{m=1,x=12,t=128,c=\" \",y=16,b=256},{m=1,x=13,t=128,c=\" \",y=16,b=256},{m=1,x=14,t=128,c=\" \",y=16,b=1},{m=1,x=16,t=128,c=\" \",y=16,b=1},{m=1,x=17,t=128,c=\" \",y=16,b=128},{m=1,x=18,t=128,c=\" \",y=16,b=256},{m=1,x=19,t=128,c=\" \",y=16,b=256},{m=1,x=20,t=128,c=\" \",y=16,b=256},{m=1,x=21,t=128,c=\" \",y=16,b=256},{m=1,x=22,t=128,c=\" \",y=16,b=256},{m=1,x=23,t=128,c=\" \",y=16,b=256},{m=1,x=24,t=128,c=\" \",y=16,b=1},{m=1,x=10,t=128,c=\" \",y=17,b=1},{m=1,x=11,t=128,c=\" \",y=17,b=128},{m=1,x=12,t=128,c=\" \",y=17,b=256},{m=1,x=13,t=128,c=\" \",y=17,b=256},{m=1,x=14,t=128,c=\" \",y=17,b=1},{m=1,x=16,t=128,c=\" \",y=17,b=1},{m=1,x=17,t=128,c=\" \",y=17,b=128},{m=1,x=18,t=128,c=\" \",y=17,b=256},{m=1,x=19,t=128,c=\" \",y=17,b=256},{m=1,x=20,t=128,c=\" \",y=17,b=256},{m=1,x=21,t=128,c=\" \",y=17,b=256},{m=1,x=22,t=128,c=\" \",y=17,b=256},{m=1,x=23,t=128,c=\" \",y=17,b=256},{m=1,x=24,t=128,c=\" \",y=17,b=1},{m=1,x=10,t=128,c=\" \",y=18,b=1},{m=1,x=11,t=128,c=\" \",y=18,b=1},{m=1,x=12,t=128,c=\" \",y=18,b=1},{m=1,x=13,t=128,c=\" \",y=18,b=1},{m=1,x=14,t=128,c=\" \",y=18,b=1},{m=1,x=16,t=128,c=\" \",y=18,b=1},{m=1,x=17,t=128,c=\" \",y=18,b=1},{m=1,x=18,t=128,c=\" \",y=18,b=1},{m=1,x=19,t=128,c=\" \",y=18,b=1},{m=1,x=20,t=128,c=\" \",y=18,b=1},{m=1,x=21,t=128,c=\" \",y=18,b=1},{m=1,x=22,t=128,c=\" \",y=18,b=1},{m=1,x=23,t=128,c=\" \",y=18,b=1},{m=1,x=24,t=128,c=\" \",y=18,b=1}},{{m=1,x=10,t=128,c=\" \",b=1,y=3},{m=1,x=11,t=128,c=\" \",b=1,y=3},{m=1,x=12,t=128,c=\" \",b=1,y=3},{m=1,x=13,t=128,c=\" \",b=1,y=3},{m=1,x=14,t=128,c=\" \",b=1,y=3},{m=1,x=15,t=128,c=\" \",b=1,y=3},{m=1,x=16,t=128,c=\" \",b=1,y=3},{m=1,x=17,t=128,c=\" \",b=1,y=3},{m=1,x=18,t=128,c=\" \",b=1,y=3},{m=1,x=19,t=128,c=\" \",b=1,y=3},{m=1,x=20,t=128,c=\" \",b=1,y=3},{m=1,x=21,t=128,c=\" \",b=1,y=3},{m=1,x=22,t=128,c=\" \",b=1,y=3},{m=1,x=23,t=128,c=\" \",b=1,y=3},{m=1,x=24,t=128,c=\" \",b=1,y=3},{m=1,x=10,t=128,c=\" \",b=1,y=4},{m=1,x=11,t=128,c=\" \",b=128,y=4},{m=1,x=12,t=128,c=\" \",b=128,y=4},{m=1,x=13,t=128,c=\" \",b=128,y=4},{m=1,x=14,t=128,c=\" \",b=128,y=4},{m=1,x=15,t=128,c=\" \",b=128,y=4},{m=1,x=16,t=128,c=\" \",b=128,y=4},{m=1,x=17,t=128,c=\" \",b=128,y=4},{m=1,x=18,t=128,c=\" \",b=128,y=4},{m=1,x=19,t=128,c=\" \",b=128,y=4},{m=1,x=20,t=128,c=\" \",b=128,y=4},{m=1,x=21,t=128,c=\" \",b=128,y=4},{m=1,x=22,t=128,c=\" \",b=128,y=4},{m=1,x=23,t=128,c=\" \",b=128,y=4},{m=1,x=24,t=128,c=\" \",b=1,y=4},{m=1,x=10,t=128,c=\" \",b=1,y=5},{m=1,x=11,t=128,c=\" \",b=128,y=5},{m=1,x=12,t=128,c=\" \",b=256,y=5},{m=1,x=13,t=128,c=\" \",b=256,y=5},{m=1,x=14,t=128,c=\" \",b=256,y=5},{m=1,x=15,t=128,c=\" \",b=256,y=5},{m=1,x=16,t=128,c=\" \",b=256,y=5},{m=1,x=17,t=128,c=\" \",b=256,y=5},{m=1,x=18,t=128,c=\" \",b=256,y=5},{m=1,x=19,t=128,c=\" \",b=256,y=5},{m=1,x=20,t=128,c=\" \",b=256,y=5},{m=1,x=21,t=128,c=\" \",b=256,y=5},{m=1,x=22,t=128,c=\" \",b=256,y=5},{m=1,x=23,t=128,c=\" \",b=256,y=5},{m=1,x=24,t=128,c=\" \",b=1,y=5},{m=1,x=10,t=128,c=\" \",b=1,y=6},{m=1,x=11,t=128,c=\" \",b=128,y=6},{m=1,x=12,t=128,c=\" \",b=256,y=6},{m=1,x=13,t=128,c=\" \",b=256,y=6},{m=1,x=14,t=128,c=\" \",b=1,y=6},{m=1,x=15,t=128,c=\" \",b=1,y=6},{m=1,x=16,t=128,c=\" \",b=1,y=6},{m=1,x=17,t=128,c=\" \",b=1,y=6},{m=1,x=18,t=128,c=\" \",b=1,y=6},{m=1,x=19,t=128,c=\" \",b=1,y=6},{m=1,x=20,t=128,c=\" \",b=1,y=6},{m=1,x=21,t=128,c=\" \",b=128,y=6},{m=1,x=22,t=128,c=\" \",b=256,y=6},{m=1,x=23,t=128,c=\" \",b=256,y=6},{m=1,x=24,t=128,c=\" \",b=1,y=6},{m=1,x=10,t=128,c=\" \",b=1,y=7},{m=1,x=11,t=128,c=\" \",b=128,y=7},{m=1,x=12,t=128,c=\" \",b=256,y=7},{m=1,x=13,t=128,c=\" \",b=256,y=7},{m=1,x=14,t=128,c=\" \",b=1,y=7},{m=1,x=20,t=128,c=\" \",b=1,y=7},{m=1,x=21,t=128,c=\" \",b=128,y=7},{m=1,x=22,t=128,c=\" \",b=256,y=7},{m=1,x=23,t=128,c=\" \",b=256,y=7},{m=1,x=24,t=128,c=\" \",b=1,y=7},{m=1,x=10,t=128,c=\" \",b=1,y=8},{m=1,x=11,t=128,c=\" \",b=128,y=8},{m=1,x=12,t=128,c=\" \",b=256,y=8},{m=1,x=13,t=128,c=\" \",b=256,y=8},{m=1,x=14,t=128,c=\" \",b=1,y=8},{m=1,x=20,t=128,c=\" \",b=1,y=8},{m=1,x=21,t=128,c=\" \",b=128,y=8},{m=1,x=22,t=128,c=\" \",b=256,y=8},{m=1,x=23,t=128,c=\" \",b=256,y=8},{m=1,x=24,t=128,c=\" \",b=1,y=8},{m=1,x=10,t=128,c=\" \",b=1,y=9},{m=1,x=11,t=128,c=\" \",b=128,y=9},{m=1,x=12,t=128,c=\" \",b=256,y=9},{m=1,x=13,t=128,c=\" \",b=256,y=9},{m=1,x=14,t=128,c=\" \",b=1,y=9},{m=1,x=15,t=128,c=\" \",b=1,y=9},{m=1,x=16,t=128,c=\" \",b=1,y=9},{m=1,x=17,t=128,c=\" \",b=1,y=9},{m=1,x=18,t=128,c=\" \",b=1,y=9},{m=1,x=19,t=128,c=\" \",b=1,y=9},{m=1,x=20,t=128,c=\" \",b=1,y=9},{m=1,x=21,t=128,c=\" \",b=128,y=9},{m=1,x=22,t=128,c=\" \",b=256,y=9},{m=1,x=23,t=128,c=\" \",b=256,y=9},{m=1,x=24,t=128,c=\" \",b=1,y=9},{m=1,x=10,t=128,c=\" \",b=1,y=10},{m=1,x=11,t=128,c=\" \",b=128,y=10},{m=1,x=12,t=128,c=\" \",b=256,y=10},{m=1,x=13,t=128,c=\" \",b=256,y=10},{m=1,x=14,t=128,c=\" \",b=128,y=10},{m=1,x=15,t=128,c=\" \",b=128,y=10},{m=1,x=16,t=128,c=\" \",b=128,y=10},{m=1,x=17,t=128,c=\" \",b=128,y=10},{m=1,x=18,t=128,c=\" \",b=128,y=10},{m=1,x=19,t=128,c=\" \",b=128,y=10},{m=1,x=20,t=128,c=\" \",b=128,y=10},{m=1,x=21,t=128,c=\" \",b=128,y=10},{m=1,x=22,t=128,c=\" \",b=256,y=10},{m=1,x=23,t=128,c=\" \",b=256,y=10},{m=1,x=24,t=128,c=\" \",b=1,y=10},{m=1,x=10,t=128,c=\" \",b=1,y=11},{m=1,x=11,t=128,c=\" \",b=128,y=11},{m=1,x=12,t=128,c=\" \",b=256,y=11},{m=1,x=13,t=128,c=\" \",b=256,y=11},{m=1,x=14,t=128,c=\" \",b=256,y=11},{m=1,x=15,t=128,c=\" \",b=256,y=11},{m=1,x=16,t=128,c=\" \",b=256,y=11},{m=1,x=17,t=128,c=\" \",b=256,y=11},{m=1,x=18,t=128,c=\" \",b=256,y=11},{m=1,x=19,t=128,c=\" \",b=256,y=11},{m=1,x=20,t=128,c=\" \",b=256,y=11},{m=1,x=21,t=128,c=\" \",b=256,y=11},{m=1,x=22,t=128,c=\" \",b=256,y=11},{m=1,x=23,t=128,c=\" \",b=256,y=11},{m=1,x=24,t=128,c=\" \",b=1,y=11},{m=1,x=10,t=128,c=\" \",b=1,y=12},{m=1,x=11,t=128,c=\" \",b=128,y=12},{m=1,x=12,t=128,c=\" \",b=256,y=12},{m=1,x=13,t=128,c=\" \",b=256,y=12},{m=1,x=14,t=128,c=\" \",b=1,y=12},{m=1,x=15,t=128,c=\" \",b=1,y=12},{m=1,x=16,t=128,c=\" \",b=1,y=12},{m=1,x=17,t=128,c=\" \",b=1,y=12},{m=1,x=18,t=128,c=\" \",b=1,y=12},{m=1,x=19,t=128,c=\" \",b=1,y=12},{m=1,x=20,t=128,c=\" \",b=1,y=12},{m=1,x=21,t=128,c=\" \",b=128,y=12},{m=1,x=22,t=128,c=\" \",b=256,y=12},{m=1,x=23,t=128,c=\" \",b=256,y=12},{m=1,x=24,t=128,c=\" \",b=1,y=12},{m=1,x=10,t=128,c=\" \",b=1,y=13},{m=1,x=11,t=128,c=\" \",b=128,y=13},{m=1,x=12,t=128,c=\" \",b=256,y=13},{m=1,x=13,t=128,c=\" \",b=256,y=13},{m=1,x=14,t=128,c=\" \",b=1,y=13},{m=1,x=20,t=128,c=\" \",b=1,y=13},{m=1,x=21,t=128,c=\" \",b=128,y=13},{m=1,x=22,t=128,c=\" \",b=256,y=13},{m=1,x=23,t=128,c=\" \",b=256,y=13},{m=1,x=24,t=128,c=\" \",b=1,y=13},{m=1,x=10,t=128,c=\" \",b=1,y=14},{m=1,x=11,t=128,c=\" \",b=128,y=14},{m=1,x=12,t=128,c=\" \",b=256,y=14},{m=1,x=13,t=128,c=\" \",b=256,y=14},{m=1,x=14,t=128,c=\" \",b=1,y=14},{m=1,x=20,t=128,c=\" \",b=1,y=14},{m=1,x=21,t=128,c=\" \",b=128,y=14},{m=1,x=22,t=128,c=\" \",b=256,y=14},{m=1,x=23,t=128,c=\" \",b=256,y=14},{m=1,x=24,t=128,c=\" \",b=1,y=14},{m=1,x=10,t=128,c=\" \",b=1,y=15},{m=1,x=11,t=128,c=\" \",b=128,y=15},{m=1,x=12,t=128,c=\" \",b=256,y=15},{m=1,x=13,t=128,c=\" \",b=256,y=15},{m=1,x=14,t=128,c=\" \",b=1,y=15},{m=1,x=20,t=128,c=\" \",b=1,y=15},{m=1,x=21,t=128,c=\" \",b=128,y=15},{m=1,x=22,t=128,c=\" \",b=256,y=15},{m=1,x=23,t=128,c=\" \",b=256,y=15},{m=1,x=24,t=128,c=\" \",b=1,y=15},{m=1,x=10,t=128,c=\" \",b=1,y=16},{m=1,x=11,t=128,c=\" \",b=128,y=16},{m=1,x=12,t=128,c=\" \",b=256,y=16},{m=1,x=13,t=128,c=\" \",b=256,y=16},{m=1,x=14,t=128,c=\" \",b=1,y=16},{m=1,x=20,t=128,c=\" \",b=1,y=16},{m=1,x=21,t=128,c=\" \",b=128,y=16},{m=1,x=22,t=128,c=\" \",b=256,y=16},{m=1,x=23,t=128,c=\" \",b=256,y=16},{m=1,x=24,t=128,c=\" \",b=1,y=16},{m=1,x=10,t=128,c=\" \",b=1,y=17},{m=1,x=11,t=128,c=\" \",b=128,y=17},{m=1,x=12,t=128,c=\" \",b=256,y=17},{m=1,x=13,t=128,c=\" \",b=256,y=17},{m=1,x=14,t=128,c=\" \",b=1,y=17},{m=1,x=20,t=128,c=\" \",b=1,y=17},{m=1,x=21,t=128,c=\" \",b=128,y=17},{m=1,x=22,t=128,c=\" \",b=256,y=17},{m=1,x=23,t=128,c=\" \",b=256,y=17},{m=1,x=24,t=128,c=\" \",b=1,y=17},{m=1,x=10,t=128,c=\" \",b=1,y=18},{m=1,x=11,t=128,c=\" \",b=1,y=18},{m=1,x=12,t=128,c=\" \",b=1,y=18},{m=1,x=13,t=128,c=\" \",b=1,y=18},{m=1,x=14,t=128,c=\" \",b=1,y=18},{m=1,x=20,t=128,c=\" \",b=1,y=18},{m=1,x=21,t=128,c=\" \",b=1,y=18},{m=1,x=22,t=128,c=\" \",b=1,y=18},{m=1,x=23,t=128,c=\" \",b=1,y=18},{m=1,x=24,t=128,c=\" \",b=1,y=18}},{{m=1,x=10,t=128,c=\" \",b=1,y=3},{m=1,x=11,t=128,c=\" \",b=1,y=3},{m=1,x=12,t=128,c=\" \",b=1,y=3},{m=1,x=13,t=128,c=\" \",b=1,y=3},{m=1,x=14,t=128,c=\" \",b=1,y=3},{m=1,x=15,t=128,c=\" \",b=1,y=3},{m=1,x=16,t=128,c=\" \",b=1,y=3},{m=1,x=17,t=128,c=\" \",b=1,y=3},{m=1,x=18,t=128,c=\" \",b=1,y=3},{m=1,x=19,t=128,c=\" \",b=1,y=3},{m=1,x=20,t=128,c=\" \",b=1,y=3},{m=1,x=21,t=128,c=\" \",b=1,y=3},{m=1,x=22,t=128,c=\" \",b=1,y=3},{m=1,x=23,t=128,c=\" \",b=1,y=3},{m=1,x=24,t=128,c=\" \",b=1,y=3},{m=1,x=10,t=128,c=\" \",b=1,y=4},{m=1,x=11,t=128,c=\" \",b=128,y=4},{m=1,x=12,t=128,c=\" \",b=128,y=4},{m=1,x=13,t=128,c=\" \",b=128,y=4},{m=1,x=14,t=128,c=\" \",b=128,y=4},{m=1,x=15,t=128,c=\" \",b=128,y=4},{m=1,x=16,t=128,c=\" \",b=128,y=4},{m=1,x=17,t=128,c=\" \",b=128,y=4},{m=1,x=18,t=128,c=\" \",b=128,y=4},{m=1,x=19,t=128,c=\" \",b=128,y=4},{m=1,x=20,t=128,c=\" \",b=128,y=4},{m=1,x=21,t=128,c=\" \",b=128,y=4},{m=1,x=22,t=128,c=\" \",b=128,y=4},{m=1,x=23,t=128,c=\" \",b=128,y=4},{m=1,x=24,t=128,c=\" \",b=1,y=4},{m=1,x=10,t=128,c=\" \",b=1,y=5},{m=1,x=11,t=128,c=\" \",b=128,y=5},{m=1,x=12,t=128,c=\" \",b=256,y=5},{m=1,x=13,t=128,c=\" \",b=256,y=5},{m=1,x=14,t=128,c=\" \",b=256,y=5},{m=1,x=15,t=128,c=\" \",b=256,y=5},{m=1,x=16,t=128,c=\" \",b=256,y=5},{m=1,x=17,t=128,c=\" \",b=256,y=5},{m=1,x=18,t=128,c=\" \",b=256,y=5},{m=1,x=19,t=128,c=\" \",b=256,y=5},{m=1,x=20,t=128,c=\" \",b=256,y=5},{m=1,x=21,t=128,c=\" \",b=256,y=5},{m=1,x=22,t=128,c=\" \",b=256,y=5},{m=1,x=23,t=128,c=\" \",b=256,y=5},{m=1,x=24,t=128,c=\" \",b=1,y=5},{m=1,x=10,t=128,c=\" \",b=1,y=6},{m=1,x=11,t=128,c=\" \",b=128,y=6},{m=1,x=12,t=128,c=\" \",b=256,y=6},{m=1,x=13,t=128,c=\" \",b=256,y=6},{m=1,x=14,t=128,c=\" \",b=1,y=6},{m=1,x=15,t=128,c=\" \",b=1,y=6},{m=1,x=16,t=128,c=\" \",b=1,y=6},{m=1,x=17,t=128,c=\" \",b=1,y=6},{m=1,x=18,t=128,c=\" \",b=1,y=6},{m=1,x=19,t=128,c=\" \",b=1,y=6},{m=1,x=20,t=128,c=\" \",b=1,y=6},{m=1,x=21,t=128,c=\" \",b=128,y=6},{m=1,x=22,t=128,c=\" \",b=256,y=6},{m=1,x=23,t=128,c=\" \",b=256,y=6},{m=1,x=24,t=128,c=\" \",b=1,y=6},{m=1,x=10,t=128,c=\" \",b=1,y=7},{m=1,x=11,t=128,c=\" \",b=128,y=7},{m=1,x=12,t=128,c=\" \",b=256,y=7},{m=1,x=13,t=128,c=\" \",b=256,y=7},{m=1,x=14,t=128,c=\" \",b=1,y=7},{m=1,x=20,t=128,c=\" \",b=1,y=7},{m=1,x=21,t=128,c=\" \",b=128,y=7},{m=1,x=22,t=128,c=\" \",b=256,y=7},{m=1,x=23,t=128,c=\" \",b=256,y=7},{m=1,x=24,t=128,c=\" \",b=1,y=7},{m=1,x=10,t=128,c=\" \",b=1,y=8},{m=1,x=11,t=128,c=\" \",b=128,y=8},{m=1,x=12,t=128,c=\" \",b=256,y=8},{m=1,x=13,t=128,c=\" \",b=256,y=8},{m=1,x=14,t=128,c=\" \",b=1,y=8},{m=1,x=20,t=128,c=\" \",b=1,y=8},{m=1,x=21,t=128,c=\" \",b=128,y=8},{m=1,x=22,t=128,c=\" \",b=256,y=8},{m=1,x=23,t=128,c=\" \",b=256,y=8},{m=1,x=24,t=128,c=\" \",b=1,y=8},{m=1,x=10,t=128,c=\" \",b=1,y=9},{m=1,x=11,t=128,c=\" \",b=128,y=9},{m=1,x=12,t=128,c=\" \",b=256,y=9},{m=1,x=13,t=128,c=\" \",b=256,y=9},{m=1,x=14,t=128,c=\" \",b=1,y=9},{m=1,x=15,t=128,c=\" \",b=1,y=9},{m=1,x=16,t=128,c=\" \",b=1,y=9},{m=1,x=17,t=128,c=\" \",b=1,y=9},{m=1,x=18,t=128,c=\" \",b=1,y=9},{m=1,x=19,t=128,c=\" \",b=1,y=9},{m=1,x=20,t=128,c=\" \",b=1,y=9},{m=1,x=21,t=128,c=\" \",b=128,y=9},{m=1,x=22,t=128,c=\" \",b=256,y=9},{m=1,x=23,t=128,c=\" \",b=256,y=9},{m=1,x=24,t=128,c=\" \",b=1,y=9},{m=1,x=10,t=128,c=\" \",b=1,y=10},{m=1,x=11,t=128,c=\" \",b=128,y=10},{m=1,x=12,t=128,c=\" \",b=256,y=10},{m=1,x=13,t=128,c=\" \",b=256,y=10},{m=1,x=14,t=128,c=\" \",b=128,y=10},{m=1,x=15,t=128,c=\" \",b=128,y=10},{m=1,x=16,t=128,c=\" \",b=128,y=10},{m=1,x=17,t=128,c=\" \",b=128,y=10},{m=1,x=18,t=128,c=\" \",b=128,y=10},{m=1,x=19,t=128,c=\" \",b=128,y=10},{m=1,x=20,t=128,c=\" \",b=128,y=10},{m=1,x=21,t=128,c=\" \",b=128,y=10},{m=1,x=22,t=128,c=\" \",b=256,y=10},{m=1,x=23,t=128,c=\" \",b=256,y=10},{m=1,x=24,t=128,c=\" \",b=1,y=10},{m=1,x=10,t=128,c=\" \",b=1,y=11},{m=1,x=11,t=128,c=\" \",b=128,y=11},{m=1,x=12,t=128,c=\" \",b=256,y=11},{m=1,x=13,t=128,c=\" \",b=256,y=11},{m=1,x=14,t=128,c=\" \",b=256,y=11},{m=1,x=15,t=128,c=\" \",b=256,y=11},{m=1,x=16,t=128,c=\" \",b=256,y=11},{m=1,x=17,t=128,c=\" \",b=256,y=11},{m=1,x=18,t=128,c=\" \",b=256,y=11},{m=1,x=19,t=128,c=\" \",b=256,y=11},{m=1,x=20,t=128,c=\" \",b=256,y=11},{m=1,x=21,t=128,c=\" \",b=256,y=11},{m=1,x=22,t=128,c=\" \",b=256,y=11},{m=1,x=23,t=128,c=\" \",b=256,y=11},{m=1,x=24,t=128,c=\" \",b=1,y=11},{m=1,x=10,t=128,c=\" \",b=1,y=12},{m=1,x=11,t=128,c=\" \",b=128,y=12},{m=1,x=12,t=128,c=\" \",b=256,y=12},{m=1,x=13,t=128,c=\" \",b=256,y=12},{m=1,x=14,t=128,c=\" \",b=1,y=12},{m=1,x=15,t=128,c=\" \",b=1,y=12},{m=1,x=16,t=128,c=\" \",b=1,y=12},{m=1,x=17,t=128,c=\" \",b=1,y=12},{m=1,x=18,t=128,c=\" \",b=1,y=12},{m=1,x=19,t=128,c=\" \",b=1,y=12},{m=1,x=20,t=128,c=\" \",b=128,y=12},{m=1,x=21,t=128,c=\" \",b=256,y=12},{m=1,x=22,t=128,c=\" \",b=1,y=12},{m=1,x=23,t=128,c=\" \",b=1,y=12},{m=1,x=24,t=128,c=\" \",b=1,y=12},{m=1,x=10,t=128,c=\" \",b=1,y=13},{m=1,x=11,t=128,c=\" \",b=128,y=13},{m=1,x=12,t=128,c=\" \",b=256,y=13},{m=1,x=13,t=128,c=\" \",b=256,y=13},{m=1,x=14,t=128,c=\" \",b=1,y=13},{m=1,x=19,t=128,c=\" \",b=1,y=13},{m=1,x=20,t=128,c=\" \",b=128,y=13},{m=1,x=21,t=128,c=\" \",b=256,y=13},{m=1,x=22,t=128,c=\" \",b=1,y=13},{m=1,x=10,t=128,c=\" \",b=1,y=14},{m=1,x=11,t=128,c=\" \",b=128,y=14},{m=1,x=12,t=128,c=\" \",b=256,y=14},{m=1,x=13,t=128,c=\" \",b=256,y=14},{m=1,x=14,t=128,c=\" \",b=1,y=14},{m=1,x=19,t=128,c=\" \",b=1,y=14},{m=1,x=20,t=128,c=\" \",b=128,y=14},{m=1,x=21,t=128,c=\" \",b=256,y=14},{m=1,x=22,t=128,c=\" \",b=1,y=14},{m=1,x=23,t=128,c=\" \",b=1,y=14},{m=1,x=24,t=128,c=\" \",b=1,y=14},{m=1,x=10,t=128,c=\" \",b=1,y=15},{m=1,x=11,t=128,c=\" \",b=128,y=15},{m=1,x=12,t=128,c=\" \",b=256,y=15},{m=1,x=13,t=128,c=\" \",b=256,y=15},{m=1,x=14,t=128,c=\" \",b=1,y=15},{m=1,x=19,t=128,c=\" \",b=1,y=15},{m=1,x=20,t=128,c=\" \",b=128,y=15},{m=1,x=21,t=128,c=\" \",b=256,y=15},{m=1,x=22,t=128,c=\" \",b=128,y=15},{m=1,x=23,t=128,c=\" \",b=128,y=15},{m=1,x=24,t=128,c=\" \",b=1,y=15},{m=1,x=10,t=128,c=\" \",b=1,y=16},{m=1,x=11,t=128,c=\" \",b=128,y=16},{m=1,x=12,t=128,c=\" \",b=256,y=16},{m=1,x=13,t=128,c=\" \",b=256,y=16},{m=1,x=14,t=128,c=\" \",b=1,y=16},{m=1,x=19,t=128,c=\" \",b=1,y=16},{m=1,x=20,t=128,c=\" \",b=128,y=16},{m=1,x=21,t=128,c=\" \",b=256,y=16},{m=1,x=22,t=128,c=\" \",b=256,y=16},{m=1,x=23,t=128,c=\" \",b=256,y=16},{m=1,x=24,t=128,c=\" \",b=1,y=16},{m=1,x=10,t=128,c=\" \",b=1,y=17},{m=1,x=11,t=128,c=\" \",b=128,y=17},{m=1,x=12,t=128,c=\" \",b=256,y=17},{m=1,x=13,t=128,c=\" \",b=256,y=17},{m=1,x=14,t=128,c=\" \",b=1,y=17},{m=1,x=19,t=128,c=\" \",b=1,y=17},{m=1,x=20,t=128,c=\" \",b=128,y=17},{m=1,x=21,t=128,c=\" \",b=256,y=17},{m=1,x=22,t=128,c=\" \",b=256,y=17},{m=1,x=23,t=128,c=\" \",b=256,y=17},{m=1,x=24,t=128,c=\" \",b=1,y=17},{m=1,x=10,t=128,c=\" \",b=1,y=18},{m=1,x=11,t=128,c=\" \",b=1,y=18},{m=1,x=12,t=128,c=\" \",b=1,y=18},{m=1,x=13,t=128,c=\" \",b=1,y=18},{m=1,x=14,t=128,c=\" \",b=1,y=18},{m=1,x=19,t=128,c=\" \",b=1,y=18},{m=1,x=20,t=128,c=\" \",b=1,y=18},{m=1,x=21,t=128,c=\" \",b=1,y=18},{m=1,x=22,t=128,c=\" \",b=1,y=18},{m=1,x=23,t=128,c=\" \",b=1,y=18},{m=1,x=24,t=128,c=\" \",b=1,y=18}},{{m=1,b=1,t=128,c=\" \",y=2,x=2},{m=1,b=1,t=128,c=\" \",y=2,x=3},{m=1,b=1,t=128,c=\" \",y=2,x=4},{m=1,b=1,t=128,c=\" \",y=2,x=5},{m=1,b=1,t=128,c=\" \",y=2,x=6},{m=1,b=1,t=128,c=\" \",y=2,x=7},{m=1,b=1,t=128,c=\" \",y=2,x=8},{m=1,b=1,t=128,c=\" \",y=2,x=9},{m=1,b=1,t=128,c=\" \",y=2,x=10},{m=1,b=1,t=128,c=\" \",y=2,x=11},{m=1,b=1,t=128,c=\" \",y=2,x=12},{m=1,b=1,t=128,c=\" \",y=2,x=13},{m=1,b=1,t=128,c=\" \",y=2,x=22},{m=1,b=1,t=128,c=\" \",y=2,x=23},{m=1,b=1,t=128,c=\" \",y=2,x=24},{m=1,b=1,t=128,c=\" \",y=2,x=25},{m=1,b=1,t=128,c=\" \",y=2,x=26},{m=1,b=1,t=128,c=\" \",y=2,x=27},{m=1,b=1,t=128,c=\" \",y=2,x=28},{m=1,b=1,t=128,c=\" \",y=2,x=29},{m=1,b=1,t=128,c=\" \",y=2,x=30},{m=1,b=1,t=128,c=\" \",y=2,x=31},{m=1,b=1,t=128,c=\" \",y=2,x=32},{m=1,b=1,t=128,c=\" \",y=2,x=33},{m=1,b=1,t=128,c=\" \",y=3,x=2},{m=1,b=128,t=128,c=\" \",y=3,x=3},{m=1,b=128,t=128,c=\" \",y=3,x=4},{m=1,b=128,t=128,c=\" \",y=3,x=5},{m=1,b=128,t=128,c=\" \",y=3,x=6},{m=1,b=128,t=128,c=\" \",y=3,x=7},{m=1,b=128,t=128,c=\" \",y=3,x=8},{m=1,b=128,t=128,c=\" \",y=3,x=9},{m=1,b=128,t=128,c=\" \",y=3,x=10},{m=1,b=128,t=128,c=\" \",y=3,x=11},{m=1,b=128,t=128,c=\" \",y=3,x=12},{m=1,b=1,t=128,c=\" \",y=3,x=13},{m=1,b=1,t=128,c=\" \",y=3,x=14},{m=1,b=1,t=128,c=\" \",y=3,x=21},{m=1,b=1,t=128,c=\" \",y=3,x=22},{m=1,b=128,t=128,c=\" \",y=3,x=23},{m=1,b=128,t=128,c=\" \",y=3,x=24},{m=1,b=128,t=128,c=\" \",y=3,x=25},{m=1,b=128,t=128,c=\" \",y=3,x=26},{m=1,b=128,t=128,c=\" \",y=3,x=27},{m=1,b=128,t=128,c=\" \",y=3,x=28},{m=1,b=128,t=128,c=\" \",y=3,x=29},{m=1,b=128,t=128,c=\" \",y=3,x=30},{m=1,b=128,t=128,c=\" \",y=3,x=31},{m=1,b=128,t=128,c=\" \",y=3,x=32},{m=1,b=1,t=128,c=\" \",y=3,x=33},{m=1,b=1,t=128,c=\" \",y=4,x=2},{m=1,b=128,t=128,c=\" \",y=4,x=3},{m=1,b=256,t=128,c=\" \",y=4,x=4},{m=1,b=256,t=128,c=\" \",y=4,x=5},{m=1,b=128,t=128,c=\" \",y=4,x=6},{m=1,b=128,t=128,c=\" \",y=4,x=7},{m=1,b=128,t=128,c=\" \",y=4,x=8},{m=1,b=256,t=128,c=\" \",y=4,x=9},{m=1,b=256,t=128,c=\" \",y=4,x=10},{m=1,b=256,t=128,c=\" \",y=4,x=11},{m=1,b=128,t=128,c=\" \",y=4,x=12},{m=1,b=128,t=128,c=\" \",y=4,x=13},{m=1,b=1,t=128,c=\" \",y=4,x=14},{m=1,b=1,t=128,c=\" \",y=4,x=21},{m=1,b=128,t=128,c=\" \",y=4,x=22},{m=1,b=128,t=128,c=\" \",y=4,x=23},{m=1,b=256,t=128,c=\" \",y=4,x=24},{m=1,b=256,t=128,c=\" \",y=4,x=25},{m=1,b=256,t=128,c=\" \",y=4,x=26},{m=1,b=128,t=128,c=\" \",y=4,x=27},{m=1,b=128,t=128,c=\" \",y=4,x=28},{m=1,b=128,t=128,c=\" \",y=4,x=29},{m=1,b=256,t=128,c=\" \",y=4,x=30},{m=1,b=256,t=128,c=\" \",y=4,x=31},{m=1,b=256,t=128,c=\" \",y=4,x=32},{m=1,b=1,t=128,c=\" \",y=4,x=33},{m=1,b=1,t=128,c=\" \",y=5,x=2},{m=1,b=128,t=128,c=\" \",y=5,x=3},{m=1,b=256,t=128,c=\" \",y=5,x=4},{m=1,b=256,t=128,c=\" \",y=5,x=5},{m=1,b=256,t=128,c=\" \",y=5,x=6},{m=1,b=128,t=128,c=\" \",y=5,x=7},{m=1,b=128,t=128,c=\" \",y=5,x=8},{m=1,b=128,t=128,c=\" \",y=5,x=9},{m=1,b=256,t=128,c=\" \",y=5,x=10},{m=1,b=256,t=128,c=\" \",y=5,x=11},{m=1,b=256,t=128,c=\" \",y=5,x=12},{m=1,b=128,t=128,c=\" \",y=5,x=13},{m=1,b=1,t=128,c=\" \",y=5,x=14},{m=1,b=1,t=128,c=\" \",y=5,x=21},{m=1,b=128,t=128,c=\" \",y=5,x=22},{m=1,b=256,t=128,c=\" \",y=5,x=23},{m=1,b=256,t=128,c=\" \",y=5,x=24},{m=1,b=256,t=128,c=\" \",y=5,x=25},{m=1,b=128,t=128,c=\" \",y=5,x=26},{m=1,b=128,t=128,c=\" \",y=5,x=27},{m=1,b=128,t=128,c=\" \",y=5,x=28},{m=1,b=256,t=128,c=\" \",y=5,x=29},{m=1,b=256,t=128,c=\" \",y=5,x=30},{m=1,b=256,t=128,c=\" \",y=5,x=31},{m=1,b=256,t=128,c=\" \",y=5,x=32},{m=1,b=1,t=128,c=\" \",y=5,x=33},{m=1,b=1,t=128,c=\" \",y=6,x=2},{m=1,b=128,t=128,c=\" \",y=6,x=3},{m=1,b=256,t=128,c=\" \",y=6,x=4},{m=1,b=256,t=128,c=\" \",y=6,x=5},{m=1,b=256,t=128,c=\" \",y=6,x=6},{m=1,b=256,t=128,c=\" \",y=6,x=7},{m=1,b=128,t=128,c=\" \",y=6,x=8},{m=1,b=128,t=128,c=\" \",y=6,x=9},{m=1,b=128,t=128,c=\" \",y=6,x=10},{m=1,b=256,t=128,c=\" \",y=6,x=11},{m=1,b=256,t=128,c=\" \",y=6,x=12},{m=1,b=256,t=128,c=\" \",y=6,x=13},{m=1,b=1,t=128,c=\" \",y=6,x=14},{m=1,b=1,t=128,c=\" \",y=6,x=15},{m=1,b=1,t=128,c=\" \",y=6,x=20},{m=1,b=1,t=128,c=\" \",y=6,x=21},{m=1,b=128,t=128,c=\" \",y=6,x=22},{m=1,b=256,t=128,c=\" \",y=6,x=23},{m=1,b=256,t=128,c=\" \",y=6,x=24},{m=1,b=128,t=128,c=\" \",y=6,x=25},{m=1,b=128,t=128,c=\" \",y=6,x=26},{m=1,b=128,t=128,c=\" \",y=6,x=27},{m=1,b=256,t=128,c=\" \",y=6,x=28},{m=1,b=256,t=128,c=\" \",y=6,x=29},{m=1,b=256,t=128,c=\" \",y=6,x=30},{m=1,b=256,t=128,c=\" \",y=6,x=31},{m=1,b=256,t=128,c=\" \",y=6,x=32},{m=1,b=1,t=128,c=\" \",y=6,x=33},{m=1,b=1,t=128,c=\" \",y=7,x=2},{m=1,b=1,t=128,c=\" \",y=7,x=3},{m=1,b=256,t=128,c=\" \",y=7,x=4},{m=1,b=256,t=128,c=\" \",y=7,x=5},{m=1,b=256,t=128,c=\" \",y=7,x=6},{m=1,b=256,t=128,c=\" \",y=7,x=7},{m=1,b=256,t=128,c=\" \",y=7,x=8},{m=1,b=128,t=128,c=\" \",y=7,x=9},{m=1,b=128,t=128,c=\" \",y=7,x=10},{m=1,b=128,t=128,c=\" \",y=7,x=11},{m=1,b=256,t=128,c=\" \",y=7,x=12},{m=1,b=256,t=128,c=\" \",y=7,x=13},{m=1,b=128,t=128,c=\" \",y=7,x=14},{m=1,b=1,t=128,c=\" \",y=7,x=15},{m=1,b=1,t=128,c=\" \",y=7,x=16},{m=1,b=1,t=128,c=\" \",y=7,x=19},{m=1,b=1,t=128,c=\" \",y=7,x=20},{m=1,b=128,t=128,c=\" \",y=7,x=21},{m=1,b=256,t=128,c=\" \",y=7,x=22},{m=1,b=256,t=128,c=\" \",y=7,x=23},{m=1,b=128,t=128,c=\" \",y=7,x=24},{m=1,b=128,t=128,c=\" \",y=7,x=25},{m=1,b=128,t=128,c=\" \",y=7,x=26},{m=1,b=256,t=128,c=\" \",y=7,x=27},{m=1,b=256,t=128,c=\" \",y=7,x=28},{m=1,b=256,t=128,c=\" \",y=7,x=29},{m=1,b=256,t=128,c=\" \",y=7,x=30},{m=1,b=256,t=128,c=\" \",y=7,x=31},{m=1,b=1,t=128,c=\" \",y=7,x=32},{m=1,b=1,t=128,c=\" \",y=7,x=33},{m=1,b=1,t=128,c=\" \",y=8,x=3},{m=1,b=1,t=128,c=\" \",y=8,x=4},{m=1,b=1,t=128,c=\" \",y=8,x=5},{m=1,b=1,t=128,c=\" \",y=8,x=6},{m=1,b=1,t=128,c=\" \",y=8,x=7},{m=1,b=1,t=128,c=\" \",y=8,x=8},{m=1,b=1,t=128,c=\" \",y=8,x=9},{m=1,b=1,t=128,c=\" \",y=8,x=10},{m=1,b=1,t=128,c=\" \",y=8,x=11},{m=1,b=1,t=128,c=\" \",y=8,x=12},{m=1,b=128,t=128,c=\" \",y=8,x=13},{m=1,b=256,t=128,c=\" \",y=8,x=14},{m=1,b=128,t=128,c=\" \",y=8,x=15},{m=1,b=1,t=128,c=\" \",y=8,x=16},{m=1,b=1,t=128,c=\" \",y=8,x=17},{m=1,b=1,t=128,c=\" \",y=8,x=18},{m=1,b=1,t=128,c=\" \",y=8,x=19},{m=1,b=128,t=128,c=\" \",y=8,x=20},{m=1,b=256,t=128,c=\" \",y=8,x=21},{m=1,b=256,t=128,c=\" \",y=8,x=22},{m=1,b=1,t=128,c=\" \",y=8,x=23},{m=1,b=1,t=128,c=\" \",y=8,x=24},{m=1,b=1,t=128,c=\" \",y=8,x=25},{m=1,b=1,t=128,c=\" \",y=8,x=26},{m=1,b=1,t=128,c=\" \",y=8,x=27},{m=1,b=1,t=128,c=\" \",y=8,x=28},{m=1,b=1,t=128,c=\" \",y=8,x=29},{m=1,b=1,t=128,c=\" \",y=8,x=30},{m=1,b=1,t=128,c=\" \",y=8,x=31},{m=1,b=1,t=128,c=\" \",y=8,x=32},{m=1,b=1,t=128,c=\" \",y=9,x=12},{m=1,b=1,t=128,c=\" \",y=9,x=13},{m=1,b=128,t=128,c=\" \",y=9,x=14},{m=1,b=256,t=128,c=\" \",y=9,x=15},{m=1,b=256,t=128,c=\" \",y=9,x=16},{m=1,b=1,t=128,c=\" \",y=9,x=17},{m=1,b=1,t=128,c=\" \",y=9,x=18},{m=1,b=256,t=128,c=\" \",y=9,x=19},{m=1,b=256,t=128,c=\" \",y=9,x=20},{m=1,b=256,t=128,c=\" \",y=9,x=21},{m=1,b=1,t=128,c=\" \",y=9,x=22},{m=1,b=1,t=128,c=\" \",y=9,x=23},{m=1,b=1,t=128,c=\" \",y=10,x=13},{m=1,b=1,t=128,c=\" \",y=10,x=14},{m=1,b=256,t=128,c=\" \",y=10,x=15},{m=1,b=256,t=128,c=\" \",y=10,x=16},{m=1,b=256,t=128,c=\" \",y=10,x=17},{m=1,b=256,t=128,c=\" \",y=10,x=18},{m=1,b=256,t=128,c=\" \",y=10,x=19},{m=1,b=256,t=128,c=\" \",y=10,x=20},{m=1,b=1,t=128,c=\" \",y=10,x=21},{m=1,b=1,t=128,c=\" \",y=10,x=22},{m=1,b=1,t=128,c=\" \",y=11,x=14},{m=1,b=1,t=128,c=\" \",y=11,x=15},{m=1,b=256,t=128,c=\" \",y=11,x=16},{m=1,b=256,t=128,c=\" \",y=11,x=17},{m=1,b=256,t=128,c=\" \",y=11,x=18},{m=1,b=256,t=128,c=\" \",y=11,x=19},{m=1,b=1,t=128,c=\" \",y=11,x=20},{m=1,b=1,t=128,c=\" \",y=11,x=21},{m=1,b=1,t=128,c=\" \",y=12,x=13},{m=1,b=1,t=128,c=\" \",y=12,x=14},{m=1,b=256,t=128,c=\" \",y=12,x=15},{m=1,b=256,t=128,c=\" \",y=12,x=16},{m=1,b=256,t=128,c=\" \",y=12,x=17},{m=1,b=256,t=128,c=\" \",y=12,x=18},{m=1,b=256,t=128,c=\" \",y=12,x=19},{m=1,b=256,t=128,c=\" \",y=12,x=20},{m=1,b=1,t=128,c=\" \",y=12,x=21},{m=1,b=1,t=128,c=\" \",y=12,x=22},{m=1,b=1,t=128,c=\" \",y=13,x=12},{m=1,b=1,t=128,c=\" \",y=13,x=13},{m=1,b=128,t=128,c=\" \",y=13,x=14},{m=1,b=256,t=128,c=\" \",y=13,x=15},{m=1,b=256,t=128,c=\" \",y=13,x=16},{m=1,b=1,t=128,c=\" \",y=13,x=17},{m=1,b=1,t=128,c=\" \",y=13,x=18},{m=1,b=256,t=128,c=\" \",y=13,x=19},{m=1,b=256,t=128,c=\" \",y=13,x=20},{m=1,b=128,t=128,c=\" \",y=13,x=21},{m=1,b=1,t=128,c=\" \",y=13,x=22},{m=1,b=1,t=128,c=\" \",y=13,x=23},{m=1,b=1,t=128,c=\" \",y=14,x=3},{m=1,b=1,t=128,c=\" \",y=14,x=4},{m=1,b=1,t=128,c=\" \",y=14,x=5},{m=1,b=1,t=128,c=\" \",y=14,x=6},{m=1,b=1,t=128,c=\" \",y=14,x=7},{m=1,b=1,t=128,c=\" \",y=14,x=8},{m=1,b=1,t=128,c=\" \",y=14,x=9},{m=1,b=1,t=128,c=\" \",y=14,x=10},{m=1,b=1,t=128,c=\" \",y=14,x=11},{m=1,b=1,t=128,c=\" \",y=14,x=12},{m=1,b=128,t=128,c=\" \",y=14,x=13},{m=1,b=256,t=128,c=\" \",y=14,x=14},{m=1,b=256,t=128,c=\" \",y=14,x=15},{m=1,b=1,t=128,c=\" \",y=14,x=16},{m=1,b=1,t=128,c=\" \",y=14,x=17},{m=1,b=1,t=128,c=\" \",y=14,x=18},{m=1,b=1,t=128,c=\" \",y=14,x=19},{m=1,b=256,t=128,c=\" \",y=14,x=20},{m=1,b=256,t=128,c=\" \",y=14,x=21},{m=1,b=128,t=128,c=\" \",y=14,x=22},{m=1,b=1,t=128,c=\" \",y=14,x=23},{m=1,b=1,t=128,c=\" \",y=14,x=24},{m=1,b=1,t=128,c=\" \",y=14,x=25},{m=1,b=1,t=128,c=\" \",y=14,x=26},{m=1,b=1,t=128,c=\" \",y=14,x=27},{m=1,b=1,t=128,c=\" \",y=14,x=28},{m=1,b=1,t=128,c=\" \",y=14,x=29},{m=1,b=1,t=128,c=\" \",y=14,x=30},{m=1,b=1,t=128,c=\" \",y=14,x=31},{m=1,b=1,t=128,c=\" \",y=14,x=32},{m=1,b=1,t=128,c=\" \",y=15,x=2},{m=1,b=1,t=128,c=\" \",y=15,x=3},{m=1,b=128,t=128,c=\" \",y=15,x=4},{m=1,b=128,t=128,c=\" \",y=15,x=5},{m=1,b=128,t=128,c=\" \",y=15,x=6},{m=1,b=128,t=128,c=\" \",y=15,x=7},{m=1,b=128,t=128,c=\" \",y=15,x=8},{m=1,b=128,t=128,c=\" \",y=15,x=9},{m=1,b=128,t=128,c=\" \",y=15,x=10},{m=1,b=128,t=128,c=\" \",y=15,x=11},{m=1,b=128,t=128,c=\" \",y=15,x=12},{m=1,b=256,t=128,c=\" \",y=15,x=13},{m=1,b=256,t=128,c=\" \",y=15,x=14},{m=1,b=1,t=128,c=\" \",y=15,x=15},{m=1,b=1,t=128,c=\" \",y=15,x=16},{m=1,b=1,t=128,c=\" \",y=15,x=19},{m=1,b=1,t=128,c=\" \",y=15,x=20},{m=1,b=256,t=128,c=\" \",y=15,x=21},{m=1,b=256,t=128,c=\" \",y=15,x=22},{m=1,b=128,t=128,c=\" \",y=15,x=23},{m=1,b=128,t=128,c=\" \",y=15,x=24},{m=1,b=128,t=128,c=\" \",y=15,x=25},{m=1,b=128,t=128,c=\" \",y=15,x=26},{m=1,b=128,t=128,c=\" \",y=15,x=27},{m=1,b=128,t=128,c=\" \",y=15,x=28},{m=1,b=128,t=128,c=\" \",y=15,x=29},{m=1,b=128,t=128,c=\" \",y=15,x=30},{m=1,b=128,t=128,c=\" \",y=15,x=31},{m=1,b=1,t=128,c=\" \",y=15,x=32},{m=1,b=1,t=128,c=\" \",y=15,x=33},{m=1,b=1,t=128,c=\" \",y=16,x=2},{m=1,b=128,t=128,c=\" \",y=16,x=3},{m=1,b=256,t=128,c=\" \",y=16,x=4},{m=1,b=256,t=128,c=\" \",y=16,x=5},{m=1,b=256,t=128,c=\" \",y=16,x=6},{m=1,b=256,t=128,c=\" \",y=16,x=7},{m=1,b=128,t=128,c=\" \",y=16,x=8},{m=1,b=128,t=128,c=\" \",y=16,x=9},{m=1,b=128,t=128,c=\" \",y=16,x=10},{m=1,b=256,t=128,c=\" \",y=16,x=11},{m=1,b=256,t=128,c=\" \",y=16,x=12},{m=1,b=256,t=128,c=\" \",y=16,x=13},{m=1,b=1,t=128,c=\" \",y=16,x=14},{m=1,b=1,t=128,c=\" \",y=16,x=15},{m=1,b=1,t=128,c=\" \",y=16,x=20},{m=1,b=1,t=128,c=\" \",y=16,x=21},{m=1,b=128,t=128,c=\" \",y=16,x=22},{m=1,b=256,t=128,c=\" \",y=16,x=23},{m=1,b=256,t=128,c=\" \",y=16,x=24},{m=1,b=128,t=128,c=\" \",y=16,x=25},{m=1,b=128,t=128,c=\" \",y=16,x=26},{m=1,b=128,t=128,c=\" \",y=16,x=27},{m=1,b=256,t=128,c=\" \",y=16,x=28},{m=1,b=256,t=128,c=\" \",y=16,x=29},{m=1,b=256,t=128,c=\" \",y=16,x=30},{m=1,b=256,t=128,c=\" \",y=16,x=31},{m=1,b=128,t=128,c=\" \",y=16,x=32},{m=1,b=1,t=128,c=\" \",y=16,x=33},{m=1,b=1,t=128,c=\" \",y=17,x=2},{m=1,b=128,t=128,c=\" \",y=17,x=3},{m=1,b=256,t=128,c=\" \",y=17,x=4},{m=1,b=256,t=128,c=\" \",y=17,x=5},{m=1,b=256,t=128,c=\" \",y=17,x=6},{m=1,b=128,t=128,c=\" \",y=17,x=7},{m=1,b=128,t=128,c=\" \",y=17,x=8},{m=1,b=128,t=128,c=\" \",y=17,x=9},{m=1,b=256,t=128,c=\" \",y=17,x=10},{m=1,b=256,t=128,c=\" \",y=17,x=11},{m=1,b=256,t=128,c=\" \",y=17,x=12},{m=1,b=128,t=128,c=\" \",y=17,x=13},{m=1,b=1,t=128,c=\" \",y=17,x=14},{m=1,b=1,t=128,c=\" \",y=17,x=21},{m=1,b=128,t=128,c=\" \",y=17,x=22},{m=1,b=256,t=128,c=\" \",y=17,x=23},{m=1,b=256,t=128,c=\" \",y=17,x=24},{m=1,b=256,t=128,c=\" \",y=17,x=25},{m=1,b=128,t=128,c=\" \",y=17,x=26},{m=1,b=128,t=128,c=\" \",y=17,x=27},{m=1,b=128,t=128,c=\" \",y=17,x=28},{m=1,b=256,t=128,c=\" \",y=17,x=29},{m=1,b=256,t=128,c=\" \",y=17,x=30},{m=1,b=256,t=128,c=\" \",y=17,x=31},{m=1,b=256,t=128,c=\" \",y=17,x=32},{m=1,b=1,t=128,c=\" \",y=17,x=33},{m=1,b=1,t=128,c=\" \",y=18,x=2},{m=1,b=128,t=128,c=\" \",y=18,x=3},{m=1,b=256,t=128,c=\" \",y=18,x=4},{m=1,b=256,t=128,c=\" \",y=18,x=5},{m=1,b=128,t=128,c=\" \",y=18,x=6},{m=1,b=128,t=128,c=\" \",y=18,x=7},{m=1,b=128,t=128,c=\" \",y=18,x=8},{m=1,b=256,t=128,c=\" \",y=18,x=9},{m=1,b=256,t=128,c=\" \",y=18,x=10},{m=1,b=256,t=128,c=\" \",y=18,x=11},{m=1,b=128,t=128,c=\" \",y=18,x=12},{m=1,b=128,t=128,c=\" \",y=18,x=13},{m=1,b=1,t=128,c=\" \",y=18,x=14},{m=1,b=1,t=128,c=\" \",y=18,x=21},{m=1,b=128,t=128,c=\" \",y=18,x=22},{m=1,b=128,t=128,c=\" \",y=18,x=23},{m=1,b=256,t=128,c=\" \",y=18,x=24},{m=1,b=256,t=128,c=\" \",y=18,x=25},{m=1,b=256,t=128,c=\" \",y=18,x=26},{m=1,b=128,t=128,c=\" \",y=18,x=27},{m=1,b=128,t=128,c=\" \",y=18,x=28},{m=1,b=128,t=128,c=\" \",y=18,x=29},{m=1,b=256,t=128,c=\" \",y=18,x=30},{m=1,b=256,t=128,c=\" \",y=18,x=31},{m=1,b=256,t=128,c=\" \",y=18,x=32},{m=1,b=1,t=128,c=\" \",y=18,x=33},{m=1,b=1,t=128,c=\" \",y=19,x=2},{m=1,b=128,t=128,c=\" \",y=19,x=3},{m=1,b=256,t=128,c=\" \",y=19,x=4},{m=1,b=128,t=128,c=\" \",y=19,x=5},{m=1,b=128,t=128,c=\" \",y=19,x=6},{m=1,b=128,t=128,c=\" \",y=19,x=7},{m=1,b=256,t=128,c=\" \",y=19,x=8},{m=1,b=256,t=128,c=\" \",y=19,x=9},{m=1,b=256,t=128,c=\" \",y=19,x=10},{m=1,b=128,t=128,c=\" \",y=19,x=11},{m=1,b=128,t=128,c=\" \",y=19,x=12},{m=1,b=1,t=128,c=\" \",y=19,x=13},{m=1,b=1,t=128,c=\" \",y=19,x=14},{m=1,b=1,t=128,c=\" \",y=19,x=21},{m=1,b=1,t=128,c=\" \",y=19,x=22},{m=1,b=128,t=128,c=\" \",y=19,x=23},{m=1,b=128,t=128,c=\" \",y=19,x=24},{m=1,b=256,t=128,c=\" \",y=19,x=25},{m=1,b=256,t=128,c=\" \",y=19,x=26},{m=1,b=128,t=128,c=\" \",y=19,x=27},{m=1,b=128,t=128,c=\" \",y=19,x=28},{m=1,b=128,t=128,c=\" \",y=19,x=29},{m=1,b=128,t=128,c=\" \",y=19,x=30},{m=1,b=256,t=128,c=\" \",y=19,x=31},{m=1,b=256,t=128,c=\" \",y=19,x=32},{m=1,b=1,t=128,c=\" \",y=19,x=33},{m=1,b=1,t=128,c=\" \",y=20,x=2},{m=1,b=1,t=128,c=\" \",y=20,x=3},{m=1,b=1,t=128,c=\" \",y=20,x=4},{m=1,b=1,t=128,c=\" \",y=20,x=5},{m=1,b=1,t=128,c=\" \",y=20,x=6},{m=1,b=1,t=128,c=\" \",y=20,x=7},{m=1,b=1,t=128,c=\" \",y=20,x=8},{m=1,b=1,t=128,c=\" \",y=20,x=9},{m=1,b=1,t=128,c=\" \",y=20,x=10},{m=1,b=1,t=128,c=\" \",y=20,x=11},{m=1,b=1,t=128,c=\" \",y=20,x=12},{m=1,b=1,t=128,c=\" \",y=20,x=13},{m=1,b=1,t=128,c=\" \",y=20,x=22},{m=1,b=1,t=128,c=\" \",y=20,x=23},{m=1,b=1,t=128,c=\" \",y=20,x=24},{m=1,b=1,t=128,c=\" \",y=20,x=25},{m=1,b=1,t=128,c=\" \",y=20,x=26},{m=1,b=1,t=128,c=\" \",y=20,x=27},{m=1,b=1,t=128,c=\" \",y=20,x=28},{m=1,b=1,t=128,c=\" \",y=20,x=29},{m=1,b=1,t=128,c=\" \",y=20,x=30},{m=1,b=1,t=128,c=\" \",y=20,x=31},{m=1,b=1,t=128,c=\" \",y=20,x=32},{m=1,b=1,t=128,c=\" \",y=20,x=33}}}",
  162.   },
  163.   pain = {
  164.     "--[[",
  165.     "   PAIN picture editor for ComputerCraft",
  166.     "   Get it with",
  167.     "    pastebin get wJQ7jav0 pain",
  168.     "    std pb wJQ7jav0 pain",
  169.     "     std ld pain pain",
  170.     "   ",
  171.     "   This is a stable release. You fool!",
  172.     "--]]",
  173.     "",
  174.     "local displayHelp = function()",
  175.     "   local progname = fs.getName(shell.getRunningProgram())",
  176.     "   print(progname..\" <filename>\")",
  177.     "   print(\"Press F1 in program for more.\")",
  178.     "end",
  179.     "",
  180.     "local pMode = 0",
  181.     "",
  182.     "local tArg = {...}",
  183.     "if (not tArg[1]) and shell then",
  184.     "   return displayHelp()",
  185.     "end",
  186.     "",
  187.     "if tArg[2] == \"view\" then",
  188.     "   pMode = 1",
  189.     "elseif tArg[2] == \"moo\" then",
  190.     "   return print(\"This PAIN does not have Super Cow Powers.\")",
  191.     "end",
  192.     "",
  193.     "local fileName",
  194.     "if not term.isColor() then",
  195.     "   error(\"Only for Advanced computers\")",
  196.     "end",
  197.     "local barmsg = \"Press F1 for help.\"",
  198.     "local tse = textutils.serialise",
  199.     "local tun = textutils.unserialise",
  200.     "local paintEncoded",
  201.     "local lastPaintEncoded",
  202.     "local frame = 1",
  203.     "local doRender = false",
  204.     "local metaHistory = {}",
  205.     "local bepimode = false      --this is a family-friendly program! now stand still while I murder you",
  206.     "local evenDrawGrid = true   --will you evenDraw(the)Grid ?",
  207.     "local renderBlittle = false --whether or not to render all in blittle",
  208.     "local firstTerm, blittleTerm = term.current()",
  209.     "local firstBG = term.getBackgroundColor()",
  210.     "local firstTX = term.getTextColor()",
  211.     "",
  212.     "local grid",
  213.     "",
  214.     "local yield = function()",
  215.     "   os.queueEvent(\"yield\")",
  216.     "   os.pullEvent(\"yield\")",
  217.     "end",
  218.     "",
  219.     "local paint = {",
  220.     "   scrollX = 0,",
  221.     "   scrollY = 0,",
  222.     "   t = colors.gray,",
  223.     "   b = colors.white,",
  224.     "   m = 1,  --in case you want to use PAIN as a level editor or something",
  225.     "   c = \" \",",
  226.     "   doGray = false,",
  227.     "}",
  228.     "",
  229.     "local scr_x, scr_y = term.getSize()",
  230.     "local scrollX, scrollY = 0, 0",
  231.     "",
  232.     "local keysDown = {}",
  233.     "local miceDown = {}",
  234.     "",
  235.     "local doRenderBar = 1 -- 1 and 0. Not true or false",
  236.     "",
  237.     "local fixstr = function(str)",
  238.     "   return str:gsub(\"\\\\(%d%d%d)\",string.char)",
  239.     "end",
  240.     "",
  241.     "local choice = function(input,breakkeys)",
  242.     "   repeat",
  243.     "       event, key = os.pullEvent(\"key\")",
  244.     "       if type(key) == \"number\" then key = keys.getName(key) end",
  245.     "       if key == nil then key = \" \" end",
  246.     "       if type(breakkeys) == \"table\" then",
  247.     "           for a = 1, #breakkeys do",
  248.     "               if key == breakkeys[a] then",
  249.     "                   return \"\"",
  250.     "               end",
  251.     "           end",
  252.     "       end",
  253.     "   until string.find(input, key)",
  254.     "   return key",
  255.     "end",
  256.     "local explode = function(div,str)",
  257.     "    if (div=='') then return false end",
  258.     "    local pos,arr = 0,{}",
  259.     "    for st,sp in function() return string.find(str,div,pos,true) end do",
  260.     "        table.insert(arr,str:sub(pos,st-1))",
  261.     "        pos = sp + 1",
  262.     "    end",
  263.     "    table.insert(arr,str:sub(pos))",
  264.     "    return arr",
  265.     "end",
  266.     "",
  267.     "local function cutString(max_line_length, str) --from stack overflow",
  268.     "   local lines = {}",
  269.     "   local line",
  270.     "   str:gsub('(%s*)(%S+)', ",
  271.     "      function(spc, word) ",
  272.     "         if not line or #line + #spc + #word > max_line_length then",
  273.     "            table.insert(lines, line)",
  274.     "            line = word",
  275.     "         else",
  276.     "            line = line..spc..word",
  277.     "         end",
  278.     "      end",
  279.     "   )",
  280.     "   table.insert(lines, line)",
  281.     "   return lines",
  282.     "end",
  283.     "",
  284.     "local cutUp = function(len,tbl)",
  285.     "   local output = {}",
  286.     "   local e = 0",
  287.     "   local s",
  288.     "   for a = 1, #tbl do",
  289.     "       if #(tbl[a]:gsub(\" \",\"\")) == 0 then",
  290.     "           s = {\"\"}",
  291.     "       else",
  292.     "           s = cutString(len,tbl[a])",
  293.     "       end",
  294.     "       for b = 1, #s do",
  295.     "           table.insert(output,s[b])",
  296.     "       end",
  297.     "   end",
  298.     "   return output",
  299.     "end",
  300.     "",
  301.     "local getEvents = function(...)",
  302.     "   local output",
  303.     "   while true do",
  304.     "       output = {os.pullEvent()}",
  305.     "       for a = 1, #arg do",
  306.     "           if type(arg[a]) == \"boolean\" then",
  307.     "               if doRender == arg[a] then",
  308.     "                   return {}",
  309.     "               end",
  310.     "           elseif output[1] == arg[a] then",
  311.     "               return unpack(output)",
  312.     "           end",
  313.     "       end",
  314.     "   end",
  315.     "end",
  316.     "",
  317.     "local sanitize = function(sani,tize)",
  318.     "   local _,x = string.find(sani,tize)",
  319.     "   if x then",
  320.     "       return sani:sub(x+1)",
  321.     "   else",
  322.     "       return sani",
  323.     "   end",
  324.     "end",
  325.     "local ro = function(input, max)",
  326.     "   return math.floor(input % max)",
  327.     "end",
  328.     "",
  329.     "local guiHelp = function()",
  330.     "   term.redirect(firstTerm)",
  331.     "   scr_x, scr_y = term.current().getSize()",
  332.     "   local _helpText = [[",
  333.     "",
  334.     " 'PAIN' Help Page",
  335.     "Programmed by LDDestroier/EldidiStroyrr",
  336.     "",
  337.     "(use UP/DOWN or scrollwheel, exit with Q)",
  338.     "If you want to use PAIN to its full capacity, then READ EVERYTHING HERE! It's not TOO long, and it's completely worth it!",
  339.     "",
  340.     "Syntax:",
  341.     ">pain <filename> [view]",
  342.     "",
  343.     "[view]: disable all writing capability to view a file",
  344.     "",
  345.     "You can see what colors are selected based on the word \"PAIN\" on the hotbar.",
  346.     "",
  347.     "Hotkeys:",
  348.     " left/right ctrl: toggle the menu",
  349.     "",
  350.     " left click:",
  351.     "  +shift = drag and let go to make a line",
  352.     "  -alone = place pixel",
  353.     "",
  354.     " right click: delete pixel",
  355.     "",
  356.     " middle click OR \"t\": place text down with current colors",
  357.     "",
  358.     " \"[\" or mouse scroll down:",
  359.     "  +shift = change to previous text color",
  360.     "  -alone = change to previous background color",
  361.     "",
  362.     " \"]\" or mouse scroll up:",
  363.     "  +shift = change to next text color",
  364.     "  -alone = change to next background color",
  365.     "",
  366.     " spacebar:",
  367.     "  +shift = toggle grid",
  368.     "  -alone = toggle bar visibility",
  369.     "",
  370.     " arrowkeys:",
  371.     "  +shift = move entire picture",
  372.     "  +tab = move one pixel at a time",
  373.     "  -alone = looks around the canvas smoothly",
  374.     "",
  375.     " \"+\" (or equals):",
  376.     "  +left alt = swap the current frame with the next frame",
  377.     "  -alone = change to next frame",
  378.     "",
  379.     " \"-\":",
  380.     "  +left alt = swap the current frame with the previous frame",
  381.     "  -alone = change to previous frame",
  382.     "",
  383.     " \"a\": set the coordinates to 0,0",
  384.     "",
  385.     " \"b\": toggle redirect to blittle, to preview in teletext characters",
  386.     "",
  387.     " \"c\": input coordinates to move the canvas to",
  388.     "",
  389.     " \"g\": toggle grayscale mode. everything is in shades of gray. if you Save, it saves in grayscale.",
  390.     "",
  391.     " \"f\":",
  392.     "  +shift = fill all empty pixels with background color",
  393.     "  -alone = absolutely nothing",
  394.     "",
  395.     " \"m\": set metadata for pixels (for game makers, otherwise safe to ignore)",
  396.     "",
  397.     "",
  398.     " Le Menu (access with CTRL):",
  399.     "",
  400.     " -left click on a menu item to select it.",
  401.     " -if you click on the menubar, let go on an option to select it.",
  402.     "",
  403.     " \"Save\"",
  404.     " Saves all frames to a specially formatted PAIN paint file. The format PAIN uses is very inefficient despite my best efforts, so Export if you don't use text or multiple frame.",
  405.     "",
  406.     " \"Export\"",
  407.     " Exports current frame to the basic paint format, which doesn't save text, but is WAY more space-efficient. Specify a path, too.",
  408.     "",
  409.     " \"Del. Frame\"",
  410.     " Deletes the current frame. Tells you off if you try to delete the only frame.",
  411.     "",
  412.     " \"Clear\"",
  413.     " Deletes all pixels on the current frame.",
  414.     "",
  415.     " \"Exit\"",
  416.     " Durr I dunno, I think it exits.",
  417.     "",
  418.     "",
  419.     "I hope my PAIN causes you joy.",
  420.     "]]",
  421.     "   _helpText = explode(\"\\n\",_helpText)",
  422.     "   helpText = cutUp(scr_x,_helpText)",
  423.     "   local helpscroll = 0",
  424.     "   term.setBackgroundColor(colors.gray)",
  425.     "   term.setTextColor(colors.white)",
  426.     "   term.clear()",
  427.     "   local evt, key",
  428.     "   while true do",
  429.     "       term.clear()",
  430.     "       for a = 1, scr_y do",
  431.     "           term.setCursorPos(1,a)",
  432.     "           term.clearLine()",
  433.     "           term.write(helpText[a-helpscroll] or \"\")",
  434.     "       end",
  435.     "       repeat",
  436.     "           evt,key = os.pullEvent()",
  437.     "       until evt == \"key\" or evt == \"mouse_scroll\"",
  438.     "       if evt == \"key\" then",
  439.     "           if key == keys.up then",
  440.     "               helpscroll = helpscroll + 1",
  441.     "           elseif key == keys.down then",
  442.     "               helpscroll = helpscroll - 1",
  443.     "           elseif key == keys.pageUp then",
  444.     "               helpscroll = helpscroll + scr_y",
  445.     "           elseif key == keys.pageDown then",
  446.     "               helpscroll = helpscroll - scr_y",
  447.     "           elseif (key == keys.q) or (key == keys.space) then",
  448.     "               doRender = true",
  449.     "               if renderBlittle then term.redirect(blittleTerm) end",
  450.     "               scr_x, scr_y = term.current().getSize()",
  451.     "               return",
  452.     "           end",
  453.     "       elseif evt == \"mouse_scroll\" then",
  454.     "           helpscroll = helpscroll - key",
  455.     "       end",
  456.     "       if helpscroll > 0 then",
  457.     "           helpscroll = 0",
  458.     "       elseif helpscroll < -(#helpText-(scr_y-3)) then",
  459.     "           helpscroll = -(#helpText-(scr_y-3))",
  460.     "       end",
  461.     "   end",
  462.     "end",
  463.     "",
  464.     "local tableRemfind = function(tbl, str)",
  465.     "   local out = tbl",
  466.     "   for a = 1, #tbl do",
  467.     "       if tbl[a] == str then",
  468.     "           table.remove(out,a)",
  469.     "           return out,a",
  470.     "       end",
  471.     "   end",
  472.     "   return {}",
  473.     "end",
  474.     "",
  475.     "local stringShift = function(str,amt)",
  476.     "   return str:sub(ro(amt-1,#str)+1)..str:sub(1,ro(amt-1,#str))",
  477.     "end",
  478.     "",
  479.     "local deepCopy",
  480.     "deepCopy = function(obj)",
  481.     "   if type(obj) ~= 'table' then return obj end",
  482.     "   local res = {}",
  483.     "   for k, v in pairs(obj) do res[deepCopy(k)] = deepCopy(v) end",
  484.     "   return res",
  485.     "end",
  486.     "",
  487.     "local renderBottomBar = function(txt)",
  488.     "   term.setCursorPos(1,scr_y)",
  489.     "   term.setBackgroundColor(colors.lightGray)",
  490.     "   term.setTextColor(colors.black)",
  491.     "   term.clearLine()",
  492.     "   term.write(txt)",
  493.     "end",
  494.     "",
  495.     "local bottomPrompt = function(txt,history,cho,breakkeys)",
  496.     "   renderBottomBar(txt)",
  497.     "   local out",
  498.     "   sleep(0)",
  499.     "   if cho then",
  500.     "       out = choice(cho,breakkeys)",
  501.     "   else",
  502.     "       out = read(_,history)",
  503.     "   end",
  504.     "   return out",
  505.     "end",
  506.     "",
  507.     "local getDotsInLine = function( startX, startY, endX, endY ) --stolen from the paintutils API...hehehe",
  508.     "    local out = {}",
  509.     "    ",
  510.     "    startX = math.floor(startX)",
  511.     "    startY = math.floor(startY)",
  512.     "    endX = math.floor(endX)",
  513.     "    endY = math.floor(endY)",
  514.     "",
  515.     "    if startX == endX and startY == endY then",
  516.     "        out = {{x=startX,y=startY}}",
  517.     "        return out",
  518.     "    end",
  519.     "    ",
  520.     "    local minX = math.min( startX, endX )",
  521.     "    if minX == startX then",
  522.     "        minY = startY",
  523.     "        maxX = endX",
  524.     "        maxY = endY",
  525.     "    else",
  526.     "        minY = endY",
  527.     "        maxX = startX",
  528.     "        maxY = startY",
  529.     "    end",
  530.     "        ",
  531.     "    local xDiff = maxX - minX",
  532.     "    local yDiff = maxY - minY",
  533.     "            ",
  534.     "    if xDiff > math.abs(yDiff) then",
  535.     "        local y = minY",
  536.     "        local dy = yDiff / xDiff",
  537.     "        for x=minX,maxX do",
  538.     "            table.insert(out,{x=x,y=math.floor(y+0.5)})",
  539.     "            y = y + dy",
  540.     "        end",
  541.     "    else",
  542.     "        local x = minX",
  543.     "        local dx = xDiff / yDiff",
  544.     "        if maxY >= minY then",
  545.     "            for y=minY,maxY do",
  546.     "                table.insert(out,{x=math.floor(x+0.5),y=y})",
  547.     "                x = x + dx",
  548.     "            end",
  549.     "        else",
  550.     "            for y=minY,maxY,-1 do",
  551.     "                table.insert(out,{x=math.floor(x+0.5),y=y})",
  552.     "                x = x - dx",
  553.     "            end",
  554.     "        end",
  555.     "    end",
  556.     "    return out",
  557.     "end",
  558.     "",
  559.     "local movePaintEncoded = function(pe,xdiff,ydiff)",
  560.     "   local outpootis = deepCopy(pe)",
  561.     "   for a = 1, #outpootis do",
  562.     "       outpootis[a].x = outpootis[a].x+xdiff",
  563.     "       outpootis[a].y = outpootis[a].y+ydiff",
  564.     "   end",
  565.     "   return outpootis",
  566.     "end",
  567.     "",
  568.     "local clearRedundant = function(dots)",
  569.     "   local input = {}",
  570.     "   local pheight = 0",
  571.     "   local pwidth = 0",
  572.     "   for a = 1, #dots do",
  573.     "       if dots[a].y > pheight then",
  574.     "           pheight = dots[a].y",
  575.     "       end",
  576.     "       if dots[a].x > pwidth then",
  577.     "           pwidth = dots[a].x",
  578.     "       end",
  579.     "   end",
  580.     "   for a = 1, #dots do",
  581.     "       if not input[dots[a].y] then input[dots[a].y] = {} end",
  582.     "       input[dots[a].y][dots[a].x] = dots[a]",
  583.     "   end",
  584.     "   local output = {}",
  585.     "   local frame = 0",
  586.     "   for y = 1, pheight do",
  587.     "       for x = 1, pwidth do",
  588.     "           if input[y] then",
  589.     "               if input[y][x] then",
  590.     "                   table.insert(output,input[y][x])",
  591.     "               end",
  592.     "           end",
  593.     "           if frame >= 50 then",
  594.     "               --yield()",
  595.     "               frame = 0",
  596.     "           end",
  597.     "       end",
  598.     "   end",
  599.     "   return output",
  600.     "end",
  601.     "",
  602.     "local grayOut = function(color)",
  603.     "   local c = deepCopy(_G.colors)",
  604.     "   local grays = {",
  605.     "       [c.white] = c.white,",
  606.     "       [c.orange] = c.lightGray,",
  607.     "       [c.magenta] = c.lightGray,",
  608.     "       [c.lightBlue] = c.lightGray,",
  609.     "       [c.yellow] = c.white,",
  610.     "       [c.lime] = c.lightGray,",
  611.     "       [c.pink] = c.lightGray,",
  612.     "       [c.gray] = c.gray,",
  613.     "       [c.lightGray] = c.lightGray,",
  614.     "       [c.cyan] = c.lightGray,",
  615.     "       [c.purple] = c.gray,",
  616.     "       [c.blue] = c.gray,",
  617.     "       [c.brown] = c.gray,",
  618.     "       [c.green] = c.lightGray,",
  619.     "       [c.red] = c.gray,",
  620.     "       [c.black] = c.black,",
  621.     "   }",
  622.     "   local newColor = grays[color] or 1",
  623.     "   return newColor",
  624.     "end",
  625.     "",
  626.     "local getOnscreenCoords = function(tbl,_x,_y)",
  627.     "   local screenTbl = {}",
  628.     "   for a = 1, #tbl do",
  629.     "       if tbl[a].x+paint.scrollX > 0 and tbl[a].x+paint.scrollX <= scr_x then",
  630.     "           if tbl[a].y+paint.scrollY > 0 and tbl[a].y+paint.scrollY <= scr_y then",
  631.     "               table.insert(screenTbl,{tbl[a].x+paint.scrollX,tbl[a].y+paint.scrollY})",
  632.     "           end",
  633.     "       end",
  634.     "   end",
  635.     "   if not _x and _y then",
  636.     "       return screenTbl",
  637.     "   else",
  638.     "       for a = 1, #screenTbl do",
  639.     "           if screenTbl[a][1] == _x and screenTbl[a][2] == _y then",
  640.     "               return true",
  641.     "           end",
  642.     "       end",
  643.     "       return false",
  644.     "   end",
  645.     "end",
  646.     "",
  647.     "local fillTool = function(info,cx,cy,color,layer) --takes a frame, not the whole paintEncoded",
  648.     "   local x,y",
  649.     "   local output = {}",
  650.     "   for a = 1, #info do",
  651.     "       if (info[a].x == cx) and (info[a].y == cy) then",
  652.     "           x = cx",
  653.     "           y = cy",
  654.     "           replaceColor = info[a].b",
  655.     "           break",
  656.     "       end",
  657.     "   end",
  658.     "   if not x and y then",
  659.     "       return",
  660.     "   end",
  661.     "   if color == replaceColor then",
  662.     "       return",
  663.     "   end",
  664.     "   table.insert(output,{",
  665.     "       [\"x\"] = x,",
  666.     "       [\"y\"] = y,",
  667.     "       [\"b\"] = color,",
  668.     "       [\"t\"] = color,",
  669.     "       [\"c\"] = \" \",",
  670.     "       [\"m\"] = paint.m",
  671.     "   })",
  672.     "   local loops = 0",
  673.     "   local tAffectedPoints = {",
  674.     "       [1] = {",
  675.     "           x = x+tTerm.scroll.x,",
  676.     "           z = z+tTerm.scroll.z",
  677.     "       }",
  678.     "   }",
  679.     "   while #tAffectedPoints > 0 do",
  680.     "       if loops%200 == 0 then",
  681.     "           sleep(0.05)",
  682.     "       end",
  683.     "       for i=-1,1,2 do",
  684.     "           local x = tAffectedPoints[1][\"x\"]+i",
  685.     "           local z = tAffectedPoints[1][\"z\"]",
  686.     "           if tBlueprint[layer][x][z] == replaceColor and x >= tTerm.viewable.sX and x <= tTerm.viewable.eX and z >= tTerm.viewable.sZ and z <= tTerm.viewable.eZ then",
  687.     "               drawPoint(x,z,color,layer,true,true)",
  688.     "               table.insert(tAffectedPoints,{[\"x\"] = x,[\"z\"] = z})",
  689.     "           end",
  690.     "           x = tAffectedPoints[1][\"x\"]",
  691.     "           z = tAffectedPoints[1][\"z\"]+i",
  692.     "           if tBlueprint[layer][x][z] == replaceColor and x >= tTerm.viewable.sX and x <= tTerm.viewable.eX and z >= tTerm.viewable.sZ and z <= tTerm.viewable.eZ then",
  693.     "               drawPoint(x,z,color,layer,true,true)",
  694.     "               table.insert(tAffectedPoints,{[\"x\"] = x,[\"z\"] = z})",
  695.     "           end",
  696.     "       end",
  697.     "       table.remove(tAffectedPoints,1)",
  698.     "       loops = loops+1",
  699.     "   end",
  700.     "end",
  701.     "",
  702.     "local saveFile = function(path,info)",
  703.     "   local output = {}",
  704.     "   for a = 1, #info do",
  705.     "       output[a] = clearRedundant(info[a])",
  706.     "       if a % 8 == 0 then yield() end",
  707.     "   end",
  708.     "   local fileout = textutils.serialize(output):gsub(\"  \",\"\"):gsub(\"\\n\",\"\"):gsub(\" = \",\"=\"):gsub(\",}\",\"}\")",
  709.     "   if #fileout >= fs.getFreeSpace(fs.getDir(path)) then",
  710.     "       barmsg = \"Not enough space.\"",
  711.     "       return",
  712.     "   end",
  713.     "   local file = fs.open(path,\"w\")",
  714.     "   file.write(fileout)",
  715.     "   file.close()",
  716.     "end",
  717.     "local renderBar = function(msg,dontSetVisible)",
  718.     "   local tsv = term.current().setVisible",
  719.     "   if (doRenderBar == 0) or renderBlittle then return end",
  720.     "   if tsv and (not dontSetVisible) then tsv(false) end",
  721.     "   term.setCursorPos(1,scr_y)",
  722.     "   term.setBackgroundColor(colors.lightGray)",
  723.     "   term.setTextColor(colors.black)",
  724.     "   term.clearLine()",
  725.     "   term.setBackgroundColor(paint.b)",
  726.     "   term.setTextColor(paint.t)",
  727.     "   term.setCursorPos(2,scr_y)",
  728.     "   term.write(\"PAIN\")",
  729.     "   term.setBackgroundColor(colors.lightGray)",
  730.     "   term.setTextColor(colors.black)",
  731.     "   term.setCursorPos(7,scr_y)",
  732.     "   term.write(msg..\" Frame: \"..frame..\"/\"..#paintEncoded)",
  733.     "   term.write(\" (X:\"..paint.scrollX..\" Y:\"..paint.scrollY..\")\")",
  734.     "   if tsv and (not dontSetVisible) then tsv(true) end",
  735.     "end",
  736.     "",
  737.     "local rendback = {",
  738.     "   b = colors.black,",
  739.     "   t = colors.gray,",
  740.     "}",
  741.     "",
  742.     "local getTablePaint = function(pe)",
  743.     "   local output = {}",
  744.     "   for a = 1, #pe do",
  745.     "       if not output[pe[a].y] then output[pe[a].y] = {} end",
  746.     "       output[pe[a].y][pe[a].x] = pe[a]",
  747.     "   end",
  748.     "   return output",
  749.     "end",
  750.     "",
  751.     "local renderPainyThings = function(xscroll,yscroll,doGrid)",
  752.     "   if bepimode then",
  753.     "       grid = {",
  754.     "           \"Bepis\",",
  755.     "           \"episB\",",
  756.     "           \"pisBe\",",
  757.     "           \"isBep\",",
  758.     "           \"sBepi\",",
  759.     "       }",
  760.     "   else",
  761.     "       grid = {",
  762.     "           \"%%..\",",
  763.     "           \"%%..\",",
  764.     "           \"%%..\",",
  765.     "           \"..%%\",",
  766.     "           \"..%%\",",
  767.     "           \"..%%\",",
  768.     "       }",
  769.     "   end",
  770.     "   term.setBackgroundColor(rendback.b)",
  771.     "   term.setTextColor(rendback.t)",
  772.     "   local badchar = \"/\"",
  773.     "   local blittlelabel = \"blittle max\"",
  774.     "   local screenlabel = \"screen max\"",
  775.     "   if doGrid then",
  776.     "       for y = 1, scr_y-(renderBlittle and 0 or doRenderBar) do",
  777.     "           term.setCursorPos(1,y)",
  778.     "           --the single most convoluted line I've ever written that works, and I love it",
  779.     "           term.write(stringShift(grid[ro(y+(yscroll+2),#grid)+1],xscroll+1):rep(math.ceil(scr_x/#grid[ro(y+(yscroll+2),#grid)+1])):sub(1,scr_x))",
  780.     "           term.setCursorPos(1,y)",
  781.     "           if ((scr_y+1)-yscroll) == y then --regular limit",
  782.     "               term.write( (string.rep(\"@\", ( (scr_x)     ) - (#screenlabel+2)  ) ..screenlabel:gsub(\" \",\"@\"):upper()..\"@@\"):sub(xscroll>0 and xscroll or 0) )",
  783.     "           elseif (((scr_y*3)+1)-yscroll) == y then --blittle limit",
  784.     "               term.write( (string.rep(\"@\", ( ((scr_x*2))   ) - (#blittlelabel+2) )..blittlelabel:gsub(\" \",\"@\"):upper()..\"@@\"):sub(xscroll>0 and xscroll or 0) )",
  785.     "           end",
  786.     "           --Stupid easter eggs, ho!--",
  787.     "           if 1000-yscroll == y then",
  788.     "               term.setCursorPos(1000-xscroll,y)",
  789.     "               term.write(\" What ARE you doing? Stop messing around! \")",
  790.     "           end",
  791.     "           if 2016-yscroll == y then",
  792.     "               term.setCursorPos(200-xscroll,y)",
  793.     "               term.write(\" MOTHER 3 is the best RPG ever. \")",
  794.     "           end",
  795.     "           if 2017-yscroll == y then",
  796.     "               term.setCursorPos(200-xscroll,y)",
  797.     "               term.write(\" Wouldn't you agree? \")",
  798.     "           end",
  799.     "           if 800-yscroll == y then",
  800.     "               term.setCursorPos(1700-xscroll,y)",
  801.     "               term.write(\" Which would you say is better? \")",
  802.     "           end",
  803.     "           if 801-yscroll == y then",
  804.     "               term.setCursorPos(1700-xscroll,y)",
  805.     "               term.write(\" Cave Story or Braid? \")",
  806.     "           end",
  807.     "           if 802-yscroll == y then",
  808.     "               term.setCursorPos(1700-xscroll,y)",
  809.     "               term.write(\" It depends what you're looking for. \")",
  810.     "           end",
  811.     "           --Is this the end?--",
  812.     "           if (xscroll > scr_x) and (xscroll < (scr_x*2)+1) then --blittle limit",
  813.     "               for y = 1, scr_y do",
  814.     "                   if y+yscroll <= (scr_y*3) then",
  815.     "                       if not (y == scr_y and doRenderBar == 1) then",
  816.     "                           term.setCursorPos((scr_x+1)-(xscroll-scr_x),y)",
  817.     "                           term.write(\"@\")",
  818.     "                       end",
  819.     "                   end",
  820.     "               end",
  821.     "           elseif (xscroll > 0) then --regular limit",
  822.     "               for y = 1, scr_y do",
  823.     "                   if y+yscroll <= scr_y then",
  824.     "                       if not (y == scr_y and doRenderBar == 1) then",
  825.     "                           term.setCursorPos((scr_x+1)-xscroll,y)",
  826.     "                           term.write(\"@\")",
  827.     "                       end",
  828.     "                   end",
  829.     "               end",
  830.     "           end",
  831.     "       end",
  832.     "       --render areas that won't save",
  833.     "       if xscroll < 0 then",
  834.     "           for y = 1, scr_y do",
  835.     "               if not (y == scr_y and doRenderBar == 1) then",
  836.     "                   term.setCursorPos(1,y)",
  837.     "                   term.write(badchar:rep(-xscroll))",
  838.     "               end",
  839.     "           end",
  840.     "       end",
  841.     "       if yscroll < 0 then",
  842.     "           for y = 1, -yscroll do",
  843.     "               if not (y == scr_y and doRenderBar == 1) then",
  844.     "                   term.setCursorPos(1,y)",
  845.     "                   term.write(badchar:rep(scr_x))",
  846.     "               end",
  847.     "           end",
  848.     "       end",
  849.     "   else",
  850.     "       term.clear()",
  851.     "   end",
  852.     "end",
  853.     "",
  854.     "renderPAIN = function(dots,xscroll,yscroll,doPain)",
  855.     "   local tsv = term.current().setVisible",
  856.     "   if tsv then tsv(false) end",
  857.     "   local beforeTX,beforeBG = term.getTextColor(), term.getBackgroundColor()",
  858.     "   local cx,cy = term.getCursorPos()",
  859.     "   local FUCK, SHIT = pcall(function()",
  860.     "       if doPain then",
  861.     "           renderPainyThings(xscroll,yscroll,evenDrawGrid)",
  862.     "           renderBar(barmsg,true)",
  863.     "       end",
  864.     "       for a = 1, #dots do",
  865.     "           local d = dots[a]",
  866.     "           if doPain then",
  867.     "               if not ((d.y-yscroll >= 1 and d.y-yscroll <= scr_y-(renderBlittle and 0 or (doRenderBar or 0))) and (d.x-xscroll >= 1 and d.x-xscroll <= scr_x)) then",
  868.     "                   d = nil",
  869.     "               end",
  870.     "           end",
  871.     "           if d then",
  872.     "               term.setCursorPos(d.x-(xscroll or 0),d.y-(yscroll or 0))",
  873.     "               term.setTextColor((paint.doGray and grayOut(d.t)) or d.t)",
  874.     "               term.setBackgroundColor((paint.doGray and grayOut(d.b)) or d.b)",
  875.     "               term.write(d.c)",
  876.     "           end",
  877.     "       end",
  878.     "   end)",
  879.     "   term.setBackgroundColor(beforeBG)",
  880.     "   term.setTextColor(beforeTX)",
  881.     "   term.setCursorPos(cx,cy)",
  882.     "   if tsv then tsv(true) end",
  883.     "   if not FUCK then error(SHIT) end --GODDAMN IT",
  884.     "end",
  885.     "",
  886.     "renderPAINFS = function(filename,xscroll,yscroll,frameNo,doPain)",
  887.     "   local tun, tse = textutils.unserialize, textutils.serialize",
  888.     "   local file = fs.open(filename,\"r\")",
  889.     "   local contents = file.readAll()",
  890.     "   local amntFrames",
  891.     "   file.close()",
  892.     "   local tcontents = tun(contents)",
  893.     "   if type(tcontents) ~= \"table\" then",
  894.     "       tcontents = importFromNFP(contents)",
  895.     "   else",
  896.     "       amntFrames = #tcontents",
  897.     "       tcontents = tcontents[frameNo or 1]",
  898.     "   end",
  899.     "   renderPAIN(tcontents,xscroll,yscroll,doPain)",
  900.     "   return amntFrames",
  901.     "end",
  902.     "",
  903.     "local getBlittle = function()",
  904.     "   if not blittle then",
  905.     "       local geet = http.get(\"http://pastebin.com/raw/ujchRSnU\")",
  906.     "       if not geet then",
  907.     "           return false",
  908.     "       else",
  909.     "           geet = geet.readAll()",
  910.     "           local file = fs.open(\"/.templittle/blittle\",\"w\")",
  911.     "           file.write(geet)",
  912.     "           file.close()",
  913.     "           os.loadAPI(\"/.templittle/blittle\")",
  914.     "           fs.delete(\"/.templittle/\")",
  915.     "           if not blittleTerm then",
  916.     "               blittleTerm = blittle.createWindow()",
  917.     "           end",
  918.     "           return blittleTerm, firstTerm",
  919.     "       end",
  920.     "   else",
  921.     "       if not blittleTerm then",
  922.     "           blittleTerm = blittle.createWindow()",
  923.     "       end",
  924.     "       return blittleTerm, firstTerm",
  925.     "   end",
  926.     "end",
  927.     "",
  928.     "local putDownText = function(x,y)",
  929.     "   term.setCursorPos(x,y)",
  930.     "   term.setTextColor((paint.doGray and grayOut(paint.t)) or paint.t)",
  931.     "   term.setBackgroundColor((paint.doGray and grayOut(paint.b)) or paint.b)",
  932.     "   local msg = read()",
  933.     "   if #msg > 0 then",
  934.     "       for a = 1, #msg do",
  935.     "           table.insert(paintEncoded[frame],{x=a+(x+paint.scrollX)-1,y=y+paint.scrollY,t=paint.t,b=paint.b,c=msg:sub(a,a),m=paint.m})",
  936.     "       end",
  937.     "   end",
  938.     "end",
  939.     "",
  940.     "local deleteDot = function(x,y)",
  941.     "   local good = false",
  942.     "   for a = #paintEncoded[frame],1,-1 do",
  943.     "       local b = paintEncoded[frame][a]",
  944.     "       if (x == b.x) and (y == b.y) then",
  945.     "           table.remove(paintEncoded[frame],a)",
  946.     "           good = true",
  947.     "       end",
  948.     "   end",
  949.     "   return good",
  950.     "end",
  951.     "",
  952.     "CTB = function(_color) --Color To Blit",
  953.     "   local blitcolors = {",
  954.     "       [colors.white] = \"0\",",
  955.     "       [colors.orange] = \"1\",",
  956.     "       [colors.magenta] = \"2\",",
  957.     "       [colors.lightBlue] = \"3\",",
  958.     "       [colors.yellow] = \"4\",",
  959.     "       [colors.lime] = \"5\",",
  960.     "       [colors.pink] = \"6\",",
  961.     "       [colors.gray] = \"7\",",
  962.     "       [colors.lightGray] = \"8\",",
  963.     "       [colors.cyan] = \"9\",",
  964.     "       [colors.purple] = \"a\",",
  965.     "       [colors.blue] = \"b\",",
  966.     "       [colors.brown] = \"c\",",
  967.     "       [colors.green] = \"d\",",
  968.     "       [colors.red] = \"e\",",
  969.     "       [colors.black] = \"f\",",
  970.     "   }",
  971.     "   return blitcolors[_color] or \"f\"",
  972.     "end",
  973.     "",
  974.     "BTC = function(_color) --Blit To Color",
  975.     "   local blitcolors = {",
  976.     "       [\"0\"] = colors.white,",
  977.     "       [\"1\"] = colors.orange,",
  978.     "       [\"2\"] = colors.magenta,",
  979.     "       [\"3\"] = colors.lightBlue,",
  980.     "       [\"4\"] = colors.yellow,",
  981.     "       [\"5\"] = colors.lime,",
  982.     "       [\"6\"] = colors.pink,",
  983.     "       [\"7\"] = colors.gray,",
  984.     "       [\"8\"] = colors.lightGray,",
  985.     "       [\"9\"] = colors.cyan,",
  986.     "       [\"a\"] = colors.purple,",
  987.     "       [\"b\"] = colors.blue,",
  988.     "       [\"c\"] = colors.brown,",
  989.     "       [\"d\"] = colors.green,",
  990.     "       [\"e\"] = colors.red,",
  991.     "       [\"f\"] = colors.black,",
  992.     "   }",
  993.     "   return blitcolors[_color]",
  994.     "end",
  995.     "",
  996.     "exportToNFP = function(input)",
  997.     "   local doop = {}",
  998.     "   local p = input",
  999.     "   local pheight = 0",
  1000.     "   local pwidth = 0",
  1001.     "   for a = 1, #p do",
  1002.     "       if p[a].y > pheight then",
  1003.     "           pheight = p[a].y",
  1004.     "       end",
  1005.     "       if p[a].x > pwidth then",
  1006.     "           pwidth = p[a].x",
  1007.     "       end",
  1008.     "   end",
  1009.     "   for k,v in pairs(p) do",
  1010.     "       if not doop[v.y] then doop[v.y] = {} end",
  1011.     "       doop[v.y][v.x] = CTB(v.b)",
  1012.     "   end",
  1013.     "   for y = 1, pheight do",
  1014.     "       if doop[y] then",
  1015.     "           for x = 1, pwidth do",
  1016.     "               if doop[y][x] then",
  1017.     "                   nfpoutput = nfpoutput..doop[y][x]",
  1018.     "               else",
  1019.     "                   nfpoutput = nfpoutput..\" \"",
  1020.     "               end",
  1021.     "           end",
  1022.     "       end",
  1023.     "       nfpoutput = nfpoutput..\"\\n\"",
  1024.     "   end",
  1025.     "   return nfpoutput",
  1026.     "end",
  1027.     "",
  1028.     "importFromNFP = function(theInput)",
  1029.     "   local output = {}",
  1030.     "   local input = explode(\"\\n\",theInput)",
  1031.     "   for a = 1, #input do",
  1032.     "       line = input[a]",
  1033.     "       for b = 1, #line do",
  1034.     "           if (line:sub(b,b) ~= \" \") and BTC(line:sub(b,b)) then",
  1035.     "               table.insert(output,{",
  1036.     "                   x = b,",
  1037.     "                   y = a,",
  1038.     "                   t = colors.white,",
  1039.     "                   b = BTC(line:sub(b,b)) or colors.black,",
  1040.     "                   c = \" \",",
  1041.     "               })",
  1042.     "           end",
  1043.     "       end",
  1044.     "   end",
  1045.     "   return output",
  1046.     "end",
  1047.     "",
  1048.     "local getTheDoots = function(pe)",
  1049.     "   local hasBadDots = false",
  1050.     "   local baddestX,baddestY = 1,1",
  1051.     "   barmsg = \"Checking...\"",
  1052.     "   for b = 1, #pe do",
  1053.     "       local doot = pe[b]",
  1054.     "       if doot.x <= 0 or doot.y <= 0 then",
  1055.     "           hasBadDots = true",
  1056.     "           if doot.x < baddestX then",
  1057.     "               baddestX = doot.x",
  1058.     "           end",
  1059.     "           if doot.y < baddestY then",
  1060.     "               baddestY = doot.y",
  1061.     "           end",
  1062.     "       end",
  1063.     "       if b % 64 == 0 then yield() end",
  1064.     "   end",
  1065.     "   return baddestX, baddestY",
  1066.     "end",
  1067.     "",
  1068.     "local function deepcompare(t1,t2,ignore_mt)",
  1069.     "   local ty1 = type(t1)",
  1070.     "   local ty2 = type(t2)",
  1071.     "   if ty1 ~= ty2 then return false end",
  1072.     "   -- non-table types can be directly compared",
  1073.     "   if ty1 ~= 'table' and ty2 ~= 'table' then return t1 == t2 end",
  1074.     "   -- as well as tables which have the metamethod __eq",
  1075.     "   local mt = getmetatable(t1)",
  1076.     "   if not ignore_mt and mt and mt.__eq then return t1 == t2 end",
  1077.     "   for k1,v1 in pairs(t1) do",
  1078.     "       local v2 = t2[k1]",
  1079.     "       if v2 == nil or not deepcompare(v1,v2) then return false end",
  1080.     "   end",
  1081.     "   for k2,v2 in pairs(t2) do",
  1082.     "       local v1 = t1[k2]",
  1083.     "       if v1 == nil or not deepcompare(v1,v2) then return false end",
  1084.     "   end",
  1085.     "   return true",
  1086.     "end",
  1087.     "",
  1088.     "local displayMenu = function()",
  1089.     "   menuOptions = {\"Save\",\"Export\",\"Del.frame\",\"Clear\",\"Exit\"}",
  1090.     "   local diss = \" \"..table.concat(menuOptions,\" \")",
  1091.     "   local cleary = scr_y-math.floor(#diss/scr_x)",
  1092.     "   for a = cleary,scr_y do",
  1093.     "       term.setCursorPos(1,a)",
  1094.     "       term.setBackgroundColor(colors.lightGray)",
  1095.     "       term.clearLine()",
  1096.     "   end",
  1097.     "   local menuPoses = {}",
  1098.     "   local menuFunctions = {",
  1099.     "       [1] = function() --Save",
  1100.     "           local hasBadDots = false",
  1101.     "           for a = 1, #paintEncoded do",
  1102.     "               local radx,rady = getTheDoots(paintEncoded[a])",
  1103.     "               if radx ~= 1 or rady ~= 1 then",
  1104.     "                   hasBadDots = true",
  1105.     "               end",
  1106.     "           end",
  1107.     "           if hasBadDots then",
  1108.     "               local ting = bottomPrompt(\"Dot(s) are OoB! Save or fix? (Y/N/F)\",_,\"ynf\",{keys.leftCtrl,keys.rightCtrl})",
  1109.     "               if ting == \"f\" then",
  1110.     "                   for a = 1, #paintEncoded do",
  1111.     "                       local baddestX, baddestY = getTheDoots(paintEncoded[a])",
  1112.     "                       paintEncoded[a] = movePaintEncoded(paintEncoded[a],-(baddestX-1),-(baddestY-1))",
  1113.     "                   end",
  1114.     "               elseif ting ~= \"y\" then",
  1115.     "                   barmsg = \"\"",
  1116.     "                   return false",
  1117.     "               end",
  1118.     "           end",
  1119.     "           local output = deepCopy(paintEncoded)",
  1120.     "           if paint.doGray then",
  1121.     "               for a = 1, #paintEncoded do",
  1122.     "                   for b = 1, #paintEncoded[a] do",
  1123.     "                       output[a][b].b = grayOut(paintEncoded[a][b].b)",
  1124.     "                       output[a][b].t = grayOut(paintEncoded[a][b].t)",
  1125.     "                       if not output[a][b].m then output[a][b].m = 1 end",
  1126.     "                   end",
  1127.     "                   if a % 2 == 0 then yield() end",
  1128.     "               end",
  1129.     "           end",
  1130.     "           saveFile(fileName,output)",
  1131.     "           lastPaintEncoded = deepCopy(paintEncoded)",
  1132.     "           term.setCursorPos(9,scr_y)",
  1133.     "           barmsg = \"Saved as '\"..fileName..\"'\"",
  1134.     "           doRender = true",
  1135.     "       end,",
  1136.     "       [2] = function() --Export",
  1137.     "           nfpoutput = \"\"",
  1138.     "           local exportName = bottomPrompt(\"Export to: /\")",
  1139.     "           if fs.combine(\"\",exportName) == \"\" then return end",
  1140.     "           if fs.isReadOnly(exportName) then",
  1141.     "               barmsg = \"That's read-only.\"",
  1142.     "               doRender = true",
  1143.     "               return",
  1144.     "           end",
  1145.     "           if fs.exists(exportName) then",
  1146.     "               if bottomPrompt(\"Overwrite? (Y/N)\",_,\"yn\",{keys.leftCtrl,keys.rightCtrl}) ~= \"y\" then return end",
  1147.     "           end",
  1148.     "           local output = exportToNFP(paintEncoded[frame])",
  1149.     "           local file = fs.open(exportName,\"w\")",
  1150.     "           file.write(output)",
  1151.     "           file.close()",
  1152.     "           doRender = true",
  1153.     "           barmsg = \"Exported as '\"..exportName..\"'\"",
  1154.     "           return",
  1155.     "       end,",
  1156.     "       [3] = function() --Del.Frame",
  1157.     "           local outcum = bottomPrompt(\"Thou art sure? (Y/N)\",_,\"yn\",{keys.leftCtrl,keys.rightCtrl})",
  1158.     "           if outcum == \"y\" then",
  1159.     "               if #paintEncoded == 1 then",
  1160.     "                   barmsg = \"Ha! You can't do that.\"",
  1161.     "                   return",
  1162.     "               end",
  1163.     "               table.remove(paintEncoded,frame)",
  1164.     "               barmsg = \"Deleted frame \"..frame..\".\"",
  1165.     "               if paintEncoded[frame-1] then",
  1166.     "                   frame = frame - 1",
  1167.     "               else",
  1168.     "                   frame = frame + 1",
  1169.     "               end",
  1170.     "               if #paintEncoded < frame then",
  1171.     "                   repeat",
  1172.     "                       frame = frame - 1",
  1173.     "                   until #paintEncoded >= frame",
  1174.     "               end",
  1175.     "               --renderPAIN(paintEncoded[frame],paint.scrollX,paint.scrollY,true)",
  1176.     "           end",
  1177.     "           doRender = true",
  1178.     "       end,",
  1179.     "       [4] = function() --Clear",
  1180.     "           local outcum = bottomPrompt(\"Clear the frame? (Y/N)\",_,\"yn\",{keys.leftCtrl,keys.rightCtrl})",
  1181.     "           if outcum == \"y\" then",
  1182.     "               paintEncoded[frame] = {}",
  1183.     "               barmsg = \"Cleared frame \"..frame..\".\"",
  1184.     "               --renderPAIN(paintEncoded[frame],paint.scrollX,paint.scrollY,true)",
  1185.     "           end",
  1186.     "           doRender = true",
  1187.     "       end,",
  1188.     "       [5] = function() --Exit",
  1189.     "           if not deepcompare(lastPaintEncoded,paintEncoded) then",
  1190.     "               local outcum = bottomPrompt(\"Abandon unsaved work? (Y/N)\",_,\"yn\",{keys.leftCtrl,keys.rightCtrl})",
  1191.     "               sleep(0)",
  1192.     "               if outcum == \"y\" then",
  1193.     "                   return \"exit\"",
  1194.     "               else",
  1195.     "                   doRender = true",
  1196.     "                   return nil",
  1197.     "               end",
  1198.     "           else",
  1199.     "               return \"exit\"",
  1200.     "           end",
  1201.     "       end,",
  1202.     "   }",
  1203.     "   local cursor = 1",
  1204.     "   local redrawmenu = true",
  1205.     "   local initial = os.time()",
  1206.     "   local clickdelay = 0.003",
  1207.     "   while true do",
  1208.     "       if redrawmenu then",
  1209.     "           term.setCursorPos(2,cleary)",
  1210.     "           term.clearLine()",
  1211.     "           for a = 1, #menuOptions do",
  1212.     "               if a == cursor then",
  1213.     "                   term.setTextColor(colors.black)",
  1214.     "                   term.setBackgroundColor(colors.white)",
  1215.     "               else",
  1216.     "                   term.setTextColor(colors.black)",
  1217.     "                   term.setBackgroundColor(colors.lightGray)",
  1218.     "               end",
  1219.     "               menuPoses[a] = {term.getCursorPos()}",
  1220.     "               write(menuOptions[a])",
  1221.     "               term.setBackgroundColor(colors.lightGray)",
  1222.     "               if a ~= #menuOptions then",
  1223.     "                   write(\" \")",
  1224.     "               end",
  1225.     "           end",
  1226.     "           redrawmenu = false",
  1227.     "       end",
  1228.     "       local event,key,x,y = getEvents(\"key\",\"char\",\"mouse_click\",\"mouse_up\",\"mouse_drag\")",
  1229.     "       if event == \"key\" then",
  1230.     "           if key == keys.left then",
  1231.     "               redrawmenu = true",
  1232.     "               cursor = cursor - 1",
  1233.     "           elseif key == keys.right then",
  1234.     "               redrawmenu = true",
  1235.     "               cursor = cursor + 1",
  1236.     "           elseif key == keys.enter then",
  1237.     "               local res = menuFunctions[cursor]()",
  1238.     "               if res == \"exit\" then",
  1239.     "                   return \"exit\"",
  1240.     "               else",
  1241.     "                   return",
  1242.     "               end",
  1243.     "           elseif key == keys.leftCtrl or key == keys.rightCtrl then",
  1244.     "               doRender = true",
  1245.     "               return",
  1246.     "           end",
  1247.     "       elseif event == \"char\" then",
  1248.     "           for a = 1, #menuOptions do",
  1249.     "               if key:lower() == menuOptions[a]:sub(1,1):lower() and a ~= cursor then",
  1250.     "                   cursor = a",
  1251.     "                   redrawmenu = true",
  1252.     "                   break",
  1253.     "               end",
  1254.     "           end",
  1255.     "       elseif event == \"mouse_click\" or event == \"mouse_up\" then",
  1256.     "           if y < cleary then",
  1257.     "               return",
  1258.     "           elseif key == 1 and initial+clickdelay < os.time() then --key? more like button",
  1259.     "               for a = 1, #menuPoses do",
  1260.     "                   if y == menuPoses[a][2] then",
  1261.     "                       if x >= menuPoses[a][1] and x <= menuPoses[a][1]+#menuOptions[a] then",
  1262.     "                           local res = menuFunctions[a]()",
  1263.     "                           if res == \"exit\" then",
  1264.     "                               return \"exit\"",
  1265.     "                           else",
  1266.     "                               return",
  1267.     "                           end",
  1268.     "                       end",
  1269.     "                   end",
  1270.     "               end",
  1271.     "           end",
  1272.     "       --elseif event == \"mouse_drag\" then",
  1273.     "       end",
  1274.     "       if (initial+clickdelay < os.time()) and string.find(event,\"mouse\") then",
  1275.     "           if key == 1 then --key? key? what key? all I see is button!",
  1276.     "               for a = 1, #menuPoses do",
  1277.     "                   if y == menuPoses[a][2] then",
  1278.     "                       if x >= menuPoses[a][1] and x <= menuPoses[a][1]+#menuOptions[a] then",
  1279.     "                           cursor = a",
  1280.     "                           redrawmenu = true",
  1281.     "                           break",
  1282.     "                       end",
  1283.     "                   end",
  1284.     "               end",
  1285.     "           end",
  1286.     "       end",
  1287.     "       if cursor < 1 then",
  1288.     "           cursor = #menuOptions",
  1289.     "       elseif cursor > #menuOptions then",
  1290.     "           cursor = 1",
  1291.     "       end",
  1292.     "   end",
  1293.     "end",
  1294.     "",
  1295.     "local lastMX,lastMY",
  1296.     "",
  1297.     "local doNonEventDrivenMovement = function() --what a STUPID function name, man",
  1298.     "   local didMove",
  1299.     "   while true do",
  1300.     "       didMove = false",
  1301.     "       if (not keysDown[keys.leftShift]) and (not isDragging) and (not keysDown[keys.tab]) then",
  1302.     "           if keysDown[keys.right] then",
  1303.     "               paint.scrollX = paint.scrollX + 1",
  1304.     "               didMove = true",
  1305.     "           elseif keysDown[keys.left] then",
  1306.     "               paint.scrollX = paint.scrollX - 1",
  1307.     "               didMove = true",
  1308.     "           end",
  1309.     "           if keysDown[keys.down] then",
  1310.     "               paint.scrollY = paint.scrollY + 1",
  1311.     "               didMove = true",
  1312.     "           elseif keysDown[keys.up] then",
  1313.     "               paint.scrollY = paint.scrollY - 1",
  1314.     "               didMove = true",
  1315.     "           end",
  1316.     "           if didMove then",
  1317.     "               if lastMX and lastMY then",
  1318.     "                   if miceDown[1] then",
  1319.     "                       os.queueEvent(\"mouse_click\",1,lastMX,lastMY)",
  1320.     "                   end",
  1321.     "                   if miceDown[2] then",
  1322.     "                       os.queueEvent(\"mouse_click\",2,lastMX,lastMY)",
  1323.     "                   end",
  1324.     "               end",
  1325.     "               doRender = true",
  1326.     "           end",
  1327.     "       end",
  1328.     "       sleep(0)",
  1329.     "   end",
  1330.     "end",
  1331.     "",
  1332.     "local linePoses = {}",
  1333.     "local dragPoses = {}",
  1334.     "",
  1335.     "local getInput = function() --gotta catch them all",
  1336.     "   local button, x, y, oldmx, oldmy, origx, origy",
  1337.     "   local isDragging = false",
  1338.     "   local proceed = false",
  1339.     "   renderBar(barmsg)",
  1340.     "   while true do",
  1341.     "       doRender = false",
  1342.     "       local oldx,oldy = paint.scrollX,paint.scrollY",
  1343.     "       local evt = {getEvents(\"mouse_scroll\",\"mouse_click\", \"mouse_drag\",\"mouse_up\",\"key\",\"key_up\",true)}",
  1344.     "       if (evt[1] == \"mouse_scroll\") and (not viewing) then",
  1345.     "           local dir = evt[2]",
  1346.     "           if dir == 1 then",
  1347.     "               if keysDown[keys.leftShift] or keysDown[keys.rightShift] then",
  1348.     "                   paint.t = paint.t * 2",
  1349.     "                   if paint.t > 32768 then",
  1350.     "                       paint.t = 32768",
  1351.     "                   end",
  1352.     "               else",
  1353.     "                   paint.b = paint.b * 2",
  1354.     "                   if paint.b > 32768 then",
  1355.     "                       paint.b = 32768",
  1356.     "                   end",
  1357.     "               end",
  1358.     "           else",
  1359.     "               if keysDown[keys.leftShift] or keysDown[keys.rightShift] then",
  1360.     "                   paint.t = math.ceil(paint.t / 2)",
  1361.     "                   if paint.t < 1 then",
  1362.     "                       paint.t = 1",
  1363.     "                   end",
  1364.     "               else",
  1365.     "                   paint.b = math.ceil(paint.b / 2)",
  1366.     "                   if paint.b < 1 then",
  1367.     "                       paint.b = 1",
  1368.     "                   end",
  1369.     "               end",
  1370.     "           end",
  1371.     "           renderBar(barmsg)",
  1372.     "       elseif ((evt[1] == \"mouse_click\") or (evt[1] == \"mouse_drag\")) and (not viewing) then",
  1373.     "           if evt[1] == \"mouse_click\" then",
  1374.     "               origx, origy = evt[3], evt[4]",
  1375.     "           end",
  1376.     "           oldmx,oldmy = x or evt[3], y or evt[4]",
  1377.     "           lastMX,lastMY = evt[3],evt[4]",
  1378.     "           button,x,y = evt[2],evt[3],evt[4]",
  1379.     "           if renderBlittle then",
  1380.     "               x = 2*x",
  1381.     "               y = 3*y",
  1382.     "               lastMX = 2*lastMX",
  1383.     "               lastMY = 3*lastMY",
  1384.     "           end",
  1385.     "           linePoses = {{x=oldmx,y=oldmy},{x=x,y=y}}",
  1386.     "           miceDown[button] = true",
  1387.     "           doRender = true",
  1388.     "           if y <= scr_y-(renderBlittle and 0 or doRenderBar) then",
  1389.     "               if (button == 3) then",
  1390.     "                   putDownText(x,y)",
  1391.     "                   miceDown = {}",
  1392.     "                   keysDown = {}",
  1393.     "               elseif button == 1 then",
  1394.     "                   if keysDown[keys.leftShift] and evt[1] == \"mouse_click\" then",
  1395.     "                       isDragging = true",
  1396.     "                   end",
  1397.     "                   if isDragging then",
  1398.     "                       if evt[1] == \"mouse_click\" then",
  1399.     "                           dragPoses[1] = {x=x,y=y}",
  1400.     "                       end",
  1401.     "                       dragPoses[2] = {x=x,y=y}",
  1402.     "                   else",
  1403.     "                       if evt[1] == \"mouse_drag\" then",
  1404.     "                           local points = getDotsInLine(linePoses[1].x,linePoses[1].y,linePoses[2].x,linePoses[2].y)",
  1405.     "                           for a = 1, #points do",
  1406.     "                               table.insert(paintEncoded[frame],{",
  1407.     "                                   x = points[a].x + paint.scrollX,",
  1408.     "                                   y = points[a].y + paint.scrollY,",
  1409.     "                                   c = paint.c,",
  1410.     "                                   b = paint.b,",
  1411.     "                                   t = paint.t,",
  1412.     "                                   m = paint.m,",
  1413.     "                               })",
  1414.     "                           end",
  1415.     "                       else",
  1416.     "                           table.insert(paintEncoded[frame],{",
  1417.     "                               x = x + paint.scrollX,",
  1418.     "                               y = y + paint.scrollY,",
  1419.     "                               c = paint.c,",
  1420.     "                               b = paint.b,",
  1421.     "                               t = paint.t,",
  1422.     "                               m = paint.m,",
  1423.     "                           })",
  1424.     "                       end",
  1425.     "                   end",
  1426.     "               elseif button == 2 and y <= scr_y-(renderBlittle and 0 or doRenderBar) then",
  1427.     "                   deleteDot(x+paint.scrollX,y+paint.scrollY)",
  1428.     "               end",
  1429.     "           elseif origy >= scr_y-(renderBlittle and 0 or doRenderBar) then",
  1430.     "               keysDown = {}",
  1431.     "               local res = displayMenu()",
  1432.     "               if res == \"exit\" then break end",
  1433.     "               doRender = true",
  1434.     "           end",
  1435.     "       elseif (evt[1] == \"mouse_up\") and (not viewing) then",
  1436.     "           origx,origy = 0,0",
  1437.     "           local button = evt[2]",
  1438.     "           miceDown[button] = false",
  1439.     "           oldmx,oldmy = nil,nil",
  1440.     "           lastMX, lastMY = nil,nil",
  1441.     "           if isDragging then",
  1442.     "               local points = getDotsInLine(dragPoses[1].x,dragPoses[1].y,dragPoses[2].x,dragPoses[2].y)",
  1443.     "               for a = 1, #points do",
  1444.     "                   table.insert(paintEncoded[frame],{",
  1445.     "                       x = points[a].x + paint.scrollX,",
  1446.     "                       y = points[a].y + paint.scrollY,",
  1447.     "                       c = paint.c,",
  1448.     "                       b = paint.b,",
  1449.     "                       t = paint.t,",
  1450.     "                       m = paint.m,",
  1451.     "                   })",
  1452.     "               end",
  1453.     "               doRender = true",
  1454.     "           end",
  1455.     "           isDragging = false",
  1456.     "       elseif evt[1] == \"key\" then",
  1457.     "           local key = evt[2]",
  1458.     "           if (not keysDown[keys.leftShift]) and (keysDown[keys.tab]) then",
  1459.     "               if key == keys.right and (not keysDown[keys.right]) then",
  1460.     "                   paint.scrollX = paint.scrollX + 1",
  1461.     "                   doRender = true",
  1462.     "               elseif key == keys.left and (not keysDown[keys.left]) then",
  1463.     "                   paint.scrollX = paint.scrollX - 1",
  1464.     "                   doRender = true",
  1465.     "               end",
  1466.     "               if key == keys.down and (not keysDown[keys.down]) then",
  1467.     "                   paint.scrollY = paint.scrollY + 1",
  1468.     "                   doRender = true",
  1469.     "               elseif key == keys.up and (not keysDown[keys.up]) then",
  1470.     "                   paint.scrollY = paint.scrollY - 1",
  1471.     "                   doRender = true",
  1472.     "               end",
  1473.     "           end",
  1474.     "           keysDown[key] = true",
  1475.     "           if key == keys.space then",
  1476.     "               if keysDown[keys.leftShift] then",
  1477.     "                   evenDrawGrid = not evenDrawGrid",
  1478.     "               else",
  1479.     "                   doRenderBar = math.abs(doRenderBar-1)",
  1480.     "               end",
  1481.     "               doRender = true",
  1482.     "           end",
  1483.     "           if key == keys.b then",
  1484.     "               local blTerm, oldTerm = getBlittle()",
  1485.     "               renderBlittle = not renderBlittle",
  1486.     "               term.setBackgroundColor(colors.black)",
  1487.     "               term.clear()",
  1488.     "               if renderBlittle then",
  1489.     "                   term.redirect(blTerm)",
  1490.     "                   blTerm.setVisible(true)",
  1491.     "               else",
  1492.     "                   term.redirect(oldTerm)",
  1493.     "                   blTerm.setVisible(false)",
  1494.     "               end",
  1495.     "               doRender = true",
  1496.     "               scr_x, scr_y = term.current().getSize()",
  1497.     "           end",
  1498.     "           if (key == keys.c) and (not renderBlittle) then",
  1499.     "               local newX = tonumber(bottomPrompt(\"Goto X:\"))",
  1500.     "               local newY",
  1501.     "               if newX then",
  1502.     "                   newY = tonumber(bottomPrompt(\"Goto Y:\"))",
  1503.     "                   paint.scrollX = newX or paint.scrollX",
  1504.     "                   paint.scrollY = newY or paint.scrollY",
  1505.     "               end",
  1506.     "               doRender = true",
  1507.     "           end",
  1508.     "           if (keysDown[keys.leftShift]) and (not isDragging) then",
  1509.     "               if key == keys.left then",
  1510.     "                   paintEncoded[frame] = movePaintEncoded(paintEncoded[frame],-1,0)",
  1511.     "                   doRender = true",
  1512.     "               elseif key == keys.right then",
  1513.     "                   paintEncoded[frame] = movePaintEncoded(paintEncoded[frame],1,0)",
  1514.     "                   doRender = true",
  1515.     "               elseif key == keys.up then",
  1516.     "                   paintEncoded[frame] = movePaintEncoded(paintEncoded[frame],0,-1)",
  1517.     "                   doRender = true",
  1518.     "               elseif key == keys.down then",
  1519.     "                   paintEncoded[frame] = movePaintEncoded(paintEncoded[frame],0,1)",
  1520.     "                   doRender = true",
  1521.     "               end",
  1522.     "           end",
  1523.     "           if keysDown[keys.leftAlt] then",
  1524.     "               if #paintEncoded > 1 then",
  1525.     "                   if key == keys.equals and paintEncoded[frame+1] then --basically plus",
  1526.     "                       local first = deepCopy(paintEncoded[frame])",
  1527.     "                       local next = deepCopy(paintEncoded[frame+1])",
  1528.     "                       paintEncoded[frame] = next",
  1529.     "                       paintEncoded[frame+1] = first",
  1530.     "                       frame = frame + 1",
  1531.     "                       barmsg = \"Swapped prev frame.\"",
  1532.     "                   end",
  1533.     "                   if key == keys.minus and paintEncoded[frame-1] then",
  1534.     "                       local first = deepCopy(paintEncoded[frame])",
  1535.     "                       local next = deepCopy(paintEncoded[frame-1])",
  1536.     "                       paintEncoded[frame] = next",
  1537.     "                       paintEncoded[frame-1] = first",
  1538.     "                       frame = frame - 1",
  1539.     "                       barmsg = \"Swapped next frame.\"",
  1540.     "                   end",
  1541.     "               end",
  1542.     "           end",
  1543.     "           if not renderBlittle then",
  1544.     "               if key == keys.m then",
  1545.     "                   local incum = bottomPrompt(\"Set meta: \",metaHistory)",
  1546.     "                   paint.m = incum:gsub(\" \",\"\") ~= \"\" and incum or paint.m",
  1547.     "                   if paint.m ~= metaHistory[#metaHistory] then",
  1548.     "                       table.insert(metaHistory,paint.m)",
  1549.     "                   end",
  1550.     "                   doRender = true",
  1551.     "               end",
  1552.     "               if key == keys.f7 then",
  1553.     "                   bepimode = not bepimode",
  1554.     "                   doRender = true",
  1555.     "               end",
  1556.     "               if key == keys.t then",
  1557.     "                   renderBottomBar(\"Click to place text.\")",
  1558.     "                   local mevt",
  1559.     "                   repeat",
  1560.     "                       mevt = {os.pullEvent(\"mouse_click\")}",
  1561.     "                   until mevt[2] == 1 and mevt[4] < scr_y-(renderBlittle and 0 or doRenderBar)",
  1562.     "                   local x,y = mevt[3],mevt[4]",
  1563.     "                   if renderBlittle then",
  1564.     "                       x = 2*x",
  1565.     "                       y = 3*y",
  1566.     "                   end",
  1567.     "                   putDownText(x,y)",
  1568.     "                   miceDown = {}",
  1569.     "                   keysDown = {}",
  1570.     "               end",
  1571.     "               if not keysDown[keys.leftAlt] then",
  1572.     "                   if key == keys.equals then --basically 'plus'",
  1573.     "                       if not paintEncoded[frame+1] then",
  1574.     "                           paintEncoded[frame+1] = {}",
  1575.     "                           local sheet = paintEncoded[frame]",
  1576.     "                           if keysDown[keys.leftShift] then",
  1577.     "                               paintEncoded[frame+1] = deepCopy(sheet)",
  1578.     "                           end",
  1579.     "                       end",
  1580.     "                       frame = frame + 1",
  1581.     "                       doRender = true",
  1582.     "                   elseif key == keys.minus then",
  1583.     "                       if frame > 1 then",
  1584.     "                           frame = frame - 1",
  1585.     "                           doRender = true",
  1586.     "                       end",
  1587.     "                   end",
  1588.     "               end",
  1589.     "               if (key == keys.leftCtrl or key == keys.rightCtrl) then",
  1590.     "                   keysDown = {}",
  1591.     "                   local res = displayMenu()",
  1592.     "                   if res == \"exit\" then break end",
  1593.     "                   doRender = true",
  1594.     "               end",
  1595.     "           end",
  1596.     "           if (key == keys.f and keysDown[keys.leftShift]) then",
  1597.     "               local deredots = {}",
  1598.     "               for a = 1, #paintEncoded[frame] do",
  1599.     "                   local dot = paintEncoded[frame][a]",
  1600.     "                   if dot.x-paint.scrollX > 0 and dot.x-paint.scrollX <= scr_x then",
  1601.     "                       if dot.y-paint.scrollY > 0 and dot.y-paint.scrollY <= scr_y then",
  1602.     "                           table.insert(deredots,{dot.x-paint.scrollX, dot.y-paint.scrollY})",
  1603.     "                       end",
  1604.     "                   end",
  1605.     "               end",
  1606.     "               for y = 1, scr_y-(renderBlittle and 0 or doRenderBar) do",
  1607.     "                   for x = 1, scr_x do",
  1608.     "                       local good = true",
  1609.     "                       for a = 1, #deredots do",
  1610.     "                           if (deredots[a][1] == x) and (deredots[a][2] == y) then",
  1611.     "                               good = bad",
  1612.     "                               break",
  1613.     "                           end",
  1614.     "                       end",
  1615.     "                       if good then",
  1616.     "                           table.insert(paintEncoded[frame],{",
  1617.     "                               x = x+paint.scrollX,",
  1618.     "                               y = y+paint.scrollY,",
  1619.     "                               c = \" \",",
  1620.     "                               t = paint.t,",
  1621.     "                               b = paint.b,",
  1622.     "                               m = paint.m,",
  1623.     "                           })",
  1624.     "                       end",
  1625.     "                   end",
  1626.     "               end",
  1627.     "               doRender = true",
  1628.     "           end",
  1629.     "           if key == keys.g then",
  1630.     "               paint.doGray = not paint.doGray",
  1631.     "               doRender = true",
  1632.     "           end",
  1633.     "           if key == keys.a then",
  1634.     "               paint.scrollX = 0",
  1635.     "               paint.scrollY = 0",
  1636.     "               doRender = true",
  1637.     "           end",
  1638.     "           if key == keys.f1 then",
  1639.     "               guiHelp()",
  1640.     "           end",
  1641.     "           if key == keys.leftBracket then",
  1642.     "               os.queueEvent(\"mouse_scroll\",2,1,1)",
  1643.     "           elseif key == keys.rightBracket then",
  1644.     "               os.queueEvent(\"mouse_scroll\",1,1,1)",
  1645.     "           end",
  1646.     "       elseif evt[1] == \"key_up\" then",
  1647.     "           local key = evt[2]",
  1648.     "           keysDown[key] = false",
  1649.     "       end",
  1650.     "       if (oldx~=paint.scrollX) or (oldy~=paint.scrollY) then",
  1651.     "           doRender = true",
  1652.     "       end",
  1653.     "       if doRender then",
  1654.     "           renderPAIN(paintEncoded[frame],paint.scrollX,paint.scrollY,true)",
  1655.     "           doRender = false",
  1656.     "       end",
  1657.     "   end",
  1658.     "end",
  1659.     "",
  1660.     "if not shell then return end",
  1661.     "",
  1662.     "fileName = shell.resolve(tostring(tArg[1]))",
  1663.     "",
  1664.     "if not fs.exists(fileName) then",
  1665.     "   paintEncoded = {{}}",
  1666.     "else",
  1667.     "   local file = fs.open(fileName,\"r\")",
  1668.     "   local contents = file.readAll()",
  1669.     "   file.close()",
  1670.     "   if type(tun(contents)) ~= \"table\" then",
  1671.     "       if pMode ~= 1 then print(\"Importing from NFP...\") end",
  1672.     "       paintEncoded = {importFromNFP(contents)}",
  1673.     "       if fileName:sub(-4,-1) == \".nfp\" then",
  1674.     "           fileName = fileName:sub(1,-5)",
  1675.     "       end",
  1676.     "   else",
  1677.     "       paintEncoded = tun(contents)",
  1678.     "   end",
  1679.     "end",
  1680.     "",
  1681.     "paintEncoded = tun(tse(paintEncoded):gsub(\"bg\",\"b\"):gsub(\"txt\",\"t\"):gsub(\"char\",\"c\"):gsub(\"meta\",\"m\")) -- gotta have backwards compatibility, sorta",
  1682.     "",
  1683.     "if not paintEncoded[frame] then paintEncoded = {paintEncoded} end",
  1684.     "if pMode == 1 then",
  1685.     "   doRenderBar = 0",
  1686.     "   renderPAIN(paintEncoded[tonumber(tArg[5]) or 1],tonumber(tArg[3]) or 0,tonumber(tArg[4]) or 0)",
  1687.     "   sleep(0)",
  1688.     "   return",
  1689.     "else",
  1690.     "   renderPAIN(paintEncoded[frame],paint.scrollX,paint.scrollY,true)",
  1691.     "end",
  1692.     "lastPaintEncoded = deepCopy(paintEncoded)",
  1693.     "",
  1694.     "parallel.waitForAny(getInput,doNonEventDrivenMovement)",
  1695.     "",
  1696.     "term.setCursorPos(1,scr_y)",
  1697.     "term.setBackgroundColor(colors.black)",
  1698.     "term.clearLine()",
  1699.   },
  1700.   r = {
  1701.     "",
  1702.     "",
  1703.     "         000000000000000",
  1704.     "         077777777777770",
  1705.     "         078888888888880",
  1706.     "         078800000007880",
  1707.     "         07880     07880",
  1708.     "         07880     07880",
  1709.     "         078800000007880",
  1710.     "         078877777777880",
  1711.     "         078888888888880",
  1712.     "         078800000078000",
  1713.     "         07880    0780  ",
  1714.     "         07880    078000",
  1715.     "         07880    078770",
  1716.     "         07880    078880",
  1717.     "         07880    078880",
  1718.     "         00000    000000",
  1719.   },
  1720.   X = {
  1721.     "",
  1722.     " 000000000000        000000000000",
  1723.     " 0777777777700      0077777777770",
  1724.     " 0788777888770      0778887778880",
  1725.     " 0788877788870      0788877788880",
  1726.     " 07888877788800    00788777888880",
  1727.     " 008888877788700  007887778888800",
  1728.     "  000000000078700007880000000000 ",
  1729.     "           007880088800          ",
  1730.     "            0088888800           ",
  1731.     "             00888800            ",
  1732.     "            0088888800           ",
  1733.     "           007880088700          ",
  1734.     "  000000000078800008870000000000 ",
  1735.     " 007777777778800  008877777777700",
  1736.     " 07888877788800    00788777888870",
  1737.     " 0788877788870      0788877788880",
  1738.     " 0788777888770      0778887778880",
  1739.     " 0787778887700      0077887777880",
  1740.     " 000000000000        000000000000",
  1741.   },
  1742.   progdor = {
  1743.     "--[[",
  1744.     " PROGDOR file bundling program",
  1745.     "",
  1746.     "Download with:",
  1747.     " pastebin get YXx5jjMV progdor",
  1748.     " std ld progdor progdor",
  1749.     "",
  1750.     "This is a stable release. You fool!",
  1751.     "--]]",
  1752.     "",
  1753.     "local doCompress = false --even if this is false, it will decompress compressed files. nifty, huh?",
  1754.     "",
  1755.     "local tArg = {...}",
  1756.     "local input = tArg[1]",
  1757.     "local outpath = tArg[2]",
  1758.     "",
  1759.     "local progdor = fs.getName(shell.getRunningProgram())",
  1760.     "local dir = shell.dir()",
  1761.     "local displayHelp = function()",
  1762.     "   local txt = progdor..\" <input> [output]\\nCompression is \"..tostring(doCompress):upper()..\".\"",
  1763.     "   return print(txt)",
  1764.     "end",
  1765.     "",
  1766.     "local yield = function()",
  1767.     "   os.queueEvent(\"yield\")",
  1768.     "   os.pullEvent(\"yield\")",
  1769.     "end",
  1770.     "",
  1771.     "-- CCA API START --",
  1772.     "",
  1773.     "local bit = bit32",
  1774.     "--[[",
  1775.     "local function pack(bn1, bn2)",
  1776.     "   bytes = {}",
  1777.     "   bytes[1] = bit.band(bn1, 0xFF)",
  1778.     "   bytes[2] = bit.rshift(bn1, 8) + bit.lshift(bit.band(bn2, 0xF), 4)",
  1779.     "   bytes[3] = bit.rshift(bn2, 4)",
  1780.     "   return bytes[1], bytes[2], bytes[3]",
  1781.     "end",
  1782.     "local function upack(b1, b2, b3)",
  1783.     "   bn1 = b1 + bit.lshift(bit.band(b2, 0xF), 8)",
  1784.     "   bn2 = bit.lshift(b3,4) + bit.band(bit.rshift(b2, 4), 0xF)",
  1785.     "   return bn1, bn2",
  1786.     "end",
  1787.     "--]]",
  1788.     "local function pack(bn1, bn2)",
  1789.     "   return bit.band(bn1, 0xFF), bit.rshift(bn1, 8) + bit.lshift(bit.band(bn2, 0xF), 4), bit.rshift(bn2, 4)",
  1790.     "end",
  1791.     "local function upack(b1, b2, b3)",
  1792.     "   return (b1 + bit.lshift(bit.band(b2, 0xF), 8)), (bit.lshift(b3,4) + bit.band(bit.rshift(b2, 4), 0xF))",
  1793.     "end",
  1794.     "local function createDict(bool)",
  1795.     "   local ret = {}",
  1796.     "   for i = 1, 255 do",
  1797.     "       if bool then",
  1798.     "           ret[string.char(i)] = i",
  1799.     "       else",
  1800.     "           ret[i] = string.char(i)",
  1801.     "       end",
  1802.     "   end",
  1803.     "   if not bool then ret[256] = 256 end",
  1804.     "   return ret",
  1805.     "end",
  1806.     "local function cp(sInput)",
  1807.     "   local dic = createDict(true)",
  1808.     "   local s = \"\"",
  1809.     "   local ch",
  1810.     "   local dlen = 256",
  1811.     "   local result = {}",
  1812.     "   local temp",
  1813.     "   for i = 1, #sInput do",
  1814.     "       if dlen == 4095 then",
  1815.     "           result[#result + 1] = dic[s]",
  1816.     "           result[#result + 1] = 256",
  1817.     "           dic = createDict(true)",
  1818.     "           dlen = 256",
  1819.     "           s = \"\"",
  1820.     "       end",
  1821.     "       ch = sInput:sub(i, i)",
  1822.     "       temp = s..ch",
  1823.     "       if dic[temp] then",
  1824.     "           s = temp",
  1825.     "       else",
  1826.     "           result[#result + 1] = dic[s]",
  1827.     "           dlen = dlen +1",
  1828.     "           dic[temp] = dlen        ",
  1829.     "           s = ch",
  1830.     "       end",
  1831.     "   end",
  1832.     "   result[#result + 1] = dic[s]",
  1833.     "   ",
  1834.     "   return result",
  1835.     "end",
  1836.     "local function dc(data)",
  1837.     "   local dic = createDict(false)   ",
  1838.     "   local entry",
  1839.     "   local ch",
  1840.     "   local currCode",
  1841.     "   local result = {}",
  1842.     "   result[#result + 1] = dic[data[1]]",
  1843.     "   prefix = dic[data[1]]",
  1844.     "   for i = 2, #data do",
  1845.     "       currCode = data[i]",
  1846.     "       if currCode == 256 then",
  1847.     "           dic = createDict(false)",
  1848.     "           prefix = \"\"",
  1849.     "       else",
  1850.     "           entry = dic[currCode]",
  1851.     "           if entry then--exists in dictionary",
  1852.     "               ch = entry:sub(1, 1)        ",
  1853.     "               result[#result + 1] = entry",
  1854.     "               if prefix ~= \"\" then",
  1855.     "                   dic[#dic+1] = prefix .. ch",
  1856.     "               end",
  1857.     "           else    ",
  1858.     "               ch = prefix:sub(1, 1)",
  1859.     "               result[#result + 1] = prefix..ch",
  1860.     "               dic[#dic + 1] = prefix..ch",
  1861.     "           end",
  1862.     "       ",
  1863.     "           prefix = dic[currCode]",
  1864.     "       end",
  1865.     "   end",
  1866.     "   ",
  1867.     "   return table.concat(result)",
  1868.     "end",
  1869.     "local function trim(inp)",
  1870.     "   for i = 0,2 do",
  1871.     "       if inp[#inp] == 0 then",
  1872.     "           inp[#inp] = nil",
  1873.     "       end",
  1874.     "   end",
  1875.     "end",
  1876.     "local function decompress(input)",
  1877.     "   local rec = {}",
  1878.     "   for i = 1, #input, 3 do",
  1879.     "       if i % 66 == 0 then",
  1880.     "           yield()",
  1881.     "       end",
  1882.     "       rec[#rec+1], rec[#rec+2] = upack(input[i], input[i+1] or 0, input[i+2] or 0)",
  1883.     "   end",
  1884.     "   trim(rec)",
  1885.     "   return dc(rec)",
  1886.     "end",
  1887.     "local function compress(input)",
  1888.     "   local rec = {}",
  1889.     "   local data = cp(input)",
  1890.     "   for i=1, #data, 2 do",
  1891.     "       yield()",
  1892.     "       rec[#rec+1], rec[#rec+2], rec[#rec+3] = pack(data[i], data[i+1] or 0)",
  1893.     "   end",
  1894.     "   trim(rec)",
  1895.     "   return rec",
  1896.     "end",
  1897.     "",
  1898.     "-- CCA API END --",
  1899.     "",
  1900.     "local fixstr = function(str)",
  1901.     "   return str:gsub(\"\\\\(%d%d%d)\",string.char)",
  1902.     "end",
  1903.     "",
  1904.     "local explode = function(div,str)",
  1905.     "    if (div=='') then return false end",
  1906.     "    local pos,arr = 0,{}",
  1907.     "    for st,sp in function() return string.find(str,div,pos,true) end do",
  1908.     "        table.insert(arr,str:sub(pos,st-1))",
  1909.     "        pos = sp + 1",
  1910.     "    end",
  1911.     "    table.insert(arr,str:sub(pos))",
  1912.     "    return arr",
  1913.     "end",
  1914.     "local sanitize = function(sani,tize)",
  1915.     "   local _,x = string.find(sani,tize)",
  1916.     "   if x then",
  1917.     "       return sani:sub(x+1)",
  1918.     "   else",
  1919.     "       return sani",
  1920.     "   end",
  1921.     "end",
  1922.     "local tablize = function(input)",
  1923.     "   if type(input) == \"string\" then",
  1924.     "       return explode(\"\\n\",input)",
  1925.     "   elseif type(input) == \"table\" then",
  1926.     "       return table.concat(input,\"\\n\")",
  1927.     "   end",
  1928.     "end",
  1929.     "local compyress = function(input)",
  1930.     "   return string.char(unpack(compress(input)))",
  1931.     "end",
  1932.     "local decompyress = function(input)",
  1933.     "   local out = {}",
  1934.     "   for a = 1, #input do",
  1935.     "       table.insert(out,string.byte(input:sub(a,a)))",
  1936.     "   end",
  1937.     "   return decompress(out)",
  1938.     "end",
  1939.     "local listAll",
  1940.     "listAll = function(_path, _files, noredundant)",
  1941.     "   local path = _path or \"\"",
  1942.     "   local files = _files or {}",
  1943.     "   if #path > 1 then table.insert(files, path) end",
  1944.     "   for _, file in ipairs(fs.list(path)) do",
  1945.     "       local path = fs.combine(path, file)",
  1946.     "       if (file ~= thisProgram) then",
  1947.     "           local guud = true",
  1948.     "           if guud then",
  1949.     "               if fs.isDir(path) then",
  1950.     "                   listAll(path, files, noredundant)",
  1951.     "               else",
  1952.     "                   table.insert(files, path)",
  1953.     "               end",
  1954.     "           end",
  1955.     "       end",
  1956.     "   end",
  1957.     "   if noredundant then",
  1958.     "       for a = 1, #files do",
  1959.     "           if fs.isDir(tostring(files[a])) then",
  1960.     "               if #fs.list(tostring(files[a])) ~= 0 then",
  1961.     "                   table.remove(files,a)",
  1962.     "               end",
  1963.     "           end",
  1964.     "       end",
  1965.     "   end",
  1966.     "   return files",
  1967.     "end",
  1968.     "if not (input) then",
  1969.     "   return displayHelp()",
  1970.     "end",
  1971.     "if not outpath then",
  1972.     "   outpath = input",
  1973.     "end",
  1974.     "",
  1975.     "local choice = function(input,verbose)",
  1976.     "   if not input then",
  1977.     "       input = \"yn\"",
  1978.     "   end",
  1979.     "   if verbose then",
  1980.     "       write(\"[\")",
  1981.     "       for a = 1, #input do",
  1982.     "           write(input:sub(a,a):upper())",
  1983.     "           if a < #input then",
  1984.     "               write(\",\")",
  1985.     "           end",
  1986.     "       end",
  1987.     "       write(\"]?\")",
  1988.     "   end",
  1989.     "   local evt,char",
  1990.     "   repeat",
  1991.     "       evt,char = os.pullEvent(\"char\")",
  1992.     "   until string.find(input:lower(),char:lower())",
  1993.     "   if verbose then",
  1994.     "       print(char:upper())",
  1995.     "   end",
  1996.     "   local pos = string.find(input:lower(),char:lower())",
  1997.     "   return pos, char:lower()",
  1998.     "end",
  1999.     "",
  2000.     "function doPack(input,output,doCompress,verbose) --make sure that shell exists before using verbose mode",
  2001.     "   local tx = term.getTextColor()",
  2002.     "   if not fs.exists(input) then return 3 end",
  2003.     "   if fs.isReadOnly(output) then return 5 end",
  2004.     "   local packageSelf = true",
  2005.     "   local packageReadOnly = true",
  2006.     "   local ro_asked = false",
  2007.     "   local ps_asked = false",
  2008.     "   if fs.isDir(input) then",
  2009.     "       local out = {}",
  2010.     "       local list = listAll(input,nil,true)",
  2011.     "       if verbose then",
  2012.     "           for a = 1, #list do --this checks for self and read-only files",
  2013.     "               if fs.isReadOnly(list[a]) and (not ro_asked) then",
  2014.     "                   write(\"Include read-only files? \")",
  2015.     "                   if choice(\"yn\",true) == 2 then",
  2016.     "                       packageReadOnly = false",
  2017.     "                   end",
  2018.     "                   ro_asked = true",
  2019.     "               end",
  2020.     "               if fs.combine(\"\",list[a]) == shell.getRunningProgram() and (not ps_asked) then",
  2021.     "                   write(\"Include self? \")",
  2022.     "                   if choice(\"yn\",true) == 2 then",
  2023.     "                       packageSelf = false",
  2024.     "                   end",
  2025.     "                   ps_asked = true",
  2026.     "               end",
  2027.     "           end",
  2028.     "       end",
  2029.     "       for a = 1, #list do --this loop gets shit done",
  2030.     "           local is_self = fs.combine(\"\",list[a]) == fs.combine(\"\",shell.getRunningProgram())",
  2031.     "           if not ((is_self and not packageSelf) or (fs.isReadOnly(list[a]) and not packageReadOnly)) then",
  2032.     "               if verbose then",
  2033.     "                   write(\"[\")",
  2034.     "                   if term.isColor() then term.setTextColor(colors.lightGray) end",
  2035.     "                   write(sanitize(list[a],fs.combine(dir,input)))",
  2036.     "                   term.setTextColor(tx)",
  2037.     "                   write(\"]\")",
  2038.     "               end",
  2039.     "               if fs.isDir(list[a]) then",
  2040.     "                   out[sanitize(list[a],fs.combine(dir,input))] = true",
  2041.     "               else",
  2042.     "                   local file = fs.open(list[a],\"r\")",
  2043.     "                   local cont = file.readAll()",
  2044.     "                   file.close()",
  2045.     "                   if doCompress then",
  2046.     "                       out[sanitize(list[a],fs.combine(dir,input))] = tablize(compyress(cont))",
  2047.     "                   else",
  2048.     "                       out[sanitize(list[a],fs.combine(dir,input))] = tablize(cont)",
  2049.     "                   end",
  2050.     "               end",
  2051.     "               local tx = term.getTextColor()",
  2052.     "               if fs.getName(list[a]):lower() == \"peasant\" then",
  2053.     "                   if term.isColor() then",
  2054.     "                       term.setTextColor(colors.orange)",
  2055.     "                   end",
  2056.     "                   print(\" BURNINATED\")",
  2057.     "               else",
  2058.     "                   if term.isColor() then",
  2059.     "                       term.setTextColor(colors.green)",
  2060.     "                   end",
  2061.     "                   print(\" GOOD\")",
  2062.     "               end",
  2063.     "               term.setTextColor(tx)",
  2064.     "           else",
  2065.     "               if fs.getName(list[a]):lower() == \"peasant\" then",
  2066.     "                   print(\"Spared \"..list[a])",
  2067.     "               else",
  2068.     "                   print(\"Skipped \"..list[a])",
  2069.     "               end",
  2070.     "           end",
  2071.     "       end",
  2072.     "       if fs.isDir(output) then fs.delete(output) end",
  2073.     "       local file = fs.open(output,\"w\")",
  2074.     "       file.writeLine(doCompress)",
  2075.     "       file.write(fixstr(textutils.serialize(out)))",
  2076.     "       file.close()",
  2077.     "       return 1",
  2078.     "   else",
  2079.     "       local file = fs.open(input,\"r\")",
  2080.     "       local isCompy = file.readLine()",
  2081.     "       local list = file.readAll()",
  2082.     "       file.close()",
  2083.     "       local list = textutils.unserialize(list)",
  2084.     "       if type(list) ~= \"table\" then",
  2085.     "           return 4",
  2086.     "       end",
  2087.     "       if fs.exists(output) then",
  2088.     "           fs.delete(output)",
  2089.     "       end",
  2090.     "       local amnt = 0",
  2091.     "       for k,v in pairs(list) do",
  2092.     "           amnt = amnt + 1",
  2093.     "       end",
  2094.     "       local num = 0",
  2095.     "       for k,v in pairs(list) do",
  2096.     "           num = num + 1",
  2097.     "           if v == true then",
  2098.     "               fs.makeDir(fs.combine(output,fs.combine(k,dir)))",
  2099.     "           else",
  2100.     "               local file = fs.open(fs.combine(output,fs.combine(k,dir)),\"w\")",
  2101.     "               if verbose then",
  2102.     "                   write(\"[\")",
  2103.     "                   if term.isColor() then term.setTextColor(colors.lightGray) end",
  2104.     "                   write(k)",
  2105.     "                   term.setTextColor(tx)",
  2106.     "                   write(\"]\")",
  2107.     "               end",
  2108.     "               if isCompy:gsub(\" \",\"\") == \"true\" then",
  2109.     "                   file.write(decompyress(tablize(v)))",
  2110.     "               else",
  2111.     "                   file.write(tablize(v))",
  2112.     "               end",
  2113.     "               file.close()",
  2114.     "               local tx = term.getTextColor()",
  2115.     "               if fs.getName(k):lower() == \"peasant\" then",
  2116.     "                   if term.isColor() then",
  2117.     "                       term.setTextColor(colors.orange)",
  2118.     "                   end",
  2119.     "                   print(\" UNBURNINATED\")",
  2120.     "               else",
  2121.     "                   if term.isColor() then",
  2122.     "                       term.setTextColor(colors.green)",
  2123.     "                   end",
  2124.     "                   print(\" GOOD\")",
  2125.     "               end",
  2126.     "               term.setTextColor(tx)",
  2127.     "           end",
  2128.     "       end",
  2129.     "       return 2",
  2130.     "   end",
  2131.     "end",
  2132.     "",
  2133.     "local success, res = pcall( function() return doPack(input,outpath,doCompress,true) end ) --functionized it!",
  2134.     "",
  2135.     "if not success then",
  2136.     "   term.setTextColor(colors.white)",
  2137.     "   print(\"\\n***Something went wrong!***\")",
  2138.     "   return printError(res)",
  2139.     "end",
  2140.     "",
  2141.     "if res then",
  2142.     "   local msgs = {",
  2143.     "       [1] = \"Successfully packed '\"..input..\"/' as '\"..outpath..\"'\",",
  2144.     "       [2] = \"Successfully unpacked '\"..input..\"' to '\"..outpath..\"/'\",",
  2145.     "       [3] = \"That file/folder does not exist.\",",
  2146.     "       [4] = \"That file isn't a packed folder.\",",
  2147.     "       [5] = \"You don't have permission.\",",
  2148.     "   }",
  2149.     "   print(msgs[res])",
  2150.     "end",
  2151.   },
  2152.   test = {
  2153.     "local mon = peripheral.find(\"monitor\")",
  2154.     "term.redirect(mon)",
  2155.     "os.loadAPI(\"pain\")",
  2156.     "shell.run(\"render\")",
  2157.     "term.setBackgroundColor(colors.black)",
  2158.     "term.clear()",
  2159.     "local space = 2",
  2160.     "local dif = 0.4",
  2161.     "function ion(txt)",
  2162.     "  term.native().setCursorPos(1,2)",
  2163.     "  term.native().write(txt..\"  \")",
  2164.     "end",
  2165.     "--pain.renderPAINFS(\"BETA\",2,4)",
  2166.     "local reverse = false",
  2167.     "while true do",
  2168.     "  _G.render(1,space,reverse)",
  2169.     "  if (math.abs(space) >= 3) or (space <= 0.2) then",
  2170.     "    dif = dif*-1",
  2171.     "    --if space <= 1 then reverse = not reverse end",
  2172.     "    reverse = not reverse",
  2173.     "  end",
  2174.     "  space = space + dif",
  2175.     "  ion(space..\"/\"..dif)",
  2176.     "  sleep(0.2)",
  2177.     "end",
  2178.   },
  2179. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement