diff --git a/binary-tiling.cpp b/binary-tiling.cpp index 5a30bc0e..e751ce5c 100644 --- a/binary-tiling.cpp +++ b/binary-tiling.cpp @@ -94,7 +94,7 @@ namespace binary { return h; } - #if MAXDIM==4 + #if MAXMDIM==4 heptagon *build3(heptagon *parent, int d, int d1, int delta) { int side = 0; if(d < 4) side = (parent->zebraval * 2 + d) % 5; @@ -157,7 +157,7 @@ namespace binary { return NULL; } - #if MAXDIM==4 + #if MAXMDIM==4 heptagon *createStep3(heptagon *parent, int d) { auto h = parent; switch(d) { @@ -220,7 +220,7 @@ namespace binary { return direct_tmatrix[dir]; } - #if MAXDIM == 4 + #if MAXMDIM == 4 void queuecube(const transmatrix& V, ld size, color_t linecolor, color_t facecolor) { ld yy = log(2) / 2; diff --git a/cell.cpp b/cell.cpp index 0985b1dc..313defc0 100644 --- a/cell.cpp +++ b/cell.cpp @@ -439,7 +439,7 @@ int celldistAlt(cell *c) { if(sphere || quotient) { return celldist(c) - 3; } - #if MAXDIM == 4 + #if MAXMDIM == 4 if(euclid && DIM == 3) return euclid3::dist_alt(c); #endif if(!c->master->alt) return 0; diff --git a/euclid.cpp b/euclid.cpp index c2b9a163..c0551e25 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -465,7 +465,7 @@ heptagon* encodeId(int id) { // 3D Euclidean space -#if MAXDIM == 4 +#if MAXMDIM == 4 namespace euclid3 { diff --git a/geometry2.cpp b/geometry2.cpp index ca33c7bb..6bac779a 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -94,7 +94,7 @@ transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hin #if CAP_BT if(binarytiling) return binary::relative_matrix(c2->master, c1->master); #endif - #if MAXDIM == 4 + #if MAXMDIM == 4 if(euclid && DIM == 3) return euclid3::relative_matrix(c2->master, c1->master); if(sphere && DIM == 3) return sphere3::relative_matrix(c2->master, c1->master); #endif diff --git a/graph.cpp b/graph.cpp index 8aee6e0d..8c3eb2a6 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5194,7 +5194,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { prec += vid.linequality; if(0); - #if MAXDIM == 4 + #if MAXMDIM == 4 else if(DIM == 3) { for(int t=0; ttype; t++) { if(!c->move(t)) continue; @@ -5823,7 +5823,7 @@ void drawthemap() { else if(archimedean) arcm::draw(); #endif - #if MAXDIM == 4 + #if MAXMDIM == 4 else if(euclid && DIM == 3) euclid3::draw(); else if(sphere && DIM == 3) diff --git a/heptagon.cpp b/heptagon.cpp index a6df8a12..ec7f1e88 100644 --- a/heptagon.cpp +++ b/heptagon.cpp @@ -227,11 +227,11 @@ heptagon *createStep(heptagon *h, int d) { if(!h->move(d) && binarytiling && DIM == 2) return binary::createStep(h, d); #endif - #if CAP_BT && MAXDIM == 4 + #if CAP_BT && MAXMDIM == 4 if(!h->move(d) && binarytiling && DIM == 3) return binary::createStep3(h, d); #endif - #if MAXDIM == 4 + #if MAXMDIM == 4 if(!h->move(d) && euclid && DIM == 3) return euclid3::createStep(h, d); #endif diff --git a/hyper.h b/hyper.h index f40af805..849d18d9 100644 --- a/hyper.h +++ b/hyper.h @@ -182,7 +182,7 @@ typedef complex cld; #define DEBSM(x) -#if MAXDIM == 3 +#if MAXMDIM == 3 #define DIM 2 #else #define DIM ((geometry == gBinary3 || geometry == gCubeTiling || geometry == gCell120 || geometry == gECell120) ? 3 : 2) @@ -191,17 +191,17 @@ typedef complex cld; extern array sightranges; -struct hyperpoint : array { +struct hyperpoint : array { hyperpoint() {} hyperpoint(ld x, ld y, ld z, ld w) { (*this)[0] = x; (*this)[1] = y; (*this)[2] = z; - if(MAXDIM == 4) (*this)[3] = w; + if(MAXMDIM == 4) (*this)[3] = w; } }; struct transmatrix { - ld tab[MAXDIM][MAXDIM]; + ld tab[MAXMDIM][MAXMDIM]; ld * operator [] (int i) { return tab[i]; } const ld * operator [] (int i) const { return tab[i]; } }; @@ -226,7 +226,7 @@ inline transmatrix operator * (const transmatrix& T, const transmatrix& U) { } constexpr transmatrix diag(ld a, ld b, ld c, ld d) { - #if MAXDIM==3 + #if MAXMDIM==3 return transmatrix{{{a,0,0}, {0,b,0}, {0,0,c}}}; #else return transmatrix{{{a,0,0,0}, {0,b,0,0}, {0,0,c,0}, {0,0,0,d}}}; @@ -2792,7 +2792,7 @@ typedef array glvec2; typedef array glvec3; typedef array glvec4; -#if MAXDIM == 4 +#if MAXMDIM == 4 #define SHDIM 4 typedef glvec4 glvertex; #else @@ -4240,7 +4240,7 @@ hyperpoint get_horopoint3(ld y, ld x, ld z); namespace binary { heptagon *createStep(heptagon *parent, int d); - #if MAXDIM == 4 + #if MAXMDIM == 4 heptagon *createStep3(heptagon *parent, int d); #endif transmatrix parabolic(ld u); @@ -4249,7 +4249,7 @@ namespace binary { } #endif -#if MAXDIM == 4 +#if MAXMDIM == 4 namespace euclid3 { heptagon *createStep(heptagon *parent, int d); hrmap* new_map(); @@ -4510,7 +4510,7 @@ struct comma_printer { template void print(hstream& hs, const array& a) { print(hs, "("); comma_printer c(hs); for(const T& t: a) c(t); print(hs, ")"); } template void print(hstream& hs, const vector& a) { print(hs, "("); comma_printer c(hs); for(const T& t: a) c(t); print(hs, ")"); } -inline void print(hstream& hs, const hyperpoint h) { print(hs, (const array&)h); } +inline void print(hstream& hs, const hyperpoint h) { print(hs, (const array&)h); } inline void print(hstream& hs, const transmatrix T) { print(hs, "("); comma_printer c(hs); for(int i=0; ic7->type; i++) { @@ -1128,7 +1128,7 @@ void optimizeview() { #if CAP_BT if(binarytiling) T = binary::relative_matrix(h2, viewctr.at); #endif - #if MAXDIM == 4 + #if MAXMDIM == 4 if(euclid && DIM == 3) T = euclid3::relative_matrix(h2, viewctr.at); if(sphere && DIM == 3) T = sphere3::relative_matrix(h2, viewctr.at); #endif diff --git a/pattern2.cpp b/pattern2.cpp index ca172be6..3f324189 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1290,7 +1290,7 @@ bool pseudohept(cell *c) { #if CAP_BT if(binarytiling) return binary::pseudohept(c); #endif - #if MAXDIM == 4 + #if MAXMDIM == 4 if(DIM == 3) { if(euclid) return euclid3::pseudohept(c); if(sphere) return sphere3::pseudohept(c); diff --git a/shaders.cpp b/shaders.cpp index 26723e5d..042f7cc9 100644 --- a/shaders.cpp +++ b/shaders.cpp @@ -614,7 +614,7 @@ void init() { hyperpoint gltopoint(const glvertex& t) { hyperpoint h; h[0] = t[0]; h[1] = t[1]; h[2] = t[2]; - if(SHDIM == 4 && MAXDIM == 4) h[3] = t[3]; + if(SHDIM == 4 && MAXMDIM == 4) h[3] = t[3]; return h; } diff --git a/sysconfig.h b/sysconfig.h index e218a888..5a04aee7 100644 --- a/sysconfig.h +++ b/sysconfig.h @@ -443,7 +443,7 @@ union SDL_Event; #endif #endif -#define MAXDIM 4 +#define MAXMDIM 4 #ifndef CAP_GEOMETRY #define CAP_GEOMETRY (!(ISMINI))