mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
2D3D:: Mirror Land ceiling draws halffloors correctly
This commit is contained in:
parent
f2d60f1647
commit
5436265311
@ -105,6 +105,10 @@ void shift_shape(hpcshape& sh, ld z) {
|
|||||||
for(int i=sh.s; i<sh.e; i++) hpc[i] = zshift(hpc[i], z);
|
for(int i=sh.s; i<sh.e; i++) hpc[i] = zshift(hpc[i], z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void shift_shape_orthogonally(hpcshape& sh, ld z) {
|
||||||
|
for(int i=sh.s; i<sh.e; i++) hpc[i] = orthogonal_move(hpc[i], z);
|
||||||
|
}
|
||||||
|
|
||||||
extern
|
extern
|
||||||
hpcshape
|
hpcshape
|
||||||
shSemiFloorSide[SIDEPARS],
|
shSemiFloorSide[SIDEPARS],
|
||||||
@ -122,7 +126,7 @@ hpcshape
|
|||||||
shMercuryBridge[2],
|
shMercuryBridge[2],
|
||||||
shTriheptaSpecial[14],
|
shTriheptaSpecial[14],
|
||||||
shCross, shGiantStar[2], shLake, shMirror,
|
shCross, shGiantStar[2], shLake, shMirror,
|
||||||
shHalfFloor[3], shHalfMirror[3],
|
shHalfFloor[6], shHalfMirror[3],
|
||||||
shGem[2], shStar, shDisk, shDiskT, shDiskS, shDiskM, shDiskSq, shRing,
|
shGem[2], shStar, shDisk, shDiskT, shDiskS, shDiskM, shDiskSq, shRing,
|
||||||
shTinyBird, shTinyShark,
|
shTinyBird, shTinyShark,
|
||||||
shEgg,
|
shEgg,
|
||||||
@ -1074,8 +1078,11 @@ void make_3d_models() {
|
|||||||
make_ball(shNightStar, 0.75, 2);
|
make_ball(shNightStar, 0.75, 2);
|
||||||
|
|
||||||
if(WDIM == 2) {
|
if(WDIM == 2) {
|
||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++) {
|
||||||
shift_shape(shHalfFloor[i], geom3::lev_to_factor(geom3::human_height * .01));
|
clone_shape(shHalfFloor[i], shHalfFloor[i+3]);
|
||||||
|
shift_shape_orthogonally(shHalfFloor[i], geom3::FLOOR - geom3::human_height * .007);
|
||||||
|
shift_shape_orthogonally(shHalfFloor[i+3], geom3::WALL + geom3::human_height * .007);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shift_shape(shBoatOuter, geom3::FLOOR);
|
shift_shape(shBoatOuter, geom3::FLOOR);
|
||||||
|
@ -5072,6 +5072,8 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
|||||||
if(!wmblack) for(int d=0; d<c->type; d++) {
|
if(!wmblack) for(int d=0; d<c->type; d++) {
|
||||||
inmirrorcount+=d;
|
inmirrorcount+=d;
|
||||||
queuepolyat(V2 * spin(d*M_PI/S3), shHalfFloor[2], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
queuepolyat(V2 * spin(d*M_PI/S3), shHalfFloor[2], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
||||||
|
if(GDIM == 3 && camera_level > geom3::WALL)
|
||||||
|
queuepolyat(V2 * spin(d*M_PI/S3), shHalfFloor[5], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
||||||
inmirrorcount-=d;
|
inmirrorcount-=d;
|
||||||
}
|
}
|
||||||
if(GDIM == 3) {
|
if(GDIM == 3) {
|
||||||
@ -5092,8 +5094,12 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
|||||||
if(!wmblack) {
|
if(!wmblack) {
|
||||||
inmirrorcount++;
|
inmirrorcount++;
|
||||||
queuepolyat(mirrorif(V2, !onleft), shHalfFloor[ct6], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
queuepolyat(mirrorif(V2, !onleft), shHalfFloor[ct6], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
||||||
|
if(GDIM == 3 && camera_level > geom3::WALL)
|
||||||
|
queuepolyat(mirrorif(V2, !onleft), shHalfFloor[ct6+3], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
||||||
inmirrorcount--;
|
inmirrorcount--;
|
||||||
queuepolyat(mirrorif(V2, onleft), shHalfFloor[ct6], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
queuepolyat(mirrorif(V2, onleft), shHalfFloor[ct6], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
||||||
|
if(GDIM == 3 && camera_level > geom3::WALL)
|
||||||
|
queuepolyat(mirrorif(V2, onleft), shHalfFloor[ct6+3], darkena(fcol, fd, 0xFF), PPR::FLOORa);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GDIM == 3)
|
if(GDIM == 3)
|
||||||
|
@ -1672,7 +1672,7 @@ hpcshape
|
|||||||
shMercuryBridge[2],
|
shMercuryBridge[2],
|
||||||
shTriheptaSpecial[14],
|
shTriheptaSpecial[14],
|
||||||
shCross, shGiantStar[2], shLake, shMirror,
|
shCross, shGiantStar[2], shLake, shMirror,
|
||||||
shHalfFloor[3], shHalfMirror[3],
|
shHalfFloor[6], shHalfMirror[3],
|
||||||
shGem[2], shStar, shDisk, shDiskT, shDiskS, shDiskM, shDiskSq, shRing,
|
shGem[2], shStar, shDisk, shDiskT, shDiskS, shDiskM, shDiskSq, shRing,
|
||||||
shTinyBird, shTinyShark,
|
shTinyBird, shTinyShark,
|
||||||
shEgg,
|
shEgg,
|
||||||
|
Loading…
Reference in New Issue
Block a user