-
Notifications
You must be signed in to change notification settings - Fork 16
/
Gamehooking.hpp
109 lines (86 loc) · 3.92 KB
/
Gamehooking.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#pragma once
#include "Structs.hpp"
#include "helpers/VMTManager.hpp"
#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
/* PaintTraverse defs */
typedef void(__thiscall *PaintTraverse_t)(void*, unsigned int, bool, bool);
extern PaintTraverse_t o_PaintTraverse;
/* CreateMove defs */
typedef bool(__thiscall *CreateMove_t)(IClientMode*, float, CUserCmd*);
extern CreateMove_t o_CreateMove;
/* PlaySound defs */
typedef void(__thiscall *PlaySound_t)(ISurface*, const char*);
extern PlaySound_t o_PlaySound;
/* EndScene defs */
typedef long(__stdcall *EndScene_t)(IDirect3DDevice9*);
extern EndScene_t o_EndScene;
/* Reset defs */
typedef long(__stdcall *Reset_t)(IDirect3DDevice9*, D3DPRESENT_PARAMETERS*);
extern Reset_t o_Reset;
/* FrameStageNotify defs */
typedef void(__stdcall *FrameStageNotify_t)(ClientFrameStage_t);
extern FrameStageNotify_t o_FrameStageNotify;
/* BeginFrame defs */
typedef void(__thiscall *BeginFrame_t)(void*, float);
extern BeginFrame_t o_BeginFrame;
/* OverrideView defs */
typedef int(__stdcall *OverrideView_t)(CViewSetup*);
extern OverrideView_t o_OverrideView;
/* SetKeyCodeState defs */
typedef void(__thiscall* SetKeyCodeState_t) (void*, ButtonCode_t, bool);
extern SetKeyCodeState_t o_SetKeyCodeState;
/* SetMouseCodeState defs */
typedef void(__thiscall* SetMouseCodeState_t) (void*, ButtonCode_t, MouseCodeState_t);
extern SetMouseCodeState_t o_SetMouseCodeState;
/* FireBullets defs */
typedef void(__thiscall* FireBullets_t)(C_TEFireBullets*, DataUpdateType_t);
extern FireBullets_t o_FireBullets;
/* InPrediction defs */
typedef bool(__thiscall* InPrediction_t)(void*);
extern InPrediction_t o_OriginalInPrediction;
/* TempEntities defs */
typedef bool(__thiscall *TempEntities_t)(void*, void*/*SVC_TempEntities*/);
extern TempEntities_t o_TempEntities;
/* SceneEnd defs */
typedef void(__thiscall *SceneEnd_t)(void*);
extern SceneEnd_t o_SceneEnd;
/* SetupBones defs */
typedef bool(__thiscall *SetupBones_t)(void*, matrix3x4_t*, int, int, float);
extern SetupBones_t o_SetupBones;
/* sv_cheats getbool defs */
typedef bool(__thiscall* GetBool_t)(void*);
extern GetBool_t o_GetBool;
/* GetViewmodelFov defs */
typedef float(__thiscall* GetViewmodelFov_t)(void*);
extern GetViewmodelFov_t o_GetViewmodelFov;
/* RunCommand defs */
typedef void(__thiscall* RunCommand_t)(void*, C_BasePlayer*, CUserCmd*, IMoveHelper*);
extern RunCommand_t o_RunCommand;
namespace Handlers
{
void __fastcall PaintTraverse_h(void *thisptr, void*, unsigned int vguiPanel, bool forceRepaint, bool allowForce);
bool __stdcall CreateMove_h(float smt, CUserCmd *userCMD);
void __stdcall PlaySound_h(const char *folderIme);
HRESULT __stdcall EndScene_h(IDirect3DDevice9 *pDevice);
HRESULT __stdcall Reset_h(IDirect3DDevice9 *pDevice, D3DPRESENT_PARAMETERS *pPresentationParameters);
LRESULT __stdcall WndProc_h(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void __stdcall FrameStageNotify_h(ClientFrameStage_t stage);
void __fastcall BeginFrame_h(void *thisptr, void*, float ft);
void __stdcall OverrideView_h(CViewSetup* pSetup);
void __fastcall SetKeyCodeState_h(void* thisptr, void* EDX, ButtonCode_t code, bool bDown);
void __fastcall SetMouseCodeState_h(void* thisptr, void* EDX, ButtonCode_t code, MouseCodeState_t state);
void __stdcall TEFireBulletsPostDataUpdate_h(DataUpdateType_t updateType);
bool __stdcall InPrediction_h();
bool __fastcall TempEntities_h(void* ECX, void* EDX, void* msg);
void __fastcall SceneEnd_h(void* thisptr, void* edx);
bool __fastcall SetupBones_h(void* ECX, void* EDX, matrix3x4_t *pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime);
bool __fastcall GetBool_SVCheats_h(PVOID pConVar, int edx);
float __fastcall GetViewModelFov_h(void* ECX, void* EDX);
void __fastcall RunCommand_h(void* ECX, void* EDX, C_BasePlayer* player, CUserCmd* cmd, IMoveHelper* helper);
}
extern HWND window;
extern WNDPROC oldWindowProc;
extern bool pressedKey[256];