Now have a configurable displayable tilemap to do better tiles.
This commit is contained in:
parent
b66a3154c7
commit
7fe6ad174d
10 changed files with 40 additions and 16 deletions
11
map.cpp
11
map.cpp
|
@ -13,17 +13,18 @@ using namespace fmt;
|
|||
Map::Map(size_t width, size_t height) :
|
||||
$width(width),
|
||||
$height(height),
|
||||
$tiles(height, matrix::Row(width, SPACE_VALUE)),
|
||||
$tiles(width, height),
|
||||
$walls(height, matrix::Row(width, SPACE_VALUE)),
|
||||
$paths(width, height)
|
||||
{}
|
||||
|
||||
Map::Map(Matrix &walls, Pathing &paths) :
|
||||
$tiles(matrix::width(walls), matrix::height(walls)),
|
||||
$walls(walls),
|
||||
$paths(paths)
|
||||
{
|
||||
$width = walls[0].size();
|
||||
$height = walls.size();
|
||||
$width = matrix::width(walls);
|
||||
$height = matrix::height(walls);
|
||||
}
|
||||
|
||||
void Map::make_paths() {
|
||||
|
@ -175,3 +176,7 @@ bool Map::INVARIANT() {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Map::load_tiles() {
|
||||
$tiles.load($walls);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue