1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

windmap now works on Goldberg, irregular, and Archimedean spheres

This commit is contained in:
Zeno Rogue 2018-08-20 16:28:47 +02:00
parent 7e52b1f340
commit 13e5c3a555
3 changed files with 9 additions and 8 deletions

View File

@ -3093,7 +3093,7 @@ namespace windmap {
// cw.spin = 0;
neighbors.emplace_back();
auto &v = neighbors.back();
if(gp::on || irr::on)
if((gp::on || irr::on) && !sphere)
for(int l=0; l<S7; l++) {
heptspin hs(cw.at->master, cw.spin);
hs = hs + l + wstep;

View File

@ -538,11 +538,11 @@ namespace gp {
int siid, sidir;
if(geosupport_threecolor() == 2) {
auto si = patterns::getpatterninfo(c, patterns::PAT_COLORING, 0);
siid = (si.id>>2) ? 1 : 0;
siid = si.id>>2;
// if(siid == 2) si.dir++;
// if(siid != pattern_threecolor(c)) printf("threecolor mismatch\n");
// if(pattern_threecolor(createMov(c, fixdir(si.dir, c))) != (siid+1)%3) printf("threecolor mismatch direction\n");
sidir = (fixdir(si.dir, c)) & 1;
sidir = fixdir(si.dir, c);
}
else if(geosupport_football() == 2) {
siid = !pseudohept(c);

View File

@ -339,10 +339,11 @@ pair<int, bool> fieldval(cell *c) {
}
int fieldval_uniq(cell *c) {
if(archimedean && sphere)
return c->master->fiftyval;
if(sphere) {
if(ctof(c) || gp::on || irr::on) return c->master->fieldval;
if(archimedean) return c->master->fiftyval;
else if(irr::on) return irr::cellindex[c];
else if(gp::on) return (get_code(gp::get_local_info(c)) << 8) | (c->master->fieldval / S7);
if(ctof(c)) return c->master->fieldval;
else return createMov(c, 0)->master->fieldval + 256 * createMov(c,2)->master->fieldval + (1<<16) * createMov(c,4)->master->fieldval;
}
else if(torus) {
@ -353,7 +354,7 @@ int fieldval_uniq(cell *c) {
return gmod(p.first * torusconfig::dx + p.second * torusconfig::dy, torusconfig::qty);
}
else if(binarytiling || archimedean) return 0;
if(ctof(c) || gp::on || irr::on) return c->master->fieldval/S7;
else if(ctof(c) || gp::on || irr::on) return c->master->fieldval/S7;
else {
int z = 0;
for(int u=0; u<S6; u+=2)
@ -1018,7 +1019,7 @@ namespace patterns {
if(euclid)
// use the torus ID
si.id = fieldpattern::fieldval_uniq(c);
else if(nonbitrunc && !archimedean)
else if(nonbitrunc && !archimedean && !gp::on && !irr::on)
// use the actual field codes
si.id = fieldpattern::fieldval(c).first;
else