fix(wide): the wide area title card's frame is drawn in strips again #2589
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2589
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/wide-title-card-sites"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Since the builder moved to Rust (#2286), nothing calls
hos_wide_title_prepare,hos_wide_title_draworhos_wide_title_reset(game/hos_wide_ui.c). The old builder's text patch called them (nx2/oot_wide.py,nx2/oot_patches.py), and that patch went with nothing in its place. So on a picture wider than 16:9, an area's title card keeps its frame at 16:9 in the middle (#2555).Three engine hook sites call them again, at the places the patch had:
ui.titlePreparereplacesf_815505b0's call off_8154f1c0, which packs a picture's record. It is found insideui.pictureConstants' function.ui.titleDrawis atf_81550720's entry and can return. It draws the strips through that function itself, and the hook then lets the game draw (per picture, per thread).ui.titleResetis atf_8156abc0's entry, where the constants' arena is reset.Read first:
game/sites/sites.tomland this build'slocations.toml(the three sites),game/sites.def, and the callbacks ingame/oot_wide_sites.c.Fixes #2555.
Testing
Tested: Linux (CachyOS), RTX 3090, at 2560x1080. Both runtimes ran headless on the same base, one without the fix (
rt-base) and one with it (rt-ws-2555). Each started fromassets/saves/castle-gate, and Link walked through the gate into Castle Town, with shots every 20 frames.HOS_WIDE_UI_LOG=1givestitle totalsfor all 8 parts: 316 prepares, 316 draws, and 0 guard failures, unused preparations, missing slots or fallbacks each.tests/test_title_card_sites.pyis new and needs no game. It checks the three sites, then runs their callbacks behind the hooks as the lift lowers them, with the real host helpers. It covers a wide card packed and drawn in three strips, a reset of another arena (strips kept) and of its own (strips dropped), a 16:9 picture, and the sites off. It fails on main, because the table has noui.titlePrepare. Following this PC's rule, it hasn't run here; this PR's CI runs it.tests/test_wide_sites.pygets stubs for the new symbols. The C compiles with gcc and clang at-Wall -Wextra.Still to test: None.
Measurements
Nothing to measure for speed: three hooks on the title card's path, which runs while a card shows.
Risks
Only the title card is affected, and only on a picture wider than 16:9. At 16:9 or with the sites off, the game's own call runs as before. Revert to undo.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (this PR's CI runs it)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e1RP1VgcWpgA7Kq6ec
Tested in game: Linux (CachyOS), RTX 3090, 2560x1080, headless: from the castle-gate save, Link walks into Castle Town. Without the fix the 'Hyrule Castle Town' card's frame stays 16:9 in the middle; with it the frame spans the wide picture (3 strips), title totals 316 prepares/316 draws per part, no guard failures or fallbacks.
WIP: fix(wide): the wide area title card's frame is drawn in strips againto fix(wide): the wide area title card's frame is drawn in strips again