mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-25 16:37:00 +00:00
remplace euclid6, euclid4, 'euclid && \!archimedean && \!penrose' with standard_tiling(), euc::in(dimension, s7)
This commit is contained in:
parent
7568accff7
commit
0a9ec78c18
14
bigstuff.cpp
14
bigstuff.cpp
@ -49,7 +49,7 @@ EX int celldistAltRelative(cell *c) {
|
|||||||
if(cryst) return crystal::dist_relative(c);
|
if(cryst) return crystal::dist_relative(c);
|
||||||
#endif
|
#endif
|
||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
if(euclid && WDIM == 3) return euc::dist_relative(c);
|
if(euc::in(3)) return euc::dist_relative(c);
|
||||||
#endif
|
#endif
|
||||||
if(euclid && quotient) return celldistAlt(c) - roundTableRadius(c);
|
if(euclid && quotient) return celldistAlt(c) - roundTableRadius(c);
|
||||||
if(sphere || quotient) {
|
if(sphere || quotient) {
|
||||||
@ -63,7 +63,7 @@ EX gp::loc camelot_coords() { return gp::loc(a4 ? 21 : 20, 10); }
|
|||||||
|
|
||||||
EX int euclidAlt(short x, short y) {
|
EX int euclidAlt(short x, short y) {
|
||||||
if(among(specialland, laTemple, laClearing, laCanvas)) {
|
if(among(specialland, laTemple, laClearing, laCanvas)) {
|
||||||
if(euclid6)
|
if(euc::in(2,6))
|
||||||
return max(int(x), x+y);
|
return max(int(x), x+y);
|
||||||
else if(PURE)
|
else if(PURE)
|
||||||
return x + abs(y);
|
return x + abs(y);
|
||||||
@ -71,7 +71,7 @@ EX int euclidAlt(short x, short y) {
|
|||||||
return max(x, y);
|
return max(x, y);
|
||||||
}
|
}
|
||||||
else if(specialland == laCaribbean || specialland == laWhirlpool || specialland == laMountain) {
|
else if(specialland == laCaribbean || specialland == laWhirlpool || specialland == laMountain) {
|
||||||
if(euclid6)
|
if(euc::in(2,6))
|
||||||
return
|
return
|
||||||
min(
|
min(
|
||||||
min(max(int(-x), -x-y) + 3,
|
min(max(int(-x), -x-y) + 3,
|
||||||
@ -1148,7 +1148,7 @@ EX void setLandEuclid(cell *c) {
|
|||||||
if(specialland == laElementalWall) {
|
if(specialland == laElementalWall) {
|
||||||
auto co = euc2_coordinates(c);
|
auto co = euc2_coordinates(c);
|
||||||
int x = co.first, y = co.second;
|
int x = co.first, y = co.second;
|
||||||
int x0 = euclid4 ? x : x + (y>>1);
|
int x0 = euc::in(2,4) ? x : x + (y>>1);
|
||||||
int y0 = y;
|
int y0 = y;
|
||||||
|
|
||||||
int id = 0;
|
int id = 0;
|
||||||
@ -1177,8 +1177,8 @@ EX void setLandEuclid(cell *c) {
|
|||||||
if(specialland == laCrossroads3) {
|
if(specialland == laCrossroads3) {
|
||||||
auto co = euc2_coordinates(c);
|
auto co = euc2_coordinates(c);
|
||||||
int x = co.first, y = co.second;
|
int x = co.first, y = co.second;
|
||||||
int y0 = euclid4 ? 2 * y - x : y;
|
int y0 = euc::in(2,4) ? 2 * y - x : y;
|
||||||
int x0 = euclid4 ? 2 * x + y : x + y/2;
|
int x0 = euc::in(2,4) ? 2 * x + y : x + y/2;
|
||||||
|
|
||||||
x0 += 24; y0 += 8;
|
x0 += 24; y0 += 8;
|
||||||
|
|
||||||
@ -1188,7 +1188,7 @@ EX void setLandEuclid(cell *c) {
|
|||||||
|
|
||||||
setland(c, id ? laCrossroads3 : laDesert);
|
setland(c, id ? laCrossroads3 : laDesert);
|
||||||
|
|
||||||
if(euclid4 ? (!(y0&15) || !(x0&15)) : ((y0&15) == 15 && (x0&1)) || ((x0&15) == 0 && ((y0+1)&1))) {
|
if(euc::in(2,4) ? (!(y0&15) || !(x0&15)) : ((y0&15) == 15 && (x0&1)) || ((x0&15) == 0 && ((y0+1)&1))) {
|
||||||
setland(c, laBarrier);
|
setland(c, laBarrier);
|
||||||
c->wall = waBarrier;
|
c->wall = waBarrier;
|
||||||
}
|
}
|
||||||
|
12
cell.cpp
12
cell.cpp
@ -487,7 +487,7 @@ EX int celldistAlt(cell *c) {
|
|||||||
return celldist(c) - 3;
|
return celldist(c) - 3;
|
||||||
}
|
}
|
||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
if(euclid && WDIM == 3) return euc::dist_alt(c);
|
if(euc::in(3)) return euc::dist_alt(c);
|
||||||
if(hyperbolic && WDIM == 3) return reg3::altdist(c->master);
|
if(hyperbolic && WDIM == 3) return reg3::altdist(c->master);
|
||||||
#endif
|
#endif
|
||||||
if(!c->master->alt) return 0;
|
if(!c->master->alt) return 0;
|
||||||
@ -862,7 +862,7 @@ 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(euclid && !archimedean && !penrose) return getEuclidCdata(euc2_coordinates(c))->val[j];
|
else if(euc::in()) return getEuclidCdata(euc2_coordinates(c))->val[j];
|
||||||
else if(archimedean && euclid)
|
else if(archimedean && euclid)
|
||||||
return getEuclidCdata(pseudocoords(c))->val[j];
|
return getEuclidCdata(pseudocoords(c))->val[j];
|
||||||
else if(archimedean && hyperbolic)
|
else if(archimedean && hyperbolic)
|
||||||
@ -880,7 +880,7 @@ 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(euclid && !archimedean && !penrose) return getEuclidCdata(euc2_coordinates(c))->bits;
|
else if(euc::in()) return getEuclidCdata(euc2_coordinates(c))->bits;
|
||||||
else if(archimedean && euclid)
|
else if(archimedean && euclid)
|
||||||
return getEuclidCdata(pseudocoords(c))->bits;
|
return getEuclidCdata(pseudocoords(c))->bits;
|
||||||
else if(archimedean && (hyperbolic || sl2))
|
else if(archimedean && (hyperbolic || sl2))
|
||||||
@ -1012,7 +1012,7 @@ EX int celldistance(cell *c1, cell *c2) {
|
|||||||
if(cryst) return crystal::precise_distance(c1, c2);
|
if(cryst) return crystal::precise_distance(c1, c2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(euclid && WDIM == 2 && !penrose && !archimedean) {
|
if(euc::in() && WDIM == 2) {
|
||||||
return euc::cyldist(euc2_coordinates(c1), euc2_coordinates(c2));
|
return euc::cyldist(euc2_coordinates(c1), euc2_coordinates(c2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1236,4 +1236,8 @@ EX vector<int> reverse_directions(heptagon *c, int dir) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX bool standard_tiling() {
|
||||||
|
return !archimedean && !penrose && !binarytiling;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2564,7 +2564,7 @@ void celldrawer::set_maywarp_floor() {
|
|||||||
void celldrawer::set_reptile_floor(const transmatrix& V, color_t col, bool nodetails) {
|
void celldrawer::set_reptile_floor(const transmatrix& V, color_t col, bool nodetails) {
|
||||||
|
|
||||||
auto si =
|
auto si =
|
||||||
euclid6 ?
|
euc::in(2,6) ?
|
||||||
patterns::getpatterninfo(c, patterns::PAT_COLORING, patterns::SPF_CHANGEROT)
|
patterns::getpatterninfo(c, patterns::PAT_COLORING, patterns::SPF_CHANGEROT)
|
||||||
:
|
:
|
||||||
patterns::getpatterninfo(c, patterns::PAT_ZEBRA, patterns::SPF_SYM0123);
|
patterns::getpatterninfo(c, patterns::PAT_ZEBRA, patterns::SPF_SYM0123);
|
||||||
@ -2579,11 +2579,11 @@ void celldrawer::set_reptile_floor(const transmatrix& V, color_t col, bool nodet
|
|||||||
else if(si.id >= 28 && si.id < 40) j = 3;
|
else if(si.id >= 28 && si.id < 40) j = 3;
|
||||||
else j = 4;
|
else j = 4;
|
||||||
|
|
||||||
if(euclid6) j = 0;
|
if(euc::in(2,6)) j = 0;
|
||||||
|
|
||||||
transmatrix D = applyPatterndir(c, si);
|
transmatrix D = applyPatterndir(c, si);
|
||||||
if(euclid6 && GOLDBERG) D = ddspin(c, si.dir);
|
if(euc::in(2,6) && GOLDBERG) D = ddspin(c, si.dir);
|
||||||
if(wmescher && (stdhyperbolic || euclid6))
|
if(wmescher && (stdhyperbolic || euc::in(2,6)))
|
||||||
set_floor(D, cgi.shReptile[j][0]);
|
set_floor(D, cgi.shReptile[j][0]);
|
||||||
else set_maywarp_floor();
|
else set_maywarp_floor();
|
||||||
|
|
||||||
|
@ -3799,7 +3799,7 @@ EX namespace dungeon {
|
|||||||
|
|
||||||
if(y0 >= 6) { y0 -= 6; x += 4; }
|
if(y0 >= 6) { y0 -= 6; x += 4; }
|
||||||
|
|
||||||
char ch = euclid6 ? tab6[y0][(x+(y+1)/2)&7] : tab4[y0][x&7];
|
char ch = euc::in(2,6) ? tab6[y0][(x+(y+1)/2)&7] : tab4[y0][x&7];
|
||||||
|
|
||||||
if(ch == '#')
|
if(ch == '#')
|
||||||
c->wall = waPlatform;
|
c->wall = waPlatform;
|
||||||
|
@ -1159,6 +1159,10 @@ EX int cyldist(gp::loc a, gp::loc b) {
|
|||||||
return best;
|
return best;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX bool in() { return euclid && standard_tiling(); }
|
||||||
|
EX bool in(int dim) { return in() && WDIM == dim; }
|
||||||
|
EX bool in(int dim, int s7) { return in(dim) && S7 == s7; }
|
||||||
|
|
||||||
EX }
|
EX }
|
||||||
|
|
||||||
EX gp::loc euc2_coordinates(cell *c) { return euc::full_coords2(c); }
|
EX gp::loc euc2_coordinates(cell *c) { return euc::full_coords2(c); }
|
||||||
|
@ -326,9 +326,8 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i
|
|||||||
for(auto pfsh: all_plain_floorshapes) {
|
for(auto pfsh: all_plain_floorshapes) {
|
||||||
auto& fsh = *pfsh;
|
auto& fsh = *pfsh;
|
||||||
|
|
||||||
if(STDVAR && !archimedean && !penrose) {
|
if(STDVAR && (standard_tiling() || binarytiling)) {
|
||||||
|
|
||||||
// standard and binary
|
|
||||||
ld hexside = fsh.rad0, heptside = fsh.rad1;
|
ld hexside = fsh.rad0, heptside = fsh.rad1;
|
||||||
|
|
||||||
for(int k=0; k<SIDEPARS; k++) sizeto(fsh.side[k], id);
|
for(int k=0; k<SIDEPARS; k++) sizeto(fsh.side[k], id);
|
||||||
@ -451,7 +450,7 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i
|
|||||||
sizeto(fsh.b, id);
|
sizeto(fsh.b, id);
|
||||||
sizeto(fsh.shadow, id);
|
sizeto(fsh.shadow, id);
|
||||||
|
|
||||||
if(STDVAR && !binarytiling && !archimedean && !penrose) {
|
if(STDVAR && standard_tiling()) {
|
||||||
generate_matrices_scale(fsh.scale, fsh.noftype);
|
generate_matrices_scale(fsh.scale, fsh.noftype);
|
||||||
if(PURE && geosupport_football() < 2) {
|
if(PURE && geosupport_football() < 2) {
|
||||||
bshape2(fsh.b[id], fsh.prio, fsh.shapeid2 ? fsh.shapeid2 : fsh.shapeid1, hept_matrices);
|
bshape2(fsh.b[id], fsh.prio, fsh.shapeid2 ? fsh.shapeid2 : fsh.shapeid1, hept_matrices);
|
||||||
|
@ -231,7 +231,7 @@ EX geometry_filter gf_spherical = {"spherical", [] { return (archimedean || sphe
|
|||||||
EX geometry_filter gf_euclidean = {"Euclidean", [] { return (archimedean || euclid) && !forced_quotient(); }};
|
EX geometry_filter gf_euclidean = {"Euclidean", [] { return (archimedean || 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 !archimedean && !binarytiling && !penrose && WDIM == 2 && !forced_quotient();
|
return standard_tiling() && WDIM == 2 && !forced_quotient();
|
||||||
}};
|
}};
|
||||||
EX geometry_filter gf_regular_3d = {"regular 3D honeycombs", [] {
|
EX geometry_filter gf_regular_3d = {"regular 3D honeycombs", [] {
|
||||||
if(euclid) return geometry == gCubeTiling;
|
if(euclid) return geometry == gCubeTiling;
|
||||||
@ -613,7 +613,7 @@ EX void showEuclideanMenu() {
|
|||||||
else if(binarytiling)
|
else if(binarytiling)
|
||||||
spf = "6,[6,7],7";
|
spf = "6,[6,7],7";
|
||||||
#endif
|
#endif
|
||||||
else if(BITRUNCATED && !euclid6)
|
else if(BITRUNCATED)
|
||||||
spf = spf + "," + its(S6) + "," + its(S6);
|
spf = spf + "," + its(S6) + "," + its(S6);
|
||||||
#if CAP_IRR
|
#if CAP_IRR
|
||||||
else if(IRREGULAR && irr::bitruncations_performed)
|
else if(IRREGULAR && irr::bitruncations_performed)
|
||||||
@ -685,7 +685,7 @@ EX void showEuclideanMenu() {
|
|||||||
#if CAP_ARCM
|
#if CAP_ARCM
|
||||||
else if(archimedean) arcm::next_variation();
|
else if(archimedean) arcm::next_variation();
|
||||||
#endif
|
#endif
|
||||||
else if(euclid4 || !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);
|
||||||
start_game();
|
start_game();
|
||||||
});
|
});
|
||||||
@ -789,7 +789,7 @@ EX void showEuclideanMenu() {
|
|||||||
|
|
||||||
string fgname = XLAT(ginf[geometry].tiling_name);
|
string fgname = XLAT(ginf[geometry].tiling_name);
|
||||||
if(qstring != "none") fgname += " " + XLAT(qstring);
|
if(qstring != "none") fgname += " " + XLAT(qstring);
|
||||||
if(!euclid6) fgname = gp::operation_name() + " " + fgname;
|
if(!euc::in(2,6)) fgname = gp::operation_name() + " " + fgname;
|
||||||
|
|
||||||
dialog::addTitle(XLAT("info about: %1", fgname), 0xFFFFFF, 150);
|
dialog::addTitle(XLAT("info about: %1", fgname), 0xFFFFFF, 150);
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ void geometry_information::prepare_basics() {
|
|||||||
floorrad0 = hexvdist* (GDIM == 3 ? 1 : 0.92);
|
floorrad0 = hexvdist* (GDIM == 3 ? 1 : 0.92);
|
||||||
floorrad1 = rhexf * (GDIM == 3 ? 1 : 0.94);
|
floorrad1 = rhexf * (GDIM == 3 ? 1 : 0.94);
|
||||||
|
|
||||||
if(euclid4) {
|
if(euc::in(2,4)) {
|
||||||
if(!BITRUNCATED)
|
if(!BITRUNCATED)
|
||||||
floorrad0 = floorrad1 = rhexf * (GDIM == 3 ? 1 : .94);
|
floorrad0 = floorrad1 = rhexf * (GDIM == 3 ? 1 : .94);
|
||||||
else
|
else
|
||||||
|
@ -3249,7 +3249,7 @@ EX bool placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, color_t
|
|||||||
dynamicval<bool> ncor(approx_nearcorner, true);
|
dynamicval<bool> ncor(approx_nearcorner, true);
|
||||||
transmatrix V2 = V * ddspin(c, i);
|
transmatrix V2 = V * ddspin(c, i);
|
||||||
|
|
||||||
if(binarytiling || archimedean || NONSTDVAR || penrose) {
|
if(NONSTDVAR || !standard_tiling()) {
|
||||||
#if CAP_ARCM
|
#if CAP_ARCM
|
||||||
if(archimedean && !PURE)
|
if(archimedean && !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;
|
||||||
|
4
help.cpp
4
help.cpp
@ -814,14 +814,14 @@ EX void describeMouseover() {
|
|||||||
if(randomPatternsMode)
|
if(randomPatternsMode)
|
||||||
out += " " + describeRPM(c->land);
|
out += " " + describeRPM(c->land);
|
||||||
|
|
||||||
if(euclid && cheater && WDIM == 2 && !archimedean && !penrose) {
|
if(cheater && euc::in(2)) {
|
||||||
auto co = euc2_coordinates(c);
|
auto co = euc2_coordinates(c);
|
||||||
out += " (" + its(co.first);
|
out += " (" + its(co.first);
|
||||||
for(int i=1; i<WDIM; i++) out += "," + its(co.second);
|
for(int i=1; i<WDIM; i++) out += "," + its(co.second);
|
||||||
out += ")";
|
out += ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(euclid && cheater && WDIM == 3) {
|
if(cheater && euc::in(3)) {
|
||||||
auto co = euc::get_ispacemap()[c->master];
|
auto co = euc::get_ispacemap()[c->master];
|
||||||
out += " (" + its(co[0]);
|
out += " (" + its(co[0]);
|
||||||
for(int i=1; i<WDIM; i++) out += "," + its(co[i]);
|
for(int i=1; i<WDIM; i++) out += "," + its(co[i]);
|
||||||
|
2
hyper.h
2
hyper.h
@ -165,8 +165,6 @@ void addMessage(string s, char spamtype = 0);
|
|||||||
#define stdeuc (geometry == gNormal || geometry == gEuclid || geometry == gEuclidSquare)
|
#define stdeuc (geometry == gNormal || geometry == gEuclid || geometry == gEuclidSquare)
|
||||||
#define smallsphere (sphere_narcm && S7 < 5)
|
#define smallsphere (sphere_narcm && S7 < 5)
|
||||||
#define bigsphere (sphere_narcm && S7 == 5)
|
#define bigsphere (sphere_narcm && S7 == 5)
|
||||||
#define euclid4 (euclid && WDIM == 2 && a4)
|
|
||||||
#define euclid6 (euclid && WDIM == 2 && !a4)
|
|
||||||
|
|
||||||
#define S6 (S3*2)
|
#define S6 (S3*2)
|
||||||
#define MAX_S3 4
|
#define MAX_S3 4
|
||||||
|
10
landgen.cpp
10
landgen.cpp
@ -506,7 +506,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 & 1) ? waCavewall : waCavefloor;
|
c->wall = (c->master->zebraval & 1) ? waCavewall : waCavefloor;
|
||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
else if(euclid && WDIM == 3)
|
else if(euc::in(3))
|
||||||
c->wall = euc::get_emerald(c) ? waCavewall : waCavefloor;
|
c->wall = euc::get_emerald(c) ? waCavewall : waCavefloor;
|
||||||
#endif
|
#endif
|
||||||
else if(euclid) {
|
else if(euclid) {
|
||||||
@ -1284,16 +1284,16 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case laStorms: {
|
case laStorms: {
|
||||||
bool randstorm = PIU(hyperbolic_not37 || NONSTDVAR || (quotient && geometry != gZebraQuotient && !(euclid && !archimedean && !penrose && WDIM == 2)));
|
bool randstorm = PIU(hyperbolic_not37 || NONSTDVAR || (quotient && geometry != gZebraQuotient && !euc::in(2)));
|
||||||
if(fargen) {
|
if(fargen) {
|
||||||
|
|
||||||
if(euclid && smallbounded && WDIM == 2) {
|
if(euc::in(2) && smallbounded) {
|
||||||
auto s = euc::sdxy();
|
auto s = euc::sdxy();
|
||||||
gp::loc st {s.first/3, s.second/3};
|
gp::loc st {s.first/3, s.second/3};
|
||||||
if(c == euc::at(st)) c->wall = waCharged;
|
if(c == euc::at(st)) c->wall = waCharged;
|
||||||
if(c == euc::at(s-st)) c->wall = waGrounded;
|
if(c == euc::at(s-st)) c->wall = waGrounded;
|
||||||
}
|
}
|
||||||
else if(euclid && WDIM == 2) {
|
else if(euc::in(2)) {
|
||||||
auto co = euc2_coordinates(c);
|
auto co = euc2_coordinates(c);
|
||||||
int x = co.first, y = co.second;
|
int x = co.first, y = co.second;
|
||||||
if((x+1)%3 == 0 && y%3 == 0) {
|
if((x+1)%3 == 0 && y%3 == 0) {
|
||||||
@ -2656,7 +2656,7 @@ EX void setdist(cell *c, int d, cell *from) {
|
|||||||
else if(cryst) crystal::set_land(c);
|
else if(cryst) crystal::set_land(c);
|
||||||
#endif
|
#endif
|
||||||
#if MAXMDIM == 4
|
#if MAXMDIM == 4
|
||||||
else if(euclid && WDIM == 3) euc::set_land(c);
|
else if(euc::in(3)) euc::set_land(c);
|
||||||
#endif
|
#endif
|
||||||
else if(hybri) setLandHybrid(c);
|
else if(hybri) setLandHybrid(c);
|
||||||
else if(sphere || (euclid && bounded)) setLandSphere(c);
|
else if(sphere || (euclid && bounded)) setLandSphere(c);
|
||||||
|
@ -1081,7 +1081,7 @@ EX land_validity_t& land_validity(eLand l) {
|
|||||||
else {
|
else {
|
||||||
bool reptile_good = false;
|
bool reptile_good = false;
|
||||||
if(hyperbolic_37 && BITRUNCATED) reptile_good = true;
|
if(hyperbolic_37 && BITRUNCATED) reptile_good = true;
|
||||||
if(euclid6) reptile_good = true;
|
if(euc::in(2,6)) reptile_good = true;
|
||||||
if(quotient && geometry != gZebraQuotient && !euclid)
|
if(quotient && geometry != gZebraQuotient && !euclid)
|
||||||
reptile_good = false;
|
reptile_good = false;
|
||||||
if(!reptile_good)
|
if(!reptile_good)
|
||||||
|
@ -167,7 +167,7 @@ namespace mapstream {
|
|||||||
}
|
}
|
||||||
if(binarytiling && VERNUM_HEX >= 0xA80C)
|
if(binarytiling && VERNUM_HEX >= 0xA80C)
|
||||||
f.write(vid.binary_width);
|
f.write(vid.binary_width);
|
||||||
if(euclid && !penrose && !archimedean) {
|
if(euc::in()) {
|
||||||
f.write(euc::eu_input.user_axes);
|
f.write(euc::eu_input.user_axes);
|
||||||
f.write(euc::eu_input.twisted);
|
f.write(euc::eu_input.twisted);
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ namespace mapstream {
|
|||||||
}
|
}
|
||||||
if(binarytiling && VERNUM_HEX >= 0xA80C)
|
if(binarytiling && VERNUM_HEX >= 0xA80C)
|
||||||
f.read(vid.binary_width);
|
f.read(vid.binary_width);
|
||||||
if(euclid && !penrose && !archimedean && VERNUM_HEX >= 0xA80D) {
|
if(euc::in() && VERNUM_HEX >= 0xA80D) {
|
||||||
f.read(euc::eu_input.user_axes);
|
f.read(euc::eu_input.user_axes);
|
||||||
f.read(euc::eu_input.twisted);
|
f.read(euc::eu_input.twisted);
|
||||||
}
|
}
|
||||||
|
22
pattern2.cpp
22
pattern2.cpp
@ -804,7 +804,7 @@ EX namespace patterns {
|
|||||||
si.dir = (zebra40(c)*4) % 6;
|
si.dir = (zebra40(c)*4) % 6;
|
||||||
}
|
}
|
||||||
if(symRotation) si.id = 1;
|
if(symRotation) si.id = 1;
|
||||||
if(euclid6 && (sub & SPF_FULLSYM))
|
if(euc::in(2,6) && (sub & SPF_FULLSYM))
|
||||||
si.symmetries = 1;
|
si.symmetries = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -829,8 +829,8 @@ EX namespace patterns {
|
|||||||
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);
|
||||||
else if(euclid4 && !penrose && !archimedean) valEuclid4(c, si, sub);
|
else if(euc::in(2,4)) valEuclid4(c, si, sub);
|
||||||
else if(euclid6 && !penrose && !archimedean) valEuclid6(c, si, sub);
|
else if(euc::in(2,6)) valEuclid6(c, si, sub);
|
||||||
else if(a4) val457(c, si, sub);
|
else if(a4) val457(c, si, sub);
|
||||||
else si.symmetries = ctof(c) ? 1 : 2;
|
else si.symmetries = ctof(c) ? 1 : 2;
|
||||||
}
|
}
|
||||||
@ -911,7 +911,7 @@ EX namespace patterns {
|
|||||||
val_warped(c, si);
|
val_warped(c, si);
|
||||||
else {
|
else {
|
||||||
si.id = pseudohept(c) ? 1 : 0;
|
si.id = pseudohept(c) ? 1 : 0;
|
||||||
if(euclid && !penrose && !archimedean) {
|
if(euc::in()) {
|
||||||
si.dir = ishex1(c) ? 0 : 3;
|
si.dir = ishex1(c) ? 0 : 3;
|
||||||
if(ctof(c)) si.symmetries = 3;
|
if(ctof(c)) si.symmetries = 3;
|
||||||
if(subpattern_flags & SPF_EXTRASYM)
|
if(subpattern_flags & SPF_EXTRASYM)
|
||||||
@ -955,7 +955,7 @@ EX namespace patterns {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(euclid6 && (sub & SPF_CHANGEROT)) {
|
if(euc::in(2,6) && (sub & SPF_CHANGEROT)) {
|
||||||
if(GOLDBERG) {
|
if(GOLDBERG) {
|
||||||
auto li = gp::get_local_info(c);
|
auto li = gp::get_local_info(c);
|
||||||
if(li.first_dir >= 0)
|
if(li.first_dir >= 0)
|
||||||
@ -969,10 +969,10 @@ EX namespace patterns {
|
|||||||
si.dir = (zebra40(c)*4 + 9 - c->c.spin(0)) % 6;
|
si.dir = (zebra40(c)*4 + 9 - c->c.spin(0)) % 6;
|
||||||
}
|
}
|
||||||
if(sub & SPF_ROT) si.id = 1;
|
if(sub & SPF_ROT) si.id = 1;
|
||||||
if(euclid6 && !(sub & SPF_EXTRASYM)) {
|
if(euc::in(2,6) && !(sub & SPF_EXTRASYM)) {
|
||||||
si.symmetries = 6;
|
si.symmetries = 6;
|
||||||
}
|
}
|
||||||
if(euclid6 && (sub & SPF_FULLSYM))
|
if(euc::in(2,6) && (sub & SPF_FULLSYM))
|
||||||
si.symmetries = 1;
|
si.symmetries = 1;
|
||||||
applyAlt(si, sub, PAT_COLORING);
|
applyAlt(si, sub, PAT_COLORING);
|
||||||
}
|
}
|
||||||
@ -1283,7 +1283,7 @@ EX int pattern_threecolor(cell *c) {
|
|||||||
patterns::val38(c, si, !BITRUNCATED ? 0 : patterns::SPF_ROT, patterns::PAT_COLORING);
|
patterns::val38(c, si, !BITRUNCATED ? 0 : patterns::SPF_ROT, patterns::PAT_COLORING);
|
||||||
return si.id >> 2;
|
return si.id >> 2;
|
||||||
}
|
}
|
||||||
if(euclid6 && gp_threecolor() == 2) {
|
if(euc::in(2,6) && gp_threecolor() == 2) {
|
||||||
auto li = gp::get_local_info(c);
|
auto li = gp::get_local_info(c);
|
||||||
int rel = gmod(li.relative.first - li.relative.second, 3);
|
int rel = gmod(li.relative.first - li.relative.second, 3);
|
||||||
if(rel && (li.last_dir&1)) rel = 3 - rel;
|
if(rel && (li.last_dir&1)) rel = 3 - rel;
|
||||||
@ -1315,7 +1315,7 @@ EX int pattern_threecolor(cell *c) {
|
|||||||
}
|
}
|
||||||
if(euclid) {
|
if(euclid) {
|
||||||
if(a4 && PURE) return eupattern4(c);
|
if(a4 && PURE) return eupattern4(c);
|
||||||
if(euclid6 && !BITRUNCATED) return eupattern(c) % 3;
|
if(euc::in(2,6) && !BITRUNCATED) return eupattern(c) % 3;
|
||||||
return c == c->master->c7 ? 0 : (c->c.spin(0)&1) ? 1 : 2;
|
return c == c->master->c7 ? 0 : (c->c.spin(0)&1) ? 1 : 2;
|
||||||
}
|
}
|
||||||
if(S3 >= OINF) return c->master->distance % 3;
|
if(S3 >= OINF) return c->master->distance % 3;
|
||||||
@ -1755,7 +1755,7 @@ EX namespace patterns {
|
|||||||
|
|
||||||
dialog::addItem(XLAT("nice coloring"), 'T');
|
dialog::addItem(XLAT("nice coloring"), 'T');
|
||||||
|
|
||||||
if(euclid6)
|
if(euc::in(2,6))
|
||||||
dialog::addItem(XLAT("seven-coloring"), 'v');
|
dialog::addItem(XLAT("seven-coloring"), 'v');
|
||||||
|
|
||||||
if(stdhyperbolic) {
|
if(stdhyperbolic) {
|
||||||
@ -2441,7 +2441,7 @@ EX namespace linepatterns {
|
|||||||
switch(id) {
|
switch(id) {
|
||||||
|
|
||||||
case patZebraTriangles:
|
case patZebraTriangles:
|
||||||
if(euclid6) {
|
if(euc::in(2,6)) {
|
||||||
if(c != c->master->c7 || patterns::sevenval(c)) break;
|
if(c != c->master->c7 || patterns::sevenval(c)) break;
|
||||||
gridline(V, C0, tC0(euc::eumove(gp::loc(-1, +3))), col, 3 + vid.linequality);
|
gridline(V, C0, tC0(euc::eumove(gp::loc(-1, +3))), col, 3 + vid.linequality);
|
||||||
gridline(V, C0, tC0(euc::eumove(gp::loc(-3, +2))), col, 3 + vid.linequality);
|
gridline(V, C0, tC0(euc::eumove(gp::loc(-3, +2))), col, 3 + vid.linequality);
|
||||||
|
@ -1134,7 +1134,7 @@ void geometry_information::configure_floorshapes() {
|
|||||||
double eps = hexhexdist * .05;
|
double eps = hexhexdist * .05;
|
||||||
if(euclid) trihepta0 = hexhexdist * .5 - eps * sqrt(3)/2, trihepta1 = hexhexdist * sqrt(3)/2 - eps; // .5-.1; .75-.05
|
if(euclid) trihepta0 = hexhexdist * .5 - eps * sqrt(3)/2, trihepta1 = hexhexdist * sqrt(3)/2 - eps; // .5-.1; .75-.05
|
||||||
|
|
||||||
if(euclid4)
|
if(euc::in(2,4))
|
||||||
trihepta0 = trihepta1 = crossf * 1.35 / 2;
|
trihepta0 = trihepta1 = crossf * 1.35 / 2;
|
||||||
|
|
||||||
if(sphere&&S7==3) trihepta0 *= 1.3, trihepta1 *= 1.6;
|
if(sphere&&S7==3) trihepta0 *= 1.3, trihepta1 *= 1.6;
|
||||||
@ -1340,7 +1340,7 @@ void geometry_information::prepare_shapes() {
|
|||||||
if(sphere) krsc *= 1.4;
|
if(sphere) krsc *= 1.4;
|
||||||
if(S7 ==8) krsc *= 1.3;
|
if(S7 ==8) krsc *= 1.3;
|
||||||
|
|
||||||
if(PURE && !euclid4) {
|
if(PURE && !euc::in(2,4)) {
|
||||||
tentacle_length = 1.52;
|
tentacle_length = 1.52;
|
||||||
bshape(shSeaTentacle, PPR::TENTACLE1, 1, 245);
|
bshape(shSeaTentacle, PPR::TENTACLE1, 1, 245);
|
||||||
}
|
}
|
||||||
@ -1353,7 +1353,7 @@ void geometry_information::prepare_shapes() {
|
|||||||
bshape(shSeaTentacle, PPR::TENTACLE1, scalefactor, 246);
|
bshape(shSeaTentacle, PPR::TENTACLE1, scalefactor, 246);
|
||||||
}
|
}
|
||||||
ld ksc = (!BITRUNCATED ? 1.8 : 1.5) * scalefactor * krsc;
|
ld ksc = (!BITRUNCATED ? 1.8 : 1.5) * scalefactor * krsc;
|
||||||
if(euclid4 && PURE) ksc *= .5;
|
if(euc::in(2,4) && PURE) ksc *= .5;
|
||||||
bshape(shKrakenHead, PPR::ONTENTACLE, ksc, 247);
|
bshape(shKrakenHead, PPR::ONTENTACLE, ksc, 247);
|
||||||
bshape(shKrakenEye, PPR::ONTENTACLE_EYES, ksc, 248);
|
bshape(shKrakenEye, PPR::ONTENTACLE_EYES, ksc, 248);
|
||||||
bshape(shKrakenEye2, PPR::ONTENTACLE_EYES2, ksc, 249);
|
bshape(shKrakenEye2, PPR::ONTENTACLE_EYES2, ksc, 249);
|
||||||
|
Loading…
Reference in New Issue
Block a user