Files

189 lines
11 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# FOV Changer verification
## Debug startup scanning
Debug builds also show a read-only diagnostics dashboard after the intro. It
anchors to the top-right HUD grid, flows into columns to fit the display and
uses the current client fonts and text shadows with no background or border.
The compact readout reports rolling frame statistics,
client/module/Present elapsed times, process CPU and memory, adapter-local memory,
aggregate core hook readiness, world snapshot age, input counters, weather,
particles and profiles. Process CPU is normalized across logical processors;
process and GPU memory are for Minecraft as a whole, not just the client DLL.
Present elapsed time includes waiting. Slow counters refresh at 2 Hz; frame
timing stays live. Inactive readers remain inactive. Release builds exclude it.
`debug_metrics_tests.h` verifies statistics, grid alignment and screen bounds at
multiple resolutions/grid sizes, sampling cadence and passive reader behavior.
Signature searches use the longest literal run as an anchor, then verify all
wildcards at each candidate. This avoids checked `vector<bool>` access at every
executable byte in unoptimized Debug builds. Unique-match rejection is retained.
`sigscan_tests.h` compares 3,000 generated patterns against an independent matcher
and checks wildcard-only patterns, overlapping matches and guard-page boundaries.
The existing integration tests still check missing and ambiguous executable matches.
Debug builds write `startup-debug.log` beside `client.dll`, including named scans,
scan durations and the transition from world hooks to modules. If startup still
stalls in-game, inspect the last entry before assuming the remaining issue is a scan.
## World modules and HUD style
See [WORLD_MODULES.md](WORLD_MODULES.md) for the new modules, verified interfaces,
controls, tests, current rendering limits and in-game checks.
## Profiles and autosaving
See [PROFILES.md](PROFILES.md) for profile controls, file storage, migration and
failure handling. The integration executable also tests profile serialization,
switching, cancellation, autosaving, rename/delete and recovery behavior.
## New quality-of-life modules
All new modules start disabled. Right-click their rows to expand settings, and use
the normal **bind** control to assign a module toggle key.
- **VISUAL / viewmodel:** separate **main** and **offhand** position X/Y/Z and
pitch/yaw/roll sliders. Zero is neutral. **Separate offhand** is on by default;
turn it off to make both hands inherit the main settings. Offhand controls cover
shields and other held offhand items, and substitute the offhand pose before the
game's item-specific transforms so animations remain relative to that pose.
Position offsets use each pose's local basis; rotation keeps its translation
pivot. Check shield raised/lowered, offhand items, empty hands, tools, blocks,
view bobbing both on/off, and third person in-game.
- **UTILITY / toggle sprint:** enable once to hold your sprint key while moving
forward. Defaults are W and Left Ctrl; both are rebindable in its settings.
Shift (sneak), S (backwards), visible menus/cursor, focus loss, and disabling
release the module's injected key. Its optional status HUD is draggable. This
uses normal keyboard input and preserves Minecraft's normal sprint restrictions.
- **HUD / cps counter:** separate left/right click totals over the previous second.
Clicks in the client menu are excluded; opening it or leaving the game clears
the rolling count. Mouse messages capture clicks between rendered frames.
- **HUD / clock:** local computer time, optional seconds and 12/24-hour format.
The expanded integration suite also checks actual viewmodel hook/trampoline calls,
independent main/offhand translation and all rotation axes, preservation of an
item-animation transform, linked mode, matrix restoration, and repeated toggles; plus Sprint's
key ownership, repeated updates, rebinding, failed-release retry, physical-input
handoff, injected-event filtering, and focus cleanup. Both x64 DLL builds pass.
The tests use controlled executable fixtures and do not establish visual behavior
inside Minecraft; the in-game checks above remain useful.
Cursor-hook installation now enables only those cursor hooks, so initializing
the menu does not enable unrelated game hooks. Module panels scroll when expanded
settings exceed the available screen height.
The viewmodel renderer, shared item renderer, and offhand call-site signatures
each matched exactly once in the captured 26.52 executable, at RVAs `0x47ca240`,
`0x47b5ba0`, and `0x47ceed3`. The call-site target is checked against the hooked
function. The offhand hook also requires that return address and the active
first-person render context, so other item-renderer calls are forwarded unchanged.
Temporary world matrices are restored after each draw scope. The isolated
executable fixtures use these exact prologues/call-site instructions and controlled
callbacks; shield rendering itself still needs the in-game check above.
### Viewmodel regression coverage
The working `hand_bob` hook is again the primary main-hand transform. The optional
hand-draw hook also passes an adjusted **copy** of its R8 source matrix: the real
26.52 renderer copies that matrix to its own storage at `+0x388`, so changing only
the shared matrix is insufficient. First-person checks accept the flags bit rather
than requiring an exact `0x21` value. Previous-frame bob snapshots expire at frame
end, avoiding duplicate main-hand offsets and stale offhand corrections.
Tests cover the direct hand hook and simulate the renderer copying a distinct input
matrix, including `0x23` flags and preservation of the caller's input. Earlier
fixtures consumed only the shared matrix and missed this rendering behavior.
### Custom crosshair
The existing crosshair module is now **custom crosshair** (F8). It includes length,
width, gap, dynamic gap/length toggles, independent speed and easing controls, base
color, gradient toggle/color, spin toggle/speed/easing, and the optional center dot.
Each dynamic channel has its own **pulse** or **movement / clicks** mode and amount.
Reactive mode responds to WASD/Space and left/right clicks; client-menu input is
excluded. Pulse speed is cycles per second; reactive speed sets transition rate;
spin speed is degrees per second. Easing options are linear, smooth, ease in,
ease out, and ease in/out. Gradient runs from the base color at the inner ends to
the second color at the outer ends. Spin and gradients work together.
Tests exercise animation timing at 60/144 Hz, easing bounds, reactive return to
rest, toggle reset, and actual ImGui draw vertices/indices, gradient colors, and
rotated geometry. Client Debug/Release builds pass. In-game rendering should be
checked after reloading the new DLL.
### Outline and native crosshair replacement
**Black outline** adds a black border behind each arm and the center dot; **outline
width** controls its thickness. The border uses the same animated gap, length, and
angle as the colored arms, and draws before the fill so gradient/spin combinations
remain intact.
Enabling Custom Crosshair suppresses the native CursorRenderer draw; disabling
restores it. The 26.52 CursorRenderer was identified through the `cursor_renderer`
factory/vtable and its `ui_crosshair` material. Its four-pointer render entry at
RVA `0x8db97b0` matches the signature exactly once in the captured executable.
The hook affects this renderer only. A missing/ambiguous signature leaves native
hiding unavailable and the module tooltip reports that limitation.
Integration tests use the verified native prologue and a controlled draw callback,
checking suppression, argument forwarding, restoration, and repeated toggles.
ImGui tests check black outline vertices with rotating arms and a center dot.
Visual behavior inside Minecraft remains an in-game check after reloading.
## FOV signature and original integration test
The FOV signature was checked against executable sections read from the running
Minecraft Windows **1.26.5203.0 (26.52)** process. It matched exactly once, at
RVA `0x46bd250`. Disassembly identified the `video.fov` option (`0x2f`), a float
return in degrees, a default of 70 degrees, and the game's 130-degree upper clamp.
Call sites pass `(renderer, frame_alpha, bool)` using the Windows x64 ABI.
`fov_changer_test.vcxproj` is a standalone x64 integration test. Its executable
fixture uses the verified function prologue with a controlled 70-degree return;
it is **not** an in-game rendering test. It exercises the production signature
scanner, MinHook, and FOV module, including:
- Missing and ambiguous signatures refuse to enable the module.
- Default off, slider updates, finite bounds, and NaN fallback.
- Forwarding calls with the projection flag false.
- Zoom composition with vanilla/overridden FOV and unchanged hand projection.
- Repeated enable/disable cycles restore the original getter.
Build the test project with Visual Studio/MSBuild in `Debug|x64`, then run
`client/build/tests/fov_changer_test.exe`. Assertions remain enabled in this project.
## In-game check
Load the updated client DLL using your existing workflow. Under **VISUAL**, enable
**fov changer** and expand its **fov** slider. The default is 90 degrees; the range
is 30–130. Check 30, 90, and 130 degrees in a world, then disable the module and
confirm the game's normal FOV returns. This sets a fixed world FOV, including
during sprinting. The zoom module magnifies this FOV when active. Neither module
writes Minecraft's saved FOV setting.
The Debug and Release client DLLs build successfully, and the isolated integration
test passes. Visual behavior inside Minecraft still requires the in-game check.
Future game updates may require a new signature; a missing or ambiguous match
leaves the module unavailable.
# Window branding
The client applies `amnesia // minecraft {version}` to the game window when its
renderer initializes. The version comes from the running app's package identity;
package `1.26.5203.0` displays as `26.52`. Without a package identity the title
omits the version. Both window icon sizes use the embedded `src/assets/window.ico`.
Branding is checked once per second and the saved title and icon handles are
restored on unload. The injector's source icon is only copied, never modified.
Render callbacks only post branding requests. Title/icon reads and writes run
on the window thread through the input message handler, avoiding a synchronous
render-to-window wait. Unload requests restoration before removing that handler,
with a one-second timeout if the window thread is unavailable.
The integration suite uses a real hidden Win32 window to verify embedded icon
loading, branding reapplication, repeated install/unload, and restoration of the
original title and icons. Minecraft's title bar and task-switcher appearance still
need an in-game check after loading the rebuilt DLL.
The regression test schedules branding from another thread while the UI thread
does not process messages, then verifies application when messages resume and
restoration from a separate unload thread. It also covers unload before the first
posted branding request has run.