1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Merge pull request #2757 from IvanSavenko/filesystem_refactor

Filesystem refactor - part 1
This commit is contained in:
Ivan Savenko
2023-09-07 10:51:02 +03:00
committed by GitHub
237 changed files with 1926 additions and 1761 deletions

View File

@@ -29,7 +29,7 @@
#include "../VCMI_Lib.h"
#include "../battle/BattleInfo.h"
#include "../campaign/CampaignState.h"
#include "../filesystem/ResourceID.h"
#include "../filesystem/ResourcePath.h"
#include "../mapObjectConstructors/AObjectTypeHandler.h"
#include "../mapObjectConstructors/CObjectClassesHandler.h"
#include "../mapObjectConstructors/DwellingInstanceConstructor.h"
@@ -601,7 +601,7 @@ void CGameState::initNewGame(const IMapService * mapService, bool allowSavingRan
else
{
logGlobal->info("Open map file: %s", scenarioOps->mapname);
const ResourceID mapURI(scenarioOps->mapname, EResType::MAP);
const ResourcePath mapURI(scenarioOps->mapname, EResType::MAP);
map = mapService->loadMap(mapURI).release();
}
}
@@ -803,7 +803,7 @@ void CGameState::removeHeroPlaceholders()
void CGameState::initStartingResources()
{
logGlobal->debug("\tSetting up resources");
const JsonNode config(ResourceID("config/startres.json"));
const JsonNode config(JsonPath::builtin("config/startres.json"));
const JsonVector &vector = config["difficulty"].Vector();
const JsonNode &level = vector[scenarioOps->difficulty];