diff options
author | Nao Pross <naopross@thearcway.org> | 2018-02-11 22:55:22 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-02-11 22:55:22 +0100 |
commit | e3fd07e606098dd9cdf0b7ed806340d8466b5572 (patch) | |
tree | cbf5cc81afcbbc62784f7c6fc02d4418cf03cee7 /src/main/headers/WorldScene.hpp | |
parent | Remove redundant scenesOffsetX/Y, replaced with panX (diff) | |
download | Subconscious-old-e3fd07e606098dd9cdf0b7ed806340d8466b5572.tar.gz Subconscious-old-e3fd07e606098dd9cdf0b7ed806340d8466b5572.zip |
Reimplement in C++ with SFML (mostly)
Diffstat (limited to 'src/main/headers/WorldScene.hpp')
-rw-r--r-- | src/main/headers/WorldScene.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/headers/WorldScene.hpp b/src/main/headers/WorldScene.hpp new file mode 100644 index 0000000..acdda63 --- /dev/null +++ b/src/main/headers/WorldScene.hpp @@ -0,0 +1,33 @@ +#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(); + + virtual void render(sf::RenderWindow &window); + + virtual void zoom(int value); + virtual void pan(int dx, int dy); + +private: + Map map; + + unsigned _tileSize; + + int _panX = 0; + int _panY = 0; +}; + +#endif |