mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 20:25:57 +00:00
Keep the Recall reticle and gauge over their target on wide and tall game resolutions
At a game resolution wider than 16:9 the ability reticle and the Recall progress ring sat between their target and the middle of the screen (at half the distance on 32:9). Both are moved in code to a point in the 1920x1080 grid on a pane under the root, so the root's scale k scaled their position too, like the markers in MARKER_ROOT. Pointer_00 and ModorecoGauge_00 join MARKER_ROOT: - Pointer_00: the code moves N_App_00. Its children's scales are animated, so k goes on N_App_00 itself (a pane's own scale doesn't scale its translate), and on the centred bow and throw pointers N_Arrow_00 / N_WeaponThrow_00. - ModorecoGauge_00: the code moves N_Trans_00 and sets its scale by distance, so k goes on the ring's pictures. They ship mirrored at -1 and are turned only 0 or 180 degrees, so apply() now accepts a shipped scale of -1 and keeps its sign. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f65b4ee07
commit
d3f841a737
1 file changed
+9
-2
@@ -33,6 +33,13 @@ MARKER_ROOT = {
|
||||
'AttentionLockOn_00': ('N_Offset_00',), # N_PosRoot_00 moves; N_Offset_00 animates y
|
||||
'EnemyInfo_00': ('Pa_EnemyLife_00', 'Pa_EnemyNotice_00'), # the parts move; N_EnemyLifeArea_* stay screen-sized
|
||||
'BalloonMessage_00': (), # the speech balloon part is pooled: its scale goes inside, see BALLOON_PART
|
||||
# The ability reticle (seen with Recall): N_App_00 moves to the target (a pane's own scale doesn't scale its
|
||||
# position); its children's scales are animated. The bow and throw pointers stay centred.
|
||||
'Pointer_00': ('N_App_00', 'N_Arrow_00', 'N_WeaponThrow_00'),
|
||||
# The Recall gauge ring: N_Trans_00 moves to the object and the code sets its scale by distance, so the scale goes
|
||||
# on the ring's pictures (mirrored, -1 as shipped; turned 0 or 180 degrees, so a scale on x stays undistorted).
|
||||
'ModorecoGauge_00': ('P_Smoke_00', 'P_Sh_00') + tuple(f'P_{p}{s}_00' for p in ('Base', 'Glow', 'Main', 'MainLight',
|
||||
'BandLight') for s in 'LR'),
|
||||
}
|
||||
|
||||
# Speech balloons are pooled: the game clones Pa_BalloonMessage_00 into Pa_BalloonMessage_%02d at run time, and the clones
|
||||
@@ -260,8 +267,8 @@ def apply(blarc, members, width, height, hud_corner=True):
|
||||
for pane in ('RootPane',) + MARKER_ROOT[layout]:
|
||||
at = pane_offset(layout, pane) + FIELD[root_scale]
|
||||
have = struct.unpack_from('<f', blarc, at)[0]
|
||||
if abs(have - 1.0) > 1e-3: raise SystemExit(f'{layout} {pane} {root_scale}: {have}, expected 1.0')
|
||||
if pane != 'RootPane': struct.pack_into('<f', blarc, at, k)
|
||||
if abs(abs(have) - 1.0) > 1e-3: raise SystemExit(f'{layout} {pane} {root_scale}: {have}, expected ±1.0')
|
||||
if pane != 'RootPane': struct.pack_into('<f', blarc, at, k * have) # mirrored panes stay mirrored
|
||||
continue
|
||||
at = pane_offset(member[5:-6], 'RootPane') + FIELD[root_scale]
|
||||
have = struct.unpack_from('<f', blarc, at)[0]
|
||||
|
||||
Reference in new issue
Block a user