Skip to content

Commit c7d3c1d

Browse files
author
Rafael Stahl
committed
fix ci; fix md codeblocks
1 parent e5abd97 commit c7d3c1d

2 files changed

Lines changed: 15 additions & 41 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- name: Requirements (Linux)
2020
if: matrix.config.name == 'Linux'
21-
run: sudo apt-get install libx11-dev mesa-common-dev libglu1-mesa-dev libxrender-dev libxfixes-dev libglew-dev
21+
run: sudo apt-get install libx11-dev mesa-common-dev libglu1-mesa-dev libxrender-dev libxfixes-dev libglew-dev libxext-dev
2222

2323
- name: Configure
2424
run: mkdir build && cd build && cmake ..

README.md

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ Bigger examples are located in separate repositories:
2727
A helper / framework for implementing a shared library that runs by itself after it is loaded into the target process.
2828

2929

30-
```
31-
#!c++
32-
30+
```c++
3331
class MyMain : public hl::Main
3432
{
3533
public:
@@ -55,9 +53,7 @@ For an example see Drawer.h section below.
5553
Wrapper for drawing with D3D or OpenGL in a resource-safe C++ way.
5654

5755

58-
```
59-
#!c++
60-
56+
```c++
6157
hl::DrawerD3D drawer;
6258
hl::WindowOverlay overlay;
6359

@@ -87,9 +83,7 @@ The implemented VEH hooking mechanism is about 3x faster than the conventional `
8783
Provides pattern scanning techniques like masked search strings or search by referenced strings in the code of the target process.
8884
8985
90-
```
91-
#!c++
92-
86+
```c++
9387
uintptr_t MapIdSig = hl::FindPattern("00 ?? 08 00 89 0d");
9488
9589
hl::PatternScanner scanner;
@@ -107,9 +101,7 @@ void *pAgentSelectionCtx = *(void**)(hl::FollowRelativeAddress(results[1] + 0xa)
107101

108102
Convenient printf-like logging macros. Source information with file name, line number and function name are included in debug builds.
109103

110-
```
111-
#!c++
112-
104+
```c++
113105
// The default configuration also logs to a file next to the library.
114106
hl::LogConfig logCfg;
115107
logCfg.logFunc = [](const std::string& msg){ std::cout << msg << std::flush; };
@@ -130,9 +122,7 @@ Various utilities for memory allocation, protection and mappings.
130122
131123
Object wrapper around a simple code patch. Takes care of memory protection and restores everything on destruction.
132124
133-
```
134-
#!c++
135-
125+
```c++
136126
hl::Patch p1, p2;
137127
p1.apply(0x00111111, (uint8_t)0xeb);
138128
p2.apply(0x00222222, "\x90\x90\x90", 3);
@@ -154,9 +144,7 @@ A high performance Windows console that accepts input and output simultaneously.
154144
Finds the D3D device used for rendering by the host application in a generic way.
155145

156146

157-
```
158-
#!c++
159-
147+
```c++
160148
auto pDev = hl::D3DDeviceFetcher::GetD3D9Device();
161149
```
162150

@@ -166,9 +154,7 @@ auto pDev = hl::D3DDeviceFetcher::GetD3D9Device();
166154
Helper class for accessing a foreign class dynamically at runtime, including doing virtual member function calls.
167155

168156

169-
```
170-
#!c++
171-
157+
```c++
172158
void *ptr = 0x12345678;
173159
hl::ForeignClass obj = ptr;
174160
int result = obj.call<int>(0x18, "Hello World", 3.14f, 42);
@@ -182,9 +168,7 @@ obj.set(0x70, value+7);
182168
Macros for declaring a foreign class statically in a type-safe, const-safe and simply convenient manner.
183169

184170

185-
```
186-
#!c++
187-
171+
```c++
188172
class CPlayer
189173
{
190174
// Declare virtual table function by offset
@@ -204,9 +188,7 @@ class CPlayer
204188
205189
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.
206190
207-
```
208-
#!c++
209-
191+
```c++
210192
hl::CrashHandler([]{
211193
int crash = *(volatile int*)nullptr;
212194
}, [](uint32_t code){
@@ -226,9 +208,7 @@ These are not really related to the topic of this library, but might often be us
226208

227209
Rng.h:
228210

229-
```
230-
#!c++
231-
211+
```c++
232212
hl::Rng rng;
233213

234214
while (true)
@@ -242,9 +222,7 @@ while (true)
242222

243223
Timer.h:
244224

245-
```
246-
#!c++
247-
225+
```c++
248226
hl::Timer t;
249227
// Some computation.
250228
std::cout << t.diff() << std::endl;
@@ -255,9 +233,7 @@ std::cout << t.diff() << std::endl;
255233

256234
Input.h:
257235

258-
```
259-
#!c++
260-
236+
```c++
261237
hl::Input input;
262238

263239
while (true)
@@ -280,7 +256,7 @@ Hacklib is written in modern C++ and requires a recent compiler. The build was t
280256

281257
The project is using CMake and requires version 3.1 or later.
282258

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`.
284260

285261
## How to build ##
286262

@@ -289,9 +265,7 @@ Graphics related components require the DirectX SDK June 2010 on Windows or on L
289265
* 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:
290266

291267

292-
```
293-
#!cmake
294-
268+
```cmake
295269
PROJECT(YourProject)
296270
297271
ADD_LIBRARY(${PROJECT_NAME} SHARED main.cpp)

0 commit comments

Comments
 (0)