diff --git a/r5dev/rtech/rtech_utils.cpp b/r5dev/rtech/rtech_utils.cpp index 6164c356..b8ae83c9 100644 --- a/r5dev/rtech/rtech_utils.cpp +++ b/r5dev/rtech/rtech_utils.cpp @@ -62,7 +62,7 @@ std::uint64_t __fastcall RTech::StringToGuid(const char* pData) //----------------------------------------------------------------------------- // Purpose: calculate 'decompressed' size and commit parameters //----------------------------------------------------------------------------- -std::uint32_t __fastcall RTech::DecompressedSize(rpak_decomp_state* state, std::uint8_t* fileBuffer, std::int64_t fileSize, std::int64_t offNoHeader, std::int64_t headerSize) +std::uint32_t __fastcall RTech::DecompressPakFileInit(rpak_decomp_state* state, std::uint8_t* fileBuffer, std::int64_t fileSize, std::int64_t offNoHeader, std::int64_t headerSize) { std::int64_t input_byte_pos_init; // r9 std::uint64_t byte_init; // r11 @@ -156,7 +156,7 @@ std::uint32_t __fastcall RTech::DecompressedSize(rpak_decomp_state* state, std:: //----------------------------------------------------------------------------- // Purpose: decompress input data //----------------------------------------------------------------------------- -std::uint8_t __fastcall RTech::Decompress(rpak_decomp_state* state, std::uint64_t inLen, std::uint64_t outLen) +std::uint8_t __fastcall RTech::DecompressPakFile(rpak_decomp_state* state, std::uint64_t inLen, std::uint64_t outLen) { std::uint64_t decompressed_position; // r15 std::uint32_t byte_bit_offset; // ebp diff --git a/r5dev/rtech/rtech_utils.h b/r5dev/rtech/rtech_utils.h index fb3182a4..3ad4ace5 100644 --- a/r5dev/rtech/rtech_utils.h +++ b/r5dev/rtech/rtech_utils.h @@ -116,8 +116,8 @@ class RTech { public: std::uint64_t __fastcall StringToGuid(const char* pData); - std::uint8_t __fastcall Decompress(rpak_decomp_state* state, std::uint64_t inLen, std::uint64_t outLen); - std::uint32_t __fastcall DecompressedSize(rpak_decomp_state* state, std::uint8_t* fileBuffer, std::int64_t fileSize, std::int64_t offNoHeader, std::int64_t headerSize); + std::uint8_t __fastcall DecompressPakFile(rpak_decomp_state* state, std::uint64_t inLen, std::uint64_t outLen); + std::uint32_t __fastcall DecompressPakFileInit(rpak_decomp_state* state, std::uint8_t* fileBuffer, std::int64_t fileSize, std::int64_t offNoHeader, std::int64_t headerSize); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/tier0/completion.cpp b/r5dev/tier0/completion.cpp index d29a06e5..1fb70566 100644 --- a/r5dev/tier0/completion.cpp +++ b/r5dev/tier0/completion.cpp @@ -463,7 +463,7 @@ void _RTech_Decompress_f_CompletionFunc(CCommand* cmd) } rpak_decomp_state state; - std::uint32_t dsize = g_pRtech->DecompressedSize(&state, upak.data(), upak.size(), 0, PAK_HEADER_SIZE); + std::uint32_t dsize = g_pRtech->DecompressPakFileInit(&state, upak.data(), upak.size(), 0, PAK_HEADER_SIZE); if (dsize == rheader->m_nSizeDisk) { @@ -480,7 +480,7 @@ void _RTech_Decompress_f_CompletionFunc(CCommand* cmd) state.m_nOutMask = UINT64_MAX; state.m_nOut = uint64_t(pakbuf.data()); - std::uint8_t decomp_result = g_pRtech->Decompress(&state, upak.size(), pakbuf.size()); + std::uint8_t decomp_result = g_pRtech->DecompressPakFile(&state, upak.size(), pakbuf.size()); if (decomp_result != 1) { DevMsg(eDLL_T::RTECH, "Error: decompression failed for '%s' return value: '%u'!\n", pak_name_in.c_str(), +decomp_result);