1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

hybrid:: draw_underlying_space no longer covers the screen in e2xe, and also fixed the orientation in product

This commit is contained in:
Zeno Rogue 2021-05-01 11:13:51 +02:00
parent 19e7b8aa29
commit 3146fdd02f
3 changed files with 9 additions and 2 deletions

View File

@ -4969,6 +4969,7 @@ EX void calcparam() {
realradius = min(realradius, cd->radius); realradius = min(realradius, cd->radius);
ld aradius = sphere ? cd->radius / (pconf.alpha - 1) : 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; } if(dronemode) { cd->ycenter -= cd->radius; cd->ycenter += vid.fsize/2; cd->ycenter += vid.fsize/2; cd->radius *= 2; }

View File

@ -2783,6 +2783,7 @@ EX bool do_draw(cell *c, const shiftmatrix& T) {
return true; return true;
} }
if(rots::drawing_underlying && euclid && hdist0(tC0(T)) > 6) return false;
if(just_gmatrix && sphere) return true; if(just_gmatrix && sphere) return true;
if(!do_draw(c)) return false; if(!do_draw(c)) return false;
if(euclid && pmodel == mdSpiral) { if(euclid && pmodel == mdSpiral) {

View File

@ -2195,6 +2195,8 @@ EX namespace rots {
return M; return M;
} }
EX bool drawing_underlying = false;
EX void draw_underlying(bool cornermode) { EX void draw_underlying(bool cornermode) {
if(underlying_scale <= 0) return; if(underlying_scale <= 0) return;
ld d = hybrid::get_where(centerover).second; ld d = hybrid::get_where(centerover).second;
@ -2203,6 +2205,8 @@ EX namespace rots {
if(det(T) < 0) T = centralsym * T; if(det(T) < 0) T = centralsym * T;
if(prod) d = 0;
hyperpoint h = inverse(View * spin(master_to_c7_angle()) * T) * C0; hyperpoint h = inverse(View * spin(master_to_c7_angle()) * T) * C0;
auto g = std::move(gmatrix); auto g = std::move(gmatrix);
@ -2226,19 +2230,20 @@ EX namespace rots {
dynamicval<bool> pf(playerfound, true); dynamicval<bool> pf(playerfound, true);
dynamicval<cell*> m5(centerover, co); dynamicval<cell*> m5(centerover, co);
dynamicval<transmatrix> m2(View, inprod ? pView : ypush(0) * qtm(h)); dynamicval<transmatrix> 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; View = inverse(stretch::mstretch_matrix) * spin(2*d) * View;
dynamicval<shiftmatrix> m3(playerV, shiftless(Id)); dynamicval<shiftmatrix> m3(playerV, shiftless(Id));
dynamicval<transmatrix> m4(actual_view_transform, Id); dynamicval<transmatrix> m4(actual_view_transform, Id);
dynamicval<shiftmatrix> m6(cwtV, shiftless(Id)); dynamicval<shiftmatrix> m6(cwtV, shiftless(Id));
dynamicval<eModel> pm(pmodel, mdDisk); dynamicval<eModel> pm(pmodel, mdDisk);
dynamicval<ld> pss(pconf.scale, (sphere ? 10 : 1) * underlying_scale); dynamicval<ld> pss(pconf.scale, (sphere ? 10 : euclid ? .4 : 1) * underlying_scale);
dynamicval<ld> psa(pconf.alpha, sphere ? 10 : 1); dynamicval<ld> psa(pconf.alpha, sphere ? 10 : 1);
dynamicval<hrmap*> p(hybrid::pmap, NULL); dynamicval<hrmap*> p(hybrid::pmap, NULL);
dynamicval<int> psr(sightrange_bonus, 0); dynamicval<int> psr(sightrange_bonus, 0);
dynamicval<int> psx(vid.use_smart_range, 2); dynamicval<int> psx(vid.use_smart_range, 2);
dynamicval<ld> psy(vid.smart_range_detail, 1); dynamicval<ld> psy(vid.smart_range_detail, 1);
dynamicval<bool> pdu(drawing_underlying, true);
calcparam(); calcparam();
reset_projection(); current_display->set_all(0, 0); reset_projection(); current_display->set_all(0, 0);