Lighting system now works and does illumination for the whole map plus entities, but not walls or multiple lights yet.
This commit is contained in:
parent
62f986719d
commit
4ceacecfda
5 changed files with 49 additions and 25 deletions
10
map.hpp
10
map.hpp
|
@ -32,17 +32,14 @@ void add_neighbors(Matrix &closed, size_t j, size_t i);
|
|||
|
||||
class Map {
|
||||
public:
|
||||
int $limit;
|
||||
Matrix $input_map;
|
||||
Matrix $walls;
|
||||
Matrix $paths;
|
||||
Matrix $lighting; // BUG: this is not the place
|
||||
std::vector<Room> $rooms;
|
||||
int $limit = 0;
|
||||
|
||||
// make explicit
|
||||
Map(Matrix input_map, Matrix walls_map, int limit) :
|
||||
$input_map(input_map),
|
||||
$walls(walls_map), $limit(limit) {
|
||||
}
|
||||
Map(Matrix input_map, Matrix walls_map, int limit);
|
||||
|
||||
// make random
|
||||
Map(size_t width, size_t height);
|
||||
|
@ -51,6 +48,7 @@ public:
|
|||
Map(Map &map) = delete;
|
||||
|
||||
Matrix& paths() { return $paths; }
|
||||
Matrix& lighting() { return $lighting; }
|
||||
Matrix& input_map() { return $input_map; }
|
||||
Matrix& walls() { return $walls; }
|
||||
int limit() { return $limit; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue