1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 09:30:35 +00:00

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 namespace arcm {
EX bool in() { return cgflags & qARCHI; }
#if HDR #if HDR
struct archimedean_tiling { struct archimedean_tiling {
@ -1087,7 +1089,7 @@ EX void next_variation() {
EX void enable(archimedean_tiling& arct) { EX void enable(archimedean_tiling& arct) {
stop_game(); stop_game();
if(!archimedean) set_variation(eVariation::pure); if(!in()) set_variation(eVariation::pure);
set_geometry(gArchimedean); set_geometry(gArchimedean);
patterns::whichPattern = patterns::PAT_NONE; patterns::whichPattern = patterns::PAT_NONE;
current = arct; current = arct;
@ -1174,7 +1176,7 @@ EX void show() {
dialog::addBreak(100); dialog::addBreak(100);
} }
else { else {
string cs = archimedean ? current.symbol : XLAT("OFF"); string cs = in() ? current.symbol : XLAT("OFF");
dialog::addSelItem("edit", cs, '/'); dialog::addSelItem("edit", cs, '/');
dialog::add_action([] () { dialog::add_action([] () {
symbol_editing = true; symbol_editing = true;
@ -1234,7 +1236,7 @@ EX void show() {
if(spos < 0) spos = 0; if(spos < 0) spos = 0;
}); });
if(archimedean) { if(in()) {
dialog::addSelItem(XLAT("size of the world"), current.world_size(), 0); 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); 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); else dialog::addBreak(100);
if(archimedean) { if(in()) {
dialog::addSelItem(XLAT("variations"), gp::operation_name(), 'v'); dialog::addSelItem(XLAT("variations"), gp::operation_name(), 'v');
dialog::add_action(next_variation); dialog::add_action(next_variation);
} }
@ -1369,6 +1371,7 @@ EX int valence() {
#endif #endif
EX map<gp::loc, cdata>& get_cdata() { return ((arcm::hrmap_archimedean*) (currentmap))->eucdata; } 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); 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]; int ds[MAX_EDGE];
for(int i=0; i<c->type; i++) ds[i] = i; 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? */ /** should we generate the horocycles in the current geometry? */
EX bool horo_ok() { EX bool horo_ok() {
return hyperbolic && !binarytiling && !archimedean && !penrose && !experimental && !hybri; return hyperbolic && !binarytiling && !arcm::in() && !penrose && !experimental && !hybri;
} }
EX bool gp_wall_test() { 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) { EX bool good_for_wall(cell *c) {
if(archimedean) return true; if(arcm::in()) return true;
if(WDIM == 3) return true; if(WDIM == 3) return true;
return pseudohept(c); return pseudohept(c);
} }
@ -1542,7 +1542,7 @@ EX bool openplains(cell *c) {
return true; return true;
} }
int dlimit = getDistLimit(); int dlimit = getDistLimit();
if(archimedean) dlimit--; if(arcm::in()) dlimit--;
if(dlimit < 7) { if(dlimit < 7) {
celllister cl(c, dlimit, 1000000, NULL); celllister cl(c, dlimit, 1000000, NULL);
int bad = 0; int bad = 0;

View File

@ -199,14 +199,14 @@ EX cell *createMov(cell *c, int d) {
} }
#endif #endif
#if CAP_ARCM #if CAP_ARCM
else if(archimedean && PURE) { else if(arcm::in() && PURE) {
if(arcm::id_of(c->master) < arcm::current.N * 2) { if(arcm::id_of(c->master) < arcm::current.N * 2) {
heptspin hs = heptspin(c->master, d) + wstep + 2 + wstep + 1; heptspin hs = heptspin(c->master, d) + wstep + 2 + wstep + 1;
c->c.connect(d, hs.at->c7, hs.spin, hs.mirrored); c->c.connect(d, hs.at->c7, hs.spin, hs.mirrored);
} }
else c->c.connect(d, c, d, false); 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) { if(arcm::id_of(c->master) >= arcm::current.N * 2) {
heptagon *h2 = createStep(c->master, d*2); heptagon *h2 = createStep(c->master, d*2);
int d1 = c->master->c.spin(d*2); int d1 = c->master->c.spin(d*2);
@ -218,7 +218,7 @@ EX cell *createMov(cell *c, int d) {
} }
} }
#endif #endif
else if(archimedean || PURE) { else if(arcm::in() || PURE) {
heptagon *h2 = createStep(c->master, d); heptagon *h2 = createStep(c->master, d);
c->c.connect(d, h2->c7,c->master->c.spin(d), c->master->c.mirror(d)); c->c.connect(d, h2->c7,c->master->c.spin(d), c->master->c.mirror(d));
hybrid::link(); hybrid::link();
@ -275,7 +275,7 @@ EX void initcells() {
#endif #endif
else if(arb::in()) currentmap = arb::new_map(); else if(arb::in()) currentmap = arb::new_map();
#if CAP_ARCM #if CAP_ARCM
else if(archimedean) currentmap = arcm::new_map(); else if(arcm::in()) currentmap = arcm::new_map();
#endif #endif
else if(euclid && !penrose) currentmap = euc::new_map(); else if(euclid && !penrose) currentmap = euc::new_map();
#if CAP_BT #if CAP_BT
@ -325,7 +325,7 @@ template<class T> void subcell(cell *c, const T& t) {
subcell(c2, t); subcell(c2, t);
} }
} }
else if(BITRUNCATED && !archimedean && !binarytiling) else if(BITRUNCATED && !arcm::in() && !binarytiling)
forCellEx(c2, c) t(c2); forCellEx(c2, c) t(c2);
t(c); t(c);
} }
@ -413,7 +413,7 @@ EX void verifycell(cell *c) {
} }
EX void verifycells(heptagon *at) { 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) { 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))); 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 CAP_IRR
if(IRREGULAR) return irr::celldist(c, false); if(IRREGULAR) return irr::celldist(c, false);
#endif #endif
if(archimedean || ctof(c)) return c->master->distance; if(arcm::in() || ctof(c)) return c->master->distance;
#if CAP_GP #if CAP_GP
if(GOLDBERG) return gp::compute_dist(c, celldist); if(GOLDBERG) return gp::compute_dist(c, celldist);
#endif #endif
@ -646,7 +646,7 @@ cdata orig_cdata;
EX bool geometry_supports_cdata() { EX bool geometry_supports_cdata() {
if(hybri) return PIU(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) { void affect(cdata& d, short rv, signed char signum) {
@ -797,7 +797,7 @@ cdata *getHeptagonCdata(heptagon *h) {
cdata *getEuclidCdata(gp::loc h) { cdata *getEuclidCdata(gp::loc h) {
int x = h.first, y = h.second; 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); // hrmap_euclidean* euc = dynamic_cast<hrmap_euclidean*> (currentmap);
if(data.count(h)) return &(data[h]); if(data.count(h)) return &(data[h]);
@ -864,9 +864,9 @@ EX cdata *arcmCdata(cell *c) {
EX int getCdata(cell *c, int j) { EX int getCdata(cell *c, int j) {
if(prod) { c = hybrid::get_where(c).first; return PIU(getBits(c)); } 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(euc::in()) return getEuclidCdata(euc2_coordinates(c))->val[j];
else if(archimedean && euclid) else if(arcm::in() && euclid)
return getEuclidCdata(pseudocoords(c))->val[j]; return getEuclidCdata(pseudocoords(c))->val[j];
else if(archimedean && hyperbolic) else if(arcm::in() && hyperbolic)
return arcmCdata(c)->val[j]*3; return arcmCdata(c)->val[j]*3;
else if(!geometry_supports_cdata()) return 0; else if(!geometry_supports_cdata()) return 0;
else if(ctof(c)) return getHeptagonCdata(c->master)->val[j]*3; 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) { EX int getBits(cell *c) {
if(prod) { c = hybrid::get_where(c).first; return PIU(getBits(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(euc::in()) return getEuclidCdata(euc2_coordinates(c))->bits;
else if(archimedean && euclid) else if(arcm::in() && euclid)
return getEuclidCdata(pseudocoords(c))->bits; return getEuclidCdata(pseudocoords(c))->bits;
else if(archimedean && (hyperbolic || sl2)) else if(arcm::in() && (hyperbolic || sl2))
return arcmCdata(c)->bits; return arcmCdata(c)->bits;
else if(!geometry_supports_cdata()) return 0; else if(!geometry_supports_cdata()) return 0;
else if(c == c->master->c7) return getHeptagonCdata(c->master)->bits; 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)); 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))) if(saved_distances.count(make_pair(c1,c2)))
return saved_distances[make_pair(c1,c2)]; return saved_distances[make_pair(c1,c2)];
@ -1043,7 +1043,7 @@ EX int celldistance(cell *c1, cell *c2) {
#endif #endif
#if MAXMDIM >= 4 #if MAXMDIM >= 4
if(euclid && !penrose && !archimedean) if(euclid && !penrose && !arcm::in())
return euc::celldistance(c1, c2); return euc::celldistance(c1, c2);
if(hyperbolic && WDIM == 3) return reg3::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() { 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: case laSwitch:
set_floor(cgi.shSwitchFloor); 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)); queuepoly(Vf * ddspin(c, i, M_PI/S7) * xpush(cgi.rhexf), cgi.shSwitchDisk, darkena(minf[active_switch()].color, fd, 0xFF));
break; break;

View File

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

View File

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

View File

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

View File

@ -662,7 +662,7 @@ void geometry_information::generate_floorshapes() {
#endif #endif
#if CAP_ARCM #if CAP_ARCM
else if(archimedean) { else if(arcm::in()) {
arcm::parent_index_of(&modelh) = 0; arcm::parent_index_of(&modelh) = 0;
auto &ac = arcm::current; auto &ac = arcm::current;
for(int i=0; i<2*ac.N + 2; i++) { 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); return gp::get_plainshape_id(c);
else if(IRREGULAR) else if(IRREGULAR)
return irr::cellindex[c]; return irr::cellindex[c];
else if(archimedean) else if(arcm::in())
return arcm::id_of(c->master); return arcm::id_of(c->master);
else if(arb::in()) else if(arb::in())
return arb::id_of(c->master); 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 #endif
#if CAP_ARCM #if CAP_ARCM
else if(archimedean) { else if(arcm::in()) {
return &queuepolyat(V, shv[arcm::id_of(c->master)], col, prio); return &queuepolyat(V, shv[arcm::id_of(c->master)], col, prio);
} }
#endif #endif

View File

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

View File

@ -423,7 +423,7 @@ void geometry_information::prepare_basics() {
ld fmin, fmax; ld fmin, fmax;
if(archimedean && !prod) if(arcm::in() && !prod)
ginf[gArchimedean].cclass = gcHyperbolic; ginf[gArchimedean].cclass = gcHyperbolic;
if(hybri) { if(hybri) {
@ -501,7 +501,7 @@ void geometry_information::prepare_basics() {
irr::compute_geometry(); irr::compute_geometry();
#endif #endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) { if(arcm::in()) {
arcm::current.compute_geometry(); arcm::current.compute_geometry();
crossf = hcrossf7 * arcm::current.scale(); crossf = hcrossf7 * arcm::current.scale();
hexvdist = arcm::current.scale() * .5; 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(GOLDBERG) V("GP", its(gp::param.first) + "," + its(gp::param.second));
if(IRREGULAR) V("IRR", its(irr::irrid)); 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)); 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() { 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) { 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 double randd() { return (rand() + .5) / (RAND_MAX + 1.); }
EX hyperpoint randomPointIn(int t) { EX hyperpoint randomPointIn(int t) {
if(NONSTDVAR || archimedean || penrose) { if(NONSTDVAR || arcm::in() || penrose) {
// Let these geometries be less confusing. // Let these geometries be less confusing.
// Also easier to implement ;) // Also easier to implement ;)
return xspinpush0(2 * M_PI * randd(), asinh(randd() / 20)); 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 #endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) { if(arcm::in()) {
auto &ac = arcm::current; auto &ac = arcm::current;
if(PURE) { if(PURE) {
if(arcm::id_of(c->master) >= ac.N*2) return C0; if(arcm::id_of(c->master) >= ac.N*2) return C0;
@ -458,7 +458,7 @@ EX hyperpoint nearcorner(cell *c, int i) {
} }
#endif #endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) { if(arcm::in()) {
if(PURE) { if(PURE) {
auto &ac = arcm::current; auto &ac = arcm::current;
auto& t = ac.get_triangle(c->master, i-1); 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 return nearcorner(c, (i+which) % c->type); // lazy
#endif #endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) { if(arcm::in()) {
if(PURE) { if(PURE) {
auto &ac = arcm::current; auto &ac = arcm::current;
auto& t = ac.get_triangle(c->master, i-1); 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); if(GOLDBERG) return gp::get_corner_position(c, cid, 2);
#endif #endif
#if CAP_IRR || CAP_ARCM #if CAP_IRR || CAP_ARCM
if(IRREGULAR || archimedean) return midcorner(c, cid, .5); if(IRREGULAR || arcm::in()) return midcorner(c, cid, .5);
#endif #endif
return ddspin(c,cid,M_PI/S7) * xpush0(cgi.tessf/2); 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) { EX color_t reptilecolor(cell *c) {
int i; int i;
if(archimedean) if(arcm::in())
i = c->master->rval0 & 3; i = c->master->rval0 & 3;
else { else {
i = zebra40(c); i = zebra40(c);
@ -3153,7 +3153,7 @@ EX bool has_nice_dual() {
if(IRREGULAR) return irr::bitruncations_performed > 0; if(IRREGULAR) return irr::bitruncations_performed > 0;
#endif #endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) return geosupport_football() >= 2; if(arcm::in()) return geosupport_football() >= 2;
#endif #endif
if(binarytiling) return false; if(binarytiling) return false;
if(BITRUNCATED) return true; 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(NONSTDVAR || !standard_tiling()) {
#if CAP_ARCM #if CAP_ARCM
if(archimedean && !PURE) if(arcm::in() && !PURE)
i = (i + arcm::parent_index_of(c->master)/DUALMUL + MODFIXER) % c->type; i = (i + arcm::parent_index_of(c->master)/DUALMUL + MODFIXER) % c->type;
#endif #endif
draw_shapevec(c, V2, qfi.fshape->gpside[sidepar][i], col, prio); draw_shapevec(c, V2, qfi.fshape->gpside[sidepar][i], col, prio);
@ -4204,7 +4204,7 @@ EX bool allowIncreasedSight() {
#endif #endif
if(randomPatternsMode) return true; if(randomPatternsMode) return true;
if(racing::on) 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; if(WDIM == 3) return true;
return false; return false;
} }
@ -4216,7 +4216,7 @@ EX bool allowChangeRange() {
#endif #endif
if(racing::on) return true; if(racing::on) return true;
if(sightrange_bonus >= 0) return true; if(sightrange_bonus >= 0) return true;
if(archimedean) return true; if(arcm::in()) return true;
if(WDIM == 3) return true; if(WDIM == 3) return true;
return false; 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 *buildHeptagon(heptagon *parent, int d, hstate s, int pard = 0, int fixdistance = COMPUTE) {
heptagon *h = buildHeptagon1(tailored_alloc<heptagon> (S7), parent, d, s, pard); 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(parent->c7) {
#if CAP_IRR #if CAP_IRR
if(IRREGULAR) 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 ALPHA (M_PI*2/S7)
#define S7 cginf.sides #define S7 cginf.sides
#define S3 cginf.vertex #define S3 cginf.vertex
#define hyperbolic_37 (S7 == 7 && S3 == 3 && !binarytiling && !archimedean) #define hyperbolic_37 (S7 == 7 && S3 == 3 && !binarytiling && !arcm::in())
#define hyperbolic_not37 ((S7 > 7 || S3 > 3 || binarytiling || archimedean) && hyperbolic) #define hyperbolic_not37 ((S7 > 7 || S3 > 3 || binarytiling || arcm::in()) && hyperbolic)
#define weirdhyperbolic ((S7 > 7 || S3 > 3 || !STDVAR || binarytiling || archimedean) && hyperbolic) #define weirdhyperbolic ((S7 > 7 || S3 > 3 || !STDVAR || binarytiling || arcm::in()) && hyperbolic)
#define stdhyperbolic (S7 == 7 && S3 == 3 && STDVAR && !binarytiling && !archimedean) #define stdhyperbolic (S7 == 7 && S3 == 3 && STDVAR && !binarytiling && !arcm::in())
#define cgflags cginf.flags #define cgflags cginf.flags
#define binarytiling (cgflags & qBINARY) #define binarytiling (cgflags & qBINARY)
#define archimedean (cgflags & qARCHI)
#define cryst (cgflags & qCRYSTAL) #define cryst (cgflags & qCRYSTAL)
#define penrose (cgflags & qPENROSE) #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 // Dry Forest burning, heat transfer, etc. are performed on the whole universe
#define doall (bounded) #define doall (bounded)
#define sphere_narcm (sphere && !archimedean) #define sphere_narcm (sphere && !arcm::in())
#define a4 (S3 == 4) #define a4 (S3 == 4)
#define a45 (S3 == 4 && S7 == 5) #define a45 (S3 == 4 && S7 == 5)
@ -186,7 +185,7 @@ void addMessage(string s, char spamtype = 0);
#define NONSTDVAR (!STDVAR) #define NONSTDVAR (!STDVAR)
#if CAP_ARCM #if CAP_ARCM
#define VALENCE (BITRUNCATED ? 3 : archimedean ? arcm::valence() : S3) #define VALENCE (BITRUNCATED ? 3 : arcm::in() ? arcm::valence() : S3)
#else #else
#define VALENCE (BITRUNCATED ? 3 : S3) #define VALENCE (BITRUNCATED ? 3 : S3)
#endif #endif

View File

@ -973,7 +973,7 @@ EX ld master_to_c7_angle() {
#if CAP_GP #if CAP_GP
if(cgi.gpdata) alpha = cgi.gpdata->alpha; if(cgi.gpdata) alpha = cgi.gpdata->alpha;
#endif #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) { 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)); return V * spin(M_PI + 2 * M_PI / S7 * (hs.spin + irr::periodmap[hs.at].base.spin));
#endif #endif
#if CAP_ARCM #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 #endif
#if CAP_BT #if CAP_BT
if(binarytiling) return V; 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) { if(fargen) {
int i = hrand(100); int i = hrand(100);
if(i < 10) if(i < 10)
@ -520,7 +520,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->wall = waCavewall; c->wall = waCavewall;
else c->wall = waCavefloor; else c->wall = waCavefloor;
} }
else if(a4 || archimedean || cryst) else if(a4 || arcm::in() || cryst)
c->wall = hrand(100) < 50 ? waCavefloor : waCavewall; c->wall = hrand(100) < 50 ? waCavefloor : waCavewall;
else if(!BITRUNCATED) { else if(!BITRUNCATED) {
if(polarb50(c)) if(polarb50(c))
@ -594,10 +594,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
v = 6; v = 6;
} }
#if CAP_ARCM #if CAP_ARCM
else if(archimedean && arcm::current.have_line) else if(arcm::in() && arcm::current.have_line)
v = arcm::linespattern(c) ? 24 : 16; v = arcm::linespattern(c) ? 24 : 16;
#endif #endif
else if((euclid&&bounded) || hyperbolic_not37 || quotient || archimedean) { else if((euclid&&bounded) || hyperbolic_not37 || quotient || arcm::in()) {
v = hrand(100) < 25 ? 24 : 16; v = hrand(100) < 25 ? 24 : 16;
} }
else if(euclid) { else if(euclid) {
@ -660,10 +660,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(d==8) { if(d==8) {
if(euclid && bounded) ; if(euclid && bounded) ;
#if CAP_ARCM #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; c->wall = arcm::linespattern(c) ? waTrapdoor : waNone;
#endif #endif
else if(euclid && !archimedean) { else if(euclid && !arcm::in()) {
auto co = euc2_coordinates(c); auto co = euc2_coordinates(c);
int y = co.second; int y = co.second;
if(y&1) c->wall = waTrapdoor; if(y&1) c->wall = waTrapdoor;
@ -671,7 +671,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
} }
#if CAP_ARCM #if CAP_ARCM
else else
if(archimedean) c->wall = hrand(2) ? waTrapdoor : waNone; if(arcm::in()) c->wall = hrand(2) ? waTrapdoor : waNone;
#endif #endif
else else
c->wall = (randomPatternsMode ? RANDPAT : (zebra40(c)&2)) ? waTrapdoor : waNone; 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(d==8) {
if(euclid && bounded) ; if(euclid && bounded) ;
#if CAP_ARCM #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; c->wall = arcm::linespattern(c) ? waVinePlant : waNone;
#endif #endif
else if(nil) { 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)) if((c->master->distance & 1) == 1 && (c->master->emeraldval % 3))
c->wall = waVinePlant; c->wall = waVinePlant;
} }
else if(euclid && !archimedean) { else if(euclid && !arcm::in()) {
auto co = euc2_coordinates(c); auto co = euc2_coordinates(c);
int y = co.second; int y = co.second;
int dy = gmod(y, 3); int dy = gmod(y, 3);
@ -707,7 +707,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
} }
else if(WDIM == 3 && hyperbolic && !binarytiling) else if(WDIM == 3 && hyperbolic && !binarytiling)
c->wall = (c->master->zebraval & 2) ? waVinePlant : waNone; 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; c->wall = hrand(100) < 50 ? waNone : waVinePlant;
else { else {
int v = emeraldval(c); int v = emeraldval(c);
@ -753,7 +753,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->item = itDodeca; c->item = itDodeca;
} }
else { else {
int i = archimedean ? hrand(50) : zebra40(c); int i = arcm::in() ? hrand(50) : zebra40(c);
if(i < 40) { if(i < 40) {
int cd = geometry_supports_cdata() ? getCdata(c, 3) : hrand(16); int cd = geometry_supports_cdata() ? getCdata(c, 3) : hrand(16);
cd &= 15; 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)) if(S7 == 4 && celldistance(c, currentmap->gamestart()) == 2 && ctof(c))
c->wall = waChasm; c->wall = waChasm;
} }
else if(archimedean) ; else if(arcm::in()) ;
else if(!euclid && zebra3(c) == 0) c->wall = waFan; else if(!euclid && zebra3(c) == 0) c->wall = waFan;
else if(pseudohept(c) && hrand(2000) < 150 && !reptilecheat) else if(pseudohept(c) && hrand(2000) < 150 && !reptilecheat)
c->wall = waChasm; c->wall = waChasm;
@ -2286,7 +2286,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(a38) if(a38)
patterns::val38(c, si, patterns::SPF_DOCKS, patterns::PAT_COLORING); patterns::val38(c, si, patterns::SPF_DOCKS, patterns::PAT_COLORING);
else 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; c->wall = waSea;
if(among(si.id, 0, 4, 16, PURE ? -1 : 24)) if(among(si.id, 0, 4, 16, PURE ? -1 : 24))
c->wall = waDock; c->wall = waDock;
@ -2576,7 +2576,7 @@ EX void setdist(cell *c, int d, cell *from) {
// this fixes the following problem: // this fixes the following problem:
// http://steamcommunity.com/app/342610/discussions/0/1470840994970724215/ // 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); int cdi = celldist(c);
if(celldist(from) > cdi) { if(celldist(from) > cdi) {
forCellCM(c2, c) if(celldist(c2) < 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 CAP_ARCM
if(archimedean) { if(arcm::in()) {
if(among(l, laPower, laZebra, laWineyard) && arcm::current.have_line) return lv::pattern_defined; if(among(l, laPower, laZebra, laWineyard) && arcm::current.have_line) return lv::pattern_defined;
// horocycles not implemented // horocycles not implemented
if(isCyclic(l)) return not_implemented; if(isCyclic(l)) return not_implemented;
@ -889,12 +889,12 @@ EX land_validity_t& land_validity(eLand l) {
return dont_work; return dont_work;
#endif #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; return dont_work;
if(archimedean && DUAL && l == laCrossroads4) if(arcm::in() && DUAL && l == laCrossroads4)
return not_implemented; return not_implemented;
if(geometry == gKiteDart3 && l == laGraveyard) if(geometry == gKiteDart3 && l == laGraveyard)
@ -906,7 +906,7 @@ EX land_validity_t& land_validity(eLand l) {
if(chaosmode) if(chaosmode)
return not_in_chaos; return not_in_chaos;
// the algorithm fails in Archimedean DUAL // the algorithm fails in Archimedean DUAL
if(archimedean && DUAL) if(arcm::in() && DUAL)
return not_implemented; return not_implemented;
// the algorithm fails in Binary4 // the algorithm fails in Binary4
if(geometry == gBinary4) if(geometry == gBinary4)
@ -970,7 +970,7 @@ EX land_validity_t& land_validity(eLand l) {
return special_chaos; return special_chaos;
return not_in_chaos; return not_in_chaos;
} }
if(archimedean || penrose) return not_implemented; if(arcm::in() || penrose) return not_implemented;
if(bounded) return unbounded_only; if(bounded) return unbounded_only;
} }
@ -978,7 +978,7 @@ EX land_validity_t& land_validity(eLand l) {
return not_in_chaos; return not_in_chaos;
// this pattern does not work on elliptic and small spheres // 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; return not_enough_space;
// ... and it works in gp only partially // ... and it works in gp only partially
@ -1191,7 +1191,7 @@ EX land_validity_t& land_validity(eLand l) {
if(l == laWildWest && !randomPatternsMode) if(l == laWildWest && !randomPatternsMode)
return out_of_theme; 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 full_game;
return ok; return ok;

View File

@ -284,7 +284,7 @@ namespace mapstream {
for(int k=0; k<i; k++) f.write(kills[k]); 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++) { for(int i=0; i<isize(cellbyid); i++) {
cell *c = cellbyid[i]; cell *c = cellbyid[i];
if(i) { if(i) {

View File

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

View File

@ -480,7 +480,7 @@ EX int treasureForLocal() {
} }
EX bool extra_safety_for_memory(cell *c) { 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) { if(hrand(1000) < 1) {
c->item = itOrbSafety; c->item = itOrbSafety;
return true; return true;

View File

@ -77,7 +77,7 @@ bool ishex2(cell *c) {
int chessvalue(cell *c) { int chessvalue(cell *c) {
#if CAP_ARCM #if CAP_ARCM
if(archimedean) if(arcm::in())
return arcm::chessvalue(c); return arcm::chessvalue(c);
else else
#endif #endif
@ -371,7 +371,7 @@ EX int fieldval_uniq(cell *c) {
return PIU ( fieldval_uniq(c1) ); return PIU ( fieldval_uniq(c1) );
} }
else if(sphere) { else if(sphere) {
if(archimedean) return c->master->fiftyval; if(arcm::in()) return c->master->fiftyval;
#if CAP_IRR #if CAP_IRR
else if(IRREGULAR) return irr::cellindex[c]; else if(IRREGULAR) return irr::cellindex[c];
#endif #endif
@ -381,12 +381,12 @@ EX int fieldval_uniq(cell *c) {
if(ctof(c)) return c->master->fieldval; 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 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); auto p = euc2_coordinates(c);
if(bounded) return p.first + (p.second << 16); if(bounded) return p.first + (p.second << 16);
return gmod(p.first - 22 * p.second, 3*127); 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(&currfp == &fp_invalid) return 0;
else if(WDIM == 3) return c->master->fieldval; else if(WDIM == 3) return c->master->fieldval;
else if(ctof(c) || NONSTDVAR) return c->master->fieldval/S7; 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) { 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(a46) val46(c, si, sub, pat);
else if(a38) val38(c, si, sub, pat); else if(a38) val38(c, si, sub, pat);
else if(sphere && S3 == 3) valSibling(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; si.id += irr::cellindex[c] << 8;
#endif #endif
#if CAP_ARCM #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); si.id += (arcm::id_of(c->master) << 8) + (arcm::parent_index_of(c->master) << 16);
#endif #endif
#if CAP_GP #if CAP_GP
@ -1019,7 +1019,7 @@ EX namespace patterns {
} }
#if CAP_ARCM #if CAP_ARCM
if(archimedean && pat == 0) { if(arcm::in() && pat == 0) {
if(sub & SPF_FOOTBALL) { if(sub & SPF_FOOTBALL) {
val_threecolors(c, si, sub); val_threecolors(c, si, sub);
return si; return si;
@ -1145,7 +1145,7 @@ EX namespace patterns {
if(euclid) if(euclid)
// use the torus ID // use the torus ID
si.id = fieldpattern::fieldval_uniq(c); si.id = fieldpattern::fieldval_uniq(c);
else if(PURE && !archimedean) else if(PURE && !arcm::in())
// use the actual field codes // use the actual field codes
si.id = fieldpattern::fieldval(c).first; si.id = fieldpattern::fieldval(c).first;
else else
@ -1169,7 +1169,7 @@ EX namespace patterns {
else val_threecolors(c, si, sub); 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); val_threecolors(c, si, sub);
} }
@ -1199,8 +1199,8 @@ EX namespace patterns {
EX bool geosupport_chessboard() { EX bool geosupport_chessboard() {
return return
#if CAP_ARCM #if CAP_ARCM
(archimedean && PURE) ? arcm::current.support_chessboard() : (arcm::in() && PURE) ? arcm::current.support_chessboard() :
(archimedean && DUAL) ? arcm::current.support_threecolor_bitruncated() : (arcm::in() && DUAL) ? arcm::current.support_threecolor_bitruncated() :
#endif #endif
(binarytiling || penrose) ? 0 : (binarytiling || penrose) ? 0 :
(S3 >= OINF) ? true : (S3 >= OINF) ? true :
@ -1211,9 +1211,9 @@ EX int geosupport_threecolor() {
if(IRREGULAR) return 0; if(IRREGULAR) return 0;
if(penrose || binarytiling) return 0; if(penrose || binarytiling) return 0;
#if CAP_ARCM #if CAP_ARCM
if(archimedean && PURE) return arcm::current.support_threecolor(); if(arcm::in() && PURE) return arcm::current.support_threecolor();
if(archimedean && BITRUNCATED) return arcm::current.support_threecolor_bitruncated(); if(arcm::in() && 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() && DUAL) return 0; // it sometimes does support threecolor, but it can be obtained in other ways then
#endif #endif
if(BITRUNCATED && S3 == 3) { if(BITRUNCATED && S3 == 3) {
if(S7 % 2) return 1; if(S7 % 2) return 1;
@ -1233,10 +1233,10 @@ EX int geosupport_football() {
if(binarytiling || penrose) return 0; if(binarytiling || penrose) return 0;
#if CAP_ARCM #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 // 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 #endif
#if CAP_IRR #if CAP_IRR
@ -1256,7 +1256,7 @@ EX int geosupport_football() {
EX int pattern_threecolor(cell *c) { EX int pattern_threecolor(cell *c) {
#if CAP_ARCM #if CAP_ARCM
if(archimedean) { if(arcm::in()) {
if(PURE) if(PURE)
return arcm::threecolor(c); return arcm::threecolor(c);
else /* if(BITRUNCATED) */ else /* if(BITRUNCATED) */
@ -1399,7 +1399,7 @@ EX bool pseudohept(cell *c) {
} }
#endif #endif
#if CAP_ARCM #if CAP_ARCM
if(archimedean) return arcm::pseudohept(c); if(arcm::in()) return arcm::pseudohept(c);
#endif #endif
#if CAP_GP #if CAP_GP
if(GOLDBERG && gp_threecolor() == 2) if(GOLDBERG && gp_threecolor() == 2)
@ -1423,11 +1423,11 @@ EX bool kraken_pseudohept(cell *c) {
return c->type != 6; return c->type != 6;
#endif #endif
#if CAP_ARCM #if CAP_ARCM
else if(archimedean && PURE) else if(arcm::in() && PURE)
return c->type != isize(arcm::current.triangles[0]); return c->type != isize(arcm::current.triangles[0]);
else if(archimedean && BITRUNCATED) else if(arcm::in() && BITRUNCATED)
return pseudohept(c); return pseudohept(c);
else if(archimedean && DUAL) else if(arcm::in() && DUAL)
return false; return false;
#endif #endif
else if(!euclid && S3 == 3 && !(S7&1) && gp_threecolor() == 1) else if(!euclid && S3 == 3 && !(S7&1) && gp_threecolor() == 1)
@ -1596,7 +1596,7 @@ EX namespace patterns {
#endif #endif
case 'A': case 'A':
#if CAP_ARCM #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 #endif
if(arb::in()) return colortables['A'][c->master->zebraval]; if(arb::in()) return colortables['A'][c->master->zebraval];
case 'B': case 'B':
@ -1783,7 +1783,7 @@ EX namespace patterns {
} }
#endif #endif
if(archimedean) if(arcm::in())
dialog::addSelItem(XLAT("Archimedean"), "Archimedean", 'A'); dialog::addSelItem(XLAT("Archimedean"), "Archimedean", 'A');
if(cryst) 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-2"), subpattern_flags & SPF_SYM02, '2');
dialog::addBoolItem(XLAT("symmetry 0-3"), subpattern_flags & SPF_SYM03, '3'); 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, '='); dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
#if CAP_ARCM #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, '='); dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
#endif #endif
@ -2022,7 +2022,7 @@ EX namespace patterns {
dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '='); 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("alternate coloring"), subpattern_flags & SPF_ALTERNATE, '\'');
dialog::addBoolItem(XLAT("football"), subpattern_flags & SPF_FOOTBALL, '*'); dialog::addBoolItem(XLAT("football"), subpattern_flags & SPF_FOOTBALL, '*');
} }
@ -2030,7 +2030,7 @@ EX namespace patterns {
if(a38 && whichPattern == PAT_COLORING) if(a38 && whichPattern == PAT_COLORING)
dialog::addBoolItem(XLAT("Docks pattern"), subpattern_flags & SPF_DOCKS, '@'); 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::addBoolItem(XLAT("remove complete classification"), subpattern_flags & SPF_NO_SUBCODES, '#');
dialog::addBreak(50); dialog::addBreak(50);
@ -2286,7 +2286,7 @@ EX namespace patterns {
cgroup = cpSingle; cgroup = cpSingle;
return; return;
} }
if(archimedean) { if(arcm::in()) {
if(whichPattern == PAT_COLORING && geosupport_threecolor()) { if(whichPattern == PAT_COLORING && geosupport_threecolor()) {
if(subpattern_flags & SPF_FOOTBALL) cgroup = cpFootball; if(subpattern_flags & SPF_FOOTBALL) cgroup = cpFootball;
else cgroup = cpThree; else cgroup = cpThree;
@ -2641,7 +2641,7 @@ EX namespace linepatterns {
col, col,
1 + vid.linequality); 1 + vid.linequality);
} }
else if(archimedean) { else if(arcm::in()) {
if(!pseudohept(c)) forCellIdEx(c2, i, c) if(c < c2 && !pseudohept(c2)) if(!pseudohept(c)) forCellIdEx(c2, i, c) if(c < c2 && !pseudohept(c2))
gridlinef(V, C0, V*currentmap->adj(c, i), C0, gridlinef(V, C0, V*currentmap->adj(c, i), C0,
col, 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 == gBinaryTiling) tlength *= 0.7;
if(geometry == gBinary4) tlength *= 0.45; if(geometry == gBinary4) tlength *= 0.45;
#if CAP_ARCM #if CAP_ARCM
if(archimedean) tlength = arcm::current.scale(); if(arcm::in()) tlength = arcm::current.scale();
#endif #endif
int max = int(20 * pow(2, vid.linequality)); int max = int(20 * pow(2, vid.linequality));
for(ld i=0; i<=max; i++) 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++; while(polydata[whereis + 2*qty] != NEWSHAPE) qty++;
double shzoomx = shzoom; double shzoomx = shzoom;
double shzoomy = 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; int rots2 = rots;
// shapes 368..370 are specially designed // shapes 368..370 are specially designed
if(!(shapeid >= 368 && shapeid <= 370)) { if(!(shapeid >= 368 && shapeid <= 370)) {
@ -1106,7 +1106,7 @@ void geometry_information::configure_floorshapes() {
init_floorshapes(); init_floorshapes();
if(0); if(0);
#if CAP_ARCM #if CAP_ARCM
else if(archimedean) else if(arcm::in())
shFullFloor.configure(arcm::current.scale()/2, arcm::current.scale()/2); shFullFloor.configure(arcm::current.scale()/2, arcm::current.scale()/2);
#endif #endif
else else

View File

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

View File

@ -608,7 +608,7 @@ EX void buildRug() {
cell *c = p.first; cell *c = p.first;
rugpoint *v = p.second; rugpoint *v = p.second;
if(archimedean || (euclid && quotient)) { if(arcm::in() || (euclid && quotient)) {
rugpoint *p[MAX_EDGE+1]; 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++) 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]); 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 #endif
if(randomPatternsMode) return; if(randomPatternsMode) return;
if(dual::state) return; if(dual::state) return;
if(archimedean) return; if(arcm::in()) return;
if(hybri) return; if(hybri) return;
if(daily::on) return; if(daily::on) return;
if(peace::on) return; if(peace::on) return;

View File

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

View File

@ -197,7 +197,7 @@ EX namespace yendor {
} }
EX bool exhaustive_distance_appropriate() { 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(nil && quotient) return true;
if(asonov::in() && asonov::period_xy && asonov::period_xy <= 256) return true; if(asonov::in() && asonov::period_xy && asonov::period_xy <= 256) return true;