From 6d7943d0195e313ab5330037d974cc662effa937 Mon Sep 17 00:00:00 2001 From: GillianMC <70141395+SandeMC@users.noreply.github.com> Date: Sat, 9 Nov 2024 01:39:48 +0200 Subject: [PATCH] I'm stupid --- shaders/GTAIV.EFLC.FusionShaders | 2 +- source/frameratevigilante.ixx | 47 +++++++++++++++++--------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/shaders/GTAIV.EFLC.FusionShaders b/shaders/GTAIV.EFLC.FusionShaders index 641a1e97..9d4dd670 160000 --- a/shaders/GTAIV.EFLC.FusionShaders +++ b/shaders/GTAIV.EFLC.FusionShaders @@ -1 +1 @@ -Subproject commit 641a1e97047e8f874ca943e71e401b10989cbf04 +Subproject commit 9d4dd67054622c9bc7fea6dc5ba1f6069c85ecc7 diff --git a/source/frameratevigilante.ixx b/source/frameratevigilante.ixx index a56f71cc..8a04f70d 100644 --- a/source/frameratevigilante.ixx +++ b/source/frameratevigilante.ixx @@ -19,33 +19,36 @@ public: FramerateVigilante() { FusionFix::onInitEventAsync() += []() - { - // Handbrake Cam (test) - auto pattern = find_pattern("E8 ? ? ? ? D9 5C 24 7C F3 0F 10 4C 24", "E8 ? ? ? ? D9 5C 24 70 F3 0F 10 44 24 ? F3 0F 58 86"); - hbsub_A18510.fun = injector::MakeCALL(pattern.get_first(0), sub_A18510).get(); - - pattern = hook::pattern("F3 0F 58 05 ? ? ? ? F3 0F 2A 0D"); - if (!pattern.empty()) { - struct LoadingTextSparks + // Handbrake Cam (test) + auto pattern = find_pattern("E8 ? ? ? ? D9 5C 24 7C F3 0F 10 4C 24", "E8 ? ? ? ? D9 5C 24 70 F3 0F 10 44 24 ? F3 0F 58 86"); + hbsub_A18510.fun = injector::MakeCALL(pattern.get_first(0), sub_A18510).get(); + + pattern = hook::pattern("F3 0F 58 05 ? ? ? ? F3 0F 2A 0D"); + if (!pattern.empty()) { - void operator()(injector::reg_pack& regs) + struct LoadingTextSparks { - regs.xmm1.f32[0] += 0.085f * *CTimer::fTimeStep; - } - }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8)); - } - else - { - pattern = hook::pattern("F3 0F 58 0D ? ? ? ? 0F 5B C0 F3 0F 11 0D"); - struct LoadingTextSparks + void operator()(injector::reg_pack& regs) + { + regs.xmm1.f32[0] += 0.085f * *CTimer::fTimeStep; + } + }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8)); + } + else { - void operator()(injector::reg_pack& regs) + pattern = hook::pattern("F3 0F 58 0D ? ? ? ? 0F 5B C0 F3 0F 11 0D"); + if (!pattern.empty()) { - regs.xmm0.f32[0] += 0.085f * *CTimer::fTimeStep; + struct LoadingTextSparks + { + void operator()(injector::reg_pack& regs) + { + regs.xmm0.f32[0] += 0.085f * *CTimer::fTimeStep; + } + }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8)); } - }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8)); - } - }; + } + }; } } FramerateVigilante;