Map is way better and components::Tile is _vastly_ improved by switching to a wchar_t on display and letting nlohmann::json auto convert it for me.

This commit is contained in:
Zed A. Shaw 2025-03-22 02:10:56 -04:00
parent 2b57552152
commit 2e79cf8781
11 changed files with 70 additions and 71 deletions

View file

@ -37,11 +37,8 @@ namespace textures {
for(auto &el : tiles.items()) {
auto &config = el.value();
TMGR.surfaces.emplace_back(load_image(config["texture"]));
std::wstring display = assets.wstring(el.key(), "display");
wchar_t tid = config["display"];
int surface_i = TMGR.surfaces.size() - 1;
wchar_t tid = display[0];
TMGR.char_to_texture[tid] = surface_i;
}
}