Camera.h 999 B

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