Rename RTech decompression methods

This commit is contained in:
Amos 2021-12-27 16:58:07 +01:00
parent 69161ae6c0
commit e03d74b753
3 changed files with 6 additions and 6 deletions

View File

@ -62,7 +62,7 @@ std::uint64_t __fastcall RTech::StringToGuid(const char* pData)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: calculate 'decompressed' size and commit parameters // 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::int64_t input_byte_pos_init; // r9
std::uint64_t byte_init; // r11 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 // 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::uint64_t decompressed_position; // r15
std::uint32_t byte_bit_offset; // ebp std::uint32_t byte_bit_offset; // ebp

View File

@ -116,8 +116,8 @@ class RTech
{ {
public: public:
std::uint64_t __fastcall StringToGuid(const char* pData); 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::uint8_t __fastcall DecompressPakFile(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::uint32_t __fastcall DecompressPakFileInit(rpak_decomp_state* state, std::uint8_t* fileBuffer, std::int64_t fileSize, std::int64_t offNoHeader, std::int64_t headerSize);
}; };
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -463,7 +463,7 @@ void _RTech_Decompress_f_CompletionFunc(CCommand* cmd)
} }
rpak_decomp_state state; 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) if (dsize == rheader->m_nSizeDisk)
{ {
@ -480,7 +480,7 @@ void _RTech_Decompress_f_CompletionFunc(CCommand* cmd)
state.m_nOutMask = UINT64_MAX; state.m_nOutMask = UINT64_MAX;
state.m_nOut = uint64_t(pakbuf.data()); 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) if (decomp_result != 1)
{ {
DevMsg(eDLL_T::RTECH, "Error: decompression failed for '%s' return value: '%u'!\n", pak_name_in.c_str(), +decomp_result); DevMsg(eDLL_T::RTECH, "Error: decompression failed for '%s' return value: '%u'!\n", pak_name_in.c_str(), +decomp_result);