1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-26 04:33:33 +00:00

2D3D:: fixed grids

This commit is contained in:
Zeno Rogue
2019-05-22 01:13:02 +02:00
parent ba91bea71c
commit 32626dc0c1
4 changed files with 58 additions and 54 deletions

View File

@@ -4393,18 +4393,18 @@ void make_clipping_planes() {
add_clipping_plane(+tx, -ty, +tx, +ty);
}
void gridline(const hyperpoint h1, const hyperpoint h2, color_t col, int prec) {
void gridline(const transmatrix& V1, const hyperpoint h1, const transmatrix& V2, const hyperpoint h2, color_t col, int prec) {
if(WDIM == 2 && GDIM == 3) {
ld eps = geom3::human_height/100;
queueline(orthogonal_move(h1,geom3::FLOOR+eps), orthogonal_move(h2,geom3::FLOOR+eps), col, prec);
queueline(orthogonal_move(h1,geom3::WALL-eps), orthogonal_move(h2,geom3::WALL-eps), col, prec);
queueline(V1*orthogonal_move(h1,geom3::FLOOR+eps), V2*orthogonal_move(h2,geom3::FLOOR+eps), col, prec);
queueline(V1*orthogonal_move(h1,geom3::WALL-eps), V2*orthogonal_move(h2,geom3::WALL-eps), col, prec);
}
else
queueline(h1, h2, col, prec);
queueline(V1*h1, V2*h2, col, prec);
}
void gridline(const transmatrix& V, const hyperpoint h1, const hyperpoint h2, color_t col, int prec) {
gridline(V*h1, V*h2, col, prec);
gridline(V, h1, V, h2, col, prec);
}
void draw_grid_at(cell *c, const transmatrix& V) {