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

View file

@ -13,13 +13,13 @@ typedef std::vector<TileRow> TileDisplay;
class TileMap {
public:
Config &$config;
Config $config;
size_t $width;
size_t $height;
matrix::Matrix $tile_ids;
TileDisplay $display;
TileMap(Config &config, size_t width, size_t height);
TileMap(size_t width, size_t height);
// disable copying
TileMap(TileMap &map) = delete;
@ -27,6 +27,7 @@ public:
size_t width() { return $width; }
size_t height() { return $height; }
void load(matrix::Matrix &walls);
const std::string &at(size_t x, size_t y);
void dump(int show_x=-1, int show_y=-1);
bool INVARIANT();