mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
save extra model parameters
This commit is contained in:
parent
0f0c342ffa
commit
54e33f9151
@ -496,6 +496,11 @@ EX void initConfig() {
|
|||||||
addsaver(pconf.collignon_parameter, "collignon-parameter", 1);
|
addsaver(pconf.collignon_parameter, "collignon-parameter", 1);
|
||||||
addsaver(pconf.collignon_reflected, "collignon-reflect", false);
|
addsaver(pconf.collignon_reflected, "collignon-reflect", false);
|
||||||
|
|
||||||
|
addsaver(pconf.aitoff_parameter, "aitoff-parameter");
|
||||||
|
addsaver(pconf.miller_parameter, "miller-parameter");
|
||||||
|
addsaver(pconf.loximuthal_parameter, "loximuthal_parameter");
|
||||||
|
addsaver(pconf.winkel_parameter, "winkel_parameter");
|
||||||
|
|
||||||
addsaver(vid.plevel_factor, "plevel_factor", 0.7);
|
addsaver(vid.plevel_factor, "plevel_factor", 0.7);
|
||||||
|
|
||||||
addsaver(vid.creature_scale, "3d-creaturescale", 1);
|
addsaver(vid.creature_scale, "3d-creaturescale", 1);
|
||||||
@ -2699,6 +2704,10 @@ EX unordered_map<string, ld&> params = {
|
|||||||
{"mgrid", vid.multiplier_grid},
|
{"mgrid", vid.multiplier_grid},
|
||||||
{"mring", vid.multiplier_ring},
|
{"mring", vid.multiplier_ring},
|
||||||
{"collignon", pconf.collignon_parameter},
|
{"collignon", pconf.collignon_parameter},
|
||||||
|
{"aitoff", pconf.aitoff_parameter},
|
||||||
|
{"loxidromic", pconf.loximuthal_parameter},
|
||||||
|
{"miller", pconf.miller_parameter},
|
||||||
|
{"winkel", pconf.winkel_parameter},
|
||||||
{"levellines", levellines},
|
{"levellines", levellines},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
41
models.cpp
41
models.cpp
@ -626,6 +626,47 @@ EX namespace models {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(vpmodel == mdMiller) {
|
||||||
|
dialog::addSelItem(XLAT("parameter"), fts(vpconf.miller_parameter), 'b');
|
||||||
|
dialog::add_action([](){
|
||||||
|
dialog::editNumber(vpconf.miller_parameter, -1, 1, .1, 4/5., XLAT("parameter"),
|
||||||
|
"The Miller projection is obtained by multiplying the latitude by 4/5, using Mercator projection, and then multiplying Y by 5/4. "
|
||||||
|
"Here you can change this parameter."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(vpmodel == mdLoximuthal) {
|
||||||
|
dialog::addSelItem(XLAT("parameter"), fts(vpconf.loximuthal_parameter), 'b');
|
||||||
|
dialog::add_action([](){
|
||||||
|
dialog::editNumber(vpconf.loximuthal_parameter, -M_PI/2, M_PI/2, .1, 0, XLAT("parameter"),
|
||||||
|
"This model is similar to azimuthal equidistant, but based on loxodromes (lines of constant geographic direction) rather than geodesics. "
|
||||||
|
"The loximuthal projection maps (the shortest) loxodromes to straight lines of the same length, going through the starting point. "
|
||||||
|
"This setting changes the latitude of the starting point."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(among(vpmodel, mdAitoff, mdHammer, mdWinkelTripel)) {
|
||||||
|
dialog::addSelItem(XLAT("parameter"), fts(vpconf.aitoff_parameter), 'b');
|
||||||
|
dialog::add_action([](){
|
||||||
|
dialog::editNumber(vpconf.aitoff_parameter, -1, 1, .1, 1/2., XLAT("parameter"),
|
||||||
|
"The Aitoff projection is obtained by multiplying the longitude by 1/2, using azimuthal equidistant projection, and then multiplying X by 1/2. "
|
||||||
|
"Hammer projection is similar but equi-area projection is used instead. "
|
||||||
|
"Here you can change this parameter."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(vpmodel == mdWinkelTripel) {
|
||||||
|
dialog::addSelItem(XLAT("mixing proportion"), fts(vpconf.winkel_parameter), 'B');
|
||||||
|
dialog::add_action([](){
|
||||||
|
dialog::editNumber(vpconf.winkel_parameter, -1, 1, .1, 1, XLAT("parameter"),
|
||||||
|
"The Winkel Tripel projection is the average of Aitoff projection and equirectangular projection. Here you can change the proportion."
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(vpmodel == mdSpiral && !euclid) {
|
if(vpmodel == mdSpiral && !euclid) {
|
||||||
dialog::addSelItem(XLAT("spiral angle"), fts(vpconf.spiral_angle) + "°", 'x');
|
dialog::addSelItem(XLAT("spiral angle"), fts(vpconf.spiral_angle) + "°", 'x');
|
||||||
dialog::add_action([](){
|
dialog::add_action([](){
|
||||||
|
Loading…
Reference in New Issue
Block a user