arb:: fixed mirrors

This commit is contained in:
Zeno Rogue 2020-01-02 18:55:17 +01:00
parent 6496b3f8b6
commit 0d4ab601d0
2 changed files with 7 additions and 2 deletions

View File

@ -340,7 +340,11 @@ struct hrmap_arbi : hrmap {
transmatrix xrm = gpushxto0(xvm);
transmatrix Res = rgpushxto0(vm) * rspintox(rm*vr) * spintox(xrm*xvl) * xrm;
transmatrix Res = rgpushxto0(vm) * rspintox(rm*vr);
if(m) Res = Res * MirrorX;
Res = Res * spintox(xrm*xvl) * xrm;
if(m) swap(vl, vr);
if(hdist(vl, Res*xvr) + hdist(vr, Res*xvl) > .1) {
println(hlog, "s1 = ", kz(spintox(rm*vr)), " s2 = ", kz(rspintox(xrm*xvr)));
@ -399,6 +403,7 @@ struct hrmap_arbi : hrmap {
h1->c7 = newCell(h1->type, h1);
h1->alt = nullptr;
h1->cdata = nullptr;
h1->emeraldval = h->emeraldval ^ m;
h->c.connect(d, h1, e, m);
arbi_matrix[h1] = make_pair(alt, T);

View File

@ -1613,7 +1613,7 @@ EX namespace patterns {
#if CAP_ARCM
if(arcm::in()) return colortables['A'][arcm::current.tilegroup[arcm::id_of(c->master)]];
#endif
if(arb::in()) return colortables['A'][c->master->zebraval];
if(arb::in()) return colortables['A'][c->master->zebraval + c->master->emeraldval * isize(arb::current.shapes)];
case 'B':
return colortables['B'][c->type & 15];
#if CAP_FIELD