summary refs log tree commit diff stats
path: root/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map.h b/src/map.h index 4c5d6d4..adf9b80 100644 --- a/src/map.h +++ b/src/map.h
@@ -5,12 +5,9 @@
5#include <string> 5#include <string>
6#include <string_view> 6#include <string_view>
7#include <vector> 7#include <vector>
8#include "renderer.h"
9#include "vector.h" 8#include "vector.h"
10#include "step_type.h" 9#include "step_type.h"
11 10
12class Renderer;
13
14struct Tile { 11struct Tile {
15 unsigned int id = 0; 12 unsigned int id = 0;
16 bool flipHorizontal = false; 13 bool flipHorizontal = false;
@@ -38,7 +35,9 @@ struct Trigger {
38class Map { 35class Map {
39public: 36public:
40 37
41 Map(std::string_view filename, Renderer& renderer); 38 explicit Map(std::string_view filename);
39
40 const std::string& getName() const { return filename_; }
42 41
43 const vec2i& getMapSize() const { return mapSize_; } 42 const vec2i& getMapSize() const { return mapSize_; }
44 43
@@ -46,7 +45,7 @@ public:
46 45
47 const std::vector<std::vector<Tile>>& getLayers() const { return layers_; } 46 const std::vector<std::vector<Tile>>& getLayers() const { return layers_; }
48 47
49 int getTilesetTextureId() const { return tilesetTextureId_; } 48 const std::string& getTilesetFilename() const { return tilesetFilename_; }
50 49
51 int getTilesetColumns() const { return tilesetColumns_; } 50 int getTilesetColumns() const { return tilesetColumns_; }
52 51
@@ -62,10 +61,11 @@ public:
62 61
63private: 62private:
64 63
64 std::string filename_;
65 vec2i mapSize_; 65 vec2i mapSize_;
66 vec2i tileSize_; 66 vec2i tileSize_;
67 std::vector<std::vector<Tile>> layers_; 67 std::vector<std::vector<Tile>> layers_;
68 int tilesetTextureId_; 68 std::string tilesetFilename_;
69 int tilesetColumns_; 69 int tilesetColumns_;
70 std::vector<Prototype> prototypes_; 70 std::vector<Prototype> prototypes_;
71 std::map<std::string, vec2i> warpPoints_; 71 std::map<std::string, vec2i> warpPoints_;