mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Make IObjectInterface::cb non-static
This commit is contained in:
@ -30,14 +30,14 @@
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
|
||||
std::unique_ptr<CMap> CMapService::loadMap(const ResourcePath & name) const
|
||||
std::unique_ptr<CMap> CMapService::loadMap(const ResourcePath & name, IGameCallback * cb) const
|
||||
{
|
||||
std::string modName = VLC->modh->findResourceOrigin(name);
|
||||
std::string language = VLC->modh->getModLanguage(modName);
|
||||
std::string encoding = Languages::getLanguageOptions(language).encoding;
|
||||
|
||||
auto stream = getStreamFromFS(name);
|
||||
return getMapLoader(stream, name.getName(), modName, encoding)->loadMap();
|
||||
return getMapLoader(stream, name.getName(), modName, encoding)->loadMap(cb);
|
||||
}
|
||||
|
||||
std::unique_ptr<CMapHeader> CMapService::loadMapHeader(const ResourcePath & name) const
|
||||
@ -50,10 +50,10 @@ std::unique_ptr<CMapHeader> CMapService::loadMapHeader(const ResourcePath & name
|
||||
return getMapLoader(stream, name.getName(), modName, encoding)->loadMapHeader();
|
||||
}
|
||||
|
||||
std::unique_ptr<CMap> CMapService::loadMap(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding) const
|
||||
std::unique_ptr<CMap> CMapService::loadMap(const uint8_t * buffer, int size, const std::string & name, const std::string & modName, const std::string & encoding, IGameCallback * cb) const
|
||||
{
|
||||
auto stream = getStreamFromMem(buffer, size);
|
||||
std::unique_ptr<CMap> map(getMapLoader(stream, name, modName, encoding)->loadMap());
|
||||
std::unique_ptr<CMap> map(getMapLoader(stream, name, modName, encoding)->loadMap(cb));
|
||||
std::unique_ptr<CMapHeader> header(map.get());
|
||||
|
||||
//might be original campaign and require patch
|
||||
|
Reference in New Issue
Block a user