replaced 'archimedean' with 'arcm::in()'

This commit is contained in:
Zeno Rogue 2019-12-14 11:42:16 +01:00
parent d529449999
commit f772f9b7fd
28 changed files with 138 additions and 136 deletions

View File

@ -12,6 +12,8 @@ namespace hr {
EX namespace arcm {
EX bool in() { return cgflags & qARCHI; }
#if HDR
struct archimedean_tiling {
@ -1087,7 +1089,7 @@ EX void next_variation() {
EX void enable(archimedean_tiling& arct) {
stop_game();
if(!archimedean) set_variation(eVariation::pure);
if(!in()) set_variation(eVariation::pure);
set_geometry(gArchimedean);
patterns::whichPattern = patterns::PAT_NONE;
current = arct;
@ -1174,7 +1176,7 @@ EX void show() {
dialog::addBreak(100);
}
else {
string cs = archimedean ? current.symbol : XLAT("OFF");
string cs = in() ? current.symbol : XLAT("OFF");
dialog::addSelItem("edit", cs, '/');
dialog::add_action([] () {
symbol_editing = true;
@ -1234,7 +1236,7 @@ EX void show() {
if(spos < 0) spos = 0;
});
if(archimedean) {
if(in()) {
dialog::addSelItem(XLAT("size of the world"), current.world_size(), 0);
dialog::addSelItem(XLAT("edge length"), current.get_class() == gcEuclid ? (fts(current.edgelength) + XLAT(" (arbitrary)")) : fts(current.edgelength), 0);
@ -1266,7 +1268,7 @@ EX void show() {
}
else dialog::addBreak(100);
if(archimedean) {
if(in()) {
dialog::addSelItem(XLAT("variations"), gp::operation_name(), 'v');
dialog::add_action(next_variation);
}
@ -1369,6 +1371,7 @@ EX int valence() {
#endif
EX map<gp::loc, cdata>& get_cdata() { return ((arcm::hrmap_archimedean*) (currentmap))->eucdata; }
}
EX }
}

View File

@ -839,7 +839,7 @@ EX bool buildBarrierNowall(cell *c, eLand l2, int forced_dir IS(NODIR)) {
}
bool warpv = warped_version(c->land, l2);
if(warpv && !archimedean && !pseudohept(c)) return false;
if(warpv && !arcm::in() && !pseudohept(c)) return false;
int ds[MAX_EDGE];
for(int i=0; i<c->type; i++) ds[i] = i;

View File

@ -1324,7 +1324,7 @@ EX int wallchance(cell *c, bool deepOcean) {
/** should we generate the horocycles in the current geometry? */
EX bool horo_ok() {
return hyperbolic && !binarytiling && !archimedean && !penrose && !experimental && !hybri;
return hyperbolic && !binarytiling && !arcm::in() && !penrose && !experimental && !hybri;
}
EX bool gp_wall_test() {
@ -1368,7 +1368,7 @@ EX bool deep_ocean_at(cell *c, cell *from) {
}
EX bool good_for_wall(cell *c) {
if(archimedean) return true;
if(arcm::in()) return true;
if(WDIM == 3) return true;
return pseudohept(c);
}
@ -1542,7 +1542,7 @@ EX bool openplains(cell *c) {
return true;
}
int dlimit = getDistLimit();
if(archimedean) dlimit--;
if(arcm::in()) dlimit--;
if(dlimit < 7) {
celllister cl(c, dlimit, 1000000, NULL);
int bad = 0;

View File

@ -199,14 +199,14 @@ EX cell *createMov(cell *c, int d) {
}
#endif
#if CAP_ARCM
else if(archimedean && PURE) {
else if(arcm::in() && PURE) {
if(arcm::id_of(c->master) < arcm::current.N * 2) {
heptspin hs = heptspin(c->master, d) + wstep + 2 + wstep + 1;
c->c.connect(d, hs.at->c7, hs.spin, hs.mirrored);
}
else c->c.connect(d, c, d, false);
}
else if(archimedean && DUAL) {
else if(arcm::in() && DUAL) {
if(arcm::id_of(c->master) >= arcm::current.N * 2) {
heptagon *h2 = createStep(c->master, d*2);
int d1 = c->master->c.spin(d*2);
@ -218,7 +218,7 @@ EX cell *createMov(cell *c, int d) {
}
}
#endif
else if(archimedean || PURE) {
else if(arcm::in() || PURE) {
heptagon *h2 = createStep(c->master, d);
c->c.connect(d, h2->c7,c->master->c.spin(d), c->master->c.mirror(d));
hybrid::link();
@ -275,7 +275,7 @@ EX void initcells() {
#endif
else if(arb::in()) currentmap = arb::new_map();
#if CAP_ARCM
else if(archimedean) currentmap = arcm::new_map();
else if(arcm::in()) currentmap = arcm::new_map();
#endif
else if(euclid && !penrose) currentmap = euc::new_map();
#if CAP_BT
@ -325,7 +325,7 @@ template<class T> void subcell(cell *c, const T& t) {
subcell(c2, t);
}
}
else if(BITRUNCATED && !archimedean && !binarytiling)
else if(BITRUNCATED && !arcm::in() && !binarytiling)
forCellEx(c2, c) t(c2);
t(c);
}
@ -413,7 +413,7 @@ EX void verifycell(cell *c) {
}
EX void verifycells(heptagon *at) {
if(GOLDBERG || IRREGULAR || archimedean) return;
if(GOLDBERG || IRREGULAR || arcm::in()) return;
for(int i=0; i<at->type; i++) if(at->move(i) && at->move(i)->move(at->c.spin(i)) && at->move(i)->move(at->c.spin(i)) != at) {
printf("hexmix error %p [%d s=%d] %p %p\n", at, i, at->c.spin(i), at->move(i), at->move(i)->move(at->c.spin(i)));
}
@ -450,7 +450,7 @@ EX int celldist(cell *c) {
#if CAP_IRR
if(IRREGULAR) return irr::celldist(c, false);
#endif
if(archimedean || ctof(c)) return c->master->distance;
if(arcm::in() || ctof(c)) return c->master->distance;
#if CAP_GP
if(GOLDBERG) return gp::compute_dist(c, celldist);
#endif
@ -646,7 +646,7 @@ cdata orig_cdata;
EX bool geometry_supports_cdata() {
if(hybri) return PIU(geometry_supports_cdata());
return among(geometry, gEuclid, gEuclidSquare, gNormal, gOctagon, g45, g46, g47, gBinaryTiling) || (archimedean && !sphere);
return among(geometry, gEuclid, gEuclidSquare, gNormal, gOctagon, g45, g46, g47, gBinaryTiling) || (arcm::in() && !sphere);
}
void affect(cdata& d, short rv, signed char signum) {
@ -797,7 +797,7 @@ cdata *getHeptagonCdata(heptagon *h) {
cdata *getEuclidCdata(gp::loc h) {
int x = h.first, y = h.second;
auto& data = archimedean ? arcm::get_cdata() : euc::get_cdata();
auto& data = arcm::in() ? arcm::get_cdata() : euc::get_cdata();
// hrmap_euclidean* euc = dynamic_cast<hrmap_euclidean*> (currentmap);
if(data.count(h)) return &(data[h]);
@ -864,9 +864,9 @@ EX cdata *arcmCdata(cell *c) {
EX int getCdata(cell *c, int j) {
if(prod) { c = hybrid::get_where(c).first; return PIU(getBits(c)); }
else if(euc::in()) return getEuclidCdata(euc2_coordinates(c))->val[j];
else if(archimedean && euclid)
else if(arcm::in() && euclid)
return getEuclidCdata(pseudocoords(c))->val[j];
else if(archimedean && hyperbolic)
else if(arcm::in() && hyperbolic)
return arcmCdata(c)->val[j]*3;
else if(!geometry_supports_cdata()) return 0;
else if(ctof(c)) return getHeptagonCdata(c->master)->val[j]*3;
@ -882,9 +882,9 @@ EX int getCdata(cell *c, int j) {
EX int getBits(cell *c) {
if(prod) { c = hybrid::get_where(c).first; return PIU(getBits(c)); }
else if(euc::in()) return getEuclidCdata(euc2_coordinates(c))->bits;
else if(archimedean && euclid)
else if(arcm::in() && euclid)
return getEuclidCdata(pseudocoords(c))->bits;
else if(archimedean && (hyperbolic || sl2))
else if(arcm::in() && (hyperbolic || sl2))
return arcmCdata(c)->bits;
else if(!geometry_supports_cdata()) return 0;
else if(c == c->master->c7) return getHeptagonCdata(c->master)->bits;
@ -1017,7 +1017,7 @@ EX int celldistance(cell *c1, cell *c2) {
return euc::cyldist(euc2_coordinates(c1), euc2_coordinates(c2));
}
if(archimedean || quotient || solnih || (penrose && euclid) || experimental || sl2 || nil) {
if(arcm::in() || quotient || solnih || (penrose && euclid) || experimental || sl2 || nil) {
if(saved_distances.count(make_pair(c1,c2)))
return saved_distances[make_pair(c1,c2)];
@ -1043,7 +1043,7 @@ EX int celldistance(cell *c1, cell *c2) {
#endif
#if MAXMDIM >= 4
if(euclid && !penrose && !archimedean)
if(euclid && !penrose && !arcm::in())
return euc::celldistance(c1, c2);
if(hyperbolic && WDIM == 3) return reg3::celldistance(c1, c2);
@ -1238,7 +1238,7 @@ EX vector<int> reverse_directions(heptagon *c, int dir) {
}
EX bool standard_tiling() {
return !archimedean && !penrose && !binarytiling;
return !arcm::in() && !penrose && !binarytiling;
}
}

View File

@ -1027,7 +1027,7 @@ void celldrawer::set_land_floor(const transmatrix& Vf) {
case laSwitch:
set_floor(cgi.shSwitchFloor);
if(ctof(c) && STDVAR && !archimedean && !binarytiling && GDIM == 2) for(int i=0; i<c->type; i++)
if(ctof(c) && STDVAR && !arcm::in() && !binarytiling && GDIM == 2) for(int i=0; i<c->type; i++)
queuepoly(Vf * ddspin(c, i, M_PI/S7) * xpush(cgi.rhexf), cgi.shSwitchDisk, darkena(minf[active_switch()].color, fd, 0xFF));
break;

View File

@ -13,7 +13,7 @@ namespace hr {
EX namespace whirlwind {
EX int fzebra3(cell *c) {
if(archimedean) return 0;
if(arcm::in()) return 0;
if(euclid) {
if(bounded) return 0;
auto co = euc2_coordinates(c);
@ -1115,7 +1115,7 @@ EX namespace mirror {
}
#endif
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
c->wall = hrand(2) ? waMirror : waCloud;
return true;
}
@ -1235,7 +1235,7 @@ EX namespace mirror {
if(penrose || sol) return;
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
create_archimedean(cw, cpid, true);
return;
}
@ -1270,7 +1270,7 @@ EX namespace mirror {
EX void createMirages(cellwalker cw, int cpid) {
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
create_archimedean(cw, cpid, false);
return;
}
@ -2009,7 +2009,7 @@ EX namespace heat {
int divby = 10;
if(S7 > 10) divby *= 2;
if(archimedean) divby *= 2;
if(arcm::in()) divby *= 2;
if(WDIM == 3) divby *= 2;
for(int i=0; i<dcs; i++) {
@ -2701,7 +2701,7 @@ EX namespace sword {
if(SWORDDIM == 3) sword_angles = 1;
else if(IRREGULAR) sword_angles = 840;
else if(binarytiling) sword_angles = 42;
else if(archimedean) {
else if(arcm::in()) {
if(!PURE) possible_divisor((BITRUNCATED ? 2 : 1) * isize(arcm::current.faces));
if(!DUAL) for(int f: arcm::current.faces) possible_divisor(f);
}
@ -3428,7 +3428,7 @@ EX namespace windmap {
// cw.spin = 0;
neighbors.emplace_back();
auto &v = neighbors.back();
if(NONSTDVAR && !sphere && !archimedean && !hybri)
if(NONSTDVAR && !sphere && !arcm::in() && !hybri)
for(int l=0; l<S7; l++) {
v.push_back(getId(cw + cth + l + wstep + cth));
}

View File

@ -428,7 +428,7 @@ struct debugScreen {
});
dialog::addSelItem("item", dnameof(what->item), 0);
#if CAP_ARCM
if(archimedean)
if(arcm::in())
dialog::addSelItem("ID", its(arcm::id_of(what->master)), 0);
#endif
dialog::addBreak(50);

View File

@ -489,7 +489,7 @@ EX bool sizes_known() {
// Castle Anthrax is infinite
if(binarytiling) return false;
// not implemented
if(archimedean) return false;
if(arcm::in()) return false;
if(penrose) return false;
return true;
}
@ -522,7 +522,7 @@ string ncnames[4] = { "NO", "distance", "type", "debug" };
eNumberCoding number_coding = ncDistance;
bool mod_allowed() {
return cheater || autocheat || archimedean || tour::on;
return cheater || autocheat || arcm::in() || tour::on;
}
EX int curr_dist(cell *c) {

View File

@ -662,7 +662,7 @@ void geometry_information::generate_floorshapes() {
#endif
#if CAP_ARCM
else if(archimedean) {
else if(arcm::in()) {
arcm::parent_index_of(&modelh) = 0;
auto &ac = arcm::current;
for(int i=0; i<2*ac.N + 2; i++) {
@ -826,7 +826,7 @@ EX int shvid(cell *c) {
return gp::get_plainshape_id(c);
else if(IRREGULAR)
return irr::cellindex[c];
else if(archimedean)
else if(arcm::in())
return arcm::id_of(c->master);
else if(arb::in())
return arb::id_of(c->master);
@ -864,7 +864,7 @@ EX struct dqi_poly *draw_shapevec(cell *c, const transmatrix& V, const vector<hp
}
#endif
#if CAP_ARCM
else if(archimedean) {
else if(arcm::in()) {
return &queuepolyat(V, shv[arcm::id_of(c->master)], col, prio);
}
#endif

View File

@ -226,9 +226,9 @@ EX geometry_filter *current_filter;
bool forced_quotient() { return quotient && !(cgflags & qOPTQ); }
EX geometry_filter gf_hyperbolic = {"hyperbolic", [] { return (archimedean || hyperbolic) && !forced_quotient(); }};
EX geometry_filter gf_spherical = {"spherical", [] { return (archimedean || sphere) && !forced_quotient(); }};
EX geometry_filter gf_euclidean = {"Euclidean", [] { return (archimedean || euclid) && !forced_quotient(); }};
EX geometry_filter gf_hyperbolic = {"hyperbolic", [] { return (arcm::in() || hyperbolic) && !forced_quotient(); }};
EX geometry_filter gf_spherical = {"spherical", [] { return (arcm::in() || sphere) && !forced_quotient(); }};
EX geometry_filter gf_euclidean = {"Euclidean", [] { return (arcm::in() || euclid) && !forced_quotient(); }};
EX geometry_filter gf_other = {"non-isotropic", [] { return prod || nonisotropic; }};
EX geometry_filter gf_regular_2d = {"regular 2D tesselations", [] {
return standard_tiling() && WDIM == 2 && !forced_quotient();
@ -289,14 +289,14 @@ void set_or_configure_geometry(eGeometry g) {
}
if(g == gRotSpace) {
bool ok = true;
if(archimedean) ok = PURE;
if(arcm::in()) ok = PURE;
else if(binarytiling || penrose) ok = false;
else ok = PURE || BITRUNCATED;
if(!ok) {
addMessage(XLAT("Only works with (semi-)regular tilings"));
return;
}
if(archimedean) {
if(arcm::in()) {
int steps, single_step;
if(!arcm::current.get_step_values(steps, single_step)) {
addMessage(XLAT("That would have %1/%2 levels", its(steps), its(single_step)));
@ -350,7 +350,7 @@ void ge_select_tiling() {
dynamicval<eGeometry> cg(geometry, g);
if(g == gArbitrary) continue;
if(g == gTorus) continue;
if(archimedean && !CAP_ARCM) continue;
if(arcm::in() && !CAP_ARCM) continue;
if(cryst && !CAP_CRYSTAL) continue;
if(sol && !CAP_SOLV) continue;
if(WDIM == 3 && MAXMDIM == 3) continue;
@ -470,7 +470,7 @@ EX void select_quotient_screen() {
}
EX void select_quotient() {
if(euclid && !penrose && !archimedean) {
if(euclid && !penrose && !arcm::in()) {
euc::prepare_torus3();
pushScreen(euc::show_torus3);
}
@ -600,7 +600,7 @@ EX void showEuclideanMenu() {
string spf = its(ts);
if(0) ;
#if CAP_ARCM
else if(archimedean) {
else if(arcm::in()) {
spf = "";
for(int i: arcm::current.faces) {
if(spf != "") spf += ",";
@ -684,7 +684,7 @@ EX void showEuclideanMenu() {
dialog::add_action([] {
if(0) ;
#if CAP_ARCM
else if(archimedean) arcm::next_variation();
else if(arcm::in()) arcm::next_variation();
#endif
else if(euc::in(2,4) || !CAP_GP) dialog::do_if_confirmed([] {
set_variation(PURE ? eVariation::bitruncated : eVariation::pure);
@ -801,8 +801,8 @@ EX void showEuclideanMenu() {
binarytiling ? fts(8 * M_PI * sqrt(2) * log(2) / pow(vid.binary_width, WDIM-1), 4) + " exp(∞)" :
#endif
#if CAP_ARCM
archimedean && (WDIM == 2) ? arcm::current.world_size() :
(archimedean && sphere) ? its(isize(currentmap->allcells())) :
arcm::in() && (WDIM == 2) ? arcm::current.world_size() :
(arcm::in() && sphere) ? its(isize(currentmap->allcells())) :
#endif
#if CAP_CRYSTAL
cryst ? "∞^" + its(ts/2) :

View File

@ -423,7 +423,7 @@ void geometry_information::prepare_basics() {
ld fmin, fmax;
if(archimedean && !prod)
if(arcm::in() && !prod)
ginf[gArchimedean].cclass = gcHyperbolic;
if(hybri) {
@ -501,7 +501,7 @@ void geometry_information::prepare_basics() {
irr::compute_geometry();
#endif
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
arcm::current.compute_geometry();
crossf = hcrossf7 * arcm::current.scale();
hexvdist = arcm::current.scale() * .5;
@ -876,7 +876,7 @@ EX void check_cgi() {
if(GOLDBERG) V("GP", its(gp::param.first) + "," + its(gp::param.second));
if(IRREGULAR) V("IRR", its(irr::irrid));
if(archimedean) V("ARCM", arcm::current.symbol);
if(arcm::in()) V("ARCM", arcm::current.symbol);
if(cryst) V("CRYSTAL", its(ginf[gCrystal].sides) + its(ginf[gCrystal].vertex));

View File

@ -310,7 +310,7 @@ void hrmap_hyperbolic::virtualRebase(heptagon*& base, transmatrix& at) {
}
EX bool no_easy_spin() {
return NONSTDVAR || archimedean || WDIM == 3 || binarytiling || penrose;
return NONSTDVAR || arcm::in() || WDIM == 3 || binarytiling || penrose;
}
ld hrmap_standard::spin_angle(cell *c, int d) {
@ -369,7 +369,7 @@ transmatrix hrmap_standard::adj(cell *c, int i) {
EX double randd() { return (rand() + .5) / (RAND_MAX + 1.); }
EX hyperpoint randomPointIn(int t) {
if(NONSTDVAR || archimedean || penrose) {
if(NONSTDVAR || arcm::in() || penrose) {
// Let these geometries be less confusing.
// Also easier to implement ;)
return xspinpush0(2 * M_PI * randd(), asinh(randd() / 20));
@ -404,7 +404,7 @@ EX hyperpoint get_corner_position(cell *c, int cid, ld cf IS(3)) {
}
#endif
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
auto &ac = arcm::current;
if(PURE) {
if(arcm::id_of(c->master) >= ac.N*2) return C0;
@ -458,7 +458,7 @@ EX hyperpoint nearcorner(cell *c, int i) {
}
#endif
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
if(PURE) {
auto &ac = arcm::current;
auto& t = ac.get_triangle(c->master, i-1);
@ -564,7 +564,7 @@ EX hyperpoint farcorner(cell *c, int i, int which) {
return nearcorner(c, (i+which) % c->type); // lazy
#endif
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
if(PURE) {
auto &ac = arcm::current;
auto& t = ac.get_triangle(c->master, i-1);
@ -609,7 +609,7 @@ EX hyperpoint get_warp_corner(cell *c, int cid) {
if(GOLDBERG) return gp::get_corner_position(c, cid, 2);
#endif
#if CAP_IRR || CAP_ARCM
if(IRREGULAR || archimedean) return midcorner(c, cid, .5);
if(IRREGULAR || arcm::in()) return midcorner(c, cid, .5);
#endif
return ddspin(c,cid,M_PI/S7) * xpush0(cgi.tessf/2);
}

View File

@ -3060,7 +3060,7 @@ bool drawstaratvec(double dx, double dy) {
EX color_t reptilecolor(cell *c) {
int i;
if(archimedean)
if(arcm::in())
i = c->master->rval0 & 3;
else {
i = zebra40(c);
@ -3153,7 +3153,7 @@ EX bool has_nice_dual() {
if(IRREGULAR) return irr::bitruncations_performed > 0;
#endif
#if CAP_ARCM
if(archimedean) return geosupport_football() >= 2;
if(arcm::in()) return geosupport_football() >= 2;
#endif
if(binarytiling) return false;
if(BITRUNCATED) return true;
@ -3251,7 +3251,7 @@ EX bool placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, color_t
if(NONSTDVAR || !standard_tiling()) {
#if CAP_ARCM
if(archimedean && !PURE)
if(arcm::in() && !PURE)
i = (i + arcm::parent_index_of(c->master)/DUALMUL + MODFIXER) % c->type;
#endif
draw_shapevec(c, V2, qfi.fshape->gpside[sidepar][i], col, prio);
@ -4204,7 +4204,7 @@ EX bool allowIncreasedSight() {
#endif
if(randomPatternsMode) return true;
if(racing::on) return true;
if(quotient || !hyperbolic || archimedean) return true;
if(quotient || !hyperbolic || arcm::in()) return true;
if(WDIM == 3) return true;
return false;
}
@ -4216,7 +4216,7 @@ EX bool allowChangeRange() {
#endif
if(racing::on) return true;
if(sightrange_bonus >= 0) return true;
if(archimedean) return true;
if(arcm::in()) return true;
if(WDIM == 3) return true;
return false;
}

View File

@ -79,7 +79,7 @@ EX heptagon *buildHeptagon1(heptagon *h, heptagon *parent, int d, hstate s, int
heptagon *buildHeptagon(heptagon *parent, int d, hstate s, int pard = 0, int fixdistance = COMPUTE) {
heptagon *h = buildHeptagon1(tailored_alloc<heptagon> (S7), parent, d, s, pard);
if(binarytiling || archimedean) return h;
if(binarytiling || arcm::in()) return h;
if(parent->c7) {
#if CAP_IRR
if(IRREGULAR)

13
hyper.h
View File

@ -112,15 +112,14 @@ void addMessage(string s, char spamtype = 0);
#define ALPHA (M_PI*2/S7)
#define S7 cginf.sides
#define S3 cginf.vertex
#define hyperbolic_37 (S7 == 7 && S3 == 3 && !binarytiling && !archimedean)
#define hyperbolic_not37 ((S7 > 7 || S3 > 3 || binarytiling || archimedean) && hyperbolic)
#define weirdhyperbolic ((S7 > 7 || S3 > 3 || !STDVAR || binarytiling || archimedean) && hyperbolic)
#define stdhyperbolic (S7 == 7 && S3 == 3 && STDVAR && !binarytiling && !archimedean)
#define hyperbolic_37 (S7 == 7 && S3 == 3 && !binarytiling && !arcm::in())
#define hyperbolic_not37 ((S7 > 7 || S3 > 3 || binarytiling || arcm::in()) && hyperbolic)
#define weirdhyperbolic ((S7 > 7 || S3 > 3 || !STDVAR || binarytiling || arcm::in()) && hyperbolic)
#define stdhyperbolic (S7 == 7 && S3 == 3 && STDVAR && !binarytiling && !arcm::in())
#define cgflags cginf.flags
#define binarytiling (cgflags & qBINARY)
#define archimedean (cgflags & qARCHI)
#define cryst (cgflags & qCRYSTAL)
#define penrose (cgflags & qPENROSE)
@ -152,7 +151,7 @@ void addMessage(string s, char spamtype = 0);
// Dry Forest burning, heat transfer, etc. are performed on the whole universe
#define doall (bounded)
#define sphere_narcm (sphere && !archimedean)
#define sphere_narcm (sphere && !arcm::in())
#define a4 (S3 == 4)
#define a45 (S3 == 4 && S7 == 5)
@ -186,7 +185,7 @@ void addMessage(string s, char spamtype = 0);
#define NONSTDVAR (!STDVAR)
#if CAP_ARCM
#define VALENCE (BITRUNCATED ? 3 : archimedean ? arcm::valence() : S3)
#define VALENCE (BITRUNCATED ? 3 : arcm::in() ? arcm::valence() : S3)
#else
#define VALENCE (BITRUNCATED ? 3 : S3)
#endif

View File

@ -973,7 +973,7 @@ EX ld master_to_c7_angle() {
#if CAP_GP
if(cgi.gpdata) alpha = cgi.gpdata->alpha;
#endif
return (!BITRUNCATED && !binarytiling && !archimedean) ? M_PI + alpha : 0;
return (!BITRUNCATED && !binarytiling && !arcm::in()) ? M_PI + alpha : 0;
}
EX transmatrix actualV(const heptspin& hs, const transmatrix& V) {
@ -984,7 +984,7 @@ EX transmatrix actualV(const heptspin& hs, const transmatrix& V) {
return V * spin(M_PI + 2 * M_PI / S7 * (hs.spin + irr::periodmap[hs.at].base.spin));
#endif
#if CAP_ARCM
if(archimedean) return V * spin(-arcm::current.triangles[arcm::id_of(hs.at)][hs.spin].first);
if(arcm::in()) return V * spin(-arcm::current.triangles[arcm::id_of(hs.at)][hs.spin].first);
#endif
#if CAP_BT
if(binarytiling) return V;

View File

@ -273,7 +273,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
}
}
}
else if(PIU(hyperbolic_not37 || (euclid&&bounded) || S7 < 5 || archimedean || WDIM == 3)) {
else if(PIU(hyperbolic_not37 || (euclid&&bounded) || S7 < 5 || arcm::in() || WDIM == 3)) {
if(fargen) {
int i = hrand(100);
if(i < 10)
@ -520,7 +520,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->wall = waCavewall;
else c->wall = waCavefloor;
}
else if(a4 || archimedean || cryst)
else if(a4 || arcm::in() || cryst)
c->wall = hrand(100) < 50 ? waCavefloor : waCavewall;
else if(!BITRUNCATED) {
if(polarb50(c))
@ -594,10 +594,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
v = 6;
}
#if CAP_ARCM
else if(archimedean && arcm::current.have_line)
else if(arcm::in() && arcm::current.have_line)
v = arcm::linespattern(c) ? 24 : 16;
#endif
else if((euclid&&bounded) || hyperbolic_not37 || quotient || archimedean) {
else if((euclid&&bounded) || hyperbolic_not37 || quotient || arcm::in()) {
v = hrand(100) < 25 ? 24 : 16;
}
else if(euclid) {
@ -660,10 +660,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(d==8) {
if(euclid && bounded) ;
#if CAP_ARCM
else if(archimedean && arcm::current.have_line)
else if(arcm::in() && arcm::current.have_line)
c->wall = arcm::linespattern(c) ? waTrapdoor : waNone;
#endif
else if(euclid && !archimedean) {
else if(euclid && !arcm::in()) {
auto co = euc2_coordinates(c);
int y = co.second;
if(y&1) c->wall = waTrapdoor;
@ -671,7 +671,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
}
#if CAP_ARCM
else
if(archimedean) c->wall = hrand(2) ? waTrapdoor : waNone;
if(arcm::in()) c->wall = hrand(2) ? waTrapdoor : waNone;
#endif
else
c->wall = (randomPatternsMode ? RANDPAT : (zebra40(c)&2)) ? waTrapdoor : waNone;
@ -688,7 +688,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(d==8) {
if(euclid && bounded) ;
#if CAP_ARCM
else if(archimedean && arcm::current.have_line)
else if(arcm::in() && arcm::current.have_line)
c->wall = arcm::linespattern(c) ? waVinePlant : waNone;
#endif
else if(nil) {
@ -699,7 +699,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if((c->master->distance & 1) == 1 && (c->master->emeraldval % 3))
c->wall = waVinePlant;
}
else if(euclid && !archimedean) {
else if(euclid && !arcm::in()) {
auto co = euc2_coordinates(c);
int y = co.second;
int dy = gmod(y, 3);
@ -707,7 +707,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
}
else if(WDIM == 3 && hyperbolic && !binarytiling)
c->wall = (c->master->zebraval & 2) ? waVinePlant : waNone;
else if(a4 || sphere || archimedean)
else if(a4 || sphere || arcm::in())
c->wall = hrand(100) < 50 ? waNone : waVinePlant;
else {
int v = emeraldval(c);
@ -753,7 +753,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->item = itDodeca;
}
else {
int i = archimedean ? hrand(50) : zebra40(c);
int i = arcm::in() ? hrand(50) : zebra40(c);
if(i < 40) {
int cd = geometry_supports_cdata() ? getCdata(c, 3) : hrand(16);
cd &= 15;
@ -1266,7 +1266,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(S7 == 4 && celldistance(c, currentmap->gamestart()) == 2 && ctof(c))
c->wall = waChasm;
}
else if(archimedean) ;
else if(arcm::in()) ;
else if(!euclid && zebra3(c) == 0) c->wall = waFan;
else if(pseudohept(c) && hrand(2000) < 150 && !reptilecheat)
c->wall = waChasm;
@ -2286,7 +2286,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(a38)
patterns::val38(c, si, patterns::SPF_DOCKS, patterns::PAT_COLORING);
else
si.id = archimedean ? (hrand(6)*4) : (zebra40(c)&2) ? 0 : zebra40(c) == 4 ? 8 : 1;
si.id = arcm::in() ? (hrand(6)*4) : (zebra40(c)&2) ? 0 : zebra40(c) == 4 ? 8 : 1;
c->wall = waSea;
if(among(si.id, 0, 4, 16, PURE ? -1 : 24))
c->wall = waDock;
@ -2576,7 +2576,7 @@ EX void setdist(cell *c, int d, cell *from) {
// this fixes the following problem:
// http://steamcommunity.com/app/342610/discussions/0/1470840994970724215/
if(!generatingEquidistant && from && d >= 7 && c->land && !binarytiling && !archimedean && !cryst && WDIM == 2 && hyperbolic) {
if(!generatingEquidistant && from && d >= 7 && c->land && !binarytiling && !arcm::in() && !cryst && WDIM == 2 && hyperbolic) {
int cdi = celldist(c);
if(celldist(from) > cdi) {
forCellCM(c2, c) if(celldist(c2) < cdi) {

View File

@ -776,7 +776,7 @@ EX land_validity_t& land_validity(eLand l) {
}
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
if(among(l, laPower, laZebra, laWineyard) && arcm::current.have_line) return lv::pattern_defined;
// horocycles not implemented
if(isCyclic(l)) return not_implemented;
@ -889,12 +889,12 @@ EX land_validity_t& land_validity(eLand l) {
return dont_work;
#endif
if(archimedean && l == laPrairie) return dont_work;
if(arcm::in() && l == laPrairie) return dont_work;
if((IRREGULAR || archimedean) && among(l, laBlizzard, laVolcano) && !sphere)
if((IRREGULAR || arcm::in()) && among(l, laBlizzard, laVolcano) && !sphere)
return dont_work;
if(archimedean && DUAL && l == laCrossroads4)
if(arcm::in() && DUAL && l == laCrossroads4)
return not_implemented;
if(geometry == gKiteDart3 && l == laGraveyard)
@ -906,7 +906,7 @@ EX land_validity_t& land_validity(eLand l) {
if(chaosmode)
return not_in_chaos;
// the algorithm fails in Archimedean DUAL
if(archimedean && DUAL)
if(arcm::in() && DUAL)
return not_implemented;
// the algorithm fails in Binary4
if(geometry == gBinary4)
@ -970,7 +970,7 @@ EX land_validity_t& land_validity(eLand l) {
return special_chaos;
return not_in_chaos;
}
if(archimedean || penrose) return not_implemented;
if(arcm::in() || penrose) return not_implemented;
if(bounded) return unbounded_only;
}
@ -978,7 +978,7 @@ EX land_validity_t& land_validity(eLand l) {
return not_in_chaos;
// this pattern does not work on elliptic and small spheres
if((l == laBlizzard || l == laVolcano) && elliptic && S7 < 5 && !archimedean)
if((l == laBlizzard || l == laVolcano) && elliptic && S7 < 5 && !arcm::in())
return not_enough_space;
// ... and it works in gp only partially
@ -1191,7 +1191,7 @@ EX land_validity_t& land_validity(eLand l) {
if(l == laWildWest && !randomPatternsMode)
return out_of_theme;
if(l == laIce && STDVAR && hyperbolic_37 && !quotient && !archimedean && !binarytiling)
if(l == laIce && STDVAR && hyperbolic_37 && !quotient && !arcm::in() && !binarytiling)
return full_game;
return ok;

View File

@ -284,7 +284,7 @@ namespace mapstream {
for(int k=0; k<i; k++) f.write(kills[k]);
}
addToQueue((bounded || euclid || prod || archimedean) ? currentmap->gamestart() : cwt.at->master->c7);
addToQueue((bounded || euclid || prod || arcm::in()) ? currentmap->gamestart() : cwt.at->master->c7);
for(int i=0; i<isize(cellbyid); i++) {
cell *c = cellbyid[i];
if(i) {

View File

@ -1384,7 +1384,7 @@ EX namespace product {
EX bool validate_spin() {
if(prod) return hybrid::in_underlying_geometry(validate_spin);
if(penrose) return false;
if(!quotient && !archimedean) return true;
if(!quotient && !arcm::in()) return true;
map<cell*, cellwalker> cws;
manual_celllister cl;
cell *start = currentmap->gamestart();

View File

@ -480,7 +480,7 @@ EX int treasureForLocal() {
}
EX bool extra_safety_for_memory(cell *c) {
if(hyperbolic && (archimedean || S3 > 3) && !quotient && !tactic::on && in_full_game()) {
if(hyperbolic && (arcm::in() || S3 > 3) && !quotient && !tactic::on && in_full_game()) {
if(hrand(1000) < 1) {
c->item = itOrbSafety;
return true;

View File

@ -77,7 +77,7 @@ bool ishex2(cell *c) {
int chessvalue(cell *c) {
#if CAP_ARCM
if(archimedean)
if(arcm::in())
return arcm::chessvalue(c);
else
#endif
@ -371,7 +371,7 @@ EX int fieldval_uniq(cell *c) {
return PIU ( fieldval_uniq(c1) );
}
else if(sphere) {
if(archimedean) return c->master->fiftyval;
if(arcm::in()) return c->master->fiftyval;
#if CAP_IRR
else if(IRREGULAR) return irr::cellindex[c];
#endif
@ -381,12 +381,12 @@ EX int fieldval_uniq(cell *c) {
if(ctof(c)) return c->master->fieldval;
else return createMov(c, 0)->master->fieldval + 256 * createMov(c,2)->master->fieldval + (1<<16) * createMov(c,4)->master->fieldval;
}
else if(euclid && !penrose && !archimedean) {
else if(euclid && !penrose && !arcm::in()) {
auto p = euc2_coordinates(c);
if(bounded) return p.first + (p.second << 16);
return gmod(p.first - 22 * p.second, 3*127);
}
else if(binarytiling || archimedean || nil || S3 >= OINF || (cgflags & qIDEAL)) return 0;
else if(binarytiling || arcm::in() || nil || S3 >= OINF || (cgflags & qIDEAL)) return 0;
else if(&currfp == &fp_invalid) return 0;
else if(WDIM == 3) return c->master->fieldval;
else if(ctof(c) || NONSTDVAR) return c->master->fieldval/S7;
@ -825,7 +825,7 @@ EX namespace patterns {
}
void val_all(cell *c, patterninfo &si, int sub, int pat) {
if(IRREGULAR || archimedean || binarytiling || WDIM == 3) si.symmetries = 1;
if(IRREGULAR || arcm::in() || binarytiling || WDIM == 3) si.symmetries = 1;
else if(a46) val46(c, si, sub, pat);
else if(a38) val38(c, si, sub, pat);
else if(sphere && S3 == 3) valSibling(c, si, sub, pat);
@ -986,7 +986,7 @@ EX namespace patterns {
si.id += irr::cellindex[c] << 8;
#endif
#if CAP_ARCM
else if(archimedean)
else if(arcm::in())
si.id += (arcm::id_of(c->master) << 8) + (arcm::parent_index_of(c->master) << 16);
#endif
#if CAP_GP
@ -1019,7 +1019,7 @@ EX namespace patterns {
}
#if CAP_ARCM
if(archimedean && pat == 0) {
if(arcm::in() && pat == 0) {
if(sub & SPF_FOOTBALL) {
val_threecolors(c, si, sub);
return si;
@ -1145,7 +1145,7 @@ EX namespace patterns {
if(euclid)
// use the torus ID
si.id = fieldpattern::fieldval_uniq(c);
else if(PURE && !archimedean)
else if(PURE && !arcm::in())
// use the actual field codes
si.id = fieldpattern::fieldval(c).first;
else
@ -1169,7 +1169,7 @@ EX namespace patterns {
else val_threecolors(c, si, sub);
}
else if(pat == PAT_COLORING && (S7 == 4 || euclid || (a38 && gp_threecolor() == 1) || archimedean)) {
else if(pat == PAT_COLORING && (S7 == 4 || euclid || (a38 && gp_threecolor() == 1) || arcm::in())) {
val_threecolors(c, si, sub);
}
@ -1199,8 +1199,8 @@ EX namespace patterns {
EX bool geosupport_chessboard() {
return
#if CAP_ARCM
(archimedean && PURE) ? arcm::current.support_chessboard() :
(archimedean && DUAL) ? arcm::current.support_threecolor_bitruncated() :
(arcm::in() && PURE) ? arcm::current.support_chessboard() :
(arcm::in() && DUAL) ? arcm::current.support_threecolor_bitruncated() :
#endif
(binarytiling || penrose) ? 0 :
(S3 >= OINF) ? true :
@ -1211,9 +1211,9 @@ EX int geosupport_threecolor() {
if(IRREGULAR) return 0;
if(penrose || binarytiling) return 0;
#if CAP_ARCM
if(archimedean && PURE) return arcm::current.support_threecolor();
if(archimedean && BITRUNCATED) return arcm::current.support_threecolor_bitruncated();
if(archimedean && DUAL) return 0; // it sometimes does support threecolor, but it can be obtained in other ways then
if(arcm::in() && PURE) return arcm::current.support_threecolor();
if(arcm::in() && BITRUNCATED) return arcm::current.support_threecolor_bitruncated();
if(arcm::in() && DUAL) return 0; // it sometimes does support threecolor, but it can be obtained in other ways then
#endif
if(BITRUNCATED && S3 == 3) {
if(S7 % 2) return 1;
@ -1233,10 +1233,10 @@ EX int geosupport_football() {
if(binarytiling || penrose) return 0;
#if CAP_ARCM
if(archimedean && DUAL) return false;
if(arcm::in() && DUAL) return false;
// it sometimes does support football, but it can be obtained in other ways then
if(archimedean /* PURE */) return arcm::current.support_football();
if(arcm::in() /* PURE */) return arcm::current.support_football();
#endif
#if CAP_IRR
@ -1256,7 +1256,7 @@ EX int geosupport_football() {
EX int pattern_threecolor(cell *c) {
#if CAP_ARCM
if(archimedean) {
if(arcm::in()) {
if(PURE)
return arcm::threecolor(c);
else /* if(BITRUNCATED) */
@ -1399,7 +1399,7 @@ EX bool pseudohept(cell *c) {
}
#endif
#if CAP_ARCM
if(archimedean) return arcm::pseudohept(c);
if(arcm::in()) return arcm::pseudohept(c);
#endif
#if CAP_GP
if(GOLDBERG && gp_threecolor() == 2)
@ -1423,11 +1423,11 @@ EX bool kraken_pseudohept(cell *c) {
return c->type != 6;
#endif
#if CAP_ARCM
else if(archimedean && PURE)
else if(arcm::in() && PURE)
return c->type != isize(arcm::current.triangles[0]);
else if(archimedean && BITRUNCATED)
else if(arcm::in() && BITRUNCATED)
return pseudohept(c);
else if(archimedean && DUAL)
else if(arcm::in() && DUAL)
return false;
#endif
else if(!euclid && S3 == 3 && !(S7&1) && gp_threecolor() == 1)
@ -1596,7 +1596,7 @@ EX namespace patterns {
#endif
case 'A':
#if CAP_ARCM
if(archimedean) return colortables['A'][arcm::current.tilegroup[arcm::id_of(c->master)]];
if(arcm::in()) return colortables['A'][arcm::current.tilegroup[arcm::id_of(c->master)]];
#endif
if(arb::in()) return colortables['A'][c->master->zebraval];
case 'B':
@ -1783,7 +1783,7 @@ EX namespace patterns {
}
#endif
if(archimedean)
if(arcm::in())
dialog::addSelItem(XLAT("Archimedean"), "Archimedean", 'A');
if(cryst)
@ -1998,11 +1998,11 @@ EX namespace patterns {
dialog::addBoolItem(XLAT("symmetry 0-2"), subpattern_flags & SPF_SYM02, '2');
dialog::addBoolItem(XLAT("symmetry 0-3"), subpattern_flags & SPF_SYM03, '3');
}
if(euclid && among(whichPattern, PAT_COLORING, PAT_TYPES) && !archimedean)
if(euclid && among(whichPattern, PAT_COLORING, PAT_TYPES) && !arcm::in())
dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
#if CAP_ARCM
if(archimedean && arcm::current.have_symmetry && whichPattern == PAT_TYPES)
if(arcm::in() && arcm::current.have_symmetry && whichPattern == PAT_TYPES)
dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
#endif
@ -2022,7 +2022,7 @@ EX namespace patterns {
dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
}
if((whichPattern == PAT_COLORING) || (whichPattern == PAT_TYPES && archimedean)) {
if((whichPattern == PAT_COLORING) || (whichPattern == PAT_TYPES && arcm::in())) {
dialog::addBoolItem(XLAT("alternate coloring"), subpattern_flags & SPF_ALTERNATE, '\'');
dialog::addBoolItem(XLAT("football"), subpattern_flags & SPF_FOOTBALL, '*');
}
@ -2030,7 +2030,7 @@ EX namespace patterns {
if(a38 && whichPattern == PAT_COLORING)
dialog::addBoolItem(XLAT("Docks pattern"), subpattern_flags & SPF_DOCKS, '@');
if(whichPattern && (IRREGULAR || GOLDBERG || archimedean))
if(whichPattern && (IRREGULAR || GOLDBERG || arcm::in()))
dialog::addBoolItem(XLAT("remove complete classification"), subpattern_flags & SPF_NO_SUBCODES, '#');
dialog::addBreak(50);
@ -2286,7 +2286,7 @@ EX namespace patterns {
cgroup = cpSingle;
return;
}
if(archimedean) {
if(arcm::in()) {
if(whichPattern == PAT_COLORING && geosupport_threecolor()) {
if(subpattern_flags & SPF_FOOTBALL) cgroup = cpFootball;
else cgroup = cpThree;
@ -2641,7 +2641,7 @@ EX namespace linepatterns {
col,
1 + vid.linequality);
}
else if(archimedean) {
else if(arcm::in()) {
if(!pseudohept(c)) forCellIdEx(c2, i, c) if(c < c2 && !pseudohept(c2))
gridlinef(V, C0, V*currentmap->adj(c, i), C0,
col,

View File

@ -93,7 +93,7 @@ void geometry_information::drawTentacle(hpcshape &h, ld rad, ld var, ld divby) {
if(geometry == gBinaryTiling) tlength *= 0.7;
if(geometry == gBinary4) tlength *= 0.45;
#if CAP_ARCM
if(archimedean) tlength = arcm::current.scale();
if(arcm::in()) tlength = arcm::current.scale();
#endif
int max = int(20 * pow(2, vid.linequality));
for(ld i=0; i<=max; i++)
@ -212,7 +212,7 @@ void geometry_information::bshape(hpcshape& sh, PPR prio, double shzoom, int sha
while(polydata[whereis + 2*qty] != NEWSHAPE) qty++;
double shzoomx = shzoom;
double shzoomy = shzoom;
if(shzoom == WOLF) shzoomx = 1.5 * (!BITRUNCATED && !archimedean ? scalefactor : 1), shzoomy = 1.6 * (!BITRUNCATED && !archimedean ? scalefactor : 1);
if(shzoom == WOLF) shzoomx = 1.5 * (!BITRUNCATED && !arcm::in() ? scalefactor : 1), shzoomy = 1.6 * (!BITRUNCATED && !arcm::in() ? scalefactor : 1);
int rots2 = rots;
// shapes 368..370 are specially designed
if(!(shapeid >= 368 && shapeid <= 370)) {
@ -1106,7 +1106,7 @@ void geometry_information::configure_floorshapes() {
init_floorshapes();
if(0);
#if CAP_ARCM
else if(archimedean)
else if(arcm::in())
shFullFloor.configure(arcm::current.scale()/2, arcm::current.scale()/2);
#endif
else

View File

@ -8,7 +8,7 @@
#include "hyper.h"
namespace hr {
EX bool quitsaves() { return (items[itOrbSafety] && CAP_SAVE && !archimedean); }
EX bool quitsaves() { return (items[itOrbSafety] && CAP_SAVE && !arcm::in()); }
EX bool needConfirmationEvenIfSaved() {
return canmove && (gold() >= 30 || tkills() >= 50) && !cheater;

View File

@ -608,7 +608,7 @@ EX void buildRug() {
cell *c = p.first;
rugpoint *v = p.second;
if(archimedean || (euclid && quotient)) {
if(arcm::in() || (euclid && quotient)) {
rugpoint *p[MAX_EDGE+1];
for(int j=0; j<c->type; j++) p[j] = findOrAddRugpoint(ggmatrix(c) * get_corner_position(c, j), v->dist);
for(int j=0; j<c->type; j++) addTriangle(v, p[j], p[(j+1) % c->type]);

View File

@ -895,7 +895,7 @@ EX void saveStats(bool emergency IS(false)) {
#endif
if(randomPatternsMode) return;
if(dual::state) return;
if(archimedean) return;
if(arcm::in()) return;
if(hybri) return;
if(daily::on) return;
if(peace::on) return;

View File

@ -1014,7 +1014,7 @@ bool texture_config::save() {
cell *ctr = centerover;
si_save = patterns::getpatterninfo0(ctr);
if(archimedean) csymbol = arcm::current.symbol;
if(arcm::in()) csymbol = arcm::current.symbol;
else csymbol = "";
for(auto s: texturesavers) if(s->dosave())

View File

@ -197,7 +197,7 @@ EX namespace yendor {
}
EX bool exhaustive_distance_appropriate() {
if(euclid && (penrose || archimedean || quotient)) return true;
if(euclid && (penrose || arcm::in() || quotient)) return true;
if(nil && quotient) return true;
if(asonov::in() && asonov::period_xy && asonov::period_xy <= 256) return true;