mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-27 13:48:15 +00:00
more pattern editing for g46
This commit is contained in:
parent
3b7ab293ba
commit
c5324ff2f5
3
cell.cpp
3
cell.cpp
@ -731,7 +731,8 @@ bool ishex1(cell *c) {
|
|||||||
|
|
||||||
int emeraldval(cell *c) {
|
int emeraldval(cell *c) {
|
||||||
if(euclid) return eupattern(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(sphere) return 0;
|
||||||
if(ctof(c))
|
if(ctof(c))
|
||||||
return c->master->emeraldval >> 3;
|
return c->master->emeraldval >> 3;
|
||||||
|
1
hyper.h
1
hyper.h
@ -656,6 +656,7 @@ namespace mapeditor {
|
|||||||
extern bool drawplayer;
|
extern bool drawplayer;
|
||||||
extern char whichPattern, whichShape;
|
extern char whichPattern, whichShape;
|
||||||
extern char whichCanvas;
|
extern char whichCanvas;
|
||||||
|
extern bool symRotation, sym01, sym02, sym03;
|
||||||
extern int displaycodes;
|
extern int displaycodes;
|
||||||
int generateCanvas(cell *c);
|
int generateCanvas(cell *c);
|
||||||
void applyModelcell(cell *c);
|
void applyModelcell(cell *c);
|
||||||
|
@ -379,7 +379,12 @@ namespace mapeditor {
|
|||||||
|
|
||||||
case 'f': {
|
case 'f': {
|
||||||
int t = emeraldval(c);
|
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;
|
if(euclid) return 0;
|
||||||
int tcdir = 0, tbest = (t&3);
|
int tcdir = 0, tbest = (t&3);
|
||||||
for(int i=0; i<c->type; i++) {
|
for(int i=0; i<c->type; i++) {
|
||||||
@ -412,7 +417,12 @@ namespace mapeditor {
|
|||||||
|
|
||||||
case 0: {
|
case 0: {
|
||||||
if(euclid) return 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);
|
int u = nopattern(c);
|
||||||
|
|
||||||
if(u == 6) {
|
if(u == 6) {
|
||||||
@ -769,11 +779,11 @@ namespace mapeditor {
|
|||||||
else if(!euclid) {
|
else if(!euclid) {
|
||||||
dialog::addBoolItem(XLAT("rotational symmetry"), (symRotation), '0');
|
dialog::addBoolItem(XLAT("rotational symmetry"), (symRotation), '0');
|
||||||
dialog::addBoolItem(XLAT("symmetry 0-1"), (sym01), '1');
|
dialog::addBoolItem(XLAT("symmetry 0-1"), (sym01), '1');
|
||||||
if(!a46) {
|
if(!a46 || !nontruncated)
|
||||||
dialog::addBoolItem(XLAT("symmetry 0-2"), (sym02), '2');
|
dialog::addBoolItem(XLAT("symmetry 0-2"), (sym02), '2');
|
||||||
|
if(!a46)
|
||||||
dialog::addBoolItem(XLAT("symmetry 0-3"), (sym03), '3');
|
dialog::addBoolItem(XLAT("symmetry 0-3"), (sym03), '3');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
dialog::addBoolItem(XLAT("edit all three colors"), (symRotation), '0');
|
dialog::addBoolItem(XLAT("edit all three colors"), (symRotation), '0');
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// rules for the emeraldvalues of heptagons.
|
// rules for the emeraldvalues of heptagons.
|
||||||
int emerald_heptagon(int parent, int dir) {
|
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--;
|
if(S7 == 8 && dir > 3) dir--;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user