blob: cf91ac5cc5026b74ff9111d62b5bee164ee7adca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/System/Vector2.hpp>
#include <vector>
namespace silly::editor {
struct Tile {
sf::Vector2i position;
};
class TileFloor {
public:
TileFloor(int width, int height) : width(width), height(height) {}
~TileFloor() = default;
void update(const sf::RenderWindow &window);
void render(sf::RenderWindow &window) const;
void place_tile(const sf::Vector2i &position);
void remove_tile(const sf::Vector2i &position);
const int get_width() const;
const int get_height() const;
private:
int width, height;
std::vector<Tile> tiles;
};
}
|