mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-06 11:32:49 +00:00
twisted product now actually appears for spherical space, and automatically sets csteps if it was illegal
This commit is contained in:
parent
30b9f3e4c7
commit
4c3a348666
@ -262,7 +262,7 @@ bool forced_quotient() { return quotient && !(cgflags & qOPTQ); }
|
|||||||
EX geometry_filter gf_hyperbolic = {"hyperbolic", 'h', [] { return (arcm::in() || arb::in() || hyperbolic) && !forced_quotient(); }};
|
EX geometry_filter gf_hyperbolic = {"hyperbolic", 'h', [] { return (arcm::in() || arb::in() || hyperbolic) && !forced_quotient(); }};
|
||||||
EX geometry_filter gf_spherical = {"spherical", 's', [] { return (arcm::in() || arb::in() || sphere) && !forced_quotient(); }};
|
EX geometry_filter gf_spherical = {"spherical", 's', [] { return (arcm::in() || arb::in() || sphere) && !forced_quotient(); }};
|
||||||
EX geometry_filter gf_euclidean = {"Euclidean", 'e', [] { return (arcm::in() || arb::in() || euclid) && !forced_quotient(); }};
|
EX geometry_filter gf_euclidean = {"Euclidean", 'e', [] { return (arcm::in() || arb::in() || euclid) && !forced_quotient(); }};
|
||||||
EX geometry_filter gf_other = {"non-isotropic", 'n', [] { return mproduct || nonisotropic; }};
|
EX geometry_filter gf_other = {"non-isotropic", 'n', [] { return mproduct || mtwisted || nonisotropic; }};
|
||||||
EX geometry_filter gf_regular_2d = {"regular 2D tesselations", 'r', [] {
|
EX geometry_filter gf_regular_2d = {"regular 2D tesselations", 'r', [] {
|
||||||
return standard_tiling() && WDIM == 2 && !forced_quotient();
|
return standard_tiling() && WDIM == 2 && !forced_quotient();
|
||||||
}};
|
}};
|
||||||
@ -314,6 +314,7 @@ void set_or_configure_geometry(eGeometry g) {
|
|||||||
else if(g == gArbitrary)
|
else if(g == gArbitrary)
|
||||||
arb::choose();
|
arb::choose();
|
||||||
else {
|
else {
|
||||||
|
bool quo = false;
|
||||||
if(among(g, gProduct, gTwistedProduct)) {
|
if(among(g, gProduct, gTwistedProduct)) {
|
||||||
if(WDIM == 3 || (g == gTwistedProduct && euclid)) {
|
if(WDIM == 3 || (g == gTwistedProduct && euclid)) {
|
||||||
addMessage(
|
addMessage(
|
||||||
@ -325,6 +326,7 @@ void set_or_configure_geometry(eGeometry g) {
|
|||||||
}
|
}
|
||||||
if(g == gTwistedProduct) {
|
if(g == gTwistedProduct) {
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
quo = sphere || quotient;
|
||||||
if(arcm::in()) ok = PURE;
|
if(arcm::in()) ok = PURE;
|
||||||
else if(bt::in() || aperiodic) ok = false;
|
else if(bt::in() || aperiodic) ok = false;
|
||||||
else ok = PURE || BITRUNCATED;
|
else ok = PURE || BITRUNCATED;
|
||||||
@ -343,7 +345,10 @@ void set_or_configure_geometry(eGeometry g) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dual::may_split_or_do([g] { set_geometry(g); });
|
dual::may_split_or_do([g, quo] {
|
||||||
|
set_geometry(g);
|
||||||
|
if(quo) hybrid::fixup_csteps();
|
||||||
|
});
|
||||||
start_game();
|
start_game();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1249,6 +1249,14 @@ EX namespace hybrid {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX void fixup_csteps() {
|
||||||
|
check_cgi(); cgi.require_basics();
|
||||||
|
if(!hybrid::csteps || gmod(cgi.psl_steps, hybrid::csteps)) {
|
||||||
|
hybrid::csteps = cgi.psl_steps;
|
||||||
|
hybrid::reconfigure();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EX hrmap *pmap;
|
EX hrmap *pmap;
|
||||||
EX geometry_information *pcgip;
|
EX geometry_information *pcgip;
|
||||||
EX eGeometry actual_geometry;
|
EX eGeometry actual_geometry;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user