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)
+, 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) {