diff options
| author | ilotterytea <iltsu@alright.party> | 2025-02-02 02:13:52 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-02-02 02:13:52 +0500 |
| commit | 0ae2d10bdfd3d4fe7483829fb9c9257973e644c7 (patch) | |
| tree | 4c8ca329017a22bee01c65cc1673a479f95c3f1f /src/floor.hpp | |
| parent | 4d6e94ad9b905df16c0c67ea9043395a1f19400a (diff) | |
feat: level package
Diffstat (limited to 'src/floor.hpp')
| -rw-r--r-- | src/floor.hpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/floor.hpp b/src/floor.hpp deleted file mode 100644 index 4236166..0000000 --- a/src/floor.hpp +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <SFML/Graphics/RenderWindow.hpp> -#include <SFML/System/Vector2.hpp> -#include <memory> -#include <vector> - -#include "tileset.hpp" - -namespace silly::editor { - struct Tile { - std::shared_ptr<TilesetTile> tile; - sf::Vector2i position; - float rotation; - }; - - struct TileLayer { - std::vector<Tile> tiles; - TilesetTileType type; - }; - - class TileFloor { - public: - 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; - void place_tile(std::shared_ptr<TilesetTile> &tile, - const sf::Vector2i &position, const float &rotation); - void remove_tile(TilesetTileType type, const sf::Vector2i &position); - - const int get_width() const; - const int get_height() const; - - private: - int width, height; - int activeLayerIndex; - std::vector<TileLayer> layers; - }; -}
\ No newline at end of file |
