Repository navigation
Conversation
… (4:3, 16:10, 5:4) From mimic-wasm's fork: on a wider screen the HUD was squeezed horizontally into the middle 16:9 (hos_wide_squeeze); on a narrower one it took the whole width at the full height, so it was stretched. hos_wide_vertical_squeeze (ratio / 16:9, 1.0 on wider screens) now scales its rows vertically there instead. Co-authored-by: Mimic <mimicwasm@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for taking on the narrow-screen HUD stretch. I've been playing with two related ideas on top of v2.0.14 and wanted to check whether either is welcome before sending anything. 1. HUD at the screen edges (opt-in). A Graphics row, HUD position: Centred 16:9 / Screen edges. With Screen edges, the gameplay HUD (hearts and magic, minimap, button guide) docks to the real corners on wide and tall screens; menus, dialogue, fades and movies keep their current placement. It follows live window resizes, and each element keeps its size. 2. Vert+ on narrow screens (opt-in). Instead of cropping the sides, a 4:3 or taller window keeps the 16:9 horizontal view and shows more above and below, with the camera's culling angle adjusted to match. Left to right: 16:9, 4:3, 2448x1848. Would you want either as a small, separate follow-up once #2015 lands? I'd rebase just the part you want onto main and keep it off by default. Not suggesting either goes into this PR. Tested on Linux, RX 7900 XT (RADV), in Kokiri Forest at 1920x1080, 2560x1080, 3440x1440, 1600x1200 and 2448x1848. Horse gauge, item wheel and dialogue placement aren't checked yet. Work in progress lives on my fork ( |
Joey-Magnus
left a comment
There was a problem hiding this comment.
There is one bug in the narrow-screen branch of the HUD patch in nx2/oot_wide.py. The instruction at this patch site (0xad401041) is ldp q1, q4, [x2]. So the projection's x row is q1, and its y row is all of q4, with m11 in lane 1. The new branch copies 16 bytes starting at (uint8_t *)c->vreg[4] + 4. Since vreg is uint64_t[32][2], that scales lanes 1-3 of q4 plus lane 0 of q5, a register this instruction never loaded, and leaves lane 0 of q4 alone. It should scale c->vreg[4] from offset 0, the same way the wide branch scales all of c->vreg[1].
tests/test_widescreen_hud.py writes its y row at the same + 4 offset, so it can't catch this. Putting y at c->vreg[4] and a sentinel value in c->vreg[5] would.
The branch also conflicts with #2120 in host/hos_main.c and tests/test_widescreen_shapes.py. The Windows failure is tests/test_log_batch.py's timing check and doesn't look related.





The one part of mimic-wasm's fork (https://github.com/mimic-wasm/Hookshot) taken in, credited to them in the commit.
Before: with Ultrawide on, a screen wider than 16:9 already squeezed the HUD horizontally into the middle 16:9 (
hos_wide_squeeze). A narrower screen (4:3, 16:10, 5:4) gave the HUD the whole width at the full height, so it came out stretched.Now:
hos_wide_vertical_squeeze(the screen ratio over 16:9, and 1.0 on wider screens) scales the HUD's rows vertically on narrower screens (nx2/oot_wide.py's HUD patch). The tests are updated (test_widescreen_shapes.py), andtest_widescreen_hud.pyis new.Left out of the fork, on purpose:
loader.bat, and ahookshot_env.txtwithRX_VK_NOOPT=1.Draft until it's checked in game in a 4:3 and a 16:10 window: the HUD should be its normal shape, centred, with nothing cut off. Wider screens shouldn't change (their vertical scale is 1.0).
🤖 Generated with Claude Code