SHOW:
|
|
- or go back to the newest paste.
1 | - | x=4 |
1 | + | p=peripheral.wrap("top") |
2 | - | br=0.5 |
2 | + | args={...} |
3 | - | file="bild" |
3 | + | file=args[1] |
4 | color={} | |
5 | color[" "]=14 | |
6 | color["0"]=14 | |
7 | color["1"]=15 | |
8 | color["2"]=16 | |
9 | color["3"]=17 | |
10 | color["4"]=18 | |
11 | color["5"]=19 | |
12 | color["6"]=20 | |
13 | color["7"]=21 | |
14 | color["8"]=22 | |
15 | color["9"]=23 | |
16 | color["a"]=24 | |
17 | color["b"]=25 | |
18 | color["c"]=26 | |
19 | color["d"]=27 | |
20 | color["e"]=28 | |
21 | color["f"]=29 | |
22 | - | fp=fs.open("eevee","r") |
22 | + | fp=fs.open(file,"r") |
23 | img=fp.readAll() | |
24 | - | p=peripheral.wrap("openblocks_projector_0") |
24 | + | |
25 | for x=0,63 do | |
26 | for z=0,63 do | |
27 | tint=color[string.sub(img,i,i)] | |
28 | if tint~=nil then | |
29 | p.setPoint(x,z,1,254-x,tint) | |
30 | p.setPoint(x,z,0,255-x,tint) | |
31 | else | |
32 | p.setPoint(x,z,1,255,tint) | |
33 | end | |
34 | i=i+1 | |
35 | end | |
36 | end |