1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-04-24 17:51:22 +00:00

WRL selectable in menus, fixed some issues

This commit is contained in:
Zeno Rogue
2020-04-16 14:36:45 +02:00
parent 0ef619739e
commit a380134d29
4 changed files with 209 additions and 94 deletions

View File

@@ -227,6 +227,15 @@ EX namespace models {
among(pmodel, mdHalfplane, mdPolynomial, mdPolygonal, mdTwoPoint, mdJoukowsky, mdJoukowskyInverted, mdSpiral, mdSimulatedPerspective, mdTwoHybrid, mdHorocyclic) || mdBandAny();
}
EX bool model_is_perspective(eModel m IS(pmodel)) {
return among(m, mdPerspective, mdGeodesic);
}
EX bool model_is_3d() {
if(GDIM == 3) return true;
return pmodel == mdBall || pmodel == mdHyperboloid || pmodel == mdHemisphere || (pmodel == mdSpiral && spiral_cone != 360);
}
EX bool model_has_transition() {
return among(pmodel, mdJoukowsky, mdJoukowskyInverted, mdBand) && GDIM == 2;
}
@@ -534,7 +543,7 @@ EX namespace models {
});
}
if(pmodel == mdBall || pmodel == mdHyperboloid || pmodel == mdHemisphere || (pmodel == mdSpiral && spiral_cone != 360)) {
if(model_is_3d()) {
dialog::addSelItem(XLAT("camera rotation in 3D models"), fts(vid.ballangle) + "°", 'b');
dialog::add_action(config_camera_rotation);
}