-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscene.h
More file actions
43 lines (39 loc) · 980 Bytes
/
scene.h
File metadata and controls
43 lines (39 loc) · 980 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include <array>
#include <vector>
#include <filesystem>
#include <SFML/Graphics.hpp>
#include "resources.h"
// const std::array<std::array<short, 10>, 10> level = { {
// {1,1,1,1,1,1,1,1,1,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,0,0,0,1,1,1,0,0,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,0,0,0,0,0,0,0,0,1},
// {1,1,1,1,1,1,1,1,1,1}
// } };
class Material
{
public:
sf::Texture texture;
};
class Cell
{
public:
sf::Color color;
std::shared_ptr<Material> wallMaterials;
};
class Scene
{
std::vector<std::vector<std::shared_ptr<Cell>>> map;
std::vector<std::shared_ptr<Cell>> cells;
std::vector<std::shared_ptr<Material>> materials;
public:
bool LoadFromResources(std::shared_ptr<ResourcesManager> resourcesManager);
std::shared_ptr<Cell> GetCell(sf::Vector2i coord);
sf::Vector2i GetSize();
};