Unoptimized disco
authorAlyssa Rosenzweig <alyssa@backtick.town>
Fri, 24 Jun 2016 23:52:21 +0000 (16:52 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Fri, 24 Jun 2016 23:52:21 +0000 (16:52 -0700)
src/PPU/disco.tosh [new file with mode: 0644]

diff --git a/src/PPU/disco.tosh b/src/PPU/disco.tosh
new file mode 100644 (file)
index 0000000..eadcb67
--- /dev/null
@@ -0,0 +1,41 @@
+define-atomic framebuffer to screen
+set index to 1
+repeat 120
+    repeat 256
+        set pen color to (item index of framebuffer)
+        change index by 1
+        change x by 1
+    end
+    change index by 256
+    change y by -1
+    repeat 256
+        set pen color to (item index of framebuffer)
+        change index by -1
+        change x by -1
+    end
+    change index by 256
+    change y by -1
+end
+
+when flag clicked
+delete all of framebuffer
+repeat (240 * 256)
+    add 0 to framebuffer
+end
+show variable time
+forever
+    reset timer
+    paint
+    set time to timer
+end
+
+define-atomic paint
+go to x: -128 y: 120
+set index to 1
+repeat (240 * 256)
+    replace item index of framebuffer with pick random 0 to 16777215
+    change index by 1
+end
+pen down
+framebuffer to screen
+pen up
This page took 0.030965 seconds and 4 git commands to generate.