From 933e12accff994a38294eadc3690b1ea256e218c Mon Sep 17 00:00:00 2001 From: somewhatlurker <52014015+somewhatlurker@users.noreply.github.com> Date: Sat, 22 Feb 2020 20:02:59 +1100 Subject: [PATCH] pause: add patch for ageage again hair --- source-code/source/plugins/TLAC/Components/Pause.cpp | 7 +++++++ source-code/source/plugins/TLAC/Components/Pause.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/source-code/source/plugins/TLAC/Components/Pause.cpp b/source-code/source/plugins/TLAC/Components/Pause.cpp index 6b6fef9..980bd1e 100644 --- a/source-code/source/plugins/TLAC/Components/Pause.cpp +++ b/source-code/source/plugins/TLAC/Components/Pause.cpp @@ -34,6 +34,8 @@ namespace TLAC::Components uint8_t* Pause::aetMovPatchAddress = (uint8_t*)0x1401703b3; std::vector Pause::origFramespeedOp; uint8_t* Pause::framespeedPatchAddress = (uint8_t*)0x140192D50; + std::vector Pause::origAgeageHairOp; + uint8_t* Pause::ageageHairPatchAddress = (uint8_t*)0x14054352c; std::vector Pause::streamPlayStates; bool(*divaGiveUpFunc)(void*) = (bool(*)(void* cls))GIVEUP_FUNC_ADDRESS; PlayerData* Pause::playerData; @@ -83,6 +85,9 @@ namespace TLAC::Components origFramespeedOp.resize(4); memcpy(origFramespeedOp.data(), framespeedPatchAddress, 4); + + origAgeageHairOp.resize(3); + memcpy(origAgeageHairOp.data(), ageageHairPatchAddress, 3); } void Pause::Initialize(ComponentsManager* manager) @@ -122,6 +127,7 @@ namespace TLAC::Components saveOldPatchOps(); InjectCode(aetMovPatchAddress, { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); InjectCode(framespeedPatchAddress, { 0x0f, 0x57, 0xc0, 0xc3 }); // XORPS XMM0,XMM0; RET + InjectCode(ageageHairPatchAddress, { 0x0f, 0x57, 0xdb }); // XORPS XMM3,XMM3 uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70); uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18); @@ -250,6 +256,7 @@ namespace TLAC::Components InjectCode(aetMovPatchAddress, origAetMovOp); InjectCode(framespeedPatchAddress, origFramespeedOp); + InjectCode(ageageHairPatchAddress, origAgeageHairOp); uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70); uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18); diff --git a/source-code/source/plugins/TLAC/Components/Pause.h b/source-code/source/plugins/TLAC/Components/Pause.h index 03f654c..42c15d6 100644 --- a/source-code/source/plugins/TLAC/Components/Pause.h +++ b/source-code/source/plugins/TLAC/Components/Pause.h @@ -46,6 +46,9 @@ namespace TLAC::Components static std::vector origFramespeedOp; static uint8_t* framespeedPatchAddress; + static std::vector origAgeageHairOp; + static uint8_t* ageageHairPatchAddress; + static bool hookedGiveUpFunc(void* cls); static void setSEVolume(int amount);