diff options
Diffstat (limited to 'src/floor.hpp')
| -rw-r--r-- | src/floor.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/floor.hpp b/src/floor.hpp index a04fc4b..1a6fe47 100644 --- a/src/floor.hpp +++ b/src/floor.hpp @@ -13,9 +13,20 @@ namespace silly::editor { std::shared_ptr<TilesetTile> tile; }; + struct TileLayer { + std::vector<Tile> tiles; + TilesetTileType type; + }; + class TileFloor { public: - TileFloor(int width, int height) : width(width), height(height) {} + TileFloor(int width, int height) : width(width), height(height) { + // creating vectors for every tile type + for (int i = 0; i < 2; i++) { + this->layers.push_back({{}, (TilesetTileType)i}); + } + } + ~TileFloor() = default; void render(sf::RenderWindow &window) const; @@ -28,6 +39,7 @@ namespace silly::editor { private: int width, height; - std::vector<Tile> tiles; + int activeLayerIndex; + std::vector<TileLayer> layers; }; }
\ No newline at end of file |
