mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-29 16:23:08 +00:00
product:: big stuff
This commit is contained in:
1 parent
fb0f5872c8
commit
f40072511b
6 files changed
+44
-6
No files matched your search
@@ -448,6 +448,7 @@ EX int compdist(int dx[]) {
|
||||
|
||||
EX int celldist(cell *c) {
|
||||
if(experimental) return 0;
|
||||
if(prod) { auto w = product::get_where(c); return PIU(celldist(w.first)) + abs(w.second); }
|
||||
if(fulltorus && WDIM == 2)
|
||||
return torusmap()->dists[decodeId(c->master)];
|
||||
if(nil) return DISTANCE_UNKNOWN;
|
||||
@@ -478,6 +479,7 @@ static const int ALTDIST_ERROR = 90000;
|
||||
|
||||
EX int celldistAlt(cell *c) {
|
||||
if(experimental) return 0;
|
||||
if(prod) { auto w = product::get_where(c); return PIU(celldistAlt(w.first)) + abs(w.second); }
|
||||
if(masterless) {
|
||||
if(fulltorus) return celldist(c);
|
||||
if(euwrap) return cylinder_alt(c);
|
||||
@@ -981,6 +983,8 @@ EX cell *random_in_distance(cell *c, int d) {
|
||||
}
|
||||
|
||||
EX int celldistance(cell *c1, cell *c2) {
|
||||
|
||||
if(prod) { auto w1 = product::get_where(c1), w2 = product::get_where(c2); return PIU(celldistance(w1.first, w2.first) + abs(w1.second - w2.second)); }
|
||||
|
||||
if((masterless) && (euclid6 || (euclid4 && PURE))) {
|
||||
if(!euwrap)
|
||||
|
||||
Reference in new issue
Block a user