Skip to content

Commit

Permalink
Make sure iHasPassedIntro is set.
Browse files Browse the repository at this point in the history
I should really stop making commits in the middle of the night.
  • Loading branch information
Lyall committed Feb 23, 2024
1 parent 2168c38 commit 0e017ed
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,21 @@ void IntroSkip()
{
Memory::PatchBytes((uintptr_t)OpeningMovieScanResult + 0xD, "\x1A", 1);
}
else
{
static SafetyHookMid IntroSkipMidHook{};
IntroSkipMidHook = safetyhook::create_mid(IntroSkipScanResult + 0x2,
[](SafetyHookContext& ctx)

static SafetyHookMid IntroSkipMidHook{};
IntroSkipMidHook = safetyhook::create_mid(IntroSkipScanResult + 0x2,
[](SafetyHookContext& ctx)
{
if (iSkipLogos != 4)
{
// Clear last byte
ctx.rax &= ~(0xFF);
// Set last byte
ctx.rax |= (BYTE)iSkipLogos;
iHasPassedIntro = 1;
});
}
}
iHasPassedIntro = 1;
});


spdlog::info("Intro Skip: Skipped intro to title state {}.", iSkipLogos);
}
Expand Down

0 comments on commit 0e017ed

Please sign in to comment.