mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-08 23:20:12 +00:00
3d:: celldistances
This commit is contained in:
parent
714ff8462a
commit
9319c3b0fa
5
cell.cpp
5
cell.cpp
@ -402,7 +402,7 @@ int celldist(cell *c) {
|
|||||||
return torusconfig::cyldist(decodeId(c->master), 0);
|
return torusconfig::cyldist(decodeId(c->master), 0);
|
||||||
if(masterless)
|
if(masterless)
|
||||||
return eudist(decodeId(c->master));
|
return eudist(decodeId(c->master));
|
||||||
if(sphere || binarytiling || geometry == gCrystal) return celldistance(c, currentmap->gamestart());
|
if(sphere || binarytiling || DIM == 3 || geometry == gCrystal) return celldistance(c, currentmap->gamestart());
|
||||||
#if CAP_IRR
|
#if CAP_IRR
|
||||||
if(IRREGULAR) return irr::celldist(c, false);
|
if(IRREGULAR) return irr::celldist(c, false);
|
||||||
#endif
|
#endif
|
||||||
@ -439,6 +439,9 @@ int celldistAlt(cell *c) {
|
|||||||
if(sphere || quotient) {
|
if(sphere || quotient) {
|
||||||
return celldist(c) - 3;
|
return celldist(c) - 3;
|
||||||
}
|
}
|
||||||
|
#if MAXDIM == 4
|
||||||
|
if(euclid && DIM == 3) return euclid3::dist_alt(c);
|
||||||
|
#endif
|
||||||
if(!c->master->alt) return 0;
|
if(!c->master->alt) return 0;
|
||||||
#if CAP_IRR
|
#if CAP_IRR
|
||||||
if(IRREGULAR) return irr::celldist(c, true);
|
if(IRREGULAR) return irr::celldist(c, true);
|
||||||
|
@ -534,6 +534,11 @@ namespace euclid3 {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dist_alt(cell *c) {
|
||||||
|
coord co = cubemap()->ispacemap[c->master];
|
||||||
|
return getcoord(co, 2);
|
||||||
|
}
|
||||||
|
|
||||||
void draw() {
|
void draw() {
|
||||||
dq::visited.clear();
|
dq::visited.clear();
|
||||||
dq::enqueue(viewctr.at, cview());
|
dq::enqueue(viewctr.at, cview());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user