diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-17 13:55:40 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-17 13:55:40 -0700 |
commit | 5443d4b834e1fda4caa755a832d61d84256bbd9a (patch) | |
tree | 9861c73c7ff3f346bc03a58c6b0a4b4c861db0ab | |
parent | cdeb3d505d4f2cdaa2774355bd56753054620817 (diff) | |
download | mu-5443d4b834e1fda4caa755a832d61d84256bbd9a.tar.gz |
attempt at standardizing constants
-rw-r--r-- | hest-life.mu | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/hest-life.mu b/hest-life.mu index f838c736..1c69bc7d 100644 --- a/hest-life.mu +++ b/hest-life.mu @@ -69,6 +69,76 @@ fn render screen: (addr screen), _self: (addr environment) { draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen screen, *tick-a, 7/fg 0/bg } +type cell-render-template { + # cells are squares + side: int + # centers of internal nodes + # nodes in neighboring cells are symmetrical with these + node-1-x: int + node-1-y: int + node-2-x: int + node-2-y: int + node-3-x: int + node-3-y: int + node-4-x: int + node-4-y: int + node-5-x: int + node-5-y: int + node-6-x: int + node-6-y: int + node-7-x: int + node-7-y: int + node-8-x: int + node-8-y: int + # internal nodes + sum-x: int + sum-y: int + filter-x: int + filter-y: int + # control points for bezier curves + # One point in each curve goes to a neighbor or output, one point is the sum + # or filter node. We just need to track the middle control point. + # + # For neighboring nodes we do need to know which direction each neighboring + # node is in. Arbitrarily we'll assign nodes starting at East and in + # clockwise order. Nodes above will also need to follow this rule, but only + # to make input edges work. Otherwise we don't care how the nodes and output + # edges are ordered, as long as the i'th control point corresponds to the + # curve connecting the i'th node. + input-edge-1-x: int + input-edge-1-y: int + input-edge-2-x: int + input-edge-2-y: int + input-edge-3-x: int + input-edge-3-y: int + input-edge-4-x: int + input-edge-4-y: int + input-edge-5-x: int + input-edge-5-y: int + input-edge-6-x: int + input-edge-6-y: int + input-edge-7-x: int + input-edge-7-y: int + input-edge-8-x: int + input-edge-8-y: int + output-edge-1-x: int + output-edge-1-y: int + output-edge-2-x: int + output-edge-2-y: int + output-edge-3-x: int + output-edge-3-y: int + output-edge-4-x: int + output-edge-4-y: int + output-edge-5-x: int + output-edge-5-y: int + output-edge-6-x: int + output-edge-6-y: int + output-edge-7-x: int + output-edge-7-y: int + output-edge-8-x: int + output-edge-8-y: int +} + fn render0 screen: (addr screen), _self: (addr environment) { var self/esi: (addr environment) <- copy _self # cell border |