mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-30 15:39:54 +00:00
separate shadows for Escher floorshapes
This commit is contained in:
parent
00f9409e06
commit
7382791dff
@ -399,6 +399,7 @@ void generate_floorshapes_for(int id, cell *c, int siid, int sidir) {
|
||||
auto& fsh = *pfsh;
|
||||
|
||||
sizeto(fsh.b, id);
|
||||
sizeto(fsh.shadow, id);
|
||||
|
||||
if(!gp::on && !irr::on && !binarytiling && !syntetic) {
|
||||
generate_matrices_scale(fsh.scale, fsh.noftype);
|
||||
@ -410,6 +411,15 @@ void generate_floorshapes_for(int id, cell *c, int siid, int sidir) {
|
||||
if(id == 0) bshape2(fsh.b[0], fsh.prio, fsh.shapeid0, hex_matrices);
|
||||
if(id == 1) bshape2(fsh.b[1], fsh.prio, fsh.shapeid1, hept_matrices);
|
||||
}
|
||||
generate_matrices_scale(fsh.scale * SHADMUL, fsh.noftype);
|
||||
if(nonbitrunc && geosupport_graveyard() < 2 && fsh.shapeid2) {
|
||||
if(id == 0) bshape2(fsh.shadow[0], fsh.prio, fsh.shapeid2, hept_matrices);
|
||||
if(id == 1) bshape2(fsh.shadow[1], fsh.prio, fsh.shapeid2, hept_matrices);
|
||||
}
|
||||
else {
|
||||
if(id == 0) bshape2(fsh.shadow[0], fsh.prio, fsh.shapeid0, hex_matrices);
|
||||
if(id == 1) bshape2(fsh.shadow[1], fsh.prio, fsh.shapeid1, hept_matrices);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
@ -421,16 +431,16 @@ void generate_floorshapes_for(int id, cell *c, int siid, int sidir) {
|
||||
|
||||
m.n.sym = cor;
|
||||
|
||||
int i = 0;
|
||||
|
||||
int v = sidir+siid;
|
||||
|
||||
for(int ii=0; ii<2; ii++) {
|
||||
int i = 0;
|
||||
for(int d=0; d<m.o.sym; d++) {
|
||||
hyperpoint center = hpxy(0,0);
|
||||
|
||||
for(int cid=0; cid<cor; cid++) {
|
||||
hyperpoint nlcorner = get_corner_position(c, (d+cid+v+1) % cor, 3 / fsh.scale);
|
||||
hyperpoint nrcorner = get_corner_position(c, (d+cid+v+2) % cor, 3 / fsh.scale);
|
||||
hyperpoint nlcorner = get_corner_position(c, (d+cid+v+1) % cor, 3 / fsh.scale * (ii ? 1/SHADMUL : 1));
|
||||
hyperpoint nrcorner = get_corner_position(c, (d+cid+v+2) % cor, 3 / fsh.scale * (ii ? 1/SHADMUL : 1));
|
||||
|
||||
hyperpoint nfar = nearcorner(c, (d+cid+v+1) % cor);
|
||||
|
||||
@ -446,7 +456,8 @@ void generate_floorshapes_for(int id, cell *c, int siid, int sidir) {
|
||||
}
|
||||
|
||||
if(i != isize(m.v)) printf("warning: i=%d sm=%d\n", i, isize(m.v));
|
||||
bshape2(fsh.b[id], fsh.prio, (fsh.shapeid2 && geosupport_graveyard() < 2) ? fsh.shapeid2 : siid?fsh.shapeid0:fsh.shapeid1, m);
|
||||
bshape2((ii?fsh.shadow:fsh.b)[id], fsh.prio, (fsh.shapeid2 && geosupport_graveyard() < 2) ? fsh.shapeid2 : siid?fsh.shapeid0:fsh.shapeid1, m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user