mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Always use ResourcePath for referencing images and animations
This commit is contained in:
@@ -23,15 +23,15 @@ MapServiceMock::MapServiceMock(const std::string & path, MapListener * mapListen
|
||||
|
||||
CZipSaver saver(io, "_");
|
||||
|
||||
const JsonNode header(ResourceID(path+CMapFormatJson::HEADER_FILE_NAME));
|
||||
const JsonNode objects(ResourceID(path+CMapFormatJson::OBJECTS_FILE_NAME));
|
||||
const JsonNode surface(ResourceID(path+"surface_terrain.json"));
|
||||
const JsonNode header(ResourcePath(path+CMapFormatJson::HEADER_FILE_NAME));
|
||||
const JsonNode objects(ResourcePath(path+CMapFormatJson::OBJECTS_FILE_NAME));
|
||||
const JsonNode surface(ResourcePath(path+"surface_terrain.json"));
|
||||
|
||||
addToArchive(saver, header, CMapFormatJson::HEADER_FILE_NAME);
|
||||
addToArchive(saver, objects, CMapFormatJson::OBJECTS_FILE_NAME);
|
||||
addToArchive(saver, surface, "surface_terrain.json");
|
||||
|
||||
ResourceID undergroundPath(path+"underground_terrain.json");
|
||||
ResourcePath undergroundPath(path+"underground_terrain.json");
|
||||
|
||||
if(CResourceHandler::get()->existsResource(undergroundPath))
|
||||
{
|
||||
@@ -53,12 +53,12 @@ std::unique_ptr<CMap> MapServiceMock::loadMap() const
|
||||
return res;
|
||||
}
|
||||
|
||||
std::unique_ptr<CMap> MapServiceMock::loadMap(const ResourceID & name) const
|
||||
std::unique_ptr<CMap> MapServiceMock::loadMap(const ResourcePath & name) const
|
||||
{
|
||||
return loadMap();
|
||||
}
|
||||
|
||||
std::unique_ptr<CMapHeader> MapServiceMock::loadMapHeader(const ResourceID & name) const
|
||||
std::unique_ptr<CMapHeader> MapServiceMock::loadMapHeader(const ResourcePath & name) const
|
||||
{
|
||||
initialBuffer.seek(0);
|
||||
CMapLoaderJson initialLoader(&initialBuffer);
|
||||
|
||||
Reference in New Issue
Block a user