diff --git a/config.cpp b/config.cpp index 04ed948c..8f2f1fcb 100644 --- a/config.cpp +++ b/config.cpp @@ -1185,6 +1185,15 @@ void show3D() { using namespace geom3; dialog::init(XLAT("3D configuration")); + if(WDIM == 2) { + dialog::addBoolItem(XLAT("use the full 3D models"), geom3::always3, 'U'); + dialog::add_action([] { + geom3::always3 = !geom3::always3; + need_reset_geometry = true; + callhooks(hooks_swapdim); + }); + } + if(vid.use_smart_range == 0 && DIM == 2) { dialog::addSelItem(XLAT("High detail range"), fts(highdetail), 'n'); dialog::addSelItem(XLAT("Mid detail range"), fts(middetail), 'm'); @@ -1218,7 +1227,7 @@ void show3D() { dialog::editNumber(mouseaim_sensitivity, -1, 1, 0.002, 0.01, XLAT("mouse aiming sensitivity"), "set to 0 to disable"); }); } - if(DIM == 2) dialog::addSelItem(XLAT("camera rotation"), fts3(vid.camera_angle), 's'); + dialog::addSelItem(XLAT("camera rotation"), fts3(vid.camera_angle), 's'); if(DIM == 2) { dialog::addSelItem(XLAT("fixed facing"), vid.fixed_facing ? fts(vid.fixed_facing_dir) : XLAT("OFF"), 'f'); dialog::add_action([] () { vid.fixed_facing = !vid.fixed_facing; @@ -1228,7 +1237,7 @@ void show3D() { } }); } - if(DIM == 2) { + if(true) { dialog::addBreak(50); dialog::addSelItem(XLAT("projection"), current_proj_name(), 'M'); } diff --git a/floorshapes.cpp b/floorshapes.cpp index b5115334..d9f868e3 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -890,7 +890,6 @@ void make_floor_textures() { dynamicval a3(geom3::always3, false); dynamicval hq(inHighQual, true); dynamicval hd(darken, 0); - dynamicval ga(vid.alpha, 1); dynamicval gd(geom3::depth, 1); dynamicval gc(geom3::camera, 1); @@ -899,6 +898,8 @@ void make_floor_textures() { vid.xres = FLOORTEXTURESIZE; vid.yres = FLOORTEXTURESIZE; vid.scale = 0.25; + vid.camera_angle = 0; + vid.alpha = 1; dynamicval lw(vid.linewidth, 2); floor_textures = new renderbuffer(vid.xres, vid.yres, vid.usingGL); diff --git a/geometry.cpp b/geometry.cpp index 30676926..d344be4a 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -250,7 +250,7 @@ namespace geom3 { ld lev_to_factor(ld lev) { if(WDIM == 3) return lev; - if(GDIM == 3) return lev - depth; + if(GDIM == 3) return depth - lev; return projection_to_factor(lev_to_projection(lev)); } ld factor_to_lev(ld fac) { @@ -335,7 +335,7 @@ namespace geom3 { BIRD = 1.20; } else { - INFDEEP = GDIM == 3 ? -10 : (euclid || sphere) ? 0.01 : lev_to_projection(0) * tanh(camera); + INFDEEP = GDIM == 3 ? +10 : (euclid || sphere) ? 0.01 : lev_to_projection(0) * tanh(camera); ld wh = actual_wall_height(); WALL = lev_to_factor(wh); FLOOR = lev_to_factor(0); diff --git a/graph.cpp b/graph.cpp index fe2add8f..e400eeac 100644 --- a/graph.cpp +++ b/graph.cpp @@ -3723,7 +3723,7 @@ void pushdown(cell *c, int& q, const transmatrix &V, double down, bool rezoom, b auto pp = dynamic_cast (&*ptds[q++]); if(!pp) continue; auto& ptd = *pp; - ptd.V = ptd.V * zpush(-down); + ptd.V = ptd.V * zpush(+down); } return; } @@ -6100,6 +6100,7 @@ void make_actual_view() { if(WDIM == 3) { actual_view_transform = Id; return; } if(sphereflipped()) sphereflip[DIM][DIM] = -1; actual_view_transform = ypush(vid.yshift) * sphereflip; + if(geom3::always3) actual_view_transform = zpush(+geom3::camera) * actual_view_transform; } transmatrix cview() {