From 46bed8d09f32360377350d71816a76abdfbf2c7c Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed, 24 Aug 2022 00:32:31 +0100 Subject: Adjust folder structure (#242) * Adjust folder structure * change launcher directory name --- NorthstarDLL/rpakfilesystem.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 NorthstarDLL/rpakfilesystem.h (limited to 'NorthstarDLL/rpakfilesystem.h') diff --git a/NorthstarDLL/rpakfilesystem.h b/NorthstarDLL/rpakfilesystem.h new file mode 100644 index 00000000..12ef983e --- /dev/null +++ b/NorthstarDLL/rpakfilesystem.h @@ -0,0 +1,24 @@ +#pragma once + +void InitialiseEngineRpakFilesystem(HMODULE baseAddress); + +class PakLoadManager +{ + public: + void LoadPakSync(const char* path); + void LoadPakAsync(const char* path, bool bMarkForUnload); + void UnloadPaks(); + + bool IsPakLoaded(int32_t pakHandle); + bool IsPakLoaded(size_t hash); + void AddLoadedPak(int32_t pakHandle, size_t hash); + void RemoveLoadedPak(int32_t pakHandle); + + private: + std::vector m_pakHandlesToUnload; + // these size_t s are the asset path hashed with STR_HASH + std::unordered_map loadedPaks {}; + std::unordered_map loadedPaksInv {}; +}; + +extern PakLoadManager* g_PakLoadManager; \ No newline at end of file -- cgit v1.2.3