Camera.h 961 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef INCLUDE_CAMERA_H
  2. #define INCLUDE_CAMERA_H
  3. namespace WalrusRPG {
  4. class Camera
  5. {
  6. protected:
  7. // 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
  8. // Vector2 a(3, 2); Vector2 b(1, 2); Vector3 c = a+b;
  9. // Vector2 destination;
  10. // Vector2 velocity;
  11. // Vector2 acceleration;
  12. public:
  13. // TODO!: TEMPOARY PUBLIC VARIABLES. Need to make getter/setters.
  14. // So, how will track camera's position? Top left or center?
  15. unsigned x; // You'll probably want to switch over signed coordonates.
  16. unsigned y;
  17. unsigned render_area_width; // What if you only want to display the map on a part of the screen?
  18. unsigned render_area_height;
  19. Camera();
  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(float dt);
  24. };
  25. }
  26. #endif