about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-16 15:54:41 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-16 15:54:41 -0700
commit4260ec3b77740341566b7e251947d937b1b8545e (patch)
treeebfc9acf6a1f912791f29f5da0c3b9d5510034b4
parent70bf20dfb4fb051f73a8e0cdda2a7499347238bc (diff)
downloadmu-4260ec3b77740341566b7e251947d937b1b8545e.tar.gz
start of a naming convention for constants
-rw-r--r--hest-life.mu42
1 files changed, 21 insertions, 21 deletions
diff --git a/hest-life.mu b/hest-life.mu
index 004510d8..31154b55 100644
--- a/hest-life.mu
+++ b/hest-life.mu
@@ -54,24 +54,24 @@ fn render0 screen: (addr screen), _self: (addr environment) {
   draw-rect screen, 0x1f0/xmin, 0x2d0/ymin, 0x210/xmax, 0x2f0/ymax, 0xf/alive
   draw-rect screen, 0x350/xmin, 0x170/ymin, 0x370/xmax, 0x190/ymax, 0xf/alive
   # sum node
-  draw-rect screen, 0x170/xmin, 0x140/ymin, 0x190/xmax, 0x160/ymax, 0x40/color
-  set-cursor-position screen, 0x2d/col, 0x13/row
+  draw-rect screen, 0x170/xsmin, 0x140/ysmin, 0x190/xsmax, 0x160/ysmax, 0x40/color
+  set-cursor-position screen, 0x2d/scol, 0x13/srow
   draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "+", 0xf/color, 0/bg
   # conveyers from neighboring inputs to sum node
-  draw-monotonic-bezier screen, 0xa0/x0 0x20/y0, 0x100/x1 0x150/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0xa0/x0 0x180/y0, 0xc0/x1 0x150/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0xa0/x0 0x2e0/y0, 0x100/x1 0x150/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0x200/x0 0x20/y0, 0x180/x1 0x90/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0x200/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0x360/x0 0x20/y0, 0x180/x1 0xc0/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0x360/x0 0x180/y0, 0x35c/x1 0x150/y1, 0x180/x2 0x150/y2, 4/color
-  draw-monotonic-bezier screen, 0x360/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/y2, 4/color
+  draw-monotonic-bezier screen, 0xa0/x0 0x20/y0, 0x100/x1 0x150/ys, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0xa0/x0 0x180/y0, 0xc0/x1 0x150/ys, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0xa0/x0 0x2e0/y0, 0x100/x1 0x150/ys, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0x200/x0 0x20/y0, 0x180/x1 0x90/y1, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0x200/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0x360/x0 0x20/y0, 0x180/x1 0xc0/y1, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0x360/x0 0x180/y0, 0x35c/x1 0x150/ys, 0x180/x2 0x150/ys, 4/color
+  draw-monotonic-bezier screen, 0x360/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/ys, 4/color
   # filter node
-  draw-rect screen, 0x200/xmin, 0x180/ymin, 0x220/xmax, 0x1a0/ymax, 0x31/color
-  set-cursor-position screen, 0x3f/col, 0x17/row
+  draw-rect screen, 0x200/xfmin, 0x180/yfmin, 0x220/xfmax, 0x1a0/yfmax, 0x31/color
+  set-cursor-position screen, 0x3f/fcol, 0x17/frow
   draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "?", 0xf/color, 0/bg
   # conveyer from sum node to filter node
-  draw-line screen 0x180/x0, 0x150/y0, 0x210/x1, 0x190/y1, 0xa2/color
+  draw-line screen 0x180/xs, 0x150/ys, 0x210/xf, 0x190/yf, 0xa2/color
   # cell outputs at corners
   draw-rect screen, 0xd0/xmin, 0x50/ymin, 0xf0/xmax, 0x70/ymax, 0xf/alive
   draw-rect screen, 0x310/xmin, 0x50/ymin, 0x330/xmax, 0x70/ymax, 0xf/alive
@@ -94,14 +94,14 @@ fn render0 screen: (addr screen), _self: (addr environment) {
   var eight-f/xmm0: float <- convert eight
   u <- divide eight-f
   # points on conveyers from neighboring cells
-  draw-bezier-point screen, u, 0xa0/x0 0x20/y0, 0x100/x1 0x150/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0xa0/x0 0x180/y0, 0xc0/x1 0x150/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0xa0/x0 0x2e0/y0, 0x100/x1 0x150/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0x200/x0 0x20/y0, 0x180/x1 0x90/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0x200/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0x360/x0 0x20/y0, 0x180/x1 0xc0/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0x360/x0 0x180/y0, 0x35c/x1 0x150/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
-  draw-bezier-point screen, u, 0x360/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/y2, 7/color, 4/radius
+  draw-bezier-point screen, u, 0xa0/x0 0x20/y0, 0x100/x1 0x150/ys, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0xa0/x0 0x180/y0, 0xc0/x1 0x150/ys, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0xa0/x0 0x2e0/y0, 0x100/x1 0x150/ys, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0x200/x0 0x20/y0, 0x180/x1 0x90/y1, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0x200/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0x360/x0 0x20/y0, 0x180/x1 0xc0/y1, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0x360/x0 0x180/y0, 0x35c/x1 0x150/ys, 0x180/x2 0x150/ys, 7/color, 4/radius
+  draw-bezier-point screen, u, 0x360/x0 0x2e0/y0, 0x180/x1 0x200/y1, 0x180/x2 0x150/ys, 7/color, 4/radius
 }
 
 fn draw-bezier-point screen: (addr screen), u: float, x0: int, y0: int, x1: int, y1: int, x2: int, y2: int, color: int, radius: int {