Advertisement
Jayss8

No Fade Stages v171.3

Apr 11th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. /* Credits to Benny */
  2.  
  3. void CHacks::NoFadeStages(bool fEnable)
  4. {
  5.     typedef void(__fastcall* CStage__FadeOut_t)(void* lpvEcx, void* lpvEdx, int bUnknown);
  6.     static CStage__FadeOut_t CStage__FadeOut = reinterpret_cast<CStage__FadeOut_t>(0x00DD1610); // 33 C9 6A 00 E8 ? ? ? ? 8B 35
  7.  
  8.     typedef int(__fastcall* CStage__FadeIn_t)(void* lpvEcx, void* lpvEdx, int bUnknown);
  9.     static CStage__FadeIn_t CStage__FadeIn = reinterpret_cast<CStage__FadeIn_t>(0x000DD1050); // 33 C9 6A 00 E8 ? ? ? ? 8B 44
  10.  
  11.     auto CStage__FadeOut__Hook = [](void* lpvEcx, void* lpvEdx, int bUnknown) -> void
  12.     {
  13.         return;
  14.     };
  15.  
  16.     auto CStage__FadeIn__Hook = [](void* lpvEcx, void* lpvEdx, int bUnknown) -> int
  17.     {
  18.         return 0;
  19.     };
  20.  
  21.     CStage__FadeOut_t FadeOutHook = CStage__FadeOut__Hook;
  22.     CStage__FadeIn_t FadeInHook = CStage__FadeIn__Hook;
  23.  
  24.     CDetour::DetourFunction(fEnable, reinterpret_cast<void**>(&CStage__FadeOut), FadeOutHook);
  25.     CDetour::DetourFunction(fEnable, reinterpret_cast<void**>(&CStage__FadeIn), FadeInHook);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement