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:
parent
2b57552152
commit
2e79cf8781
11 changed files with 70 additions and 71 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue