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:
9
src/ModMan/Context/FastFileContext.cpp
Normal file
9
src/ModMan/Context/FastFileContext.cpp
Normal 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;
|
||||
}
|
||||
13
src/ModMan/Context/FastFileContext.h
Normal file
13
src/ModMan/Context/FastFileContext.h
Normal 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;
|
||||
};
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user