Prior to deleting the TileMap to see if I can just replace it with new features in Map and textures::.

This commit is contained in:
Zed A. Shaw 2025-05-25 10:30:45 -04:00
parent f45dbe8c48
commit ea9f6bf383
5 changed files with 15 additions and 8 deletions

View file

@ -38,8 +38,8 @@ void TileMap::dump(int show_x, int show_y) {
std::cout << to_string(show_x, show_y) << std::endl;
}
void TileMap::set_tile(size_t x, size_t y, string tile_name) {
json tile_conf = $config[tile_name];
void TileMap::set_tile(size_t x, size_t y, const string& tile_name) {
json& tile_conf = $config[tile_name];
auto tile = components::convert<Tile>(tile_conf);
$tile_ids[y][x] = tile.display;