1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Moved range highlight transforms to config file

This commit is contained in:
Ivan Savenko
2024-07-16 20:14:49 +00:00
parent 81c7c0ce24
commit 4f8f217b49
5 changed files with 65 additions and 101 deletions

View File

@@ -65,10 +65,10 @@ void RenderHandler::initFromJson(AnimationLayoutMap & source, const JsonNode & c
for(const JsonNode & frame : group["frames"].Vector())
{
JsonNode toAdd;
JsonNode toAdd = frame;
JsonUtils::inherit(toAdd, base);
toAdd["file"].String() = basepath + frame.String();
source[groupID].push_back(ImageLocator(toAdd));
source[groupID].emplace_back(toAdd);
}
}
@@ -80,7 +80,7 @@ void RenderHandler::initFromJson(AnimationLayoutMap & source, const JsonNode & c
if (source[group].size() <= frame)
source[group].resize(frame+1);
JsonNode toAdd;
JsonNode toAdd = node;
JsonUtils::inherit(toAdd, base);
toAdd["file"].String() = basepath + node["file"].String();
source[group][frame] = ImageLocator(toAdd);