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

- removed multiple unused files

- config folder with all json files is used via new FS API
- fixed campaigns loading. Replaced "detect h3m starts" heuristics with CCompessedStream::getNextBlock()
This commit is contained in:
Ivan Savenko
2012-08-02 11:03:26 +00:00
parent b3c17d2788
commit e67f8afdd9
60 changed files with 211 additions and 1397 deletions

View File

@@ -2,6 +2,7 @@
#include "JsonNode.h"
#include "HeroBonus.h"
#include "Filesystem/CResourceLoader.h"
const JsonNode JsonNode::nullNode;
@@ -18,9 +19,10 @@ JsonNode::JsonNode(const char *data, size_t datasize):
JsonValidator validator(*this);
}
JsonNode::JsonNode(std::string filename):
JsonNode::JsonNode(ResourceID && fileURI):
type(DATA_NULL)
{
std::string filename = CResourceHandler::get()->getResourceName(fileURI);
FILE * file = fopen(filename.c_str(), "rb");
if (!file)
{