feat: wire vertical exaggeration through the shell #13
+4
-22
@@ -165,6 +165,10 @@ pub fn supported_presets() -> &'static [&'static str] {
|
|||||||
&["plane", "hill"]
|
&["plane", "hill"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn supported_quality_presets() -> &'static [&'static str] {
|
||||||
|
&["preview", "balanced", "final"]
|
||||||
|
}
|
||||||
|
|
||||||
pub fn supported_importers() -> &'static [&'static str] {
|
pub fn supported_importers() -> &'static [&'static str] {
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "hgt",
|
feature = "hgt",
|
||||||
@@ -233,28 +237,6 @@ pub fn supported_importers() -> &'static [&'static str] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn info_text() -> String {
|
pub fn info_text() -> String {
|
||||||
use std::fmt::Write as _;
|
|
||||||
|
|
||||||
let mut text = String::new();
|
|
||||||
writeln!(&mut text, "openvistapro {}", env!("CARGO_PKG_VERSION")).unwrap();
|
|
||||||
writeln!(&mut text, "presets: {}", supported_presets().join(", ")).unwrap();
|
|
||||||
writeln!(
|
|
||||||
&mut text,
|
|
||||||
"quality: {}",
|
|
||||||
supported_quality_presets().join(", ")
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
let importers = supported_importers();
|
|
||||||
if importers.is_empty() {
|
|
||||||
writeln!(&mut text, "importers: (none)").unwrap();
|
|
||||||
} else {
|
|
||||||
writeln!(&mut text, "importers: {}", importers.join(", ")).unwrap();
|
|
||||||
}
|
|
||||||
writeln!(&mut text, "scene files: .ovp.toml").unwrap();
|
|
||||||
text
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn execute(cli: Cli) -> Result<(), CliError> {
|
|
||||||
match cli.command {
|
match cli.command {
|
||||||
Command::Info => {
|
Command::Info => {
|
||||||
print!("{}", info_text());
|
print!("{}", info_text());
|
||||||
|
|||||||
+1
-2
@@ -243,8 +243,6 @@ mod tests {
|
|||||||
let s = Scene::default();
|
let s = Scene::default();
|
||||||
assert!(s.water_level < s.tree_line);
|
assert!(s.water_level < s.tree_line);
|
||||||
assert!(s.tree_line < s.snow_line);
|
assert!(s.tree_line < s.snow_line);
|
||||||
assert!(s.palette.water_level < s.palette.tree_line);
|
|
||||||
assert!(s.palette.tree_line < s.palette.snow_line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -281,3 +279,4 @@ mod tests {
|
|||||||
assert!(center > far);
|
assert!(center > far);
|
||||||
assert!(h.river_coverage(h.river_center_x, 0.5) > h.river_coverage(0.0, 0.5));
|
assert!(h.river_coverage(h.river_center_x, 0.5) > h.river_coverage(0.0, 0.5));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user