mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-03 01:07:03 +00:00
Crystal World and Warped Coast work correctly
This commit is contained in:
parent
683471b7c0
commit
1f356b1dff
@ -412,37 +412,6 @@ hyperpoint get_corner_position(cell *c, int cid, ld cf) {
|
||||
return C0;
|
||||
}
|
||||
|
||||
hyperpoint hypercorner(cell *c, gp::local_info& li, int i) {
|
||||
cellwalker cw(c, i);
|
||||
cw += wstep;
|
||||
transmatrix cwm = calc_relative_matrix(cw.at, c, i);
|
||||
if(elliptic && cwm[2][2] < 0) cwm = centralsym * cwm;
|
||||
return cwm * gp::get_corner_position(cw.at, (cw+2).spin);
|
||||
}
|
||||
|
||||
hyperpoint midcorner(cell *c, int i, ld v) {
|
||||
if(gp::on) {
|
||||
auto li = gp::get_local_info(c);
|
||||
auto hcor = hypercorner(c, li, i);
|
||||
auto tcor = get_corner_position(li, i, 3);
|
||||
return mid_at(tcor, hcor, v);
|
||||
}
|
||||
if(irr::on) {
|
||||
auto& vs = irr::cells[irr::cellindex[c]];
|
||||
int neid = vs.neid[i];
|
||||
int spin = vs.spin[i];
|
||||
auto &vs2 = irr::cells[neid];
|
||||
int cor2 = isize(vs2.vertices);
|
||||
hyperpoint nfar = vs.vertices[i];
|
||||
transmatrix rel = vs.rpusher * vs.relmatrices[vs2.owner] * vs2.pusher;
|
||||
hyperpoint nlfar = rel * vs2.vertices[(spin+2)%cor2];
|
||||
return mid_at(nfar, nlfar, .49);
|
||||
}
|
||||
if(archimedean) return C0;
|
||||
printf("midcorner not handled\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
hyperpoint nearcorner(cell *c, int i) {
|
||||
if(gp::on) {
|
||||
cellwalker cw(c, i);
|
||||
@ -490,6 +459,7 @@ hyperpoint farcorner(cell *c, int i, int which) {
|
||||
int hint = cw.spin;
|
||||
cw += wstep;
|
||||
transmatrix cwm = calc_relative_matrix(cw.at, c, hint);
|
||||
if(elliptic && cwm[2][2] < 0) cwm = centralsym * cwm;
|
||||
// hyperpoint nfar = cwm*C0;
|
||||
auto li1 = gp::get_local_info(cw.at);
|
||||
if(which == 0)
|
||||
@ -522,9 +492,16 @@ hyperpoint farcorner(cell *c, int i, int which) {
|
||||
return cellrelmatrix(c, i) * get_corner_position(c->move(i), (cellwalker(c, i) + wstep + (which?-1:2)).spin);
|
||||
}
|
||||
|
||||
hyperpoint midcorner(cell *c, int i, ld v) {
|
||||
auto hcor = farcorner(c, i, 0);
|
||||
auto tcor = get_corner_position(c, i, 3);
|
||||
return mid_at(tcor, hcor, v);
|
||||
}
|
||||
|
||||
hyperpoint get_warp_corner(cell *c, int cid) {
|
||||
// midcorner(c, cid, .5) but sometimes easier versions exist
|
||||
if(gp::on) return gp::get_corner_position(c, cid, 2);
|
||||
if(irr::on) return midcorner(c, cid, .5);
|
||||
if(irr::on || archimedean) return midcorner(c, cid, .5);
|
||||
return ddspin(c,cid,M_PI/S7) * xpush0(tessf/2);
|
||||
}
|
||||
|
||||
|
@ -3093,6 +3093,8 @@ bool noAdjacentChasms(cell *c) {
|
||||
// does the current geometry allow nice duals
|
||||
bool has_nice_dual() {
|
||||
if(irr::on) return irr::bitruncations_performed > 0;
|
||||
if(archimedean) return geosupport_football() >= 2;
|
||||
if(binarytiling) return false;
|
||||
if(!nonbitrunc) return true;
|
||||
if((S7 & 1) == 0) return true;
|
||||
if(!gp::on) return false;
|
||||
@ -3126,7 +3128,7 @@ void set_maywarp_floor(cell *c) {
|
||||
auto si = patterns::getpatterninfo(c, 0, 0);
|
||||
if(si.id == 0 || si.id == 1)
|
||||
set_floor(shTriheptaFloor);
|
||||
else if(si.id >= 14)
|
||||
else if(si.id >= 14 || !stdhyperbolic)
|
||||
set_floor(shFloor);
|
||||
else
|
||||
set_floor(applyPatterndir(c, si), shTriheptaSpecial[si.id]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user