summaryrefslogtreecommitdiff
path: root/src/camera.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-07-23 04:59:52 -0500
committertom barrett <spalf0@gmail.com>2019-07-23 04:59:52 -0500
commitc25884efd8d1a239c88dbafd7a0e12eca3c7401b (patch)
tree63ca4a26fa7ff159ae654841b724e7ca4e876da7 /src/camera.rs
parent2ee665ef6954f6eab9f0398c19284b3ea4c8246d (diff)
update deps
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,
}
}