From a3f8e222e9be9a4163f964bdf6bf59c5c94c5332 Mon Sep 17 00:00:00 2001 From: Jenny White Date: Sat, 28 Apr 2018 22:53:37 +0300 Subject: [PATCH 01/16] clang-format --- include/projlogging.hpp | 1 - include/sdk/ScreenSpaceEffects.h | 1 - src/chatlog.cpp | 1 + src/copypasted/CSignature.cpp | 4 +++- src/hack.cpp | 7 ++++--- src/hacks/ESP.cpp | 4 ++-- src/hacks/SkinChanger.cpp | 2 +- src/hacks/Walkbot.cpp | 3 ++- src/hooks.cpp | 5 +++-- src/hooks/others.cpp | 4 ++-- src/velocity.cpp | 17 +++++++++-------- src/visual/drawmgr.cpp | 12 ++++++------ 12 files changed, 33 insertions(+), 28 deletions(-) mode change 100755 => 100644 include/projlogging.hpp mode change 100755 => 100644 include/sdk/ScreenSpaceEffects.h mode change 100755 => 100644 src/chatlog.cpp mode change 100755 => 100644 src/copypasted/CSignature.cpp mode change 100755 => 100644 src/hacks/SkinChanger.cpp mode change 100755 => 100644 src/hooks.cpp mode change 100755 => 100644 src/velocity.cpp diff --git a/include/projlogging.hpp b/include/projlogging.hpp old mode 100755 new mode 100644 index e7ab9b17..bef24f2e --- a/include/projlogging.hpp +++ b/include/projlogging.hpp @@ -5,7 +5,6 @@ * Author: nullifiedcat */ - #pragma once namespace projectile_logging diff --git a/include/sdk/ScreenSpaceEffects.h b/include/sdk/ScreenSpaceEffects.h old mode 100755 new mode 100644 index 8818d482..58cae8a5 --- a/include/sdk/ScreenSpaceEffects.h +++ b/include/sdk/ScreenSpaceEffects.h @@ -87,4 +87,3 @@ extern CScreenSpaceEffectRegistration **g_ppScreenSpaceRegistrationHead; CEffect pEffectName##_effect; \ CScreenSpaceEffectRegistration pEffectName##_reg(#pEffectName, \ &pEffectName##_effect); - diff --git a/src/chatlog.cpp b/src/chatlog.cpp old mode 100755 new mode 100644 index 6fa8e67c..0f225c69 --- a/src/chatlog.cpp +++ b/src/chatlog.cpp @@ -27,6 +27,7 @@ public: { }; static end_t end; + public: csv_stream() { diff --git a/src/copypasted/CSignature.cpp b/src/copypasted/CSignature.cpp old mode 100755 new mode 100644 index fc077bf2..d92b45a3 --- a/src/copypasted/CSignature.cpp +++ b/src/copypasted/CSignature.cpp @@ -79,7 +79,9 @@ uintptr_t CSignature::dwFindPattern(uintptr_t dwAddress, uintptr_t dwLength, } } - logging::Info("THIS IS SERIOUS: Could not locate signature: \n============\n\"%s\"\n============", szPattern); + logging::Info("THIS IS SERIOUS: Could not locate signature: " + "\n============\n\"%s\"\n============", + szPattern); return NULL; } diff --git a/src/hack.cpp b/src/hack.cpp index ddbcdf2a..6b3781ee 100644 --- a/src/hack.cpp +++ b/src/hack.cpp @@ -79,7 +79,7 @@ std::stack &hack::command_stack() return stack; } -#if ENABLE_VISUALS /* Why would we need colored chat stuff in textmode? \ +#if ENABLE_VISUALS /* Why would we need colored chat stuff in textmode? \ */ #define red 184, 56, 59, 255 #define blu 88, 133, 162, 255 @@ -245,8 +245,9 @@ free(logname);*/ if (not exists) { Error(("Missing essential file: " + s + - "/%s\nYou MUST run install-data script to finish " - "installation").c_str(), + "/%s\nYou MUST run install-data script to finish " + "installation") + .c_str(), s.c_str()); } } diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp index 43e9f65b..c7423100 100644 --- a/src/hacks/ESP.cpp +++ b/src/hacks/ESP.cpp @@ -402,8 +402,8 @@ void _FASTCALL emoji(CachedEntity *ent) } glez_rgba_t white = glez_rgba(255, 255, 255, 255); while (!textur || textur == 4294967295) - textur = glez_texture_load_png_rgba(DATA_PATH - "/textures/atlas.png"); + textur = glez_texture_load_png_rgba( + DATA_PATH "/textures/atlas.png"); player_info_s info; unsigned int steamID; unsigned int steamidarray[32]{}; diff --git a/src/hacks/SkinChanger.cpp b/src/hacks/SkinChanger.cpp old mode 100755 new mode 100644 index eae1044e..6facc80d --- a/src/hacks/SkinChanger.cpp +++ b/src/hacks/SkinChanger.cpp @@ -398,7 +398,7 @@ void def_attribute_modifier::Set(int id, float value) logging::Info("Woah there, that's too many! Remove some."); return; } - modifiers.push_back(attribute_s{ (uint16_t)id, value }); + modifiers.push_back(attribute_s{ (uint16_t) id, value }); logging::Info("Added new attribute: %i %.2f (%i)", id, value, modifiers.size()); } diff --git a/src/hacks/Walkbot.cpp b/src/hacks/Walkbot.cpp index cdd255fc..ec587150 100644 --- a/src/hacks/Walkbot.cpp +++ b/src/hacks/Walkbot.cpp @@ -1194,7 +1194,8 @@ void Move() prevlvlname = g_IEngine->GetLevelName(); std::string prvlvlname = format(prevlvlname); logging::Info("%s %s", prevlvlname, prvlvlname.c_str()); - if (boost::contains(prvlvlname, "pl_") || boost::contains(prvlvlname, "cp_")) + if (boost::contains(prvlvlname, "pl_") || + boost::contains(prvlvlname, "cp_")) { logging::Info("1"); bool ret = false; diff --git a/src/hooks.cpp b/src/hooks.cpp old mode 100755 new mode 100644 index dfca7408..82611217 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -79,8 +79,9 @@ void *VMTHook::GetMethod(uint32_t idx) const void VMTHook::HookMethod(ptr_t func, uint32_t idx) { - logging::Info("Hooking method %d of vtable 0x%08x, replacing 0x%08x with 0x%08x", idx, - vtable_original, GetMethod(idx), func); + logging::Info( + "Hooking method %d of vtable 0x%08x, replacing 0x%08x with 0x%08x", idx, + vtable_original, GetMethod(idx), func); vtable_hooked[2 + idx] = func; } diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp index 0e11dee4..a5db9e5c 100644 --- a/src/hooks/others.cpp +++ b/src/hooks/others.cpp @@ -1045,8 +1045,8 @@ void LevelInit_hook(void *_this, const char *newmap) hacks::shared::lagexploit::bcalled = false; #if ENABLE_VISUALS typedef bool *(*LoadNamedSkys_Fn)(const char *); - uintptr_t addr = - gSignatures.GetEngineSignature("55 89 E5 57 31 FF 56 8D B5 ? ? ? ? 53 81 EC 6C 01 00 00"); + uintptr_t addr = gSignatures.GetEngineSignature( + "55 89 E5 57 31 FF 56 8D B5 ? ? ? ? 53 81 EC 6C 01 00 00"); static LoadNamedSkys_Fn LoadNamedSkys = LoadNamedSkys_Fn(addr); bool succ; logging::Info("Going to load the skybox"); diff --git a/src/velocity.cpp b/src/velocity.cpp old mode 100755 new mode 100644 index 4e3b5a11..23f4bd08 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -14,14 +14,15 @@ namespace velocity EstimateAbsVelocity_t EstimateAbsVelocity{}; -void Init() { +void Init() +{ EstimateAbsVelocity = - (void (*)(IClientEntity *, Vector &)) gSignatures.GetClientSignature( - "55 89 E5 56 53 83 EC 20 8B 5D 08 8B 75 0C E8 ? ? ? ? 39 D8 74 79 " - "0F B6 05 ? ? ? ? 81 C3 B8 02 00 00 C6 05 ? ? ? ? 01 F3 0F 10 05 ? " - "? ? ? F3 0F 11 45 F0 88 45 EC A1 ? ? ? ? 89 45 E8 8D 45 E8 A3 ? ? " - "? ? A1 ? ? ? ? F3 0F 10 40 0C 89 74 24 04 89 1C 24 F3 0F 11 44 24 " - "08 E8 ? ? ? ? 0F B6 45 EC F3 0F 10 45 F0 F3 0F 11 05 ? ? ? ? A2 ? " - "? ? ? 8B 45 E8 A3 ? ? ? ? 83 C4 20 5B 5E 5D C3"); + (void (*)(IClientEntity *, Vector &)) gSignatures.GetClientSignature( + "55 89 E5 56 53 83 EC 20 8B 5D 08 8B 75 0C E8 ? ? ? ? 39 D8 74 79 " + "0F B6 05 ? ? ? ? 81 C3 B8 02 00 00 C6 05 ? ? ? ? 01 F3 0F 10 05 ? " + "? ? ? F3 0F 11 45 F0 88 45 EC A1 ? ? ? ? 89 45 E8 8D 45 E8 A3 ? ? " + "? ? A1 ? ? ? ? F3 0F 10 40 0C 89 74 24 04 89 1C 24 F3 0F 11 44 24 " + "08 E8 ? ? ? ? 0F B6 45 EC F3 0F 10 45 F0 F3 0F 11 05 ? ? ? ? A2 ? " + "? ? ? 8B 45 E8 A3 ? ? ? ? 83 C4 20 5B 5E 5D C3"); } } diff --git a/src/visual/drawmgr.cpp b/src/visual/drawmgr.cpp index 96340e1c..0bdaeb2b 100644 --- a/src/visual/drawmgr.cpp +++ b/src/visual/drawmgr.cpp @@ -27,9 +27,9 @@ void render_cheat_visuals() void BeginCheatVisuals() { -/*#if RENDERING_ENGINE_OPENGL - std::lock_guard draw_lock(drawing_mutex); -#endif*/ + /*#if RENDERING_ENGINE_OPENGL + std::lock_guard draw_lock(drawing_mutex); + #endif*/ draw_api::draw_begin(); ResetStrings(); } @@ -45,9 +45,9 @@ CatVar enable_logo(CV_SWITCH, "nullcore_mode_logo", "1", void DrawCheatVisuals() { -/*#if RENDERING_ENGINE_OPENGL - std::lock_guard draw_lock(drawing_mutex); -#endif*/ + /*#if RENDERING_ENGINE_OPENGL + std::lock_guard draw_lock(drawing_mutex); + #endif*/ { PROF_SECTION(DRAW_misc); hacks::shared::misc::DrawText(); From ca11b4355b33a3eb66997e23b83434a9753ccc14 Mon Sep 17 00:00:00 2001 From: Jenny White Date: Sat, 28 Apr 2018 23:35:42 +0300 Subject: [PATCH 02/16] WIP hooks refactor --- include/common.hpp | 2 +- include/hooks/CMakeLists.txt | 9 +- include/hooks/CreateMove.hpp | 13 --- include/hooks/HookedMethods.hpp | 151 ++++++++++++++++++++++++++++++++ include/hooks/PaintTraverse.hpp | 15 ---- include/hooks/hookedmethods.hpp | 73 --------------- include/hooks/others.hpp | 63 ------------- src/hooks/sdl.cpp | 2 +- 8 files changed, 154 insertions(+), 174 deletions(-) delete mode 100755 include/hooks/CreateMove.hpp create mode 100644 include/hooks/HookedMethods.hpp delete mode 100755 include/hooks/PaintTraverse.hpp delete mode 100644 include/hooks/hookedmethods.hpp delete mode 100755 include/hooks/others.hpp diff --git a/include/common.hpp b/include/common.hpp index 0df4b0f6..d76b439c 100755 --- a/include/common.hpp +++ b/include/common.hpp @@ -94,7 +94,7 @@ #include "textfile.hpp" #include "ipc.hpp" #include "tfmm.hpp" -#include "hooks/hookedmethods.hpp" +#include "hooks/HookedMethods.hpp" #include "classinfo/classinfo.hpp" #include "votelogger.hpp" #include "crits.hpp" diff --git a/include/hooks/CMakeLists.txt b/include/hooks/CMakeLists.txt index cb48678f..2151284f 100644 --- a/include/hooks/CMakeLists.txt +++ b/include/hooks/CMakeLists.txt @@ -1,11 +1,4 @@ target_sources(cathook PRIVATE - "${CMAKE_CURRENT_LIST_DIR}/CreateMove.hpp" - "${CMAKE_CURRENT_LIST_DIR}/hookedmethods.hpp" - "${CMAKE_CURRENT_LIST_DIR}/others.hpp") - -if(EnableVisuals) - target_sources(cathook PRIVATE - "${CMAKE_CURRENT_LIST_DIR}/PaintTraverse.hpp") -endif() + "${CMAKE_CURRENT_LIST_DIR}/HookedMethods.hpp") target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}") \ No newline at end of file diff --git a/include/hooks/CreateMove.hpp b/include/hooks/CreateMove.hpp deleted file mode 100755 index b5a13f77..00000000 --- a/include/hooks/CreateMove.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/* - * CreateMove.h - * - * Created on: Jan 8, 2017 - * Author: nullifiedcat - */ - -#pragma once - -class CUserCmd; - -extern bool *bSendPackets; -bool CreateMove_hook(void *, float, CUserCmd *); diff --git a/include/hooks/HookedMethods.hpp b/include/hooks/HookedMethods.hpp new file mode 100644 index 00000000..2e3193e9 --- /dev/null +++ b/include/hooks/HookedMethods.hpp @@ -0,0 +1,151 @@ + +/* + Created by Jenny White on 28.04.18. + Copyright (c) 2018 nullworks. All rights reserved. +*/ + + +#pragma once + +#include "common.hpp" + +extern bool *bSendPackets; +extern CatVar no_zoom; +extern CatVar clean_screenshots; +extern CatVar disable_visuals; +extern CatVar disconnect_reason; +#if ENABLE_VISUALS +extern int spectator_target; +#endif + +#if ENABLE_VISUALS +union SDL_Event; +#endif + +namespace types +{ +// ClientMode +using CreateMove = bool(*)(void *, float, CUserCmd *); +using LevelInit = void(*)(void *, const char *); +using LevelShutdown = void(*)(void *); +// ClientMode + 4 +using FireGameEvent = void(*)(void *_this, IGameEvent *event); +// IBaseClient +using DispatchUserMessage = bool(*)(void *, int, bf_read &); +// IInput +using GetUserCmd = CUserCmd *(*)(IInput *, int); + +using CanPacket = bool(*)(void *); +using IN_KeyEvent = int(*)(void *, int, int, const char *); +using SendNetMsg = bool(*)(void *, INetMessage &, bool, bool); +using Shutdown = void(*)(void *, const char *); +using BeginFrame = void(*)(IStudioRender *); +using CanInspect = bool(*)(IClientEntity *); +using GetClientName = const char *(*)(CBaseClientState *); +using ProcessSetConVar = bool(*)(CBaseClientState *, NET_SetConVar *); +using ProcessGetCvarValue = bool(*)(CBaseClientState *, SVC_GetCvarValue *); +// ISteamFriends +using GetFriendPersonaName = const char *(*)(ISteamFriends *, CSteamID); + +#if ENABLE_VISUALS +// ClientMode +using OverrideView = void(*)(void *, CViewSetup *); +// IEngineVGui +using Paint = void(*)(IEngineVGui *, PaintMode_t); +//IVModelRender +using DrawModelExecute = void(*)(IVModelRender *, const DrawModelState_t &, + const ModelRenderInfo_t &, matrix3x4_t *); +// IBaseClient +using FrameStageNotify = void(*)(void *, int); + +using PaintTraverse = void(*)(void *, unsigned int, bool, bool); +// SDL +using SDL_GL_SwapWindow = void(*)(SDL_Window *window); +using SDL_PollEvent = int(*)(SDL_Event *event); +// Manual +using RandomInt = int(*)(void *, int, int); +#endif +} + +namespace methods +{ +bool CreateMove(void *, float, CUserCmd *); +void PaintTraverse(void *, unsigned int, bool, bool); +const char *GetClientName(CBaseClientState *_this); +bool ProcessSetConVar(CBaseClientState *_this, NET_SetConVar *msg); +bool ProcessGetCvarValue(CBaseClientState *_this, SVC_GetCvarValue *msg); +const char *GetFriendPersonaName(ISteamFriends *_this, CSteamID steamID); +void FireGameEvent(void *_this, IGameEvent *event); +CUserCmd *GetUserCmd(IInput *, int); +void DrawModelExecute(IVModelRender *_this, const DrawModelState_t &state, + const ModelRenderInfo_t &info, matrix3x4_t *matrix); +bool CanPacket(void *); +int IN_KeyEvent(void *, int, int, const char *); +bool SendNetMsg(void *, INetMessage &, bool, bool); +void Shutdown(void *, const char *); +void OverrideView(void *, CViewSetup *); +bool DispatchUserMessage(void *, int, bf_read &); +void FrameStageNotify(void *, int); +void LevelInit(void *, const char *); +void LevelShutdown(void *); +int RandomInt(void *, int, int); +int SDL_PollEvent(SDL_Event *event); +void SDL_GL_SwapWindow(SDL_Window *window); +void Paint(IEngineVGui *_this, PaintMode_t mode); + +} + + + +// typedef void(*CInput__CreateMove_t)(void*, int, float, bool); +// void CInput__CreateMove_hook(void*, int sequence_number, float +// input_sample_frametime, bool active); + + +#if ENABLE_VISUALS + +/* SDL HOOKS */ +union SDL_Event; +class SDL_Window; + +extern SDL_Window *sdl_current_window; + + + +void DoSDLHooking(); +void DoSDLUnhooking(); +#endif + + +// TODO! +#if 0 + +#if ENABLE_NULL_GRAPHICS +typedef ITexture *(*FindTexture_t)(void *, const char *, const char *, bool, + int); +typedef IMaterial *(*FindMaterialEx_t)(void *, const char *, const char *, int, + bool, const char *); +typedef IMaterial *(*FindMaterial_t)(void *, const char *, const char *, bool, + const char *); + +/* 70 */ void ReloadTextures_null_hook(void *this_); +/* 71 */ void ReloadMaterials_null_hook(void *this_, const char *pSubString); +/* 73 */ IMaterial *FindMaterial_null_hook(void *this_, + char const *pMaterialName, + const char *pTextureGroupName, + bool complain, + const char *pComplainPrefix); +/* 81 */ ITexture *FindTexture_null_hook(void *this_, char const *pTextureName, + const char *pTextureGroupName, + bool complain, + int nAdditionalCreationFlags); +/* 121 */ void ReloadFilesInList_null_hook(void *this_, + IFileList *pFilesToReload); +/* 123 */ IMaterial *FindMaterialEx_null_hook(void *this_, + char const *pMaterialName, + const char *pTextureGroupName, + int nContext, bool complain, + const char *pComplainPrefix); +#endif + +#endif \ No newline at end of file diff --git a/include/hooks/PaintTraverse.hpp b/include/hooks/PaintTraverse.hpp deleted file mode 100755 index 147ab016..00000000 --- a/include/hooks/PaintTraverse.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * PaintTraverse.h - * - * Created on: Jan 8, 2017 - * Author: nullifiedcat - */ - -#pragma once - -class CatVar; - -extern CatVar no_zoom; -extern CatVar clean_screenshots; -extern CatVar disable_visuals; -void PaintTraverse_hook(void *, unsigned int, bool, bool); diff --git a/include/hooks/hookedmethods.hpp b/include/hooks/hookedmethods.hpp deleted file mode 100644 index 15513884..00000000 --- a/include/hooks/hookedmethods.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * hooks.h - * - * Created on: Jan 8, 2017 - * Author: nullifiedcat - */ - -#pragma once - -#include "common.hpp" - -typedef bool (*CreateMove_t)(void *, float, CUserCmd *); -typedef void (*PaintTraverse_t)(void *, unsigned int, bool, bool); -typedef bool (*CanPacket_t)(void *); -typedef int (*IN_KeyEvent_t)(void *, int, int, const char *); -typedef bool (*SendNetMsg_t)(void *, INetMessage &, bool, bool); -typedef void (*Shutdown_t)(void *, const char *); -typedef void (*OverrideView_t)(void *, CViewSetup *); -typedef bool (*DispatchUserMessage_t)(void *, int, bf_read &); -typedef void (*FrameStageNotify_t)(void *, int); -typedef void (*LevelInit_t)(void *, const char *); -typedef void (*LevelShutdown_t)(void *); - -typedef void (*BeginFrame_t)(IStudioRender *); -typedef bool (*CanInspect_t)(IClientEntity *); -typedef void (*DrawModelExecute_t)(IVModelRender *, const DrawModelState_t &, - const ModelRenderInfo_t &, matrix3x4_t *); -typedef CUserCmd *(*GetUserCmd_t)(IInput *, int); -typedef const char *(*GetClientName_t)(CBaseClientState *); -typedef bool (*ProcessSetConVar_t)(CBaseClientState *, NET_SetConVar *); -typedef bool (*ProcessGetCvarValue_t)(CBaseClientState *, SVC_GetCvarValue *); -typedef void (*Paint_t)(IEngineVGui *, PaintMode_t); - -typedef int (*RandomInt_t)(void *, int, int); - -const char *GetClientName_hook(CBaseClientState *_this); -bool ProcessSetConVar_hook(CBaseClientState *_this, NET_SetConVar *msg); -bool ProcessGetCvarValue_hook(CBaseClientState *_this, SVC_GetCvarValue *msg); -// typedef void(*CInput__CreateMove_t)(void*, int, float, bool); -// void CInput__CreateMove_hook(void*, int sequence_number, float -// input_sample_frametime, bool active); -typedef const char *(*GetFriendPersonaName_t)(ISteamFriends *, CSteamID); -const char *GetFriendPersonaName_hook(ISteamFriends *_this, CSteamID steamID); - -typedef void (*FireGameEvent_t)(void *_this, IGameEvent *event); -void FireGameEvent_hook(void *_this, IGameEvent *event); - -CUserCmd *GetUserCmd_hook(IInput *, int); -void DrawModelExecute_hook(IVModelRender *_this, const DrawModelState_t &state, - const ModelRenderInfo_t &info, matrix3x4_t *matrix); - -#if ENABLE_VISUALS -void Paint_hook(IEngineVGui *_this, PaintMode_t mode); - -/* SDL HOOKS */ -union SDL_Event; -class SDL_Window; - -extern SDL_Window *sdl_current_window; - -typedef int (*SDL_PollEvent_t)(SDL_Event *event); -typedef void (*SDL_GL_SwapWindow_t)(SDL_Window *window); - -int SDL_PollEvent_hook(SDL_Event *event); -void SDL_GL_SwapWindow_hook(SDL_Window *window); - -void DoSDLHooking(); -void DoSDLUnhooking(); -#endif - -#include "CreateMove.hpp" -#include "PaintTraverse.hpp" -#include "others.hpp" diff --git a/include/hooks/others.hpp b/include/hooks/others.hpp deleted file mode 100755 index 4f284fc4..00000000 --- a/include/hooks/others.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * others.h - * - * Created on: Jan 8, 2017 - * Author: nullifiedcat - */ - -#pragma once - -#include "config.h" - -class INetMessage; -class CViewSetup; -class bf_read; -class SDL_Window; -class CatVar; - -extern CatVar disconnect_reason; -#if ENABLE_VISUALS -extern int spectator_target; -#endif - -bool CanPacket_hook(void *); -int IN_KeyEvent_hook(void *, int, int, const char *); -bool SendNetMsg_hook(void *, INetMessage &, bool, bool); -void Shutdown_hook(void *, const char *); -void OverrideView_hook(void *, CViewSetup *); -bool DispatchUserMessage_hook(void *, int, bf_read &); -void FrameStageNotify_hook(void *, int); -void LevelInit_hook(void *, const char *); -void LevelShutdown_hook(void *); -int RandomInt_hook(void *, int, int); - -#if ENABLE_NULL_GRAPHICS -typedef ITexture *(*FindTexture_t)(void *, const char *, const char *, bool, - int); -typedef IMaterial *(*FindMaterialEx_t)(void *, const char *, const char *, int, - bool, const char *); -typedef IMaterial *(*FindMaterial_t)(void *, const char *, const char *, bool, - const char *); - -/* 70 */ void ReloadTextures_null_hook(void *this_); -/* 71 */ void ReloadMaterials_null_hook(void *this_, const char *pSubString); -/* 73 */ IMaterial *FindMaterial_null_hook(void *this_, - char const *pMaterialName, - const char *pTextureGroupName, - bool complain, - const char *pComplainPrefix); -/* 81 */ ITexture *FindTexture_null_hook(void *this_, char const *pTextureName, - const char *pTextureGroupName, - bool complain, - int nAdditionalCreationFlags); -/* 121 */ void ReloadFilesInList_null_hook(void *this_, - IFileList *pFilesToReload); -/* 123 */ IMaterial *FindMaterialEx_null_hook(void *this_, - char const *pMaterialName, - const char *pTextureGroupName, - int nContext, bool complain, - const char *pComplainPrefix); -#endif - -// extern unsigned int* swapwindow_ptr; -// extern unsigned int swapwindow_orig; diff --git a/src/hooks/sdl.cpp b/src/hooks/sdl.cpp index 092e7ec6..382aedd6 100755 --- a/src/hooks/sdl.cpp +++ b/src/hooks/sdl.cpp @@ -7,7 +7,7 @@ #include "common.hpp" -#include "hooks/hookedmethods.hpp" +#include "hooks/HookedMethods.hpp" #include "hack.hpp" #include From ab1f52bd1e48a1a3b2f3dc8cb389f5a53eb5443c Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 28 Apr 2018 22:52:54 +0200 Subject: [PATCH 03/16] Fix signature --- .cproject | 14 ++++++-------- src/reclasses/CTFPartyClient.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.cproject b/.cproject index 6995721c..357841bb 100755 --- a/.cproject +++ b/.cproject @@ -43,7 +43,7 @@