You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -130,9 +122,7 @@ Various utilities for memory allocation, protection and mappings.
130
122
131
123
Object wrapper around a simple code patch. Takes care of memory protection and restores everything on destruction.
132
124
133
-
```
134
-
#!c++
135
-
125
+
```c++
136
126
hl::Patch p1, p2;
137
127
p1.apply(0x00111111, (uint8_t)0xeb);
138
128
p2.apply(0x00222222, "\x90\x90\x90", 3);
@@ -154,9 +144,7 @@ A high performance Windows console that accepts input and output simultaneously.
154
144
Finds the D3D device used for rendering by the host application in a generic way.
155
145
156
146
157
-
```
158
-
#!c++
159
-
147
+
```c++
160
148
auto pDev = hl::D3DDeviceFetcher::GetD3D9Device();
161
149
```
162
150
@@ -166,9 +154,7 @@ auto pDev = hl::D3DDeviceFetcher::GetD3D9Device();
166
154
Helper class for accessing a foreign class dynamically at runtime, including doing virtual member function calls.
167
155
168
156
169
-
```
170
-
#!c++
171
-
157
+
```c++
172
158
void *ptr = 0x12345678;
173
159
hl::ForeignClass obj = ptr;
174
160
int result = obj.call<int>(0x18, "Hello World", 3.14f, 42);
@@ -182,9 +168,7 @@ obj.set(0x70, value+7);
182
168
Macros for declaring a foreign class statically in a type-safe, const-safe and simply convenient manner.
183
169
184
170
185
-
```
186
-
#!c++
187
-
171
+
```c++
188
172
classCPlayer
189
173
{
190
174
// Declare virtual table function by offset
@@ -204,9 +188,7 @@ class CPlayer
204
188
205
189
A wrapper that catches system exceptions like memory access faults. The handlers should never be called in working programs, because C++ destructors are not called when a fault occurs.
206
190
207
-
```
208
-
#!c++
209
-
191
+
```c++
210
192
hl::CrashHandler([]{
211
193
int crash = *(volatile int*)nullptr;
212
194
}, [](uint32_t code){
@@ -226,9 +208,7 @@ These are not really related to the topic of this library, but might often be us
@@ -280,7 +256,7 @@ Hacklib is written in modern C++ and requires a recent compiler. The build was t
280
256
281
257
The project is using CMake and requires version 3.1 or later.
282
258
283
-
Graphics related components require the DirectX SDK June 2010 on Windows or on Linux the X11 and OpenGL libraries. The essential headers and libraries of the DirectX SDK are included in this repository. Required Linux packages would for example be on Debian/Ubuntu: `sudo apt-get install libx11-dev mesa-common-dev libglu1-mesa-dev libxrender-dev libxfixes-dev libglew-dev`.
259
+
Graphics related components require the DirectX SDK June 2010 on Windows or on Linux the X11 and OpenGL libraries. The essential headers and libraries of the DirectX SDK are included in this repository. Required Linux packages would for example be on Debian/Ubuntu: `sudo apt-get install libx11-dev mesa-common-dev libglu1-mesa-dev libxrender-dev libxfixes-dev libglew-dev libxext-dev`.
284
260
285
261
## How to build ##
286
262
@@ -289,9 +265,7 @@ Graphics related components require the DirectX SDK June 2010 on Windows or on L
289
265
* For your own project folders, it is most convenient to put them into the hacklib/src folder. Then provide a CMakeLists file in this folder. For example: hacklib/src/YourProject/CMakeLists.txt. You need to re-run CMake manually after adding your project folder, it will not detect the new folder itself. The basic CMakeLists file is the following, add source files as neccessary to the ADD_LIBRARY command:
0 commit comments