mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
- fixed save games issues (#1044)
- hopefully some speedup for filesystem loading (#1048)
This commit is contained in:
@ -13,22 +13,7 @@ ArchiveEntry::ArchiveEntry()
|
||||
|
||||
}
|
||||
|
||||
CLodArchiveLoader::CLodArchiveLoader()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CLodArchiveLoader::CLodArchiveLoader(const std::string & archive)
|
||||
{
|
||||
open(archive);
|
||||
}
|
||||
|
||||
CLodArchiveLoader::CLodArchiveLoader(const CFileInfo & archive)
|
||||
{
|
||||
open(archive);
|
||||
}
|
||||
|
||||
void CLodArchiveLoader::open(const std::string & archive)
|
||||
{
|
||||
// Open archive file(.snd, .vid, .lod)
|
||||
this->archive = archive;
|
||||
@ -58,11 +43,6 @@ void CLodArchiveLoader::open(const std::string & archive)
|
||||
}
|
||||
}
|
||||
|
||||
void CLodArchiveLoader::open(const CFileInfo & archive)
|
||||
{
|
||||
open(archive.getName());
|
||||
}
|
||||
|
||||
void CLodArchiveLoader::initLODArchive(CFileInputStream & fileStream)
|
||||
{
|
||||
// Define LodEntryBlock struct
|
||||
@ -204,14 +184,14 @@ std::unique_ptr<CInputStream> CLodArchiveLoader::load(const std::string & resour
|
||||
}
|
||||
}
|
||||
|
||||
std::list<std::string> CLodArchiveLoader::getEntries() const
|
||||
std::unordered_map<ResourceID, std::string> CLodArchiveLoader::getEntries() const
|
||||
{
|
||||
std::list<std::string> retList;
|
||||
std::unordered_map<ResourceID, std::string> retList;
|
||||
|
||||
for(auto it = entries.begin(); it != entries.end(); ++it)
|
||||
{
|
||||
const ArchiveEntry & entry = it->second;
|
||||
retList.push_back(entry.name);
|
||||
retList[ResourceID(entry.name)] = entry.name;
|
||||
}
|
||||
|
||||
return std::move(retList);
|
||||
|
Reference in New Issue
Block a user