thcrap
thcrap copied to clipboard
thcrap: Implement hot-repatching
Hot-repatching
Description
With this feature, newly downloaded binary hacks, breakpoints and other patch data loaded on initialization could immediately be re-applied after a patch update was downloaded, without having to restart the game.
Prerequisites
- Breakpoint removal
- File change notifications also need to work with ZIP files, preferably without having to care whether patch files comes from a ZIP or a real directory structure.
Implementation
- Each plug-in (and the core) can export a
thcrap_plugin_repatch()function. thcrap_repatch()calls each DLL'sthcrap_plugin_repatch().- Using the file change notification functions of the Win32 API, this function is also called whenever the user changes a file locally.