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:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user