feat: combine loading bar and zone list

This commit is contained in:
Jan Laupetin
2025-10-27 21:01:03 +01:00
parent 78538d68f5
commit 23f5ad67e9
11 changed files with 276 additions and 129 deletions
+13 -2
View File
@@ -4,15 +4,26 @@
#include "Zone/Zone.h"
#include <memory>
#include <shared_mutex>
#include <vector>
class LoadedZone
{
public:
std::unique_ptr<Zone> m_zone;
std::string m_file_path;
LoadedZone(std::unique_ptr<Zone> zone, std::string filePath);
};
class FastFileContext
{
public:
void Destroy();
result::Expected<Zone*, std::string> LoadFastFile(const std::string& path);
result::Expected<LoadedZone*, std::string> LoadFastFile(const std::string& path);
result::Expected<NoResult, std::string> UnloadZone(const std::string& zoneName);
std::vector<std::unique_ptr<Zone>> m_loaded_zones;
std::vector<std::unique_ptr<LoadedZone>> m_loaded_zones;
std::shared_mutex m_zone_lock;
};