Now have a configurable displayable tilemap to do better tiles.

This commit is contained in:
Zed A. Shaw 2024-12-24 01:36:25 -05:00
parent b66a3154c7
commit 7fe6ad174d
10 changed files with 40 additions and 16 deletions

11
map.cpp
View file

@ -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);
}