Skip to content

Commit

Permalink
corona fix (#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasak authored Oct 28, 2024
1 parent d733f17 commit aaf9bd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions source/GTA3.WidescreenFix/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ void RsSelectDeviceHook()

void FixCoronas()
{
auto pattern = hook::pattern("D8 0E D9 1E D9 05 ? ? ? ? D8 35 ? ? ? ? D8 0B D9 1B"); //0x51C46A
injector::WriteMemory<uint8_t>(pattern.count(1).get(0).get<uint32_t>(1), 0x0B, true);

if (bNoLightSquare)
{
auto pattern = hook::pattern("D8 0E D9 1E D9 05 ? ? ? ? D8 35 ? ? ? ? D8 0B D9 1B"); //0x51C46A
injector::WriteMemory<uint8_t>(pattern.count(1).get(0).get<uint32_t>(1), 0x0B, true);

auto pfCAutoPreRender = (uint32_t)hook::pattern("81 EC F8 06 00 00 0F BF 45 5C 3D 83 00 00 00").count(1).get(0).get<uint32_t>(0);
auto pfCBrightLightsRegisterOne = (uint32_t)hook::pattern("D9 EE D9 EE 83 EC 20 8B 44 24").count(1).get(0).get<uint32_t>(0);
pattern = hook::range_pattern(pfCAutoPreRender, pfCAutoPreRender + 0x4309, "E8 ? ? ? ?");
Expand Down
6 changes: 3 additions & 3 deletions source/GTAVC.WidescreenFix/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ void RsSelectDeviceHook()

void FixCoronas()
{
auto pattern = hook::pattern("D8 0E D9 1E D9 05 ? ? ? ? D8 35 ? ? ? ? D8 0B D9 1B"); //0x57797A
injector::WriteMemory<uint8_t>(pattern.count(1).get(0).get<uint32_t>(1), 0x0B, true);

if (bNoLightSquare)
{
auto pattern = hook::pattern("D8 0E D9 1E D9 05 ? ? ? ? D8 35 ? ? ? ? D8 0B D9 1B"); //0x57797A
injector::WriteMemory<uint8_t>(pattern.count(1).get(0).get<uint32_t>(1), 0x0B, true);

auto pfCAutoPreRender = (uint32_t)hook::pattern("FF 35 ? ? ? ? 50 8D 84 24 24 05 00").count(1).get(0).get<uint32_t>(0);
auto pfCBikePreRender = (uint32_t)hook::pattern("D9 83 FC 03 00 00 D8 1D ? ? ? ? DF E0 F6 C4 45").count(1).get(0).get<uint32_t>(0);
auto pfCBrightLightsRegisterOne = (uint32_t)hook::pattern("D9 EE D9 EE 83 EC 20 8B 44 24").count(1).get(0).get<uint32_t>(0);
Expand Down

0 comments on commit aaf9bd0

Please sign in to comment.