about summary refs log tree commit diff stats
path: root/hest-life.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-16 07:16:49 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-16 07:23:43 -0700
commit2ab8747b4aa6d662253a90551a51f7ae981ab596 (patch)
treed2c80881433acba1e9a640968dc666cbab521c52 /hest-life.mu
parentf2b5b5081fc6092393c1d37c7255dee154e1a7a5 (diff)
downloadmu-2ab8747b4aa6d662253a90551a51f7ae981ab596.tar.gz
Bresenham's algorithm for bezier curves
Diffstat (limited to 'hest-life.mu')
-rw-r--r--hest-life.mu8
1 files changed, 8 insertions, 0 deletions
diff --git a/hest-life.mu b/hest-life.mu
new file mode 100644
index 00000000..552c42ae
--- /dev/null
+++ b/hest-life.mu
@@ -0,0 +1,8 @@
+fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
+  draw-line             screen,         1 1,   0x80 0x100,               7/color
+  draw-line             screen,  0x80 0x100,  0x200 0x140,               7/color
+  draw-monotonic-bezier screen,         1 1,   0x80 0x100,  0x200 0x140, 0xc/color
+  draw-disc             screen,         1 1,            3,               7/color 0xf/border
+  draw-disc             screen,  0x80 0x100,            3,               7/color 0xf/border
+  draw-disc             screen, 0x200 0x140,            3,               7/color 0xf/border
+}