mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
VpkLib: rename CPackedStore to CPackedStoreBuilder
Avoid confusion with the game's CPackedStore class.
This commit is contained in:
parent
106670d940
commit
a92847fa7a
@ -648,10 +648,10 @@ void VPK_Pack_f(const CCommand& args)
|
||||
Msg(eDLL_T::FS, "*** Starting VPK build command for: '%s'\n", pair.m_DirName.Get());
|
||||
timer.Start();
|
||||
|
||||
CPackedStore packedStore;
|
||||
CPackedStoreBuilder builder;
|
||||
|
||||
packedStore.InitLzCompParams(fs_packedstore_compression_level->GetString(), fs_packedstore_max_helper_threads->GetInt());
|
||||
packedStore.PackWorkspace(pair, fs_packedstore_workspace->GetString(), "vpk/");
|
||||
builder.InitLzCompParams(fs_packedstore_compression_level->GetString(), fs_packedstore_max_helper_threads->GetInt());
|
||||
builder.PackWorkspace(pair, fs_packedstore_workspace->GetString(), "vpk/");
|
||||
|
||||
timer.End();
|
||||
Msg(eDLL_T::FS, "*** Time elapsed: '%lf' seconds\n", timer.GetDuration().GetSeconds());
|
||||
@ -680,10 +680,10 @@ void VPK_Unpack_f(const CCommand& args)
|
||||
Msg(eDLL_T::FS, "*** Starting VPK extraction command for: '%s'\n", arg.Get());
|
||||
timer.Start();
|
||||
|
||||
CPackedStore packedStore;
|
||||
CPackedStoreBuilder builder;
|
||||
|
||||
packedStore.InitLzDecompParams();
|
||||
packedStore.UnpackWorkspace(vpk, fs_packedstore_workspace->GetString());
|
||||
builder.InitLzDecompParams();
|
||||
builder.UnpackWorkspace(vpk, fs_packedstore_workspace->GetString());
|
||||
|
||||
timer.End();
|
||||
Msg(eDLL_T::FS, "*** Time elapsed: '%lf' seconds\n", timer.GetDuration().GetSeconds());
|
||||
|
@ -85,10 +85,10 @@ static void ReVPK_Pack(const CCommand& args)
|
||||
Msg(eDLL_T::FS, "*** Starting VPK build command for: '%s'\n", pair.m_DirName.Get());
|
||||
timer.Start();
|
||||
|
||||
CPackedStore packedStore;
|
||||
CPackedStoreBuilder builder;
|
||||
|
||||
packedStore.InitLzCompParams();
|
||||
packedStore.PackWorkspace(pair, "ship/", "vpk/");
|
||||
builder.InitLzCompParams();
|
||||
builder.PackWorkspace(pair, "ship/", "vpk/");
|
||||
|
||||
timer.End();
|
||||
Msg(eDLL_T::FS, "*** Time elapsed: '%lf' seconds\n", timer.GetDuration().GetSeconds());
|
||||
@ -114,10 +114,10 @@ static void ReVPK_Unpack(const CCommand& args)
|
||||
Msg(eDLL_T::FS, "*** Starting VPK extraction command for: '%s'\n", arg.Get());
|
||||
timer.Start();
|
||||
|
||||
CPackedStore packedStore;
|
||||
CPackedStoreBuilder builder;
|
||||
|
||||
packedStore.InitLzDecompParams();
|
||||
packedStore.UnpackWorkspace(vpk, "ship/");
|
||||
builder.InitLzDecompParams();
|
||||
builder.UnpackWorkspace(vpk, "ship/");
|
||||
|
||||
timer.End();
|
||||
Msg(eDLL_T::FS, "*** Time elapsed: '%lf' seconds\n", timer.GetDuration().GetSeconds());
|
||||
|
@ -61,7 +61,7 @@ static lzham_compress_level DetermineCompressionLevel(const char* compressionLev
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: initialize parameters for compression algorithm
|
||||
//-----------------------------------------------------------------------------
|
||||
void CPackedStore::InitLzCompParams(const char* compressionLevel, const lzham_int32 maxHelperThreads)
|
||||
void CPackedStoreBuilder::InitLzCompParams(const char* compressionLevel, const lzham_int32 maxHelperThreads)
|
||||
{
|
||||
/*| PARAMETERS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
|
||||
m_lzCompParams.m_struct_size = sizeof(lzham_compress_params);
|
||||
@ -78,7 +78,7 @@ void CPackedStore::InitLzCompParams(const char* compressionLevel, const lzham_in
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: initialize parameters for decompression algorithm
|
||||
//-----------------------------------------------------------------------------
|
||||
void CPackedStore::InitLzDecompParams(void)
|
||||
void CPackedStoreBuilder::InitLzDecompParams(void)
|
||||
{
|
||||
/*| PARAMETERS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/
|
||||
m_lzDecompParams.m_struct_size = sizeof(lzham_decompress_params);
|
||||
@ -412,7 +412,7 @@ static void ValidateCRC32PostDecomp(const CUtlString& assetPath, const uint32_t
|
||||
// chunkIndex -
|
||||
// Output : true if the chunk was deduplicated, false otherwise
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CPackedStore::Deduplicate(const uint8_t* pEntryBuffer, VPKChunkDescriptor_t& descriptor, const size_t chunkIndex)
|
||||
bool CPackedStoreBuilder::Deduplicate(const uint8_t* pEntryBuffer, VPKChunkDescriptor_t& descriptor, const size_t chunkIndex)
|
||||
{
|
||||
string entryHash(reinterpret_cast<const char*>(pEntryBuffer), descriptor.m_nUncompressedSize);
|
||||
entryHash = sha1(entryHash);
|
||||
@ -436,7 +436,7 @@ bool CPackedStore::Deduplicate(const uint8_t* pEntryBuffer, VPKChunkDescriptor_t
|
||||
// *workspaceName -
|
||||
// *buildPath -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CPackedStore::PackWorkspace(const VPKPair_t& vpkPair, const char* workspaceName, const char* buildPath)
|
||||
void CPackedStoreBuilder::PackWorkspace(const VPKPair_t& vpkPair, const char* workspaceName, const char* buildPath)
|
||||
{
|
||||
CUtlString workspacePath(workspaceName);
|
||||
workspacePath.AppendSlash();
|
||||
@ -569,7 +569,7 @@ void CPackedStore::PackWorkspace(const VPKPair_t& vpkPair, const char* workspace
|
||||
// Input : &vpkDirectory -
|
||||
// &workspaceName -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CPackedStore::UnpackWorkspace(const VPKDir_t& vpkDir, const char* workspaceName)
|
||||
void CPackedStoreBuilder::UnpackWorkspace(const VPKDir_t& vpkDir, const char* workspaceName)
|
||||
{
|
||||
CUtlString workspacePath(workspaceName);
|
||||
|
||||
|
@ -193,7 +193,7 @@ struct VPKPair_t
|
||||
//-----------------------------------------------------------------------------
|
||||
// VPK utility class.
|
||||
//-----------------------------------------------------------------------------
|
||||
class CPackedStore
|
||||
class CPackedStoreBuilder
|
||||
{
|
||||
public:
|
||||
void InitLzCompParams(const char* compressionLevel = "default", const lzham_int32 maxHelperThreads = -1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user