fixed new geometry handling for Archimedean

This commit is contained in:
Zeno Rogue committed 2019-09-12 22:50:15 +02:00
1 parent 2f954d0538
commit a03eb0d913
23 files changed
+57 -55

No files matched your search

+7 -7
View File
@@ -265,7 +265,7 @@ EX void initcells() {
if(res) currentmap = res;
else if(nonisotropic || prod) currentmap = nisot::new_map();
#if CAP_CRYSTAL
else if(geometry == gCrystal) currentmap = crystal::new_map();
else if(cryst) currentmap = crystal::new_map();
#endif
#if CAP_ARCM
else if(archimedean) currentmap = arcm::new_map();
@@ -466,7 +466,7 @@ EX int celldist(cell *c) {
if(masterless)
return eudist(decodeId(c->master));
if(euclid && (penrose || archimedean)) return celldistance(currentmap->gamestart(), c);
if(sphere || binarytiling || WDIM == 3 || geometry == gCrystal || sol || penrose) return celldistance(currentmap->gamestart(), c);
if(sphere || binarytiling || WDIM == 3 || cryst || sol || penrose) return celldistance(currentmap->gamestart(), c);
#if CAP_IRR
if(IRREGULAR) return irr::celldist(c, false);
#endif
@@ -506,7 +506,7 @@ EX int celldistAlt(cell *c) {
#endif
if(nil) return c->master->zebraval + abs(c->master->emeraldval) + (specialland == laCamelot && !tactic::on? 30 : 0);;
#if CAP_CRYSTAL
if(geometry == gCrystal)
if(cryst)
return crystal::dist_alt(c);
#endif
if(sphere || quotient) {
@@ -935,7 +935,7 @@ EX int heptdistance(heptagon *h1, heptagon *h2) {
// very rough distance
int d = 0;
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::space_distance(h1->c7, h2->c7);
if(cryst) return crystal::space_distance(h1->c7, h2->c7);
#endif
if(sol) return solv::approx_distance(h1, h2);
while(true) {
@@ -949,7 +949,7 @@ EX int heptdistance(heptagon *h1, heptagon *h2) {
EX int heptdistance(cell *c1, cell *c2) {
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::space_distance(c1, c2);
if(cryst) return crystal::space_distance(c1, c2);
#endif
if(!hyperbolic || quotient || WDIM == 3) return celldistance(c1, c2);
else return heptdistance(c1->master, c2->master);
@@ -1034,7 +1034,7 @@ EX int celldistance(cell *c1, cell *c2) {
}
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::precise_distance(c1, c2);
if(cryst) return crystal::precise_distance(c1, c2);
#endif
if(masterless || archimedean || quotient || sol || (penrose && euclid) || experimental) {
@@ -1072,7 +1072,7 @@ EX int celldistance(cell *c1, cell *c2) {
EX vector<cell*> build_shortest_path(cell *c1, cell *c2) {
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::build_shortest_path(c1, c2);
if(cryst) return crystal::build_shortest_path(c1, c2);
#endif
vector<cell*> p;
if(euclid) {