Skip to content

widberg/sinker

Repository files navigation

Sinker

Build Status Documentation Status codecov

//$ 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.

Documentation

The documentation is hosted on Read the Docs.

Getting Started

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.

Contributing

Instructions on how to build and test the project.

Prerequisites

Only needed if editing the Sinker Script grammar file.

Checkout

git clone https://github.com/widberg/sinker.git --recurse-submodules --shallow-submodules

Build and Test

cmake -B build -DSINKER_BUILD_TESTS=ON
cmake --build build --target check-sinker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published