mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +00:00
Fractal landscapes fixed in Goldberg heptagonal geometries
This commit is contained in:
parent
fc6c3a6ec8
commit
e494eb0020
14
cell.cpp
14
cell.cpp
@ -1318,11 +1318,12 @@ cdata *getEuclidCdata(heptagon *h) {
|
|||||||
int getCdata(cell *c, int j) {
|
int getCdata(cell *c, int j) {
|
||||||
if(euclid) return getEuclidCdata(c->master)->val[j];
|
if(euclid) return getEuclidCdata(c->master)->val[j];
|
||||||
else if(geometry) return 0;
|
else if(geometry) return 0;
|
||||||
else if(c->type != 6) return getHeptagonCdata(c->master)->val[j]*3;
|
else if(ctof(c)) return getHeptagonCdata(c->master)->val[j]*3;
|
||||||
else {
|
else {
|
||||||
int jj = 0;
|
int jj = 0;
|
||||||
for(int k=0; k<6; k++) if(c->mov[k] && c->mov[k]->type == 7)
|
auto ar = gp::get_masters(c);
|
||||||
jj += getHeptagonCdata(c->mov[k]->master)->val[j];
|
for(int k=0; k<3; k++)
|
||||||
|
jj += getHeptagonCdata(ar[k]->master)->val[j];
|
||||||
return jj;
|
return jj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1332,9 +1333,10 @@ int getBits(cell *c) {
|
|||||||
else if(geometry) return 0;
|
else if(geometry) return 0;
|
||||||
else if(c->type != 6) return getHeptagonCdata(c->master)->bits;
|
else if(c->type != 6) return getHeptagonCdata(c->master)->bits;
|
||||||
else {
|
else {
|
||||||
int b0 = getHeptagonCdata(createMov(c, 0)->master)->bits;
|
auto ar = gp::get_masters(c);
|
||||||
int b1 = getHeptagonCdata(createMov(c, 2)->master)->bits;
|
int b0 = getHeptagonCdata(ar[0]->master)->bits;
|
||||||
int b2 = getHeptagonCdata(createMov(c, 4)->master)->bits;
|
int b1 = getHeptagonCdata(ar[1]->master)->bits;
|
||||||
|
int b2 = getHeptagonCdata(ar[2]->master)->bits;
|
||||||
return (b0 & b1) | (b1 & b2) | (b2 & b0);
|
return (b0 & b1) | (b1 & b2) | (b2 & b0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
hyper.h
2
hyper.h
@ -3026,6 +3026,8 @@ namespace gp {
|
|||||||
int dist_1(), dist_2(), dist_3();
|
int dist_1(), dist_2(), dist_3();
|
||||||
|
|
||||||
int solve_triangle(int dmain, int d0, int d1, loc at);
|
int solve_triangle(int dmain, int d0, int d1, loc at);
|
||||||
|
|
||||||
|
array<cell*, 3> get_masters(cell *c);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_sightrange();
|
int get_sightrange();
|
||||||
|
Loading…
Reference in New Issue
Block a user