From 5ddadf44021f5b7ecc55a4a3dedd09ea21102cc1 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 17 May 2021 14:58:34 -0700 Subject: new strategy, same as the old strategy --- hest-life.mu | 73 +++--------------------------------------------------------- 1 file changed, 3 insertions(+), 70 deletions(-) diff --git a/hest-life.mu b/hest-life.mu index 1c69bc7d..46e1967f 100644 --- a/hest-life.mu +++ b/hest-life.mu @@ -69,76 +69,9 @@ 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 -} - +# Lots of hardcoded constants for now. +# TODO: split this up into a primitive to render a single cell and its +# incoming edges (but not the neighboring nodes they emanate from) fn render0 screen: (addr screen), _self: (addr environment) { var self/esi: (addr environment) <- copy _self # cell border -- cgit 1.4.1-2-gfad0