1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-13 13:47:37 +00:00

raycasting in 2D

This commit is contained in:
Zeno Rogue
2020-06-03 15:11:20 +02:00
parent fad1c650c7
commit 2a0b0101fd
8 changed files with 94 additions and 39 deletions

View File

@@ -914,6 +914,7 @@ EX int shvid(cell *c) {
}
EX struct dqi_poly *draw_shapevec(cell *c, const transmatrix& V, const vector<hpcshape> &shv, color_t col, PPR prio IS(PPR::DEFAULT)) {
if(no_wall_rendering) return NULL;
if(!c) return &queuepolyat(V, shv[0], col, prio);
else if(WDIM == 3) return NULL;
#if CAP_GP
@@ -950,10 +951,12 @@ EX struct dqi_poly *draw_shapevec(cell *c, const transmatrix& V, const vector<hp
}
EX void draw_floorshape(cell *c, const transmatrix& V, const floorshape &fsh, color_t col, PPR prio IS(PPR::DEFAULT)) {
if(no_wall_rendering) return;
draw_shapevec(c, V, fsh.b, col, prio);
}
EX void draw_qfi(cell *c, const transmatrix& V, color_t col, PPR prio IS(PPR::DEFAULT), vector<hpcshape> floorshape::* tab IS(&floorshape::b)) {
if(no_wall_rendering) return;
if(qfi.shape)
queuepolyat(V * qfi.spin, *qfi.shape, col, prio);
else if(qfi.usershape >= 0) {