Refactored out the tilemap since it was mostly doing nothing useful.
This commit is contained in:
parent
ea9f6bf383
commit
3a745d492a
15 changed files with 40 additions and 187 deletions
10
map.cpp
10
map.cpp
|
@ -13,13 +13,11 @@ using namespace fmt;
|
|||
Map::Map(size_t width, size_t height) :
|
||||
$width(width),
|
||||
$height(height),
|
||||
$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)
|
||||
{
|
||||
|
@ -144,8 +142,12 @@ bool Map::INVARIANT() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void Map::load_tiles() {
|
||||
$tiles.load($walls);
|
||||
void Map::init_tiles() {
|
||||
$tiles = $walls;
|
||||
}
|
||||
|
||||
Matrix& Map::tiles() {
|
||||
return $walls;
|
||||
}
|
||||
|
||||
void Map::enclose() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue