1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-11 23:59:44 +00:00

3d:: native perspective is now pmodel == mdPerspective, and other models work too

This commit is contained in:
Zeno Rogue
2019-03-20 02:10:53 +01:00
parent 1d1baf2207
commit 46ae64e945
9 changed files with 77 additions and 39 deletions

View File

@@ -4808,8 +4808,8 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
for(int a=0; a<c->type; a++)
if(c->move(a) && !isWall3(c->move(a), dummy)) {
if(a < 4 && among(geometry, gHoroTris, gBinary3) && celldistAlt(c) >= celldistAlt(viewctr.at->c7)) continue;
if(a < 2 && among(geometry, gHoroRec) && celldistAlt(c) >= celldistAlt(viewctr.at->c7)) continue;
if(a < 4 && pmodel == mdPerspective && among(geometry, gHoroTris, gBinary3) && celldistAlt(c) >= celldistAlt(viewctr.at->c7)) continue;
if(a < 2 && pmodel == mdPerspective && among(geometry, gHoroRec) && celldistAlt(c) >= celldistAlt(viewctr.at->c7)) continue;
if(qfi.fshape && wmescher) {
auto& poly = queuepoly(V, shWall3D[a], darkena(wcol - d * get_darkval(a), 0, 0xFF));
poly.tinf = &qfi.fshape->tinf3;
@@ -5923,6 +5923,7 @@ void drawthemap() {
mmspatial = vid.monmode == 4 || vid.monmode == 5;
spatial_graphics = wmspatial || mmspatial;
spatial_graphics = spatial_graphics && DIM == 2;
#if CAP_RUG
if(rug::rugged && !rug::spatial_rug) spatial_graphics = false;
#endif
@@ -6146,7 +6147,7 @@ void calcparam() {
}
cd->radius = vid.scale * cd->scrsize;
if(DIM == 3) cd->radius = cd->scrsize;
if(DIM == 3 && pmodel == mdPerspective) cd->radius = cd->scrsize;
realradius = min(realradius, cd->radius);
if(dronemode) { cd->ycenter -= cd->radius; cd->ycenter += vid.fsize/2; cd->ycenter += vid.fsize/2; cd->radius *= 2; }