1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-30 13:32:59 +00:00

remplace euclid6, euclid4, 'euclid && \!archimedean && \!penrose' with standard_tiling(), euc::in(dimension, s7)

This commit is contained in:
Zeno Rogue
2019-12-14 11:26:03 +01:00
parent 7568accff7
commit 0a9ec78c18
16 changed files with 56 additions and 51 deletions

View File

@@ -487,7 +487,7 @@ EX int celldistAlt(cell *c) {
return celldist(c) - 3;
}
#if MAXMDIM >= 4
if(euclid && WDIM == 3) return euc::dist_alt(c);
if(euc::in(3)) return euc::dist_alt(c);
if(hyperbolic && WDIM == 3) return reg3::altdist(c->master);
#endif
if(!c->master->alt) return 0;
@@ -862,7 +862,7 @@ EX cdata *arcmCdata(cell *c) {
EX int getCdata(cell *c, int j) {
if(prod) { c = hybrid::get_where(c).first; return PIU(getBits(c)); }
else if(euclid && !archimedean && !penrose) return getEuclidCdata(euc2_coordinates(c))->val[j];
else if(euc::in()) return getEuclidCdata(euc2_coordinates(c))->val[j];
else if(archimedean && euclid)
return getEuclidCdata(pseudocoords(c))->val[j];
else if(archimedean && hyperbolic)
@@ -880,7 +880,7 @@ EX int getCdata(cell *c, int j) {
EX int getBits(cell *c) {
if(prod) { c = hybrid::get_where(c).first; return PIU(getBits(c)); }
else if(euclid && !archimedean && !penrose) return getEuclidCdata(euc2_coordinates(c))->bits;
else if(euc::in()) return getEuclidCdata(euc2_coordinates(c))->bits;
else if(archimedean && euclid)
return getEuclidCdata(pseudocoords(c))->bits;
else if(archimedean && (hyperbolic || sl2))
@@ -1012,7 +1012,7 @@ EX int celldistance(cell *c1, cell *c2) {
if(cryst) return crystal::precise_distance(c1, c2);
#endif
if(euclid && WDIM == 2 && !penrose && !archimedean) {
if(euc::in() && WDIM == 2) {
return euc::cyldist(euc2_coordinates(c1), euc2_coordinates(c2));
}
@@ -1236,4 +1236,8 @@ EX vector<int> reverse_directions(heptagon *c, int dir) {
}
}
EX bool standard_tiling() {
return !archimedean && !penrose && !binarytiling;
}
}