X-Git-Url: http://git.localhorst.tv/?p=space.git;a=blobdiff_plain;f=src%2Fgraphics%2FCamera.cpp;fp=src%2Fgraphics%2FCamera.cpp;h=74ebd5f6fb3759f99870ec618af5ed20b5c707e6;hp=ea2f97de328f5270a0edeab91c998d9444b9aefa;hb=61c2d30a60d586cbe63885885c6a373c7713af1e;hpb=08d0e47634e1632c96ebe3308535a86f5e625b40 diff --git a/src/graphics/Camera.cpp b/src/graphics/Camera.cpp index ea2f97d..74ebd5f 100644 --- a/src/graphics/Camera.cpp +++ b/src/graphics/Camera.cpp @@ -3,9 +3,9 @@ namespace space { -Camera::Camera(int w, int h, const Vector &t) +Camera::Camera(Vector s, const Vector &t) : target(&t) -, size(w, h) +, size(s) , offset(size / 2) , zoom(1) , zoomAcc(0) { @@ -13,8 +13,8 @@ Camera::Camera(int w, int h, const Vector &t) } -void Camera::Resize(int w, int h) { - size = Vector(w, h); +void Camera::Resize(Vector s) { + size = s; offset = size / 2; }