Skip to content

Commit

Permalink
I'm stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
SandeMC committed Nov 8, 2024
1 parent ad7f22b commit 6d7943d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion shaders/GTAIV.EFLC.FusionShaders
47 changes: 25 additions & 22 deletions source/frameratevigilante.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -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<LoadingTextSparks>(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<LoadingTextSparks>(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<LoadingTextSparks>(pattern.get_first(0), pattern.get_first(8));
}
}; injector::MakeInline<LoadingTextSparks>(pattern.get_first(0), pattern.get_first(8));
}
};
}
};
}
} FramerateVigilante;

0 comments on commit 6d7943d

Please sign in to comment.