-
Notifications
You must be signed in to change notification settings - Fork 12
/
Common.hpp
100 lines (84 loc) · 1.81 KB
/
Common.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
#pragma once
#define _CRT_SECURE_NO_WARNINGS
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT _WIN32_WINNT_WIN7
#include <winsdkver.h>
#include <sdkddkver.h>
#include <windows.h>
#include <windowsx.h>
#include <winternl.h>
#include <psapi.h>
#include <dxgi1_4.h>
#include <d3d12.h>
#pragma comment(lib, "d3d12.lib")
#include <DirectXMath.h>
#include <DirectXPackedVector.h>
#include <Psapi.h>
#include <TlHelp32.h>
#include <cassert>
#include <cinttypes>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <atomic>
#include <bitset>
#include <chrono>
#include <deque>
#include <filesystem>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <memory>
#include <mutex>
#include <optional>
#include <sstream>
#include <stack>
#include <string>
#include <thread>
#include <type_traits>
#include <unordered_map>
#include <vector>
#include "Vector.hpp"
#include <MinHook.h>
namespace ER {
using namespace std::chrono_literals;
using namespace DirectX;
using namespace DirectX::PackedVector;
namespace fs = std::filesystem;
inline HMODULE g_Module{};
inline std::atomic_bool g_Running = true;
template<typename T> inline T RPM(uint64_t lpBaseAddress)
{
__try
{
T A{};
A = *(T*)(lpBaseAddress);
return A;
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
return T{};
}
}
template<typename T> inline void WPM(uint64_t lpBaseAddress, T Val)
{
__try
{
*(T*)(lpBaseAddress) = Val;
return;
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
}
}
static uint64_t dwGameBase = (uint64_t)GetModuleHandle(NULL);
}
#include "Game.hpp"
#include "GameEnums.hpp"