aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/WorldScene.hpp
blob: d21d885ec9741e44aee1e631398e4a04d2b248f4 (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
#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:
    Map map;

    unsigned _tileSize;
};

#endif