Categorized hooks/types

This commit is contained in:
Jenny White 2018-04-28 23:54:21 +03:00
parent ca11b4355b
commit 3e35c859f2
2 changed files with 57 additions and 37 deletions

View File

@ -22,6 +22,9 @@ extern int spectator_target;
union SDL_Event; union SDL_Event;
#endif #endif
namespace hooked_methods
{
namespace types namespace types
{ {
// ClientMode // ClientMode
@ -32,75 +35,90 @@ using LevelShutdown = void(*)(void *);
using FireGameEvent = void(*)(void *_this, IGameEvent *event); using FireGameEvent = void(*)(void *_this, IGameEvent *event);
// IBaseClient // IBaseClient
using DispatchUserMessage = bool(*)(void *, int, bf_read &); using DispatchUserMessage = bool(*)(void *, int, bf_read &);
using IN_KeyEvent = int(*)(void *, int, int, const char *);
// IInput // IInput
using GetUserCmd = CUserCmd *(*)(IInput *, int); using GetUserCmd = CUserCmd *(*)(IInput *, int);
// INetChannel
using CanPacket = bool(*)(void *); using SendNetMsg = bool(*)(INetChannel *, INetMessage &, bool, bool);
using IN_KeyEvent = int(*)(void *, int, int, const char *); using CanPacket = bool(*)(INetChannel *);
using SendNetMsg = bool(*)(void *, INetMessage &, bool, bool); using Shutdown = void(*)(INetChannel *, const char *);
using Shutdown = void(*)(void *, const char *); // CBaseClientState
using BeginFrame = void(*)(IStudioRender *);
using CanInspect = bool(*)(IClientEntity *);
using GetClientName = const char *(*)(CBaseClientState *); using GetClientName = const char *(*)(CBaseClientState *);
using ProcessSetConVar = bool(*)(CBaseClientState *, NET_SetConVar *); using ProcessSetConVar = bool(*)(CBaseClientState *, NET_SetConVar *);
using ProcessGetCvarValue = bool(*)(CBaseClientState *, SVC_GetCvarValue *); using ProcessGetCvarValue = bool(*)(CBaseClientState *, SVC_GetCvarValue *);
// ISteamFriends // ISteamFriends
using GetFriendPersonaName = const char *(*)(ISteamFriends *, CSteamID); using GetFriendPersonaName = const char *(*)(ISteamFriends *, CSteamID);
// IEngineVGui
using Paint = void(*)(IEngineVGui *, PaintMode_t);
#if ENABLE_VISUALS #if ENABLE_VISUALS
// ClientMode // ClientMode
using OverrideView = void(*)(void *, CViewSetup *); using OverrideView = void(*)(void *, CViewSetup *);
// IEngineVGui
using Paint = void(*)(IEngineVGui *, PaintMode_t);
// IVModelRender // IVModelRender
using DrawModelExecute = void(*)(IVModelRender *, const DrawModelState_t &, using DrawModelExecute = void(*)(IVModelRender *, const DrawModelState_t &,
const ModelRenderInfo_t &, matrix3x4_t *); const ModelRenderInfo_t &, matrix3x4_t *);
// IStudioRender
using BeginFrame = void(*)(IStudioRender *);
// IBaseClient // IBaseClient
using FrameStageNotify = void(*)(void *, int); using FrameStageNotify = void(*)(void *, int);
// vgui::IPanel
using PaintTraverse = void(*)(void *, unsigned int, bool, bool); using PaintTraverse = void(*)(vgui::IPanel *, unsigned int, bool, bool);
// SDL // SDL
using SDL_GL_SwapWindow = void(*)(SDL_Window *window); using SDL_GL_SwapWindow = void(*)(SDL_Window *window);
using SDL_PollEvent = int(*)(SDL_Event *event); using SDL_PollEvent = int(*)(SDL_Event *event);
// Manual // IUniformRandomStream
using RandomInt = int(*)(void *, int, int); using RandomInt = int(*)(void *, int, int);
#endif #endif
} }
namespace methods namespace methods
{ {
// ClientMode
bool CreateMove(void *, float, CUserCmd *); bool CreateMove(void *, float, CUserCmd *);
void PaintTraverse(void *, unsigned int, bool, bool); void LevelInit(void *, const char *);
void LevelShutdown(void *);
// ClientMode + 4
void FireGameEvent(void *_this, IGameEvent *event);
// IBaseClient
bool DispatchUserMessage(void *, int, bf_read &);
int IN_KeyEvent(void *, int, int, const char *);
// IInput
CUserCmd *GetUserCmd(IInput *, int);
// INetChannel
bool SendNetMsg(INetChannel *, INetMessage &, bool, bool);
bool CanPacket(INetChannel *);
void Shutdown(INetChannel *, const char *);
// CBaseClientState
const char *GetClientName(CBaseClientState *_this); const char *GetClientName(CBaseClientState *_this);
bool ProcessSetConVar(CBaseClientState *_this, NET_SetConVar *msg); bool ProcessSetConVar(CBaseClientState *_this, NET_SetConVar *msg);
bool ProcessGetCvarValue(CBaseClientState *_this, SVC_GetCvarValue *msg); bool ProcessGetCvarValue(CBaseClientState *_this, SVC_GetCvarValue *msg);
// ISteamFriends
const char *GetFriendPersonaName(ISteamFriends *_this, CSteamID steamID); const char *GetFriendPersonaName(ISteamFriends *_this, CSteamID steamID);
void FireGameEvent(void *_this, IGameEvent *event); // IEngineVGui
CUserCmd *GetUserCmd(IInput *, int); void Paint(IEngineVGui *_this, PaintMode_t mode);
#if ENABLE_VISUALS
// ClientMode
void OverrideView(void *, CViewSetup *);
// IVModelRender
void DrawModelExecute(IVModelRender *_this, const DrawModelState_t &state, void DrawModelExecute(IVModelRender *_this, const DrawModelState_t &state,
const ModelRenderInfo_t &info, matrix3x4_t *matrix); const ModelRenderInfo_t &info, matrix3x4_t *matrix);
bool CanPacket(void *); // IStudioRender
int IN_KeyEvent(void *, int, int, const char *); void BeginFrame(IStudioRender *);
bool SendNetMsg(void *, INetMessage &, bool, bool); // IBaseClient
void Shutdown(void *, const char *);
void OverrideView(void *, CViewSetup *);
bool DispatchUserMessage(void *, int, bf_read &);
void FrameStageNotify(void *, int); void FrameStageNotify(void *, int);
void LevelInit(void *, const char *); // vgui::IPanel
void LevelShutdown(void *); void PaintTraverse(vgui::IPanel *, unsigned int, bool, bool);
int RandomInt(void *, int, int); // SDL
int SDL_PollEvent(SDL_Event *event);
void SDL_GL_SwapWindow(SDL_Window *window); void SDL_GL_SwapWindow(SDL_Window *window);
void Paint(IEngineVGui *_this, PaintMode_t mode); int SDL_PollEvent(SDL_Event *event);
// IUniformRandomStream
int RandomInt(void *, int, int);
#endif
} }
}
// 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 #if ENABLE_VISUALS
@ -117,7 +135,8 @@ void DoSDLUnhooking();
#endif #endif
// TODO! // TODO
// wontfix.club
#if 0 #if 0
#if ENABLE_NULL_GRAPHICS #if ENABLE_NULL_GRAPHICS

View File

@ -51,6 +51,7 @@ class IGameEventManager;
class TFGCClientSystem; class TFGCClientSystem;
class CGameRules; class CGameRules;
class IEngineVGui; class IEngineVGui;
class IUniformRandomStream;
extern TFGCClientSystem *g_TFGCClientSystem; extern TFGCClientSystem *g_TFGCClientSystem;
extern CHud *g_CHUD; extern CHud *g_CHUD;