1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-04-01 00:07:02 +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);
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) {
d = hrand(c->type); */
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? */
EX bool horo_ok() {
if(INVERSE) return false;
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) {
if(arcm::in()) return true;
if(WDIM == 3) return true;
if(INVERSE) return true;
return pseudohept(c);
}

View File

@ -531,6 +531,11 @@ EX int celldistAlt(cell *c) {
if(ctof(c)) return c->master->alt->distance;
#if CAP_GP
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
int dx[MAX_S3]; dx[0] = 0;
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);
#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);
}
@ -1316,7 +1328,8 @@ EX bool standard_tiling() {
}
EX int valence() {
if(BITRUNCATED) return 3;
if(BITRUNCATED || IRREGULAR) return 3;
if(INVERSE) return WARPED ? 4 : max(S3, S7);
#if CAP_ARCM
if(arcm::in()) return arcm::valence();
#endif

View File

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