2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-30 16:27:47 +00:00

feat: add bind for loading fastfiles to ModMan

This commit is contained in:
Jan Laupetin
2025-10-11 12:51:21 +01:00
parent 42473a7320
commit 4911cfa4c6
15 changed files with 215 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
#include "FastFileContext.h"
#include "ZoneLoading.h"
bool FastFileContext::LoadFastFile(const std::string& path)
{
m_loaded_zones.emplace_back(ZoneLoading::LoadZone(path));
return true;
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include "Zone/Zone.h"
#include <memory>
#include <vector>
class FastFileContext
{
public:
bool LoadFastFile(const std::string& path);
std::vector<std::unique_ptr<Zone>> m_loaded_zones;
};

View File

@@ -5,3 +5,13 @@ ModManContext& ModManContext::Get()
static ModManContext context;
return context;
}
void ModManContext::Startup()
{
m_db_thread.Start();
}
void ModManContext::Destroy()
{
m_db_thread.Terminate();
}

View File

@@ -1,5 +1,7 @@
#pragma once
#include "FastFileContext.h"
#include "Utils/DispatchableThread.h"
#include "Web/WebViewLib.h"
#include <memory>
@@ -9,6 +11,12 @@ class ModManContext
public:
static ModManContext& Get();
void Startup();
void Destroy();
std::unique_ptr<webview::webview> m_main_webview;
std::unique_ptr<webview::webview> m_dev_tools_webview;
FastFileContext m_fast_file;
DispatchableThread m_db_thread;
};