From 419739c2c93b4862b23bb4dcfabba77c727c99ce Mon Sep 17 00:00:00 2001 From: Scobalula Date: Thu, 3 Nov 2022 07:51:06 +0000 Subject: [PATCH] MW2 Fixes --- src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp | 8 ++++---- src/WraithXCOD/WraithXCOD/WraithXCOD.rc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp b/src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp index e737b18..8fc72a7 100644 --- a/src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp +++ b/src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp @@ -601,9 +601,9 @@ std::unique_ptr GameModernWarfare5::ReadXSound(const CoDSound_t* Sound) { // Buffer std::unique_ptr SoundBuffer = nullptr; - // Extract buffer, these are compressed + // Extract buffer, these are compressed, pad the audio size since the size in sound asset is literal, but XPAK data is padded. uint32_t SoundMemoryResult = 0; - SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKey, (int32_t)(((uint64_t)SoundData.Size + 4095) & 0xFFFFFFFFFFFFF000), SoundMemoryResult); + SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKey, (int32_t)(((uint64_t)SoundData.Size + (size_t)SoundData.SeekTableSize + 4095) & 0xFFFFFFFFFFFFFFF0), SoundMemoryResult); if (SoundMemoryResult == 0) return nullptr; @@ -617,9 +617,9 @@ std::unique_ptr GameModernWarfare5::ReadXSound(const CoDSound_t* Sound) { // Buffer std::unique_ptr SoundBuffer = nullptr; - // Extract buffer, these are compressed + // Extract buffer, these are compressed, pad the audio size since the size in sound asset is literal, but XPAK data is padded. uint32_t SoundMemoryResult = 0; - SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKeyEx, (int32_t)(((uint64_t)SoundData.LoadedSize + 4095) & 0xFFFFFFFFFFFFF000), SoundMemoryResult); + SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKeyEx, (int32_t)(((uint64_t)SoundData.LoadedSize + (size_t)SoundData.SeekTableSize + 4095) & 0xFFFFFFFFFFFFFFF0), SoundMemoryResult); if (SoundMemoryResult == 0) return nullptr; diff --git a/src/WraithXCOD/WraithXCOD/WraithXCOD.rc b/src/WraithXCOD/WraithXCOD/WraithXCOD.rc index d1c1238..cfc59cf 100644 --- a/src/WraithXCOD/WraithXCOD/WraithXCOD.rc +++ b/src/WraithXCOD/WraithXCOD/WraithXCOD.rc @@ -348,8 +348,8 @@ IDI_CHECKMARK ICON "..\\..\\WraithX\\Resources\\Che // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,23,25,0 - PRODUCTVERSION 1,23,25,0 + FILEVERSION 1,23,27,0 + PRODUCTVERSION 1,23,27,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -366,12 +366,12 @@ BEGIN BEGIN VALUE "CompanyName", "DTZxPorter / Scobalula" VALUE "FileDescription", "Greyhound" - VALUE "FileVersion", "1.23.25.0" + VALUE "FileVersion", "1.23.27.0" VALUE "InternalName", "Greyhound" VALUE "LegalCopyright", "Copyright (C) 2022 DTZxPorter / Scobalula" VALUE "OriginalFilename", "Greyhound.exe" VALUE "ProductName", "Greyhound" - VALUE "ProductVersion", "1.23.25.0" + VALUE "ProductVersion", "1.23.27.0" END END BLOCK "VarFileInfo"