From f873a4ba1822dd426c5ce06f8bacea0fb5b76250 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 4 Jul 2021 10:39:55 +0200 Subject: [PATCH] init_heptagon fixup --- arbitrile.cpp | 25 ++++--------------------- binary-tiling.cpp | 5 +---- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/arbitrile.cpp b/arbitrile.cpp index 618f6525..32e307b2 100644 --- a/arbitrile.cpp +++ b/arbitrile.cpp @@ -669,30 +669,17 @@ struct hrmap_arbi : hrmap { hrmap_arbi() { dynamicval curmap(currentmap, this); - origin = tailored_alloc (current.shapes[0].size()); + origin = init_heptagon(current.shapes[0].size()); origin->s = hsOrigin; - origin->emeraldval = 0; - origin->zebraval = 0; - origin->fiftyval = 0; - origin->fieldval = 0; - origin->rval0 = origin->rval1 = 0; - origin->cdata = NULL; - origin->alt = NULL; origin->c7 = newCell(origin->type, origin); - origin->distance = 0; heptagon *alt = NULL; if(hyperbolic) { dynamicval g(geometry, gNormal); - alt = tailored_alloc (S7); + alt = init_heptagon(S7); alt->s = hsOrigin; - alt->emeraldval = 0; - alt->zebraval = 0; - alt->distance = 0; - alt->c7 = NULL; alt->alt = alt; - alt->cdata = NULL; current_altmap = newAltMap(alt); } @@ -768,12 +755,10 @@ struct hrmap_arbi : hrmap { } } - auto h1 = tailored_alloc (current.shapes[xt].size()); + auto h1 = init_heptagon(current.shapes[xt].size()); h1->distance = h->distance + 1; h1->zebraval = xt; h1->c7 = newCell(h1->type, h1); - h1->alt = nullptr; - h1->cdata = nullptr; h1->emeraldval = h->emeraldval ^ m; h->c.connect(d, h1, e, m); @@ -816,12 +801,10 @@ struct hrmap_arbi : hrmap { } } - auto h1 = tailored_alloc (current.shapes[xt].size()); + auto h1 = init_heptagon(current.shapes[xt].size()); h1->distance = h->distance + 1; h1->zebraval = xt; h1->c7 = newCell(h1->type, h1); - h1->alt = nullptr; - h1->cdata = nullptr; h1->emeraldval = h->emeraldval ^ m; h->c.connect(d, h1, e, m); diff --git a/binary-tiling.cpp b/binary-tiling.cpp index e887c49e..dbff0e17 100644 --- a/binary-tiling.cpp +++ b/binary-tiling.cpp @@ -122,15 +122,12 @@ EX namespace bt { } EX heptagon *build(heptagon *parent, int d, int d1, int t, int side, int delta) { - auto h = buildHeptagon1(tailored_alloc (t), parent, d, hsA, d1); + auto h = buildHeptagon1(init_heptagon(t), parent, d, hsA, d1); h->distance = parent->distance + delta; h->dm4 = parent->dm4 + delta; h->c7 = NULL; if(parent->c7) h->c7 = newCell(t, h); - h->cdata = NULL; h->zebraval = side; - h->emeraldval = 0; - h->fieldval = 0; switch(geometry) { case gBinary4: if(d < 2)