1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-07-01 00:08:50 +00:00

standard binary tiling, also improved the looks of variant binary tiling, and optimized shvid for pure

This commit is contained in:
Zeno Rogue
2019-07-22 11:21:27 +02:00
parent 2598bbcdd5
commit 2d30f3830c
10 changed files with 94 additions and 46 deletions
+12 -1
View File
@@ -391,7 +391,7 @@ double cellgfxdist(cell *c, int i) {
if(c->type == 8 && (i&1)) return cgi.crossf * sqrt(2);
return cgi.crossf;
}
if(NONSTDVAR || archimedean || WDIM == 3) return hdist0(tC0(calc_relative_matrix(c->move(i), c, i)));
if(NONSTDVAR || archimedean || WDIM == 3 || binarytiling) return hdist0(tC0(calc_relative_matrix(c->move(i), c, i)));
return !BITRUNCATED ? cgi.tessf : (c->type == 6 && (i&1)) ? cgi.hexhexdist : cgi.crossf;
}
@@ -510,6 +510,17 @@ hyperpoint nearcorner(cell *c, int i) {
}
#endif
#if CAP_BT
if(geometry == gBinary4) {
ld yx = log(2) / 2;
ld yy = yx;
hyperpoint neis[5];
neis[0] = binary::get_horopoint(2*yy, -0.5);
neis[1] = binary::get_horopoint(2*yy, +0.5);
neis[2] = binary::get_horopoint(0, 1);
neis[3] = binary::get_horopoint(-2*yy, c->master->zebraval ? -0.25 : +0.25);
neis[4] = binary::get_horopoint(0, -1);
return neis[i];
}
if(binarytiling) {
if(WDIM == 3) {
println(hlog, "nearcorner called");