1
0
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:
Ivan Savenko
2013-10-26 19:33:34 +00:00
parent e2c037402c
commit 9237e6d97d
17 changed files with 1313 additions and 1052 deletions

View File

@ -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;