1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-07 00:44:08 +00:00

bigstuff in inverse

This commit is contained in:
Zeno Rogue 2020-07-13 00:53:48 +02:00
parent cf0abe6184
commit 224a02d086
4 changed files with 18 additions and 2 deletions

View File

@ -844,7 +844,7 @@ EX bool buildBarrierNowall(cell *c, eLand l2, int forced_dir IS(NODIR)) {
vector<int> ds = hrandom_permutation(c->type); vector<int> ds = hrandom_permutation(c->type);
for(int i=0; i<c->type; i++) { for(int i=0; i<c->type; i++) {
int d = forced_dir != NODIR ? forced_dir : (valence()>3) ? (2+(i&1)) : ds[i]; int d = forced_dir != NODIR ? forced_dir : (valence()>3 && !INVERSE) ? (2+(i&1)) : ds[i];
/* if(warpv && GOLDBERG) { /* if(warpv && GOLDBERG) {
d = hrand(c->type); */ d = hrand(c->type); */
if(warpv && c->move(d) && c->move(d)->mpdist < c->mpdist) continue; if(warpv && c->move(d) && c->move(d)->mpdist < c->mpdist) continue;

View File

@ -1375,6 +1375,7 @@ EX int wallchance(cell *c, bool deepOcean) {
/** should we generate the horocycles in the current geometry? */ /** should we generate the horocycles in the current geometry? */
EX bool horo_ok() { EX bool horo_ok() {
if(INVERSE) return false;
return hyperbolic && !bt::in() && !arcm::in() && !kite::in() && !experimental && !hybri; return hyperbolic && !bt::in() && !arcm::in() && !kite::in() && !experimental && !hybri;
} }
@ -1421,6 +1422,7 @@ EX bool deep_ocean_at(cell *c, cell *from) {
EX bool good_for_wall(cell *c) { EX bool good_for_wall(cell *c) {
if(arcm::in()) return true; if(arcm::in()) return true;
if(WDIM == 3) return true; if(WDIM == 3) return true;
if(INVERSE) return true;
return pseudohept(c); return pseudohept(c);
} }

View File

@ -531,6 +531,11 @@ EX int celldistAlt(cell *c) {
if(ctof(c)) return c->master->alt->distance; if(ctof(c)) return c->master->alt->distance;
#if CAP_GP #if CAP_GP
if(GOLDBERG) return gp::compute_dist(c, celldistAlt); if(GOLDBERG) return gp::compute_dist(c, celldistAlt);
if(INVERSE) {
cell *c1 = gp::get_mapped(c);
return UIU(gp::compute_dist(c1, celldistAlt)) / 2;
/* TODO */
}
#endif #endif
int dx[MAX_S3]; dx[0] = 0; int dx[MAX_S3]; dx[0] = 0;
for(int u=0; u<S3; u++) if(createMov(c, u+u)->master->alt == NULL) for(int u=0; u<S3; u++) if(createMov(c, u+u)->master->alt == NULL)
@ -1122,6 +1127,13 @@ EX int celldistance(cell *c1, cell *c2) {
if(hyperbolic && WDIM == 3) return reg3::celldistance(c1, c2); if(hyperbolic && WDIM == 3) return reg3::celldistance(c1, c2);
#endif #endif
if(INVERSE) {
c1 = gp::get_mapped(c1);
c2 = gp::get_mapped(c2);
return UIU(celldistance(c1, c2)) / 2;
/* TODO */
}
return hyperbolic_celldistance(c1, c2); return hyperbolic_celldistance(c1, c2);
} }
@ -1316,7 +1328,8 @@ EX bool standard_tiling() {
} }
EX int valence() { EX int valence() {
if(BITRUNCATED) return 3; if(BITRUNCATED || IRREGULAR) return 3;
if(INVERSE) return WARPED ? 4 : max(S3, S7);
#if CAP_ARCM #if CAP_ARCM
if(arcm::in()) return arcm::valence(); if(arcm::in()) return arcm::valence();
#endif #endif

View File

@ -910,6 +910,7 @@ EX land_validity_t& land_validity(eLand l) {
} }
if(arcm::in() || kite::in()) return not_implemented; if(arcm::in() || kite::in()) return not_implemented;
if(bounded) return unbounded_only; if(bounded) return unbounded_only;
if(INVERSE) return not_implemented;
} }
if(chaosmode && isCrossroads(l)) if(chaosmode && isCrossroads(l))