diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-09 19:39:30 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-09 19:39:30 -0500 |
commit | 0c2cd251fa0427b19f7c995bc7da7319d2ac80a5 (patch) | |
tree | 5ef74b3c50fa8bba3424f9e438d5fce61838c7df /src/map.h | |
parent | 60f10cf1c5e8b0610ebe12d11531030e6c241a42 (diff) | |
download | tanetane-0c2cd251fa0427b19f7c995bc7da7319d2ac80a5.tar.gz tanetane-0c2cd251fa0427b19f7c995bc7da7319d2ac80a5.tar.bz2 tanetane-0c2cd251fa0427b19f7c995bc7da7319d2ac80a5.zip |
Maps can contain named points of interest called warps
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h index a896b00..7bfb15e 100644 --- a/src/map.h +++ b/src/map.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef MAP_H_D95D6D47 | 1 | #ifndef MAP_H_D95D6D47 |
2 | #define MAP_H_D95D6D47 | 2 | #define MAP_H_D95D6D47 |
3 | 3 | ||
4 | #include <map> | ||
4 | #include <string> | 5 | #include <string> |
5 | #include <string_view> | 6 | #include <string_view> |
6 | #include <vector> | 7 | #include <vector> |
@@ -48,6 +49,8 @@ public: | |||
48 | 49 | ||
49 | const std::vector<Prototype>& getPrototypes() const { return prototypes_; } | 50 | const std::vector<Prototype>& getPrototypes() const { return prototypes_; } |
50 | 51 | ||
52 | const vec2i& getWarpPoint(const std::string& name) const { return warpPoints_.at(name); } | ||
53 | |||
51 | private: | 54 | private: |
52 | 55 | ||
53 | vec2i mapSize_; | 56 | vec2i mapSize_; |
@@ -56,6 +59,7 @@ private: | |||
56 | int tilesetTextureId_; | 59 | int tilesetTextureId_; |
57 | int tilesetColumns_; | 60 | int tilesetColumns_; |
58 | std::vector<Prototype> prototypes_; | 61 | std::vector<Prototype> prototypes_; |
62 | std::map<std::string, vec2i> warpPoints_; | ||
59 | }; | 63 | }; |
60 | 64 | ||
61 | #endif /* end of include guard: MAP_H_D95D6D47 */ | 65 | #endif /* end of include guard: MAP_H_D95D6D47 */ |