diff options
Diffstat (limited to 'src/map.h')
| -rw-r--r-- | src/map.h | 12 |
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 | ||
| 12 | class Renderer; | ||
| 13 | |||
| 14 | struct Tile { | 11 | struct 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 { | |||
| 38 | class Map { | 35 | class Map { |
| 39 | public: | 36 | public: |
| 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 | ||
| 63 | private: | 62 | private: |
| 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_; |
