diff options
| author | ilotterytea <iltsu@alright.party> | 2025-02-01 22:38:12 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-02-01 22:38:12 +0500 |
| commit | 2f54da5844b959c29788b2a0883ee5dae5bdbbd2 (patch) | |
| tree | 401dedebe78fe5e8bdaec9cb25367368ad632535 /src/floor.hpp | |
| parent | 6317119d02897c13f3f90ade86446f110b852ed7 (diff) | |
feat: place textured tiles
Diffstat (limited to 'src/floor.hpp')
| -rw-r--r-- | src/floor.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/floor.hpp b/src/floor.hpp index e0bdcc4..a04fc4b 100644 --- a/src/floor.hpp +++ b/src/floor.hpp @@ -2,11 +2,15 @@ #include <SFML/Graphics/RenderWindow.hpp> #include <SFML/System/Vector2.hpp> +#include <memory> #include <vector> +#include "tileset.hpp" + namespace silly::editor { struct Tile { sf::Vector2i position; + std::shared_ptr<TilesetTile> tile; }; class TileFloor { @@ -15,7 +19,8 @@ namespace silly::editor { ~TileFloor() = default; void render(sf::RenderWindow &window) const; - void place_tile(const sf::Vector2i &position); + void place_tile(std::shared_ptr<TilesetTile> &tile, + const sf::Vector2i &position); void remove_tile(const sf::Vector2i &position); const int get_width() const; |
