From f924628fd9aab0615be37a8cb57b2df29d446d14 Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Fri, 28 Jul 2023 15:33:18 +0200 Subject: [PATCH] Add hook comments --- src/hooks.c | 3 +++ src/include/hooks.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hooks.c b/src/hooks.c index 10e3d09..465b1da 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -23,12 +23,15 @@ DECL_HOOK(CL_Move); /*----------------------------------------------------------------------------*/ bool hooks_init(void) { + /* VMT hooking */ HOOK(i_client, CL_CreateMove); HOOK(i_client, HUD_Redraw); HOOK(i_studiomodelrenderer, StudioRenderModel); + /* OpenGL hooks */ GL_HOOK(glColor4f); + /* Detour hooks */ void* clmove_ptr = dlsym(hw, "CL_Move"); if (!clmove_ptr) return false; diff --git a/src/include/hooks.h b/src/include/hooks.h index 674aafc..ab709d5 100644 --- a/src/include/hooks.h +++ b/src/include/hooks.h @@ -91,12 +91,15 @@ bool hooks_init(void); void hooks_restore(void); +/* VMT hooks */ DECL_HOOK_EXTERN(void, CL_CreateMove, float, usercmd_t*, int); DECL_HOOK_EXTERN(int, HUD_Redraw, float, int); -DECL_HOOK_EXTERN(void, StudioRenderModel, void* this_ptr); +DECL_HOOK_EXTERN(void, StudioRenderModel, void*); -DECL_HOOK_EXTERN(void, glColor4f, GLfloat r, GLfloat g, GLfloat b, GLfloat a); +/* OpenGL hooks */ +DECL_HOOK_EXTERN(void, glColor4f, GLfloat, GLfloat, GLfloat, GLfloat); +/* Detour hooks */ DECL_HOOK_EXTERN(void, CL_Move); #endif /* HOOKS_H_ */