Repository navigation
jak2: fix hud alignment - #4075
Conversation
|
Can one of the admins verify this patch? |
|
make sure you test this on all the missions that have custom HUD elements |
|
Thanks for checking it out, good call! Through this I found one HUD element appearing incorrectly, which was the floating jetboard trick points. This isn't something introduced by this PR, but something that got left out. This is because it isn't a texture or merc model, but live text drawn here. Through this I found an original game bug, which is they scale it by At PC 16:9, the original mistake gets compounded, appearing all the way on the right of screen. In order to preserve the original game bug, I guard on |
|
ok to test |
There were a few things going on here.
Jak 2's menu wheel is zoomed in at 16:9 but zoomed out at 4:3. However, the custom aspects use the scaling from the 4:3 mode, this makes sense as you'd want the zoomed out wheel.
However I noticed HUD elements scaled correctly on PS2 16:9 but not PC 16:9, which was a hint.
The hardcoded values for every individual HUD element for 16:9 and 4:3 are in pixels, normalized across 480 being the stretch of the screen.
To fix the HUD alignment I scaled those offsets, scaling them inside
set-hud-piece-positionmeant both textures and merc models got scaled at the same time.Note that you can get (very tiny) snapping into different integer values as you scale to different aspects. This is simply the result of scaling integer offsets which is what the game uses.