mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
the implementation in reg3 can now be used for the cube tiling
This commit is contained in:
parent
0eed6a03d4
commit
e86e6267ec
2
cell.cpp
2
cell.cpp
@ -1308,6 +1308,8 @@ EX int celldistance(cell *c1, cell *c2) {
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
if(euclid) return clueless_celldistance(c1, c2);
|
||||
|
||||
return hyperbolic_celldistance(c1, c2);
|
||||
}
|
||||
|
||||
|
@ -648,6 +648,7 @@ EX void initConfig() {
|
||||
|
||||
param_b(no_find_player, "no_find_player");
|
||||
param_b(game_keys_scroll, "game_keys_scroll");
|
||||
param_b(reg3::cubes_reg3, "cubes_reg3");
|
||||
|
||||
param_b(arb::apeirogon_consistent_coloring, "apeirogon_consistent_coloring", true)
|
||||
-> editable("apeirogon_consistent_coloring", 'c');
|
||||
|
@ -1356,6 +1356,7 @@ EX void generate() {
|
||||
*/
|
||||
EX bool in() {
|
||||
if(fake::in()) return FPIU(in());
|
||||
if(geometry == gCubeTiling && (reg3::cubes_reg3 || !PURE)) return false;
|
||||
return euclid && standard_tiling();
|
||||
}
|
||||
|
||||
|
@ -650,7 +650,7 @@ void action_change_variation() {
|
||||
else if(arcm::in()) arcm::next_variation();
|
||||
#endif
|
||||
#if MAXMDIM >= 4
|
||||
else if(reg3::in()) reg3::configure_variation();
|
||||
else if(reg3::in() || geometry == gCubeTiling) reg3::configure_variation();
|
||||
#endif
|
||||
else if(euc::in(2,4) || !CAP_GP) dialog::do_if_confirmed([] {
|
||||
set_variation(PURE ? eVariation::bitruncated : eVariation::pure);
|
||||
@ -1015,7 +1015,7 @@ EX void showEuclideanMenu() {
|
||||
else if(nil) {
|
||||
menuitem_nilwidth('v');
|
||||
}
|
||||
else if((WDIM == 3 || kite::in() || arb::in()) && !reg3::in()) dialog::addBreak(100);
|
||||
else if((WDIM == 3 || kite::in() || arb::in()) && !reg3::in() && geometry != gCubeTiling) dialog::addBreak(100);
|
||||
else
|
||||
menuitem_change_variation('v');
|
||||
|
||||
|
9
reg3.cpp
9
reg3.cpp
@ -116,9 +116,12 @@ EX namespace reg3 {
|
||||
|
||||
EX bool ultra_mirror_in() { return (cgflags & qULTRA) && ultra_mirror_on; }
|
||||
|
||||
EX bool cubes_reg3;
|
||||
|
||||
EX bool in() {
|
||||
if(fake::in()) return FPIU(in());
|
||||
return WDIM == 3 && !euclid && !bt::in() && !nonisotropic && !hybri && !kite::in();
|
||||
if(geometry == gCubeTiling && (cubes_reg3 || !PURE)) return true;
|
||||
return WDIM == 3 && /* !euclid && */ !bt::in() && !nonisotropic && !hybri && !kite::in();
|
||||
}
|
||||
|
||||
EX void compute_ultra() {
|
||||
@ -266,6 +269,8 @@ EX namespace reg3 {
|
||||
|
||||
/* precise ideal vertex */
|
||||
if(klein_scale > 1-1e-5 && klein_scale < 1+1e-5) klein_scale = 1;
|
||||
|
||||
if(euclid) klein_scale = sqrt(3)/2;
|
||||
|
||||
/* actual vertex */
|
||||
hyperpoint v2 = C0 + klein_scale * h012;
|
||||
@ -1319,6 +1324,8 @@ EX namespace reg3 {
|
||||
else if(hyperbolic) {
|
||||
return new hrmap_field3(&fp);
|
||||
}
|
||||
else if(geometry == gCubeTiling)
|
||||
return new seifert_weber::hrmap_singlecell(0);
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user