wryl 已修改 1 year ago. 還原成這個修訂版本
1 file changed, 0 insertions, 0 deletions
Drawing A Box 重命名為 pen-box.nv
檔案名稱與重新命名前相同
wryl 已修改 1 year ago. 還原成這個修訂版本
1 file changed, 4 insertions, 21 deletions
Drawing A Box
| @@ -78,8 +78,7 @@ | |||
| 78 | 78 | |@pen-y <- @pen-y-temp, @pen-y-temp | @pen-y, @pen-y <- @pen-y-temp | |
| 79 | 79 | |@pen-y <- @pen-y-temp | | |
| 80 | 80 | ||
| 81 | - | |@trigger-set-pixel| @pixel-r += 255, @pixel-g += 255, @pixel-b += 255, set pixel | |
| 82 | - | |set pixel| @set-pixel | |
| 81 | + | |@trigger-set-pixel| @set-pixel | |
| 83 | 82 | ||
| 84 | 83 | |@pen-x++| @pen-x | |
| 85 | 84 | |@pen-x--, @pen-x| | |
| @@ -134,32 +133,16 @@ | |||
| 134 | 133 | ||
| 135 | 134 | || start | |
| 136 | 135 | |start| | |
| 137 | - | set up the screen, | |
| 138 | 136 | pen up, | |
| 139 | 137 | rrrr,rrrr,rrrr,rrrr, | |
| 140 | 138 | dddd,dddd,dddd,dddd, | |
| 141 | 139 | main | |
| 142 | - | |set up the screen| | |
| 143 | - | @resolution-x += 255, | |
| 144 | - | @resolution-x += 255, | |
| 145 | - | @resolution-y += 255, | |
| 146 | - | @resolution-y += 255, | |
| 147 | - | set the screen resolution | |
| 148 | - | |set the screen resolution| @set-resolution | |
| 149 | 140 | |main| | |
| 150 | - | poll for input, | |
| 151 | - | clear the screen, | |
| 152 | 141 | draw a frame, | |
| 153 | - | display, | |
| 154 | - | loop | |
| 155 | - | |poll for input| @poll-input | |
| 156 | - | |clear the screen| @clear-screen | |
| 142 | + | display | |
| 157 | 143 | |draw a frame|1 | |
| 158 | 144 | |1|2, pen down, rrrr, rrrr, rrrr, rrrr | |
| 159 | 145 | |2|3, dddd, dddd, dddd, dddd | |
| 160 | 146 | |3|4, llll, llll, llll, llll | |
| 161 | - | |4|5, uuuu, uuuu, uuuu, uuuu | |
| 162 | - | |5| , pen up, r, d | |
| 163 | - | |display| @display | |
| 164 | - | |loop, @quit| | |
| 165 | - | |loop| main | |
| 147 | + | |4| uuuu, uuuu, uuuu, uuuu | |
| 148 | + | |display| @display | |
wryl 已修改 1 year ago. 還原成這個修訂版本
1 file changed, 4 insertions, 8 deletions
Drawing A Box
| @@ -59,14 +59,10 @@ | |||
| 59 | 59 | |@pen-lift, @pen-draw| @pen-lift | |
| 60 | 60 | |@pen-lift| | |
| 61 | 61 | ||
| 62 | - | |#| constant, @pixel-x = @pen-x, 18446744073709551615 | |
| 63 | - | |#| constant, @pixel-y = @pen-y, 18446744073709551615 | |
| 64 | - | |#| constant, @pen-x <- @pen-x-temp, 18446744073709551615 | |
| 65 | - | |#| constant, @pen-y <- @pen-y-temp, 18446744073709551615 | |
| 66 | - | |@pixel-x = @pen-x:max| @pixel-x = @pen-x:18446744073709551615 | |
| 67 | - | |@pixel-y = @pen-y:max| @pixel-y = @pen-y:18446744073709551615 | |
| 68 | - | |@pen-x <- @pen-x-temp:max| @pen-x <- @pen-x-temp:18446744073709551615 | |
| 69 | - | |@pen-y <- @pen-y-temp:max| @pen-y <- @pen-y-temp:18446744073709551615 | |
| 62 | + | |@pixel-x = @pen-x:max| @pixel-x = @pen-x:4294967295 | |
| 63 | + | |@pixel-y = @pen-y:max| @pixel-y = @pen-y:4294967295 | |
| 64 | + | |@pen-x <- @pen-x-temp:max| @pen-x <- @pen-x-temp:4294967295 | |
| 65 | + | |@pen-y <- @pen-y-temp:max| @pen-y <- @pen-y-temp:4294967295 | |
| 70 | 66 | ||
| 71 | 67 | |@pixel-x = @pen-x, @pen-x | @pen-x-temp, | |
| 72 | 68 | @pixel-x, | |
wryl 已修改 1 year ago. 還原成這個修訂版本
1 file changed, 169 insertions
Drawing A Box (檔案已創建)
| @@ -0,0 +1,169 @@ | |||
| 1 | + | |u | up | |
| 2 | + | |d | down | |
| 3 | + | |l | left | |
| 4 | + | |r | right | |
| 5 | + | |f | forward | |
| 6 | + | |tl | turn left | |
| 7 | + | |tr | turn right | |
| 8 | + | |uu | u,u | |
| 9 | + | |dd | d,d | |
| 10 | + | |ll | l,l | |
| 11 | + | |rr | r,r | |
| 12 | + | |ff | f,f | |
| 13 | + | |tll | tl,tl | |
| 14 | + | |trr | tr,tr | |
| 15 | + | |uuu | uu,u | |
| 16 | + | |ddd | dd,d | |
| 17 | + | |lll | ll,l | |
| 18 | + | |rrr | rr,r | |
| 19 | + | |fff | ff,f | |
| 20 | + | |tlll | tll,tl | |
| 21 | + | |trrr | trr,tr | |
| 22 | + | |uuuu | uu,uu | |
| 23 | + | |dddd | dd,dd | |
| 24 | + | |llll | ll,ll | |
| 25 | + | |rrrr | rr,rr | |
| 26 | + | |ffff | ff,ff | |
| 27 | + | |tllll | tll,tll | |
| 28 | + | |trrrr | trr,trr | |
| 29 | + | |up | @pen-up | |
| 30 | + | |down | @pen-down | |
| 31 | + | |left | @pen-left | |
| 32 | + | |right | @pen-right | |
| 33 | + | |forward | @pen-forward | |
| 34 | + | |turn left | @pen-turn-left | |
| 35 | + | |turn right| @pen-turn-right | |
| 36 | + | |pen down | @pen-start | |
| 37 | + | |pen up | @pen-stop | |
| 38 | + | ||
| 39 | + | |@pen-start| @pen-draw | |
| 40 | + | |@pen-stop, @pen-draw| @pen-stop | |
| 41 | + | |@pen-stop| | |
| 42 | + | ||
| 43 | + | ||@pen-direction-right | |
| 44 | + | |@pen-forward, @pen-direction-up | @pen-up, @pen-direction-up | |
| 45 | + | |@pen-forward, @pen-direction-down | @pen-down, @pen-direction-down | |
| 46 | + | |@pen-forward, @pen-direction-left | @pen-left, @pen-direction-left | |
| 47 | + | |@pen-forward, @pen-direction-right| @pen-right, @pen-direction-right | |
| 48 | + | ||
| 49 | + | |@pen-turn-left, @pen-direction-up | @pen-direction-left | |
| 50 | + | |@pen-turn-left, @pen-direction-down | @pen-direction-right | |
| 51 | + | |@pen-turn-left, @pen-direction-left | @pen-direction-down | |
| 52 | + | |@pen-turn-left, @pen-direction-right| @pen-direction-up | |
| 53 | + | ||
| 54 | + | |@pen-turn-right, @pen-direction-up | @pen-direction-right | |
| 55 | + | |@pen-turn-right, @pen-direction-down | @pen-direction-left | |
| 56 | + | |@pen-turn-right, @pen-direction-left | @pen-direction-up | |
| 57 | + | |@pen-turn-right, @pen-direction-right| @pen-direction-down | |
| 58 | + | ||
| 59 | + | |@pen-lift, @pen-draw| @pen-lift | |
| 60 | + | |@pen-lift| | |
| 61 | + | ||
| 62 | + | |#| constant, @pixel-x = @pen-x, 18446744073709551615 | |
| 63 | + | |#| constant, @pixel-y = @pen-y, 18446744073709551615 | |
| 64 | + | |#| constant, @pen-x <- @pen-x-temp, 18446744073709551615 | |
| 65 | + | |#| constant, @pen-y <- @pen-y-temp, 18446744073709551615 | |
| 66 | + | |@pixel-x = @pen-x:max| @pixel-x = @pen-x:18446744073709551615 | |
| 67 | + | |@pixel-y = @pen-y:max| @pixel-y = @pen-y:18446744073709551615 | |
| 68 | + | |@pen-x <- @pen-x-temp:max| @pen-x <- @pen-x-temp:18446744073709551615 | |
| 69 | + | |@pen-y <- @pen-y-temp:max| @pen-y <- @pen-y-temp:18446744073709551615 | |
| 70 | + | ||
| 71 | + | |@pixel-x = @pen-x, @pen-x | @pen-x-temp, | |
| 72 | + | @pixel-x, | |
| 73 | + | @pixel-x = @pen-x | |
| 74 | + | |@pixel-x = @pen-x | @pen-x <- @pen-x-temp | |
| 75 | + | |@pen-x <- @pen-x-temp, @pen-x-temp | @pen-x, @pen-x <- @pen-x-temp | |
| 76 | + | |@pen-x <- @pen-x-temp | | |
| 77 | + | ||
| 78 | + | |@pixel-y = @pen-y, @pen-y | @pen-y-temp, | |
| 79 | + | @pixel-y, | |
| 80 | + | @pixel-y = @pen-y | |
| 81 | + | |@pixel-y = @pen-y | @pen-y <- @pen-y-temp | |
| 82 | + | |@pen-y <- @pen-y-temp, @pen-y-temp | @pen-y, @pen-y <- @pen-y-temp | |
| 83 | + | |@pen-y <- @pen-y-temp | | |
| 84 | + | ||
| 85 | + | |@trigger-set-pixel| @pixel-r += 255, @pixel-g += 255, @pixel-b += 255, set pixel | |
| 86 | + | |set pixel| @set-pixel | |
| 87 | + | ||
| 88 | + | |@pen-x++| @pen-x | |
| 89 | + | |@pen-x--, @pen-x| | |
| 90 | + | |@pen-x--| | |
| 91 | + | ||
| 92 | + | |@pen-y++| @pen-y | |
| 93 | + | |@pen-y--, @pen-y| | |
| 94 | + | |@pen-y--| | |
| 95 | + | ||
| 96 | + | |@pen-left, @pen-draw| | |
| 97 | + | @pixel-x = @pen-x:max, | |
| 98 | + | @pixel-y = @pen-y:max, | |
| 99 | + | @pen-draw, | |
| 100 | + | @trigger-set-pixel, | |
| 101 | + | @pen-x-- | |
| 102 | + | ||
| 103 | + | |@pen-left| | |
| 104 | + | @pen-x-- | |
| 105 | + | ||
| 106 | + | |@pen-right, @pen-draw| | |
| 107 | + | @pixel-x = @pen-x:max, | |
| 108 | + | @pixel-y = @pen-y:max, | |
| 109 | + | @pen-draw, | |
| 110 | + | @trigger-set-pixel, | |
| 111 | + | @pen-x++ | |
| 112 | + | ||
| 113 | + | |@pen-right| | |
| 114 | + | @pen-x++ | |
| 115 | + | ||
| 116 | + | |@pen-up, @pen-draw| | |
| 117 | + | @pixel-x = @pen-x:max, | |
| 118 | + | @pixel-y = @pen-y:max, | |
| 119 | + | @pen-draw, | |
| 120 | + | @trigger-set-pixel, | |
| 121 | + | @pen-y-- | |
| 122 | + | ||
| 123 | + | |@pen-up| | |
| 124 | + | @pen-y-- | |
| 125 | + | ||
| 126 | + | |@pen-down, @pen-draw| | |
| 127 | + | @pixel-x = @pen-x:max, | |
| 128 | + | @pixel-y = @pen-y:max, | |
| 129 | + | @pen-draw, | |
| 130 | + | @trigger-set-pixel, | |
| 131 | + | @pen-y++ | |
| 132 | + | ||
| 133 | + | |@pen-down| | |
| 134 | + | @pen-y++ | |
| 135 | + | ||
| 136 | + | ||
| 137 | + | ||
| 138 | + | ||
| 139 | + | || start | |
| 140 | + | |start| | |
| 141 | + | set up the screen, | |
| 142 | + | pen up, | |
| 143 | + | rrrr,rrrr,rrrr,rrrr, | |
| 144 | + | dddd,dddd,dddd,dddd, | |
| 145 | + | main | |
| 146 | + | |set up the screen| | |
| 147 | + | @resolution-x += 255, | |
| 148 | + | @resolution-x += 255, | |
| 149 | + | @resolution-y += 255, | |
| 150 | + | @resolution-y += 255, | |
| 151 | + | set the screen resolution | |
| 152 | + | |set the screen resolution| @set-resolution | |
| 153 | + | |main| | |
| 154 | + | poll for input, | |
| 155 | + | clear the screen, | |
| 156 | + | draw a frame, | |
| 157 | + | display, | |
| 158 | + | loop | |
| 159 | + | |poll for input| @poll-input | |
| 160 | + | |clear the screen| @clear-screen | |
| 161 | + | |draw a frame|1 | |
| 162 | + | |1|2, pen down, rrrr, rrrr, rrrr, rrrr | |
| 163 | + | |2|3, dddd, dddd, dddd, dddd | |
| 164 | + | |3|4, llll, llll, llll, llll | |
| 165 | + | |4|5, uuuu, uuuu, uuuu, uuuu | |
| 166 | + | |5| , pen up, r, d | |
| 167 | + | |display| @display | |
| 168 | + | |loop, @quit| | |
| 169 | + | |loop| main | |