gistfile1.txt
· 1.5 KiB · Text
Raw
Playground
|------------------------------------------------------|
|#| constant, @resolution-x, 400
|#| constant, @resolution-y, 400
||window, @resolution-x:400, @resolution-y:400, display
|window| @set-resolution
|#| constant, Loop x, 400
|#| constant, Loop y, 400
|#| constant, x->p, 400
|#| constant, y->p, 400
|#| constant, x->x1, 400
|#| constant, y->x1, 400
|#| constant, xss, 200
|#| constant, yss, 200
|#| constant, ox, 200
|#| constant, oy, 200
|#| constant, sx, 2
|#| constant, sy, 2
|------------------------------------------------------|
|| Loop y:400, Perform y transfer, Perform x transfer
|Perform y transfer, x| Perform y transfer
|Loop y, Perform y transfer|
, Loop x:400
, Increment y
|Loop x, Perform x transfer|
, x->p:400
, y->p:400
, Set the color
|x->p,x|@pixel-x,~x
|x->p|
|Set the color,~x|Set the color,x
|y->p,y|@pixel-y,~y
|y->p|
|Set the color,~y|Set the color,y
|Set the color|
, x->x1:400
, y->y1:400
, t1
, xss:200
, yss:200
, ox:200
, oy:200
, Square ox
, Square oy
, Set the pixel
|x->x1,x|x1,mx,~x
|x->x1|
|t1,~x|t1,x
|y->y1,y|y1,my,~y
|y->y1|
|t1,~y|t1,y
|t1|
|xss,mx|
|xss|
|mx|sx:2
|x1,sx|
|sx|
|yss,my|
|yss|
|my|sy:2
|y1,sy|
|sy|
|ox,x1|
|oy,y1|
|ox|@pixel-r
|oy|@pixel-g
|Set the pixel|
, @set-pixel
, Increment x
|Increment x|
, x
, Perform x transfer
|Increment y|
, y
, Perform y transfer
|------------------------------------------------------|
|display| @display, loop
|loop, @quit|
|loop| loop, @poll-input
|------------------------------------------------------|
| 1 | |------------------------------------------------------| |
| 2 | |#| constant, @resolution-x, 400 |
| 3 | |#| constant, @resolution-y, 400 |
| 4 | ||window, @resolution-x:400, @resolution-y:400, display |
| 5 | |window| @set-resolution |
| 6 | |
| 7 | |#| constant, Loop x, 400 |
| 8 | |#| constant, Loop y, 400 |
| 9 | |#| constant, x->p, 400 |
| 10 | |#| constant, y->p, 400 |
| 11 | |#| constant, x->x1, 400 |
| 12 | |#| constant, y->x1, 400 |
| 13 | |#| constant, xss, 200 |
| 14 | |#| constant, yss, 200 |
| 15 | |#| constant, ox, 200 |
| 16 | |#| constant, oy, 200 |
| 17 | |#| constant, sx, 2 |
| 18 | |#| constant, sy, 2 |
| 19 | |------------------------------------------------------| |
| 20 | |
| 21 | || Loop y:400, Perform y transfer, Perform x transfer |
| 22 | |
| 23 | |Perform y transfer, x| Perform y transfer |
| 24 | |
| 25 | |Loop y, Perform y transfer| |
| 26 | , Loop x:400 |
| 27 | , Increment y |
| 28 | |
| 29 | |Loop x, Perform x transfer| |
| 30 | , x->p:400 |
| 31 | , y->p:400 |
| 32 | , Set the color |
| 33 | |
| 34 | |x->p,x|@pixel-x,~x |
| 35 | |x->p| |
| 36 | |Set the color,~x|Set the color,x |
| 37 | |
| 38 | |y->p,y|@pixel-y,~y |
| 39 | |y->p| |
| 40 | |Set the color,~y|Set the color,y |
| 41 | |
| 42 | |Set the color| |
| 43 | , x->x1:400 |
| 44 | , y->y1:400 |
| 45 | , t1 |
| 46 | , xss:200 |
| 47 | , yss:200 |
| 48 | , ox:200 |
| 49 | , oy:200 |
| 50 | , Square ox |
| 51 | , Square oy |
| 52 | , Set the pixel |
| 53 | |
| 54 | |x->x1,x|x1,mx,~x |
| 55 | |x->x1| |
| 56 | |t1,~x|t1,x |
| 57 | |y->y1,y|y1,my,~y |
| 58 | |y->y1| |
| 59 | |t1,~y|t1,y |
| 60 | |t1| |
| 61 | |xss,mx| |
| 62 | |xss| |
| 63 | |mx|sx:2 |
| 64 | |x1,sx| |
| 65 | |sx| |
| 66 | |yss,my| |
| 67 | |yss| |
| 68 | |my|sy:2 |
| 69 | |y1,sy| |
| 70 | |sy| |
| 71 | |ox,x1| |
| 72 | |oy,y1| |
| 73 | |
| 74 | |ox|@pixel-r |
| 75 | |oy|@pixel-g |
| 76 | |
| 77 | |Set the pixel| |
| 78 | , @set-pixel |
| 79 | , Increment x |
| 80 | |
| 81 | |Increment x| |
| 82 | , x |
| 83 | , Perform x transfer |
| 84 | |
| 85 | |Increment y| |
| 86 | , y |
| 87 | , Perform y transfer |
| 88 | |
| 89 | |------------------------------------------------------| |
| 90 | |display| @display, loop |
| 91 | |
| 92 | |loop, @quit| |
| 93 | |loop| loop, @poll-input |
| 94 | |------------------------------------------------------| |