Repository navigation
games/0400486024DEC000: screen shape (DM_SCREEN_ASPECT) renders taller aspects without stretched HUD or transition gaps - #2651
PiinoStudio wants to merge 3 commits into
Conversation
|
This is an Ocarina of Time fix, writing this here so that agents can properly search for it as opposed to using the game ID |
…r aspects without stretched HUD or transition gaps With screen_aspect on and DM_SCREEN_ASPECT set (e.g. 1.6 for 16:10 MacBook or 1.333 for 4:3 iPad), places seventeen fingerprint-matched stubs under MATCH_FRAME_STEP: - Eleven height sites across graphics init, scene app init, base scene defaults, display mgr defaults, base res read, and display targets. - 3D perspective projection (sead::PerspectiveProjection::doUpdateMatrixImpl_) and inlined devirtualized projection matrix updates in camera update (main+0x33b82c) and device proj (main+0x23b9a8) scaling aspect and Vert+ fovyTan so gameplay and 3D subscreen/item models maintain 1:1 circular proportions without distortion on any screen ratio. - Layout2 ortho projection builders (main+0x1520c80 and main+0x773b90) scaling canvas height so HUD widgets keep 1:1 pixel aspect ratio. - Layout2 CalculateMtx (main+0x14e9980) scaling full-screen PicturePanes so scene transitions and faders cover the expanded canvas without gaps. Verified in gameplay on macOS across 16:9, 16:10, and 4:3.
1425a3f to
c606e3e
Compare
|
Thanks for this. I've been doing the same for Ocarina of Time on a fork (a 1.54 laptop screen) and asked about the scope in #2588, so a few notes from that work, in case they're useful:
Our version touches the same fades and HUD paths, so the two would collide if both went in. I'd rather test yours on the 1.54 screen than offer a second one. Is there anything specific you'd like checked? |
…een backdrops in CalculateMtx
|
@padsiwono Thanks for the detailed notes and for offering to test on your 1.54 screen! I just pushed two updates to this PR:
If you get a chance to test on your 1.54 laptop screen, it would be great to check:
Your note about stubbing the earlier camera loads for unified Vert+/Hor+ (including 21:9) also sounds very clean—happy to look into folding that in or keeping it in mind if maintainers want ultrawide covered in the same PR. |
With
screen_aspect onandDM_SCREEN_ASPECTset (e.g.1.6for 16:10 MacBook displays or1.333for 4:3 iPad displays; launcher setting Picture shape), places fifteen fingerprint-matched stubs underMATCH_FRAME_STEP(others, inactive when state+0x48is 0):graphics init,scene app init,base scene defaults,display mgr defaults,base res read, anddisplay target a/b/c.sead::PerspectiveProjection::doUpdateMatrixImpl_at0x3485cc0), scalingfovyTanbyk = (16/9) / ratiofor Vert+ framing (preserving horizontal 16:9 framing with extra vertical scene view).layout orthoatmain+0x1520c80andlayout view orthoatmain+0x773b90), scaling canvas height so 2D HUD elements (hearts, buttons, minimap) keep a 1:1 pixel aspect ratio in the safe area.layout calc matrixatmain+0x14e9980), scaling full-screenPicturePaneelements (width >= 1000,height >= 700,|width*9 - height*16| < 200) so scene faders and door/warp transitions (such asP_Black_00andP_White_00inEventFade_00) cover the expanded canvas without un-faded bands at top and bottom.Verification
Verified in active gameplay on macOS (v131072, Kokiri Forest and Goron City):
16:9(0,2560x1440),16:10(1.6,2560x1600), and4:3(1.333,2560x1920) all keepheart1at68x33(h/w = 0.485, shifted vertically by half the extra height) with unstretched HUD widgets and Vert+ 3D framing.top_non_black = 0,bot_non_black = 0).python3 dm/tools/docs_patches.py --check) and test suite pass cleanly.