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

Always use ResourcePath for referencing images and animations

This commit is contained in:
Ivan Savenko
2023-08-23 15:07:50 +03:00
parent f79492e5b0
commit 823ffa7a07
201 changed files with 1390 additions and 1362 deletions

View File

@@ -85,7 +85,7 @@ std::string CBonusTypeHandler::bonusToString(const std::shared_ptr<Bonus> & bonu
return text;
}
std::string CBonusTypeHandler::bonusToGraphics(const std::shared_ptr<Bonus> & bonus) const
ImagePath CBonusTypeHandler::bonusToGraphics(const std::shared_ptr<Bonus> & bonus) const
{
std::string fileName;
bool fullPath = false;
@@ -191,12 +191,12 @@ std::string CBonusTypeHandler::bonusToGraphics(const std::shared_ptr<Bonus> & bo
if(!fileName.empty() && !fullPath)
fileName = "zvs/Lib1.res/" + fileName;
return fileName;
return ImagePath::builtinTODO(fileName);
}
void CBonusTypeHandler::load()
{
const JsonNode gameConf(ResourceID("config/gameConfig.json"));
const JsonNode gameConf(ResourcePath("config/gameConfig.json"));
const JsonNode config(JsonUtils::assembleFromFiles(gameConf["bonuses"].convertTo<std::vector<std::string>>()));
load(config);
}