mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
more guard fixes
This commit is contained in:
parent
319e316b55
commit
94c7cf6b03
8
fake.cpp
8
fake.cpp
@ -34,8 +34,12 @@ EX namespace fake {
|
|||||||
if(arcm::in() && PURE) return true;
|
if(arcm::in() && PURE) return true;
|
||||||
if(WDIM == 2) return false;
|
if(WDIM == 2) return false;
|
||||||
if(among(geometry, gBitrunc3)) return false;
|
if(among(geometry, gBitrunc3)) return false;
|
||||||
|
#if MAXMDIM >= 4
|
||||||
if(reg3::in() && !among(variation, eVariation::pure, eVariation::subcubes, eVariation::coxeter, eVariation::bch_oct)) return false;
|
if(reg3::in() && !among(variation, eVariation::pure, eVariation::subcubes, eVariation::coxeter, eVariation::bch_oct)) return false;
|
||||||
return euc::in() || reg3::in();
|
return euc::in() || reg3::in();
|
||||||
|
#else
|
||||||
|
return euc::in();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
map<cell*, ld> random_order;
|
map<cell*, ld> random_order;
|
||||||
@ -133,7 +137,11 @@ EX namespace fake {
|
|||||||
}
|
}
|
||||||
transmatrix S1, S2;
|
transmatrix S1, S2;
|
||||||
ld dist;
|
ld dist;
|
||||||
|
#if MAXMDIM >= 4
|
||||||
bool impure = reg3::in() && !PURE;
|
bool impure = reg3::in() && !PURE;
|
||||||
|
#else
|
||||||
|
bool impure = !PURE;
|
||||||
|
#endif
|
||||||
vector<int> mseq;
|
vector<int> mseq;
|
||||||
if(impure) {
|
if(impure) {
|
||||||
mseq = FPIU ( currentmap->get_move_seq(c, d) );
|
mseq = FPIU ( currentmap->get_move_seq(c, d) );
|
||||||
|
24
reg3.cpp
24
reg3.cpp
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "hyper.h"
|
#include "hyper.h"
|
||||||
namespace hr {
|
namespace hr {
|
||||||
#if MAXMDIM >= 4
|
|
||||||
|
|
||||||
EX hyperpoint final_coords(hyperpoint h) {
|
EX hyperpoint final_coords(hyperpoint h) {
|
||||||
if(sn::in() || !bt::in())
|
if(sn::in() || !bt::in())
|
||||||
@ -68,6 +67,19 @@ void subcellshape::compute_hept() {
|
|||||||
compute_common();
|
compute_common();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX namespace reg3 {
|
||||||
|
EX void make_vertices_only(vector<hyperpoint>& vo, const vector<vector<hyperpoint>>& csh) {
|
||||||
|
vo.clear();
|
||||||
|
for(auto& v: csh)
|
||||||
|
for(hyperpoint h: v) {
|
||||||
|
bool found = false;
|
||||||
|
for(hyperpoint h2: vo) if(hdist(h, h2) < 1e-6) found = true;
|
||||||
|
if(!found) vo.push_back(h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EX }
|
||||||
|
|
||||||
|
#if MAXMDIM >= 4
|
||||||
void subcellshape::compute_sub() {
|
void subcellshape::compute_sub() {
|
||||||
hyperpoint gres = Hypc;
|
hyperpoint gres = Hypc;
|
||||||
for(auto& face: faces) {
|
for(auto& face: faces) {
|
||||||
@ -167,16 +179,6 @@ EX namespace reg3 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void make_vertices_only(vector<hyperpoint>& vo, const vector<vector<hyperpoint>>& csh) {
|
|
||||||
vo.clear();
|
|
||||||
for(auto& v: csh)
|
|
||||||
for(hyperpoint h: v) {
|
|
||||||
bool found = false;
|
|
||||||
for(hyperpoint h2: vo) if(hdist(h, h2) < 1e-6) found = true;
|
|
||||||
if(!found) vo.push_back(h);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EX void generate() {
|
EX void generate() {
|
||||||
|
|
||||||
if(fake::in()) {
|
if(fake::in()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user