summaryrefslogtreecommitdiff
path: root/src/camera.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/camera.rs')
-rw-r--r--src/camera.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/camera.rs b/src/camera.rs
index 07745e5..bcb8f69 100644
--- a/src/camera.rs
+++ b/src/camera.rs
@@ -1,5 +1,5 @@
+use ggez::conf::Conf;
use ggez::nalgebra::Point2;
-use ggez::Context;
use crate::constants;
@@ -10,13 +10,11 @@ pub struct Camera {
}
impl Camera {
- pub fn new(context: &mut Context, map_dimensions: (f32, f32)) -> Camera {
+ pub fn new(map_dimensions: (f32, f32)) -> Camera {
+ let conf = Conf::new();
Camera {
draw: Point2::new(0.0, 0.0),
- window_dimensions: (
- context.conf.window_mode.width,
- context.conf.window_mode.height,
- ),
+ window_dimensions: (conf.window_mode.width, conf.window_mode.height),
map_dimensions,
}
}