wryl revised this gist . Go to revision
1 file changed, 1 deletion
pen.nv
@@ -59,7 +59,6 @@ | |||
59 | 59 | |@pen-turn-right, @pen-direction-left | @pen-direction-up | |
60 | 60 | |@pen-turn-right, @pen-direction-right| @pen-direction-down | |
61 | 61 | ||
62 | - | |@pen-lift, @pen-draw| | |
63 | 62 | |@pixel-x = @pen-x, @pen-x | @pen-x-temp, | |
64 | 63 | @pixel-x, | |
65 | 64 | @pixel-x = @pen-x |
wryl revised this gist . Go to revision
1 file changed, 183 insertions
pen.nv(file created)
@@ -0,0 +1,183 @@ | |||
1 | + | |#| start exhaustive | |
2 | + | |u | up | |
3 | + | |d | down | |
4 | + | |l | left | |
5 | + | |r | right | |
6 | + | |f | forward | |
7 | + | |tl | turn left | |
8 | + | |tr | turn right | |
9 | + | |uu | u,u | |
10 | + | |dd | d,d | |
11 | + | |ll | l,l | |
12 | + | |rr | r,r | |
13 | + | |ff | f,f | |
14 | + | |tll | tl,tl | |
15 | + | |trr | tr,tr | |
16 | + | |uuu | uu,u | |
17 | + | |ddd | dd,d | |
18 | + | |lll | ll,l | |
19 | + | |rrr | rr,r | |
20 | + | |fff | ff,f | |
21 | + | |tlll | tll,tl | |
22 | + | |trrr | trr,tr | |
23 | + | |uuuu | uu,uu | |
24 | + | |dddd | dd,dd | |
25 | + | |llll | ll,ll | |
26 | + | |rrrr | rr,rr | |
27 | + | |ffff | ff,ff | |
28 | + | |tllll | tll,tll | |
29 | + | |trrrr | trr,trr | |
30 | + | |up | @pen-up | |
31 | + | |down | @pen-down | |
32 | + | |left | @pen-left | |
33 | + | |right | @pen-right | |
34 | + | |forward | @pen-forward | |
35 | + | |turn left | @pen-turn-left | |
36 | + | |turn right| @pen-turn-right | |
37 | + | |pen down | @pen-start | |
38 | + | |pen up | @pen-stop | |
39 | + | |#| end exhaustive | |
40 | + | ||
41 | + | |#| start exhaustive | |
42 | + | |@pen-start| @pen-draw | |
43 | + | |@pen-stop, @pen-draw| | |
44 | + | |@pen-stop| | |
45 | + | ||
46 | + | ||@pen-direction-right | |
47 | + | |@pen-forward, @pen-direction-up | @pen-up, @pen-direction-up | |
48 | + | |@pen-forward, @pen-direction-down | @pen-down, @pen-direction-down | |
49 | + | |@pen-forward, @pen-direction-left | @pen-left, @pen-direction-left | |
50 | + | |@pen-forward, @pen-direction-right| @pen-right, @pen-direction-right | |
51 | + | ||
52 | + | |@pen-turn-left, @pen-direction-up | @pen-direction-left | |
53 | + | |@pen-turn-left, @pen-direction-down | @pen-direction-right | |
54 | + | |@pen-turn-left, @pen-direction-left | @pen-direction-down | |
55 | + | |@pen-turn-left, @pen-direction-right| @pen-direction-up | |
56 | + | ||
57 | + | |@pen-turn-right, @pen-direction-up | @pen-direction-right | |
58 | + | |@pen-turn-right, @pen-direction-down | @pen-direction-left | |
59 | + | |@pen-turn-right, @pen-direction-left | @pen-direction-up | |
60 | + | |@pen-turn-right, @pen-direction-right| @pen-direction-down | |
61 | + | ||
62 | + | |@pen-lift, @pen-draw| | |
63 | + | |@pixel-x = @pen-x, @pen-x | @pen-x-temp, | |
64 | + | @pixel-x, | |
65 | + | @pixel-x = @pen-x | |
66 | + | |@pixel-x = @pen-x | @pen-x <- @pen-x-temp | |
67 | + | |@pen-x <- @pen-x-temp, @pen-x-temp | @pen-x, @pen-x <- @pen-x-temp | |
68 | + | |@pen-x <- @pen-x-temp | | |
69 | + | ||
70 | + | |@pixel-y = @pen-y, @pen-y | @pen-y-temp, | |
71 | + | @pixel-y, | |
72 | + | @pixel-y = @pen-y | |
73 | + | |@pixel-y = @pen-y | @pen-y <- @pen-y-temp | |
74 | + | |@pen-y <- @pen-y-temp, @pen-y-temp | @pen-y, @pen-y <- @pen-y-temp | |
75 | + | |@pen-y <- @pen-y-temp | | |
76 | + | ||
77 | + | |@pen-x++| @pen-x | |
78 | + | |@pen-x--, @pen-x| | |
79 | + | |@pen-x--| | |
80 | + | ||
81 | + | |@pen-y++| @pen-y | |
82 | + | |@pen-y--, @pen-y| | |
83 | + | |@pen-y--| | |
84 | + | |#| end exhaustive | |
85 | + | ||
86 | + | |@trigger-set-pixel| @set-pixel | |
87 | + | ||
88 | + | |@pen-left, @pen-draw| | |
89 | + | @pixel-x = @pen-x, | |
90 | + | @pixel-y = @pen-y, | |
91 | + | @pen-draw, | |
92 | + | @trigger-set-pixel, | |
93 | + | @pen-x-- | |
94 | + | ||
95 | + | |@pen-left| | |
96 | + | @pen-x-- | |
97 | + | ||
98 | + | |@pen-right, @pen-draw| | |
99 | + | @pixel-x = @pen-x, | |
100 | + | @pixel-y = @pen-y, | |
101 | + | @pen-draw, | |
102 | + | @trigger-set-pixel, | |
103 | + | @pen-x++ | |
104 | + | ||
105 | + | |@pen-right| | |
106 | + | @pen-x++ | |
107 | + | ||
108 | + | |@pen-up, @pen-draw| | |
109 | + | @pixel-x = @pen-x, | |
110 | + | @pixel-y = @pen-y, | |
111 | + | @pen-draw, | |
112 | + | @trigger-set-pixel, | |
113 | + | @pen-y-- | |
114 | + | ||
115 | + | |@pen-up| | |
116 | + | @pen-y-- | |
117 | + | ||
118 | + | |@pen-down, @pen-draw| | |
119 | + | @pixel-x = @pen-x, | |
120 | + | @pixel-y = @pen-y, | |
121 | + | @pen-draw, | |
122 | + | @trigger-set-pixel, | |
123 | + | @pen-y++ | |
124 | + | ||
125 | + | |@pen-down| | |
126 | + | @pen-y++ | |
127 | + | ||
128 | + | |H|H1 | |
129 | + | |H1|H2, | |
130 | + | pen down, | |
131 | + | dddd,dddd,dddd,dddd, | |
132 | + | dddd,dddd,dddd,dddd | |
133 | + | |H2|H3, | |
134 | + | pen up, | |
135 | + | uuuu,uuuu, | |
136 | + | uuuu,uuuu | |
137 | + | |H3|H4, | |
138 | + | pen down, | |
139 | + | rrrr, | |
140 | + | rrrr | |
141 | + | |H4|H5, | |
142 | + | uuuu,uuuu, | |
143 | + | uuuu,uuuu | |
144 | + | |H5|H6, | |
145 | + | dddd,dddd,dddd,dddd, | |
146 | + | dddd,dddd,dddd,dddd | |
147 | + | |H6| | |
148 | + | pen up, | |
149 | + | uuuu,uuuu,uuuu,uuuu, | |
150 | + | uuuu,uuuu,uuuu,uuuu, | |
151 | + | rrrr | |
152 | + | |i|i1 | |
153 | + | |i1|i2, | |
154 | + | pen up, | |
155 | + | dddd,dddd,dddd,dddd, | |
156 | + | dddd,dddd,dddd,ddd | |
157 | + | |i2|i3, | |
158 | + | pen down, | |
159 | + | uuuu,uuuu,uuuu,uuu | |
160 | + | |i3|i4, | |
161 | + | pen up, | |
162 | + | uuuu,uuuu | |
163 | + | |i4|i5, | |
164 | + | pen down, | |
165 | + | uuuu,uuuu | |
166 | + | |i5| | |
167 | + | pen up, | |
168 | + | llll,llll,llll | |
169 | + | ||
170 | + | || start | |
171 | + | |start| | |
172 | + | pen up, | |
173 | + | rrrr,rrrr,rrrr,rrrr, | |
174 | + | dddd,dddd,dddd,dddd, | |
175 | + | main | |
176 | + | |main| | |
177 | + | draw a frame, | |
178 | + | loop | |
179 | + | |draw a frame| Hi | |
180 | + | |Hi| H,i | |
181 | + | |display| @display | |
182 | + | |loop, @quit| | |
183 | + | |loop| main |
Newer
Older