//$ symbol game::CoreMainLoop, "void (__stdcall *)()";
//$ tag game::CoreMainLoop, hook;
//$ address game::CoreMainLoop, [retail], @0x00688bf0;
void __stdcall wrap_game_CoreMainLoop() {
BROADCAST(Tick);
// Do stuff before the real game::CoreMainLoop() is called.
real_game_CoreMainLoop();
// Do stuff after the real game::CoreMainLoop() is called.
}
Instrument Windows binaries hook, line, and sinker at runtime with this batteries included hook specification and installation suite. Sinker Script is a simple domain-specific language for specifying addresses in a loaded module programmatically. The Sinker Compiler makes it easy to amalgamate many Sinker Script files and produce .def
headers for easy use of the Sinker Runtime Library from C++. The Sinker Runtime Library installs the specified hooks into a module at runtime.
The documentation is hosted on Read the Docs.
Instructions on how to include Sinker in your CMake project can be found in the CMake Integration section of the documentation. I recommend reading the rest of the documentation first to get a feel for how Sinker works.
Instructions on how to build and test the project.
- Git
- CMake
- re2c (Optional†)
- Bison or WinFlexBison (Optional†)
†Only needed if editing the Sinker Script grammar file.
git clone https://github.com/widberg/sinker.git --recurse-submodules --shallow-submodules
cmake -B build -DSINKER_BUILD_TESTS=ON
cmake --build build --target check-sinker