From 3146fdd02ff8fc80da021527d8f203157b7253b8 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 1 May 2021 11:13:51 +0200 Subject: [PATCH] hybrid:: draw_underlying_space no longer covers the screen in e2xe, and also fixed the orientation in product --- graph.cpp | 1 + hypgraph.cpp | 1 + nonisotropic.cpp | 9 +++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/graph.cpp b/graph.cpp index d8156004..a1185930 100644 --- a/graph.cpp +++ b/graph.cpp @@ -4969,6 +4969,7 @@ EX void calcparam() { realradius = min(realradius, cd->radius); ld aradius = sphere ? cd->radius / (pconf.alpha - 1) : cd->radius; + if(euclid && rots::drawing_underlying) aradius *= 2.5; if(dronemode) { cd->ycenter -= cd->radius; cd->ycenter += vid.fsize/2; cd->ycenter += vid.fsize/2; cd->radius *= 2; } diff --git a/hypgraph.cpp b/hypgraph.cpp index cc90f1a1..84890d3c 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -2783,6 +2783,7 @@ EX bool do_draw(cell *c, const shiftmatrix& T) { return true; } + if(rots::drawing_underlying && euclid && hdist0(tC0(T)) > 6) return false; if(just_gmatrix && sphere) return true; if(!do_draw(c)) return false; if(euclid && pmodel == mdSpiral) { diff --git a/nonisotropic.cpp b/nonisotropic.cpp index 0d770da9..c21bc127 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -2194,6 +2194,8 @@ EX namespace rots { return M; } + + EX bool drawing_underlying = false; EX void draw_underlying(bool cornermode) { if(underlying_scale <= 0) return; @@ -2202,6 +2204,8 @@ EX namespace rots { transmatrix T = rots::uzpush(-d) * spin(-2*d); if(det(T) < 0) T = centralsym * T; + + if(prod) d = 0; hyperpoint h = inverse(View * spin(master_to_c7_angle()) * T) * C0; @@ -2226,19 +2230,20 @@ EX namespace rots { dynamicval pf(playerfound, true); dynamicval m5(centerover, co); dynamicval m2(View, inprod ? pView : ypush(0) * qtm(h)); - if(PURE) View = View * pispin; + if(PURE && !inprod) View = View * pispin; View = inverse(stretch::mstretch_matrix) * spin(2*d) * View; dynamicval m3(playerV, shiftless(Id)); dynamicval m4(actual_view_transform, Id); dynamicval m6(cwtV, shiftless(Id)); dynamicval pm(pmodel, mdDisk); - dynamicval pss(pconf.scale, (sphere ? 10 : 1) * underlying_scale); + dynamicval pss(pconf.scale, (sphere ? 10 : euclid ? .4 : 1) * underlying_scale); dynamicval psa(pconf.alpha, sphere ? 10 : 1); dynamicval p(hybrid::pmap, NULL); dynamicval psr(sightrange_bonus, 0); dynamicval psx(vid.use_smart_range, 2); dynamicval psy(vid.smart_range_detail, 1); + dynamicval pdu(drawing_underlying, true); calcparam(); reset_projection(); current_display->set_all(0, 0);