1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-19 19:54:47 +00:00

2D3D:: palace gates

This commit is contained in:
Zeno Rogue 2019-05-25 01:36:22 +02:00
parent b8919c884c
commit 67f3bd6a3c
2 changed files with 25 additions and 1 deletions

View File

@ -1075,6 +1075,23 @@ void make_3d_models() {
shift_shape(shSemiFloorShadow, geom3::FLOOR - geom3::human_height / 100);
shift_shape(shSemiFloor[0], geom3::WALL);
bshape(shPalaceGate, PPR::WALL);
for(int i=0; i<4; i++) {
ld x = -0.219482 + (0.135153 + 0.219482) * (i+.5) / 4;
for(int j=0; j<12; j++) {
hyperpoint left = xpush(x) * xspinpush0(j * 30 * degree, 0.02);
hyperpoint right = xpush(x) * xspinpush0((j+1) * 30 * degree, 0.02);
hpcpush(orthogonal_move(left, geom3::FLOOR));
hpcpush(orthogonal_move(right, geom3::FLOOR));
hpcpush(orthogonal_move(left, geom3::WALL));
hpcpush(orthogonal_move(right, geom3::FLOOR));
hpcpush(orthogonal_move(left, geom3::WALL));
hpcpush(orthogonal_move(right, geom3::WALL));
}
}
shPalaceGate.flags |= POLY_TRIANGLES;
finishshape();
}
#undef S

View File

@ -4085,11 +4085,18 @@ void draw_wall(cell *c, const transmatrix& V, color_t wcol, color_t& zcol, int c
draw_shapevec(c, V, qfi.fshape->shadow, SHADOW_WALL, PPR::WALLSHADOW);
return;
}
if(c->wall == waClosedGate) {
int hdir = 0;
for(int i=0; i<c->type; i++) if(c->move(i)->wall == waClosedGate)
hdir = i;
queuepolyat(V * ddspin(c, hdir, M_PI), shPalaceGate, darkena(wcol, 0, 0xFF), wmspatial?PPR::WALL3A:PPR::WALL);
return;
}
color_t wcol0 = wcol;
color_t wcol2 = gradient(0, wcol0, 0, .8, 1);
draw_shapevec(c, V, qfi.fshape->levels[SIDE_WALL], darkena(wcol, 0, 0xFF), PPR::WALL);
forCellIdEx(c2, i, c)
if(!highwall(c2) || conegraph(c2))
if(!highwall(c2) || conegraph(c2) || c2->wall == waClosedGate)
placeSidewall(c, i, SIDE_WALL, V, darkena(wcol2, fd, 255));
dynamicval<color_t> p(poly_outline, OUTLINE_TRANS);