diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-06 16:19:25 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-06 16:19:25 +0100 |
| commit | 9f0724dcd25a06c5674d30d045dc485a341253b1 (patch) | |
| tree | e7587dd03c0b164113d3b879b18d81fccf332c05 /FIX_PLAN.md | |
| parent | Chams: leave engine-forced material passes alone (diff) | |
| download | hl2h-9f0724dcd25a06c5674d30d045dc485a341253b1.tar.gz hl2h-9f0724dcd25a06c5674d30d045dc485a341253b1.zip | |
Hooks: central vtable install with restore support
Move vtable patching into hooks.cpp: one call clones the table, validates every
slot, records the originals and installs the clone. Installs happen from the
setup, game and paint threads, so the bookkeeping is mutex-protected.
Client, CInput, IVModelRender, IStudioRender and ISurface all use it, and
hooks_restore_all() can now put every interface back (previously impossible).
Diffstat (limited to 'FIX_PLAN.md')
| -rw-r--r-- | FIX_PLAN.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/FIX_PLAN.md b/FIX_PLAN.md index 2c84122..3ebbd17 100644 --- a/FIX_PLAN.md +++ b/FIX_PLAN.md | |||
| @@ -788,6 +788,14 @@ the engine's override cleared for every model drawn afterwards. This is the fix | |||
| 788 | for the corruption described in P2-6; it needs an in-game check because it | 788 | for the corruption described in P2-6; it needs an in-game check because it |
| 789 | relies on the engine always going through the vtable for that call. | 789 | relies on the engine always going through the vtable for that call. |
| 790 | 790 | ||
| 791 | ### Batch 6 — hook registry | ||
| 792 | |||
| 793 | `hooks.h` / `hooks.cpp` own vtable installation: one call clones, bounds-checks | ||
| 794 | every slot, records the originals and installs the clone, with a mutex because | ||
| 795 | installs happen from the setup, game and paint threads. `hooks_restore_all()` | ||
| 796 | puts every interface back, which previously was impossible. Client, CInput, | ||
| 797 | IVModelRender, IStudioRender and ISurface all go through it now. | ||
| 798 | |||
| 791 | ### Known remaining work | 799 | ### Known remaining work |
| 792 | 800 | ||
| 793 | Deliberately deferred, with reasons: | 801 | Deliberately deferred, with reasons: |
| @@ -800,7 +808,7 @@ Deliberately deferred, with reasons: | |||
| 800 | - **P3-2 declarative settings table** — large rewrite of `config_save`, | 808 | - **P3-2 declarative settings table** — large rewrite of `config_save`, |
| 801 | `config_load`, `config_reset_defaults` and `build_cards`. It can regress | 809 | `config_load`, `config_reset_defaults` and `build_cards`. It can regress |
| 802 | config persistence, so it should follow an in-game pass. | 810 | config persistence, so it should follow an in-game pass. |
| 803 | - **P3-3 `esp.cpp` split**, **P3-5 header split**, **P3-6 hook registry** — | 811 | - **P3-3 `esp.cpp` split**, **P3-5 header split** — |
| 804 | behaviour-neutral moves with a large diff; best done after the current build | 812 | behaviour-neutral moves with a large diff; best done after the current build |
| 805 | has been validated in-game so a regression is easy to bisect. | 813 | has been validated in-game so a regression is easy to bisect. |
| 806 | 814 | ||
