Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Deji69 committed Mar 20, 2024
1 parent fd83d01 commit 08ea96c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
8 changes: 4 additions & 4 deletions ZHMModSDK/Include/Hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ class ZHMSDK_API Hooks
static Hook<TEntityRef<ZHitman5>*(ZPlayerRegistry* th, TEntityRef<ZHitman5>* out)>* ZPlayerRegistry_GetLocalPlayer;
static Hook<void(ZDynamicPageController* th, ZDynamicObject& data, void* a3, void* a4, void* a5)>* ZDynamicPageController_Expand;
static Hook<void(ZDynamicPageController* th, ZDynamicObject& actionObj, void* menuNode)>* ZDynamicPageController_HandleActionObject2;
static Hook<EOS_PlatformHandle*(EOS_Platform_Options* Options)>* EOS_Platform_Create;
static Hook<void*(void* th, void* a2)>* ZLevelManagerStateCondition_ZLevelManagerStateCondition;
static Hook<void*(void* th, void* a1)>* ZLoadingScreenVideo_ActivateLoadingScreen;
static Hook<bool(void* th, void* a1)>* ZLoadingScreenVideo_StartNewVideo;
static Hook<EOS_PlatformHandle*(EOS_Platform_Options* Options)>* EOS_Platform_Create;
//static Hook<void(ZTemplateEntityFactory* th, ZEntityRef entity, void* a3, void* a4)>* ZTemplateEntityFactory_ConfigureEntity;
//static Hook<void(ZCppEntityFactory* th, ZEntityRef entity, void* a3, void* a4)>* ZCppEntityFactory_ConfigureEntity;
//static Hook<void(ZBehaviorTreeEntityFactory* th, ZEntityRef entity, void* a3, void* a4)>* ZBehaviorTreeEntityFactory_ConfigureEntity;
Expand All @@ -121,7 +124,4 @@ class ZHMSDK_API Hooks
//static Hook<void(ZRenderMaterialEntityFactory* th, ZEntityRef entity, void* a3)>* ZAudioSwitchBlueprintFactory_DestroyEntity;
//static Hook<void(ZRenderMaterialEntityFactory* th, ZEntityRef entity, void* a3)>* ZAudioStateBlueprintFactory_DestroyEntity;
//static Hook<void(ZRenderMaterialEntityFactory* th, ZEntityRef entity, void* a3)>* ZAspectEntityBlueprintFactory_DestroyEntity;
static Hook<void*(void* th, void* a2)>* ZLevelManagerStateCondition_ZLevelManagerStateCondition;
static Hook<void*(void* th, void* a1)>* ZLoadingScreenVideo_ActivateLoadingScreen;
static Hook<bool(void* th, void* a1)>* ZLoadingScreenVideo_StartNewVideo;
};
40 changes: 21 additions & 19 deletions ZHMModSDK/Src/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ std::unordered_set<HookBase*>* HookRegistry::g_Hooks = nullptr;
DetourTrampoline* Trampolines::g_Trampolines = nullptr;
size_t Trampolines::g_TrampolineCount = 0;

PATTERN_HOOK(
"\x40\x53\x48\x83\xEC\x00\x48\x8B\xD9\x48\x8D\x0D\x00\x00\x00\x00\xFF\x15\x00\x00\x00\x00\x48\x8B\xCB\xE8\x00\x00\x00\x00\x83\xBB\xE8\x00\x00\x00",
"xxx????xxxxxxxxxxxxx????xxxxxx????xxxxxxxxxxx????xxx????x???????xxx????xxxxxxxxxxxxx????xxxxxxxxxx????xxx????x??xxx",
ZLevelManagerStateCondition_ZLevelManagerStateCondition,
void*(void* th, void* a2)
);

PATTERN_HOOK(
"\x48\x89\x5C\x24\x08\x48\x89\x74\x24\x10\x57\x48\x83\xEC\x00\x48\x8B\xF9\x0F\xB6\xDA\x48\x8D\x0D",
"xxxxxxxxxxxxxx?xxxxxxxxx",
ZLoadingScreenVideo_ActivateLoadingScreen,
void*(void* th, void* a1));

PATTERN_HOOK(
"\x40\x53\x48\x83\xEC\x00\x48\x8B\xD9\x48\x8D\x0D\x00\x00\x00\x00\xFF\x15\x00\x00\x00\x00\x48\x8B\xCB\xE8\x00\x00\x00\x00\x83\xBB\xE8\x00\x00\x00",
"xxxxx?xxxxxx????xx????xxxx????xxxxxx",
ZLoadingScreenVideo_StartNewVideo,
bool(void* th, void* a1));

PATTERN_HOOK(
"\x48\x89\x5C\x24\x08\x57\x48\x83\xEC\x00\x48\x8B\xD9\xE8\x00\x00\x00\x00\x33\xFF\x48\x8D\x05\x00\x00\x00\x00\x48\x89\xB9\x08\x03\x00\x00",
"xxxxxxxxx?xxxx????xxxxx????xxxxxxx",
Expand Down Expand Up @@ -333,6 +314,27 @@ PATTERN_HOOK(
void(ZDynamicPageController* th, ZDynamicObject& actionObj, void* menuNode)
);

PATTERN_HOOK(
"\x40\x53\x48\x83\xEC\x00\x48\x8B\xD9\x48\x8D\x0D\x00\x00\x00\x00\xFF\x15\x00\x00\x00\x00\x48\x8B\xCB\xE8\x00\x00\x00\x00\x83\xBB\xE8\x00\x00\x00",
"xxx????xxxxxxxxxxxxx????xxxxxx????xxxxxxxxxxx????xxx????x???????xxx????xxxxxxxxxxxxx????xxxxxxxxxx????xxx????x??xxx",
ZLevelManagerStateCondition_ZLevelManagerStateCondition,
void*(void* th, void* a2)
);

PATTERN_HOOK(
"\x48\x89\x5C\x24\x08\x48\x89\x74\x24\x10\x57\x48\x83\xEC\x00\x48\x8B\xF9\x0F\xB6\xDA\x48\x8D\x0D",
"xxxxxxxxxxxxxx?xxxxxxxxx",
ZLoadingScreenVideo_ActivateLoadingScreen,
void*(void* th, void* a1)
);

PATTERN_HOOK(
"\x40\x53\x48\x83\xEC\x00\x48\x8B\xD9\x48\x8D\x0D\x00\x00\x00\x00\xFF\x15\x00\x00\x00\x00\x48\x8B\xCB\xE8\x00\x00\x00\x00\x83\xBB\xE8\x00\x00\x00",
"xxxxx?xxxxxx????xx????xxxx????xxxxxx",
ZLoadingScreenVideo_StartNewVideo,
bool(void* th, void* a1)
);

MODULE_HOOK(
"EOSSDK-Win64-Shipping.dll",
"EOS_Platform_Create",
Expand Down

0 comments on commit 08ea96c

Please sign in to comment.