1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-03 13:51:22 +00:00

more lands implemented for cylinders

This commit is contained in:
Zeno Rogue
2018-12-04 19:13:26 +01:00
parent aa1b102b78
commit 05df60ae70
3 changed files with 26 additions and 4 deletions

View File

@@ -357,6 +357,10 @@ namespace torusconfig {
return 2 * (e1.first * e2.first + e1.second*e2.second) + (S3 == 3 ? e1.first*e2.second + e2.first * e1.second : 0);
}
int dcross(gp::loc e1, gp::loc e2) {
return e1.first * e2.second - e1.second*e2.first;
}
gp::loc sdxy() { return gp::loc(sdx, sdy); }
int mobius_dir_basic() {
@@ -1356,6 +1360,7 @@ int celldist(cell *c) {
int celldistAlt(cell *c) {
if(masterless) {
if(fulltorus) return celldist(c);
if(euwrap) return cylinder_alt(c);
int x, y;
tie(x,y) = vec_to_pair(decodeId(c->master));
return euclidAlt(x, y);