some more DIM->WDIM/GDIM fixes
This commit is contained in:
parent
f8247073e7
commit
aa8d4965e4
|
@ -579,9 +579,9 @@ namespace binary {
|
||||||
// on which horocycle are we
|
// on which horocycle are we
|
||||||
ld horo_level(hyperpoint h) {
|
ld horo_level(hyperpoint h) {
|
||||||
using namespace hyperpoint_vec;
|
using namespace hyperpoint_vec;
|
||||||
h /= (1 + h[DIM]);
|
h /= (1 + h[GDIM]);
|
||||||
h[0] -= 1;
|
h[0] -= 1;
|
||||||
h /= sqhypot_d(DIM, h);
|
h /= sqhypot_d(GDIM, h);
|
||||||
h[0] += .5;
|
h[0] += .5;
|
||||||
return log(2) + log(-h[0]);
|
return log(2) + log(-h[0]);
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@ void virtualRebaseSimple(heptagon*& base, transmatrix& at) {
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
|
|
||||||
double currz = at[DIM][DIM];
|
double currz = at[GDIM][GDIM];
|
||||||
|
|
||||||
heptagon *h = base;
|
heptagon *h = base;
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ void virtualRebaseSimple(heptagon*& base, transmatrix& at) {
|
||||||
|
|
||||||
for(int d=0; d<S7; d++) {
|
for(int d=0; d<S7; d++) {
|
||||||
transmatrix V2 = itmatrix(h, d) * at;
|
transmatrix V2 = itmatrix(h, d) * at;
|
||||||
double newz = V2[DIM][DIM];
|
double newz = V2[GDIM][GDIM];
|
||||||
if(newz < currz) {
|
if(newz < currz) {
|
||||||
currz = newz;
|
currz = newz;
|
||||||
bestV = V2;
|
bestV = V2;
|
||||||
|
|
|
@ -2474,7 +2474,7 @@ void setdist(cell *c, int d, cell *from) {
|
||||||
|
|
||||||
if(d >= BARLEV) {
|
if(d >= BARLEV) {
|
||||||
|
|
||||||
if(binarytiling && DIM == 3 && !c->land) {
|
if(binarytiling && WDIM == 3 && !c->land) {
|
||||||
ld z = vid.binary_width;
|
ld z = vid.binary_width;
|
||||||
cell *cseek = c;
|
cell *cseek = c;
|
||||||
int step = 0;
|
int step = 0;
|
||||||
|
@ -2483,7 +2483,7 @@ void setdist(cell *c, int d, cell *from) {
|
||||||
if(cseek->master->emeraldval) setland(c, eLand(cseek->master->emeraldval));
|
if(cseek->master->emeraldval) setland(c, eLand(cseek->master->emeraldval));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!c->land && from && (DIM == 3 || !among(from->land, laBarrier, laElementalWall, laHauntedWall, laOceanWall)) && !quotient) {
|
if(!c->land && from && (WDIM == 3 || !among(from->land, laBarrier, laElementalWall, laHauntedWall, laOceanWall)) && !quotient) {
|
||||||
if(!hasbardir(c)) setland(c, from->land);
|
if(!hasbardir(c)) setland(c, from->land);
|
||||||
}
|
}
|
||||||
if(c->land == laTemple && !tactic::on && !chaosmode) setland(c, laRlyeh);
|
if(c->land == laTemple && !tactic::on && !chaosmode) setland(c, laRlyeh);
|
||||||
|
@ -2503,7 +2503,7 @@ void setdist(cell *c, int d, cell *from) {
|
||||||
else if(geometry == gCrystal) crystal::set_land(c);
|
else if(geometry == gCrystal) crystal::set_land(c);
|
||||||
#endif
|
#endif
|
||||||
#if MAXMDIM == 4
|
#if MAXMDIM == 4
|
||||||
else if(euclid && DIM == 3) euclid3::set_land(c);
|
else if(euclid && WDIM == 3) euclid3::set_land(c);
|
||||||
#endif
|
#endif
|
||||||
else if(sphere || fulltorus) setLandSphere(c);
|
else if(sphere || fulltorus) setLandSphere(c);
|
||||||
else if(euclid) setLandEuclid(c);
|
else if(euclid) setLandEuclid(c);
|
||||||
|
|
Loading…
Reference in New Issue