blob: 2835842facf42bd9f04fa49a8ac0bf37e6753ce1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef WORLDSCENE_HPP
#define WORLDSCENE_HPP
#include "Scene.hpp"
#include "Map.hpp"
#include <SFML/Graphics.hpp>
class WorldScene : public Scene
{
public:
constexpr static float MAX_ZOOM = 10;
constexpr static float MIN_ZOOM = 1/2.0;
constexpr static int DEFAULT_TILE_SIZE_PX = 20;
WorldScene(sf::RenderWindow &window);
virtual void render();
virtual void resize(const sf::Event::SizeEvent &size);
virtual void zoom(float factor);
virtual void pan(int dx, int dy);
private:
float _zoom = 1;
unsigned _tileSize;
Map _map;
};
#endif
|