init_heptagon fixup
This commit is contained in:
parent
74486309a6
commit
f873a4ba18
|
@ -669,30 +669,17 @@ struct hrmap_arbi : hrmap {
|
||||||
|
|
||||||
hrmap_arbi() {
|
hrmap_arbi() {
|
||||||
dynamicval<hrmap*> curmap(currentmap, this);
|
dynamicval<hrmap*> curmap(currentmap, this);
|
||||||
origin = tailored_alloc<heptagon> (current.shapes[0].size());
|
origin = init_heptagon(current.shapes[0].size());
|
||||||
origin->s = hsOrigin;
|
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->c7 = newCell(origin->type, origin);
|
||||||
origin->distance = 0;
|
|
||||||
|
|
||||||
heptagon *alt = NULL;
|
heptagon *alt = NULL;
|
||||||
|
|
||||||
if(hyperbolic) {
|
if(hyperbolic) {
|
||||||
dynamicval<eGeometry> g(geometry, gNormal);
|
dynamicval<eGeometry> g(geometry, gNormal);
|
||||||
alt = tailored_alloc<heptagon> (S7);
|
alt = init_heptagon(S7);
|
||||||
alt->s = hsOrigin;
|
alt->s = hsOrigin;
|
||||||
alt->emeraldval = 0;
|
|
||||||
alt->zebraval = 0;
|
|
||||||
alt->distance = 0;
|
|
||||||
alt->c7 = NULL;
|
|
||||||
alt->alt = alt;
|
alt->alt = alt;
|
||||||
alt->cdata = NULL;
|
|
||||||
current_altmap = newAltMap(alt);
|
current_altmap = newAltMap(alt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -768,12 +755,10 @@ struct hrmap_arbi : hrmap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto h1 = tailored_alloc<heptagon> (current.shapes[xt].size());
|
auto h1 = init_heptagon(current.shapes[xt].size());
|
||||||
h1->distance = h->distance + 1;
|
h1->distance = h->distance + 1;
|
||||||
h1->zebraval = xt;
|
h1->zebraval = xt;
|
||||||
h1->c7 = newCell(h1->type, h1);
|
h1->c7 = newCell(h1->type, h1);
|
||||||
h1->alt = nullptr;
|
|
||||||
h1->cdata = nullptr;
|
|
||||||
h1->emeraldval = h->emeraldval ^ m;
|
h1->emeraldval = h->emeraldval ^ m;
|
||||||
h->c.connect(d, h1, e, m);
|
h->c.connect(d, h1, e, m);
|
||||||
|
|
||||||
|
@ -816,12 +801,10 @@ struct hrmap_arbi : hrmap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto h1 = tailored_alloc<heptagon> (current.shapes[xt].size());
|
auto h1 = init_heptagon(current.shapes[xt].size());
|
||||||
h1->distance = h->distance + 1;
|
h1->distance = h->distance + 1;
|
||||||
h1->zebraval = xt;
|
h1->zebraval = xt;
|
||||||
h1->c7 = newCell(h1->type, h1);
|
h1->c7 = newCell(h1->type, h1);
|
||||||
h1->alt = nullptr;
|
|
||||||
h1->cdata = nullptr;
|
|
||||||
h1->emeraldval = h->emeraldval ^ m;
|
h1->emeraldval = h->emeraldval ^ m;
|
||||||
h->c.connect(d, h1, e, m);
|
h->c.connect(d, h1, e, m);
|
||||||
|
|
||||||
|
|
|
@ -122,15 +122,12 @@ EX namespace bt {
|
||||||
}
|
}
|
||||||
|
|
||||||
EX heptagon *build(heptagon *parent, int d, int d1, int t, int side, int delta) {
|
EX heptagon *build(heptagon *parent, int d, int d1, int t, int side, int delta) {
|
||||||
auto h = buildHeptagon1(tailored_alloc<heptagon> (t), parent, d, hsA, d1);
|
auto h = buildHeptagon1(init_heptagon(t), parent, d, hsA, d1);
|
||||||
h->distance = parent->distance + delta;
|
h->distance = parent->distance + delta;
|
||||||
h->dm4 = parent->dm4 + delta;
|
h->dm4 = parent->dm4 + delta;
|
||||||
h->c7 = NULL;
|
h->c7 = NULL;
|
||||||
if(parent->c7) h->c7 = newCell(t, h);
|
if(parent->c7) h->c7 = newCell(t, h);
|
||||||
h->cdata = NULL;
|
|
||||||
h->zebraval = side;
|
h->zebraval = side;
|
||||||
h->emeraldval = 0;
|
|
||||||
h->fieldval = 0;
|
|
||||||
switch(geometry) {
|
switch(geometry) {
|
||||||
case gBinary4:
|
case gBinary4:
|
||||||
if(d < 2)
|
if(d < 2)
|
||||||
|
|
Loading…
Reference in New Issue