upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/code_hooks.h
AgeCommit message (Collapse)Author
10 dayscode_hooks: unwind data for the thunks, so exceptions and stack walks pass ↵ARKALI
through them
10 daysfix(runtime): validate PE64 headers and executable section bounds in ↵Vadson159
code_hooks (#5395) Squash-merged after diff review of PR #5395
11 daysMods: first-person view, the base (camera section, view-mode getter hook)ItsNotRexed
mod.json gains "camera": {"view_mode": "first_person"|"default", "first_person_value", "contexts"}. gta6rt --view-mode-getter RVA hooks the game's view-mode getter with a result-override thunk (code_hooks.h: the original runs, then its result and first argument go through leonida::mods::override_view_mode), so the listed contexts answer first person and the others keep the game's mode. mods/first_person asks for it on foot. docs/modding.md records why switching a mode is enough: the game's tuning data refers to a first-person view (FirstPersonDirectionDot, UseFirstPersonCameraMatrix on cloth capsules, FIRST_PERSON_VIEW hit-reaction recovery, a firstpersonshooter HUD texture; RDR2's engine branch), while GTA V's camera class names are not present by joaat. The context numbering and the first-person enum value (4, GTA V's) are manifest settings to confirm in the executable. ctest mods and code_hooks cover the parser, the override and the thunk on x64 code in memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 daysMods: the archetype hook, --archetype-lookup RVA[,ARG]ItsNotRexed
code_hooks.h hooks a function of the mapped game image without patching it: every direct call/jmp rel32 to it in the image's executable sections is pointed at a thunk that saves rcx/rdx/r8/r9 and xmm0-3, passes the hash (argument 0 or 1) through leonida::mods::active().remap() and jumps on to the original. gta6rt installs it right after mapping, before any image code runs, and logs how many call sites it redirected, so a --dry-run with a candidate RVA tells whether it is the archetype lookup. ctest code_hooks runs the thunk on x64 functions written into memory (call and tail jump remapped, r8 preserved, a branch elsewhere left byte for byte). With the executable's lookup RVA this applies mods/mandy_prison_intro; docs/modding.md says how to find it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>