mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Improved json validation
- split JsonNode.cpp into JsonNode and JsonDetail files - validation should be notably faster (at least 10% faster loading) - support for "format" field, allows checking existance of files. - minor fixes in schemas - msk/msg files are now optional
This commit is contained in:
@ -365,11 +365,6 @@ void Graphics::addImageListEntry(size_t index, std::string listName, std::string
|
||||
{
|
||||
if (!imageName.empty())
|
||||
{
|
||||
ResourceID resID("SPRITES/" + imageName, EResType::IMAGE);
|
||||
if (!CResourceHandler::get()->existsResource(resID) && // file not found
|
||||
imageName.find(':') == std::string::npos) // and entry does not refers to frame in def file
|
||||
logGlobal->errorStream() << "Required image " << "SPRITES/" << imageName << " is missing!";
|
||||
|
||||
JsonNode entry;
|
||||
entry["frame"].Float() = index;
|
||||
entry["file"].String() = imageName;
|
||||
|
Reference in New Issue
Block a user