Camera.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef INCLUDE_CAMERA_H
  2. #define INCLUDE_CAMERA_H
  3. namespace WalrusRPG
  4. {
  5. class Camera
  6. {
  7. protected:
  8. // So, how will track camera's position? Top left or center?
  9. signed x; // You'll probably want to switch over signed coordonates.
  10. signed y;
  11. unsigned render_area_width; // What if you only want to display the map on a part of the screen?
  12. unsigned render_area_height;
  13. // Do you want to use classes for coordinates and allow them to have vector-based mathematics? With operator overriding that could be doable to have
  14. // Vector2 a(3, 2); Vector2 b(1, 2); Vector3 c = a+b;
  15. // Vector2 destination;
  16. // Vector2 velocity;
  17. // Vector2 acceleration;
  18. public:
  19. Camera(signed x, signed y);
  20. ~Camera();
  21. // This doesn't need any render as it's the utility which helps rendering. Unless you want to show debnug things.
  22. // void render(float dt) const;
  23. void update(unsigned dt);
  24. void set_x(signed x);
  25. signed get_x() const;
  26. void set_y(signed y);
  27. signed get_y() const;
  28. };
  29. }
  30. #endif