aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/WorldScene.hpp
blob: 09f312081522b5699426a98f787b43bc055a8395 (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
33
34
#ifndef WORLDSCENE_HPP
#define WORLDSCENE_HPP

#include "Scene.hpp"
#include "Map.hpp"

#include <SFML/Graphics.hpp>


class WorldScene : public Scene
{
public:
    constexpr static int ZOOM_MIN = 1;
    constexpr static int ZOOM_MAX = 100;
    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;

    int _panX = 0;
    int _panY = 0;
};

#endif