Skip to content

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jun 12, 2024
1 parent 2fcaa99 commit dfaf796
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions source/fixes.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ public:

// Disable Z-write for emmissive shaders. Fixes visual bugs e.g. strobe lights in Bahama Mamas (TBoGT) and more.
{
static uint32_t* dwEFB1B8 = *hook::pattern("8B 0D ? ? ? ? 8B 11 FF 52 28 50 8B CE E8 ? ? ? ? 8B F8 EB 02 33 FF 8B 07 8B CF FF 50 08").get_first<uint32_t*>(2);
auto pattern = hook::pattern("83 FF 05 74 05 83 FF 04 75 26 6A 00 6A 0C E8 ? ? ? ? 83 C4 08 85 C0 74 0B 6A 01 8B C8 E8");
static uintptr_t loc_6E39F3 = (uintptr_t)hook::pattern("8B 45 0C 8B 4C 24 18 33 F6 33 D2 89 74 24 1C 66 3B 54 C1").get_first(0);
static uint32_t* dwEFB1B8 = *hook::pattern("6A 01 6A 10 89 3D").get_first<uint32_t*>(6);
auto pattern = find_pattern("83 FF 05 74 05 83 FF 04 75 26 6A 00 6A 0C E8 ? ? ? ? 83 C4 08 85 C0 74 0B 6A 01 8B C8 E8", "83 FF 05 74 05");
static uintptr_t loc_6E39F3 = (uintptr_t)find_pattern("8B 45 0C 8B 4C 24 18 33 F6 33 D2 89 74 24 1C 66 3B 54 C1", "8B 4D 0C 66 83 7C CE").get_first(0);
struct EmissiveDepthWriteHook
{
void operator()(injector::reg_pack& regs)
Expand All @@ -468,14 +468,15 @@ public:
}
}; injector::MakeInline<EmissiveDepthWriteHook>(pattern.get_first(0), pattern.get_first(10));

pattern = hook::pattern("6A 01 8B C8 E8 ? ? ? ? EB 02 33 C0 50 E8 ? ? ? ? 83 C4 04 8B 45 0C 8B 4C 24 18");
pattern = find_pattern("6A 01 8B C8 E8 ? ? ? ? EB 02 33 C0 50 E8 ? ? ? ? 83 C4 04 8B 45 0C 8B 4C 24 18", "6A 01 8B C8 E8 ? ? ? ? EB 02 33 C0 8B C8 E8 ? ? ? ? 8B 4D 0C");
injector::WriteMemory<uint8_t>(pattern.get_first(1), 0, true);
}

// Water Foam Height Weirdness
{
auto pattern = hook::pattern("F3 0F 58 0D ? ? ? ? 83 EC 08 F3 0F 59 05");
injector::MakeNOP(pattern.get_first(0), 8, true);
if (!pattern.empty())
injector::MakeNOP(pattern.get_first(0), 8, true);
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion source/windowed.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public:
bSkipWindowedCallback1 = false;
});

pattern = find_pattern("C6 05 ? ? ? ? ? FF 75 14", "C6 05 ? ? ? ? ? 8B 54 24 1C");
pattern = find_pattern("C6 05 ? ? ? ? ? FF 75 14", "C6 05 ? ? ? ? ? 8B 54 24 1C", "C6 05 ? ? ? ? ? FF 15 ? ? ? ? 5F");
static auto AltEnterHandlerHook = safetyhook::create_mid(pattern.get_first(),
[](SafetyHookContext& ctx)
{
Expand Down

0 comments on commit dfaf796

Please sign in to comment.