1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-28 19:10:35 +00:00

flag 'experimental' for new geometries

This commit is contained in:
Zeno Rogue 2019-08-10 19:34:12 +02:00
parent 50e4990a76
commit 437c4e4cdd
5 changed files with 12 additions and 4 deletions

View File

@ -1259,7 +1259,7 @@ EX int wallchance(cell *c, bool deepOcean) {
EX bool horo_ok() {
// do the horocycles work in the current geometry?
return hyperbolic && !binarytiling && !archimedean && !penrose;
return hyperbolic && !binarytiling && !archimedean && !penrose && !experimental;
}
EX bool gp_wall_test() {
@ -1309,7 +1309,7 @@ EX bool good_for_wall(cell *c) {
}
EX void buildBigStuff(cell *c, cell *from) {
if(sphere || quotient || nonisotropic || (penrose && !binarytiling)) return;
if(sphere || quotient || nonisotropic || (penrose && !binarytiling) || experimental) return;
if(chaosmode > 1) return;
bool deepOcean = deep_ocean_at(c, from);

View File

@ -448,6 +448,7 @@ EX int compdist(int dx[]) {
}
EX int celldist(cell *c) {
if(experimental) return 0;
if(fulltorus && WDIM == 2)
return torusmap()->dists[decodeId(c->master)];
if(nil) return DISTANCE_UNKNOWN;
@ -477,6 +478,7 @@ static const int ALTDIST_ERROR = 90000;
#endif
EX int celldistAlt(cell *c) {
if(experimental) return 0;
if(masterless) {
if(fulltorus) return celldist(c);
if(euwrap) return cylinder_alt(c);
@ -1014,7 +1016,7 @@ EX int celldistance(cell *c1, cell *c2) {
if(geometry == gCrystal) return crystal::precise_distance(c1, c2);
#endif
if(masterless || archimedean || quotient || sol || (penrose && euclid)) {
if(masterless || archimedean || quotient || sol || (penrose && euclid) || experimental) {
if(saved_distances.count(make_pair(c1,c2)))
return saved_distances[make_pair(c1,c2)];

View File

@ -249,6 +249,8 @@ static const flagtype qELLIPTIC = 128;
static const flagtype qBINARY = 256;
static const flagtype qPENROSE = 512;
static const flagtype qEXPERIMENTAL = 32768;
// note: dnext assumes that x&7 equals 7
static const int SEE_ALL = 50;
static const int FORBIDDEN = -1;

View File

@ -113,6 +113,9 @@ void addMessage(string s, char spamtype = 0);
#define archimedean (geometry == gArchimedean)
#define penrose (ginf[geometry].flags & qPENROSE)
/** convenience flag for geometries with major aspects missing */
#define experimental (ginf[geometry].flags & qEXPERIMENTAL)
// these geometries do not feature alternate structures for horocycles
#define eubinary (euclid || binarytiling || geometry == gCrystal || nil)

View File

@ -371,7 +371,8 @@ EX pair<int, bool> fieldval(cell *c) {
}
EX int fieldval_uniq(cell *c) {
if(sphere) {
if(experimental) return 0;
else if(sphere) {
if(archimedean) return c->master->fiftyval;
#if CAP_IRR
else if(IRREGULAR) return irr::cellindex[c];