]> git.localhorst.tv Git - space.git/blobdiff - src/graphics/Camera.cpp
move to SDL2
[space.git] / src / graphics / Camera.cpp
index 553b74f77f0f9afbd36e1f6373d1b7b41bda50b5..74ebd5f6fb3759f99870ec618af5ed20b5c707e6 100644 (file)
@@ -3,16 +3,19 @@
 
 namespace space {
 
-Camera::Camera(int w, int h, const Vector<float> &t)
+Camera::Camera(Vector<int> s, const Vector<float> &t)
 : target(&t)
-, offset(w/2, h/2)
-, zoom(1) {
+, size(s)
+, offset(size / 2)
+, zoom(1)
+, zoomAcc(0) {
 
 }
 
 
-void Camera::Resize(int w, int h) {
-       offset = Vector<float>(w/2, h/2);
+void Camera::Resize(Vector<int> s) {
+       size = s;
+       offset = size / 2;
 }
 
 void Camera::Update(float delta) {