diff --git a/cell.cpp b/cell.cpp index 988330bd..479ed5a2 100644 --- a/cell.cpp +++ b/cell.cpp @@ -731,7 +731,8 @@ bool ishex1(cell *c) { int emeraldval(cell *c) { if(euclid) return eupattern(c); - if(a46) return c->master->distance & 1; + if(a46) return ctof(c) ? ((c->master->emeraldval & 2) ? 1 : 0) : + ((c->master->emeraldval & 1) ^ ((c->master->emeraldval & 2)>>1) ^ (c->spin(0)&1)) ? 8 : 4; if(sphere) return 0; if(ctof(c)) return c->master->emeraldval >> 3; diff --git a/hyper.h b/hyper.h index d1ebef7f..a7d346c6 100644 --- a/hyper.h +++ b/hyper.h @@ -656,6 +656,7 @@ namespace mapeditor { extern bool drawplayer; extern char whichPattern, whichShape; extern char whichCanvas; + extern bool symRotation, sym01, sym02, sym03; extern int displaycodes; int generateCanvas(cell *c); void applyModelcell(cell *c); diff --git a/mapeditor.cpp b/mapeditor.cpp index bb437c2b..5fb731a0 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -379,7 +379,12 @@ namespace mapeditor { case 'f': { int t = emeraldval(c); - if(a46) return c->master->emeraldval ^ (c->master->distance & 1); + if(a46) { + if(ctof(c)) + return (c->master->emeraldval & 1) ^ (c->master->emeraldval & 2 ? 1 : 0); + else + return ((c->mov[0]->master->emeraldval + c->spin(0)) & 1) ? 2 : 0; + } if(euclid) return 0; int tcdir = 0, tbest = (t&3); for(int i=0; itype; i++) { @@ -412,7 +417,12 @@ namespace mapeditor { case 0: { if(euclid) return 0; - if(a46) return c->master->emeraldval; + if(a46) { + if(ctof(c)) + return c->master->emeraldval; + else + return ((c->mov[0]->master->emeraldval + c->spin(0)) & 1) ? 2 : 0; + } int u = nopattern(c); if(u == 6) { @@ -769,10 +779,10 @@ namespace mapeditor { else if(!euclid) { dialog::addBoolItem(XLAT("rotational symmetry"), (symRotation), '0'); dialog::addBoolItem(XLAT("symmetry 0-1"), (sym01), '1'); - if(!a46) { + if(!a46 || !nontruncated) dialog::addBoolItem(XLAT("symmetry 0-2"), (sym02), '2'); + if(!a46) dialog::addBoolItem(XLAT("symmetry 0-3"), (sym03), '3'); - } } else dialog::addBoolItem(XLAT("edit all three colors"), (symRotation), '0'); diff --git a/patterns.cpp b/patterns.cpp index f4349415..46e9b0d1 100644 --- a/patterns.cpp +++ b/patterns.cpp @@ -7,7 +7,7 @@ // rules for the emeraldvalues of heptagons. int emerald_heptagon(int parent, int dir) { - if(a46) return (parent+dir)&1; + if(a46) return parent ^ (dir & 1) ^ 2; if(S7 == 8 && dir > 3) dir--;