Map.h 564 B

12345678910111213141516171819202122232425262728
  1. #ifndef INCLUDE_MAP_H
  2. #define INCLUDE_MAP_H
  3. #include "Camera.h"
  4. #include "Entity.h"
  5. namespace WalrusRPG
  6. {
  7. class Map
  8. {
  9. protected:
  10. // <Tiles> data;
  11. // <Tileset> tileset;
  12. unsigned int width;
  13. unsigned int height;
  14. unsigned *layer0;
  15. unsigned *layer1;
  16. // TODO?: add a boolean/getter to know if a second layer exist?
  17. public:
  18. Map(int width, int height, unsigned *layer0, unsigned *layer1);
  19. ~Map();
  20. void render(Camera &camera, unsigned dt) const;
  21. void update(unsigned dt);
  22. bool entity_collide(Entity &entity) const;
  23. };
  24. }
  25. #endif