diff options
Diffstat (limited to 'shell/data.limg')
-rw-r--r-- | shell/data.limg | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/shell/data.limg b/shell/data.limg index 9e7c1954..fac0e683 100644 --- a/shell/data.limg +++ b/shell/data.limg @@ -58,6 +58,10 @@ (write str c) (set c (key keyboard)))) str))]) + (wait . [(def (wait keyboard) + (while (= 0 (key keyboard))))]) + (sq . [(def (sq n) (* n n))]) + (cube . [(def (cube n) (* (* n n) n))]) (fill_rect . [(def (fill_rect screen x1 y1 x2 y2 color) (for y y1 (< y y2) (++ y) (hline1 screen y x1 x2 color)))]) @@ -125,16 +129,17 @@ (for y r (< y ymax) (+= y side) (for x r (< x xmax) (+= x side) (circle_rainbow screen x y (- r 100) 10)))))))]) - (task . [(def (task screen) + (task . [(def (task screen keyboard) (let xmax (width screen) (let ymax (height screen) - (for y 0 (< y ymax) (+= y 1) - (for x 4 (< x xmax) (+= x 1) + (for y 0 (< y ymax) (+= y 4) + #(wait keyboard) + (for x 0 (< x xmax) (+= x 1) (pixel screen x y # color - (+ (* x x) (* y y))))))))]) + (+ 16 (+ (/ x 4) (cube (/ y 4))))))))))]) (main . [(def (main screen keyboard) - (task screen))]) + (task screen keyboard))]) )) - (sandbox . (task screen)) + (sandbox . (task screen keyboard)) ) |