1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 01:50:36 +00:00

better changing embedded settings

This commit is contained in:
Zeno Rogue 2023-02-18 12:55:33 +01:00
parent e40bd436af
commit 1eaa6d4dd9

View File

@ -1123,15 +1123,17 @@ EX namespace geom3 {
vid.fixed_facing_dir = 90; vid.fixed_facing_dir = 90;
} }
} }
EX void switch_fpp() { EX void switch_fpp() {
#if MAXMDIM >= 4 #if MAXMDIM >= 4
#if CAP_GL && CAP_RUG #if CAP_GL && CAP_RUG
if(rug::rugged) rug::close(); if(rug::rugged) rug::close();
#endif #endif
if(dual::split(switch_fpp)) return; if(dual::split(switch_fpp)) return;
check_cgi(); cgi.require_basics();
View = iso_inverse(models::rotmatrix()) * View; if(!changing_embedded_settings)
View = inverse(models::rotmatrix()) * View;
if(!vid.always3) { if(!vid.always3) {
vid.always3 = true; vid.always3 = true;
apply_always3(); apply_always3();
@ -1145,14 +1147,18 @@ EX namespace geom3 {
swapdim(-1); swapdim(-1);
vid.always3 = false; vid.always3 = false;
apply_always3(); apply_always3();
vid.wall_height = .3; if(!changing_embedded_settings) {
vid.human_wall_ratio = .7; vid.wall_height = .3;
vid.camera = 1; vid.human_wall_ratio = .7;
vid.depth = 1; vid.camera = 1;
vid.depth = 1;
}
if(among(pmodel, mdPerspective, mdGeodesic)) pmodel = mdDisk; if(among(pmodel, mdPerspective, mdGeodesic)) pmodel = mdDisk;
swapdim(0); swapdim(0);
} }
View = models::rotmatrix() * View;
if(!changing_embedded_settings)
View = models::rotmatrix() * View;
#endif #endif
} }