summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/benoit/benoit/application/handle_keys.rs6
-rw-r--r--source/benoit/benoit/configuration/load.rs10
2 files changed, 8 insertions, 8 deletions
diff --git a/source/benoit/benoit/application/handle_keys.rs b/source/benoit/benoit/application/handle_keys.rs
index 25f3ea9..547971f 100644
--- a/source/benoit/benoit/application/handle_keys.rs
+++ b/source/benoit/benoit/application/handle_keys.rs
@@ -36,12 +36,12 @@ impl Application {
}
self.zoom = match scan_code {
- Scancode::E => self.zoom * 2.0,
- Scancode::Q => self.zoom / 2.0,
+ Scancode::E => self.zoom * 4.0,
+ Scancode::Q => self.zoom / 4.0,
_ => self.zoom,
};
- let translate_ammount: f64 = 1.0 / 16.0 / self.zoom;
+ let translate_ammount: f64 = 1.0 / 4.0 / self.zoom;
self.position_x += match scan_code {
Scancode::A => -translate_ammount,
diff --git a/source/benoit/benoit/configuration/load.rs b/source/benoit/benoit/configuration/load.rs
index c9b0512..1c0cfe8 100644
--- a/source/benoit/benoit/configuration/load.rs
+++ b/source/benoit/benoit/configuration/load.rs
@@ -29,8 +29,6 @@ use std::fs::read;
use std::str::FromStr;
use toml::{Table, Value};
-use std::time::Duration;
-
impl Configuration {
pub fn load(path: &str) -> Configuration {
eprintln!("loading configuration at \"{path}\"");
@@ -65,13 +63,15 @@ impl Configuration {
};
};
+ get_integer(&mut configuration.thread_count, &configuration_table, "thread_count");
+
get_integer(&mut configuration.canvas_width, &configuration_table, "canvas_width");
get_integer(&mut configuration.canvas_height, &configuration_table, "canvas_height");
get_integer(&mut configuration.scale, &configuration_table, "scale");
- get_float(&mut configuration.position_x, &configuration_table, "position_x");
- get_float(&mut configuration.position_y, &configuration_table, "position_y");
- get_float(&mut configuration.zoom, &configuration_table, "zoom");
+ get_float(&mut configuration.position_x, &configuration_table, "real");
+ get_float(&mut configuration.position_y, &configuration_table, "imaginary");
+ get_float(&mut configuration.zoom, &configuration_table, "zoom");
get_integer(&mut configuration.maximum_iteration_count, &configuration_table, "maximum_iteration_count");