about summary refs log tree commit diff stats
path: root/shell/data.limg
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-06 10:54:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-06 10:54:50 -0700
commitc4cf38773f9c92ed0d5ebc72165801e581755b2f (patch)
tree208a00f78939c95d785f6b0dfe51085533ed7de0 /shell/data.limg
parentb5d3095c923ba8ce7ee07bc2666e42a9a1f483af (diff)
downloadmu-c4cf38773f9c92ed0d5ebc72165801e581755b2f.tar.gz
more space for definitions
Diffstat (limited to 'shell/data.limg')
-rw-r--r--shell/data.limg17
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))
 )