You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
520 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef MAP_VIEW_H
  2. #define MAP_VIEW_H MAP_VIEW_H
  3. #include "SDL.h"
  4. #include "tile_collection.h"
  5. class MapView{
  6. int width, height;
  7. int offsetx, offsety;
  8. SDL_Window *window;
  9. public:
  10. TileCollection tiles;
  11. int zoom;
  12. MapView(SDL_Window *window, int width, int height, int zoom);
  13. void center_coords(double lat, double lng);
  14. void move_by(int dx, int dy);
  15. void zoom_at(int x, int y);
  16. void zoom_in();
  17. void zoom_out();
  18. void resize(int width, int height);
  19. void update_bounds();
  20. void render();
  21. };
  22. #endif