1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +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,7 +2,6 @@
#include "CHeroHandler.h"
#include "Filesystem/CResourceLoader.h"
#include "CLodHandler.h"
#include "../lib/VCMI_Lib.h"
#include "../lib/JsonNode.h"
#include "GameConstants.h"
@@ -116,7 +115,7 @@ void CHeroHandler::loadObstacles()
};
const JsonNode config(GameConstants::DATA_DIR + "/config/obstacles.json");
const JsonNode config(ResourceID("config/obstacles.json"));
loadObstacles(config["obstacles"], false, obstacles);
loadObstacles(config["absoluteObstacles"], true, absoluteObstacles);
//loadObstacles(config["moats"], true, moats);
@@ -124,7 +123,7 @@ void CHeroHandler::loadObstacles()
void CHeroHandler::loadPuzzleInfo()
{
const JsonNode config(GameConstants::DATA_DIR + "/config/puzzle_map.json");
const JsonNode config(ResourceID("config/puzzle_map.json"));
int faction = 0;
@@ -230,7 +229,7 @@ void CHeroHandler::loadHeroes()
}
// Load heroes information
const JsonNode config(GameConstants::DATA_DIR + "/config/heroes.json");
const JsonNode config(ResourceID("config/heroes.json"));
BOOST_FOREACH(const JsonNode &hero, config["heroes"].Vector()) {
int hid = hero["id"].Float();
const JsonNode *value;
@@ -426,7 +425,7 @@ ui64 CHeroHandler::reqExp (ui32 level) const
void CHeroHandler::loadTerrains()
{
int faction = 0;
const JsonNode config(GameConstants::DATA_DIR + "/config/terrains.json");
const JsonNode config(ResourceID("config/terrains.json"));
nativeTerrains.resize(GameConstants::F_NUMBER);