diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-08-24 00:32:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 00:32:31 +0100 |
commit | f9bc3c9d1834cb8bd5f872b749b057c33e8b0102 (patch) | |
tree | e96e2da0d95798dd42eddf644a82a74555db858f /NorthstarDLL/rpakfilesystem.h | |
parent | 812893d8219daa60f5b5b7fd22cbd6b175603399 (diff) | |
download | NorthstarLauncher-f9bc3c9d1834cb8bd5f872b749b057c33e8b0102.tar.gz NorthstarLauncher-f9bc3c9d1834cb8bd5f872b749b057c33e8b0102.zip |
Adjust folder structure (#242)
* Adjust folder structure
* change launcher directory name
Diffstat (limited to 'NorthstarDLL/rpakfilesystem.h')
-rw-r--r-- | NorthstarDLL/rpakfilesystem.h | 24 |
1 files changed, 24 insertions, 0 deletions
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<int> m_pakHandlesToUnload; + // these size_t s are the asset path hashed with STR_HASH + std::unordered_map<int32_t, size_t> loadedPaks {}; + std::unordered_map<size_t, int32_t> loadedPaksInv {}; +}; + +extern PakLoadManager* g_PakLoadManager;
\ No newline at end of file |