mirror of
https://github.com/ApfelTeeSaft/N64Recomp.git
synced 2026-08-27 11:53:33 +00:00
Implements the [[patches.func]] feature that was mentioned as planned in the README. This allows defining recompiler hooks in the config file that call specific functions at designated points. Added FunctionHookDefinition struct supporting two modes: - before_call: Hook at function entry - before_vram: Hook at specific instruction address Hook functions receive rdram and recomp_context parameters for full access to registers and memory. The implementation reuses the existing function_hooks map so it integrates cleanly with the current pipeline. Includes validation for nonexistent functions, invalid addresses, and misaligned vram values with helpful error messages.