Working on loading screen

This commit is contained in:
Vladislav Khorev committed 2026-07-09 20:32:57 +03:00
1 parent 1c2c80f0ea
commit 44f5136f1d
8 files changed
+272 -187

No files matched your search

+14 -2
View File
@@ -528,8 +528,20 @@ namespace ZL
void TextureManager::Unload(const std::string& fileName, const std::string& zipFile)
{
//For now, we should keep all textures in memory, to make game load faster after restart
//textureMap.erase(MakeKey(fileName, zipFile));
textureMap.erase(MakeKey(fileName, zipFile));
}
void TextureManager::UnloadByPrefix(const std::string& prefix)
{
for (auto& it = textureMap.begin(); it != textureMap.end(); ) {
if (it->first.substr(0, prefix.size()) == prefix) {
std::cout << "Unloading texture with prefix: " << it->first << std::endl;
it = textureMap.erase(it);
}
else {
++it;
}
}
}
void TextureManager::UnloadAll()
+1
View File
@@ -76,6 +76,7 @@ namespace ZL
#endif
void Unload(const std::string& fileName, const std::string& zipFile = "");
void UnloadByPrefix(const std::string& prefix);
void UnloadAll();
private: