Skip to content

Commit

Permalink
tweak(extra-natives-five): correct indentation on preprocessor direct…
Browse files Browse the repository at this point in the history
…ives
  • Loading branch information
d22tny committed Nov 20, 2024
1 parent e5a2d4f commit 1c7ac13
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions code/components/extra-natives-five/src/VisualSettingsNatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,18 @@ static InitFunction initFunction([]()

static HookFunction hookFunction([]()
{
#ifdef GTA_FIVE
g_visualSettings = hook::get_address<VisualSettingsData*>(hook::get_pattern("48 83 25 ? ? ? ? 00 48 8D ? ? ? ? ? E8 ? ? ? ? E8", 11));
#elif IS_RDR3
g_visualSettings = hook::get_address<VisualSettingsData*>(hook::get_pattern("48 89 2D ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 48 8D 0D", -11));
#endif
#ifdef GTA_FIVE
g_visualSettings = hook::get_address<VisualSettingsData*>(hook::get_pattern("48 83 25 ? ? ? ? 00 48 8D ? ? ? ? ? E8 ? ? ? ? E8", 11));
#elif IS_RDR3
g_visualSettings = hook::get_address<VisualSettingsData*>(hook::get_pattern("48 89 2D ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 48 8D 0D", -11));
#endif

{
#ifdef GTA_FIVE
auto location = (char*)hook::get_call(hook::get_pattern("48 83 25 ? ? ? ? 00 48 8D ? ? ? ? ? E8 ? ? ? ? E8", 15));
#elif IS_RDR3
auto location = (char*)hook::get_call(hook::get_pattern("48 89 2D ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 48 8D 0D", 7));
#endif
#ifdef GTA_FIVE
auto location = (char*)hook::get_call(hook::get_pattern("48 83 25 ? ? ? ? 00 48 8D ? ? ? ? ? E8 ? ? ? ? E8", 15));
#elif IS_RDR3
auto location = (char*)hook::get_call(hook::get_pattern("48 89 2D ? ? ? ? E8 ? ? ? ? E8 ? ? ? ? 48 8D 0D", 7));
#endif

hook::set_call(&g_origLoadVisualSettingsDat, location + 0x12);
hook::call(location + 0x12, LoadVisualSettingsDatStub);
Expand Down

0 comments on commit 1c7ac13

Please sign in to comment.