From 2b83d70d21eec0b025d26ff5c1b4e49aa5fcabf6 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 23 May 2020 15:24:37 +0200 Subject: [PATCH 1/4] Fix something i missed which still blocks textmode Sorry for that --- include/hooks/HookedMethods.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hooks/HookedMethods.hpp b/include/hooks/HookedMethods.hpp index 038123ed..eb87477d 100644 --- a/include/hooks/HookedMethods.hpp +++ b/include/hooks/HookedMethods.hpp @@ -66,6 +66,8 @@ DECLARE_HOOKED_METHOD(ServerCmdKeyValues, void, IVEngineClient013 *, KeyValues * // vgui::IPanel DECLARE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *, unsigned int, bool, bool); #endif +// IUniformRandomStream +DECLARE_HOOKED_METHOD(RandomInt, int, IUniformRandomStream *, int, int); #if ENABLE_VISUALS // CHudChat DECLARE_HOOKED_METHOD(StartMessageMode, int, CHudBaseChat *, int); @@ -81,8 +83,6 @@ DECLARE_HOOKED_METHOD(SDL_PollEvent, int, SDL_Event *); #if ENABLE_CLIP DECLARE_HOOKED_METHOD(SDL_SetClipboardText, int, const char *); #endif -// IUniformRandomStream -DECLARE_HOOKED_METHOD(RandomInt, int, IUniformRandomStream *, int, int); #endif #if ENABLE_VISUALS || ENABLE_TEXTMODE DECLARE_HOOKED_METHOD(DrawModelExecute, void, IVModelRender *, const DrawModelState_t &, const ModelRenderInfo_t &, matrix3x4_t *); From e986d996889a11948f703b8501131d44c0228bb7 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 23 May 2020 15:34:02 +0200 Subject: [PATCH 2/4] Add textmode CI settings --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 18c97c3c..f72066e1 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,3 +8,11 @@ jobs: - run: name: "Compiling cathook" command: git submodule update --init --recursive; mkdir build; cd build; cmake -DEnableWarnings=0 ..; make -j8; cd .. + textmode_build: + docker: + - image: nullworks/cathook-docker-ci-arch:latest + steps: + - checkout + - run: + name: "Compiling textmode cathook" + command: git submodule update --init --recursive; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release -DVisuals_DrawType="Textmode" -DVACBypass=1 -DEnableWarnings=0 ..; make -j8; cd .. From 2ec45445a61d64a1e3a090adf45dc1beded93bbe Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 23 May 2020 17:06:58 +0200 Subject: [PATCH 3/4] Fix unresolved symbol how do i do this --- src/hooks/CMakeLists.txt | 1 + src/hooks/{visual => }/RandomInt.cpp | 0 src/hooks/visual/CMakeLists.txt | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename src/hooks/{visual => }/RandomInt.cpp (100%) diff --git a/src/hooks/CMakeLists.txt b/src/hooks/CMakeLists.txt index ab5ba8ae..b860f238 100755 --- a/src/hooks/CMakeLists.txt +++ b/src/hooks/CMakeLists.txt @@ -11,6 +11,7 @@ set(files "${CMAKE_CURRENT_LIST_DIR}/CanPacket.cpp" "${CMAKE_CURRENT_LIST_DIR}/others.cpp" "${CMAKE_CURRENT_LIST_DIR}/Paint.cpp" "${CMAKE_CURRENT_LIST_DIR}/PreDataUpdate.cpp" + "${CMAKE_CURRENT_LIST_DIR}/RandomInt.cpp" "${CMAKE_CURRENT_LIST_DIR}/RunCommand.cpp" "${CMAKE_CURRENT_LIST_DIR}/SendNetMsg.cpp" "${CMAKE_CURRENT_LIST_DIR}/Shutdown.cpp" diff --git a/src/hooks/visual/RandomInt.cpp b/src/hooks/RandomInt.cpp similarity index 100% rename from src/hooks/visual/RandomInt.cpp rename to src/hooks/RandomInt.cpp diff --git a/src/hooks/visual/CMakeLists.txt b/src/hooks/visual/CMakeLists.txt index 0e4cc2e8..6346376f 100755 --- a/src/hooks/visual/CMakeLists.txt +++ b/src/hooks/visual/CMakeLists.txt @@ -4,7 +4,6 @@ set(files "${CMAKE_CURRENT_LIST_DIR}/BeginFrame.cpp" "${CMAKE_CURRENT_LIST_DIR}/FrameStageNotify.cpp" "${CMAKE_CURRENT_LIST_DIR}/OverrideView.cpp" "${CMAKE_CURRENT_LIST_DIR}/PaintTraverse.cpp" - "${CMAKE_CURRENT_LIST_DIR}/RandomInt.cpp" "${CMAKE_CURRENT_LIST_DIR}/SDL_GL_SwapWindow.cpp" "${CMAKE_CURRENT_LIST_DIR}/SDL_PollEvent.cpp" "${CMAKE_CURRENT_LIST_DIR}/IN_KeyEvent.cpp") From 62e708658d0afd2e288e2c4760daa4064a4035a0 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sat, 23 May 2020 19:30:04 +0200 Subject: [PATCH 4/4] Fix missing function in textmode --- src/core/interfaces.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/interfaces.cpp b/src/core/interfaces.cpp index 32bc4b05..81970343 100644 --- a/src/core/interfaces.cpp +++ b/src/core/interfaces.cpp @@ -161,9 +161,9 @@ void CreateInterfaces() g_IMaterialSystem = BruteforceInterface("VMaterialSystem", sharedobj::materialsystem()); g_IMDLCache = BruteforceInterface("MDLCache", sharedobj::datacache()); - g_IPanel = BruteforceInterface("VGUI_Panel", sharedobj::vgui2()); + g_IPanel = BruteforceInterface("VGUI_Panel", sharedobj::vgui2()); + g_pUniformStream = **(IUniformRandomStream ***) (gSignatures.GetVstdSignature("A3 ? ? ? ? C3 89 F6") + 0x1); #if ENABLE_VISUALS - g_pUniformStream = **(IUniformRandomStream ***) (gSignatures.GetVstdSignature("A3 ? ? ? ? C3 89 F6") + 0x1); g_IVDebugOverlay = BruteforceInterface("VDebugOverlay", sharedobj::engine()); g_ISurface = BruteforceInterface("VGUI_Surface", sharedobj::vguimatsurface()); g_IStudioRender = BruteforceInterface("VStudioRender", sharedobj::studiorender());