1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

3d:: pseudohept specified

This commit is contained in:
? 2019-02-27 14:40:56 +01:00 committed by Zeno Rogue
parent a1ca5b2995
commit b8913b39fd
4 changed files with 26 additions and 1 deletions

View File

@ -343,6 +343,13 @@ auto bt_config = addHook(hooks_args, 0, [] () {
}); });
#endif #endif
bool pseudohept(cell *c) {
if(DIM == 2)
return c->type & c->master->distance & 1;
else
return (c->master->zebraval == 1) && (c->master->distance & 1);
}
int celldistance3(cell *c1, cell *c2) { // [untested] int celldistance3(cell *c1, cell *c2) { // [untested]
int steps = 0; int steps = 0;
int d1 = celldistAlt(c1); int d1 = celldistAlt(c1);

View File

@ -528,6 +528,12 @@ namespace euclid3 {
return x; return x;
} }
bool pseudohept(cell *c) {
coord co = cubemap()->ispacemap[c->master];
for(int i=0; i<3; i++) if(!(getcoord(co, i) & 1)) return false;
return true;
}
void draw() { void draw() {
dq::visited.clear(); dq::visited.clear();
dq::enqueue(viewctr.at, cview()); dq::enqueue(viewctr.at, cview());

View File

@ -1287,7 +1287,15 @@ bool pseudohept(cell *c) {
#if CAP_IRR #if CAP_IRR
if(IRREGULAR) return irr::pseudohept(c); if(IRREGULAR) return irr::pseudohept(c);
#endif #endif
if(binarytiling) return c->type & c->master->distance & 1; #if CAP_BT
if(binarytiling) return binary::pseudohept(c);
#endif
#if MAXDIM == 4
if(DIM == 3) {
if(euclid) return euclid3::pseudohept(c);
if(sphere) return sphere3::pseudohept(c);
}
#endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) return arcm::pseudohept(c); if(archimedean) return arcm::pseudohept(c);
#endif #endif

View File

@ -378,6 +378,10 @@ transmatrix relative_matrix(heptagon *h2, heptagon *h1) {
return inverse(gmatr(h1)) * gmatr(h2); return inverse(gmatr(h1)) * gmatr(h2);
} }
bool pseudohept(cell *c) {
return c->master->zebraval < 16;
}
void draw() { void draw() {
sphereflip = Id; sphereflip = Id;
auto m = (hrmap_spherical3*) currentmap; auto m = (hrmap_spherical3*) currentmap;