From 5931470800c43260f600303d1231dbaf586f26fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 9 Feb 2021 22:28:27 -0500 Subject: Map changing! Also removed some dependencies on the Renderer. More changes need to be made. Fading to black before the change would be good. And making sure the characters are facing the right direction. Maybe that code shouldn't live in Game, either. Later we also want to combine the tilesets for these two maps (and any others that are on Tanetane). --- src/map.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/map.h') 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 @@ #include #include #include -#include "renderer.h" #include "vector.h" #include "step_type.h" -class Renderer; - struct Tile { unsigned int id = 0; bool flipHorizontal = false; @@ -38,7 +35,9 @@ struct Trigger { class Map { public: - Map(std::string_view filename, Renderer& renderer); + explicit Map(std::string_view filename); + + const std::string& getName() const { return filename_; } const vec2i& getMapSize() const { return mapSize_; } @@ -46,7 +45,7 @@ public: const std::vector>& getLayers() const { return layers_; } - int getTilesetTextureId() const { return tilesetTextureId_; } + const std::string& getTilesetFilename() const { return tilesetFilename_; } int getTilesetColumns() const { return tilesetColumns_; } @@ -62,10 +61,11 @@ public: private: + std::string filename_; vec2i mapSize_; vec2i tileSize_; std::vector> layers_; - int tilesetTextureId_; + std::string tilesetFilename_; int tilesetColumns_; std::vector prototypes_; std::map warpPoints_; -- cgit 1.4.1