feat(prompts): the keyboard face's ocarina notes and letters show the keys bound #2755
Open
github-sync
wants to merge 3 commits from
github/pr/2755 into main
pull from: github/pr/2755
merge into: MagicBeanDev:main
MagicBeanDev:main
MagicBeanDev:github/pr/2893
MagicBeanDev:github/pr/2890
MagicBeanDev:github/pr/2887
MagicBeanDev:github/pr/2878
MagicBeanDev:github/pr/2875
MagicBeanDev:github/pr/2874
MagicBeanDev:github/pr/2873
MagicBeanDev:github/pr/2871
MagicBeanDev:github/pr/2756
MagicBeanDev:github/pr/2897
MagicBeanDev:github/pr/2896
MagicBeanDev:github/pr/2718
MagicBeanDev:github/pr/2842
MagicBeanDev:github/pr/2691
MagicBeanDev:github/pr/2895
MagicBeanDev:github/pr/2743
MagicBeanDev:github/pr/2765
MagicBeanDev:github/pr/2708
MagicBeanDev:github/pr/2732
MagicBeanDev:github/pr/2817
MagicBeanDev:github/pr/2876
MagicBeanDev:release-please--branches--main
MagicBeanDev:release-please--branches--main--release-notes
MagicBeanDev:github/pr/2778
MagicBeanDev:github/pr/2888
MagicBeanDev:github/pr/2866
MagicBeanDev:github/pr/2877
MagicBeanDev:github/pr/2800
MagicBeanDev:github/pr/2829
MagicBeanDev:github/pr/2850
MagicBeanDev:github/pr/2889
MagicBeanDev:github/pr/2882
MagicBeanDev:github/pr/2860
MagicBeanDev:github/pr/2849
MagicBeanDev:github/pr/2886
MagicBeanDev:github/pr/2794
MagicBeanDev:github/pr/2840
MagicBeanDev:github/pr/2830
MagicBeanDev:github/pr/2834
MagicBeanDev:github/pr/2719
MagicBeanDev:github/pr/2742
MagicBeanDev:github/pr/2741
MagicBeanDev:github/pr/2820
MagicBeanDev:github/pr/2771
MagicBeanDev:github/pr/2859
MagicBeanDev:github/pr/2858
MagicBeanDev:github/pr/2823
MagicBeanDev:github/pr/2757
MagicBeanDev:github/pr/2769
MagicBeanDev:github/pr/2844
MagicBeanDev:github/pr/2843
MagicBeanDev:github/pr/2673
MagicBeanDev:github/pr/2855
MagicBeanDev:github/pr/2739
MagicBeanDev:github/pr/2807
MagicBeanDev:github/pr/2851
MagicBeanDev:github/pr/2789
MagicBeanDev:github/pr/2814
MagicBeanDev:github/pr/2818
MagicBeanDev:github/pr/2774
MagicBeanDev:github/pr/2772
MagicBeanDev:github/pr/2750
MagicBeanDev:github/pr/2786
MagicBeanDev:github/pr/2785
MagicBeanDev:github/pr/2782
MagicBeanDev:github/pr/2779
MagicBeanDev:github/pr/2775
MagicBeanDev:github/pr/2706
MagicBeanDev:github/pr/2766
MagicBeanDev:github/pr/2747
MagicBeanDev:github/pr/2759
MagicBeanDev:github/pr/2745
MagicBeanDev:github/pr/2740
MagicBeanDev:github/pr/2733
MagicBeanDev:github/pr/2725
MagicBeanDev:github/pr/2727
MagicBeanDev:github/pr/2728
MagicBeanDev:github/pr/2729
MagicBeanDev:github/pr/2721
MagicBeanDev:github/pr/2722
MagicBeanDev:github/pr/2715
MagicBeanDev:github/pr/2714
MagicBeanDev:github/pr/2707
MagicBeanDev:github/pr/2703
MagicBeanDev:github/pr/2705
MagicBeanDev:github/pr/2697
MagicBeanDev:github/pr/2679
MagicBeanDev:github/pr/2676
MagicBeanDev:github/pr/2669
MagicBeanDev:docs/what-hookshot-connects-to
MagicBeanDev:fix/hdr-encode-test
MagicBeanDev:fix/main-tests
MagicBeanDev:fix/play-cache-files
MagicBeanDev:perf/game-barrier-order
MagicBeanDev:feat/heap-lazy
MagicBeanDev:feat/texture-detail
MagicBeanDev:perf/astc-opaque-bc1
MagicBeanDev:fix/fs-dir-lock
MagicBeanDev:fix/framegen-native-kept
MagicBeanDev:fix/update-no-downgrade
MagicBeanDev:port/k10-gcn-f16-mirrors
MagicBeanDev:fix/framegen-mult-cap
MagicBeanDev:chore/release-as-2.1.1
MagicBeanDev:perf/pcache-load-switch
MagicBeanDev:fix/prepare-progress-log
MagicBeanDev:fix/update-closes-stale-game
MagicBeanDev:fix/hdr-scaled-sampled
MagicBeanDev:perf/first-start-preset
MagicBeanDev:perf/zero-upload
MagicBeanDev:fix/vcore-escape-2s
MagicBeanDev:test/fake-gh-atomic
MagicBeanDev:perf/batch-idle-flush
MagicBeanDev:test/finish-stub-a
MagicBeanDev:chore/record-2.1.0
MagicBeanDev:fix/main-red-tests
MagicBeanDev:fix/test-display-startup-driver-cache
MagicBeanDev:feat/mesh-shader-mode
MagicBeanDev:fix/menu-probes-at-startup
MagicBeanDev:fix/fps-counter-classic
MagicBeanDev:fix/test-log-batch-flake
MagicBeanDev:fix/narrow-screen-hud
MagicBeanDev:ci/prereleases
MagicBeanDev:release/v2.0.15
MagicBeanDev:hotfix/v2.0.15
MagicBeanDev:fix/present-ahead-replay
MagicBeanDev:release/v2.0.13
MagicBeanDev:fix/bracket-paths-2013
MagicBeanDev:fix/hdr-overlays-2013
MagicBeanDev:fix/fps-counter-scale-2013
MagicBeanDev:fix/stick-seen-at-rest
MagicBeanDev:hotfix/menu-fits-screen
MagicBeanDev:fix/f1-always-opens-menu
MagicBeanDev:fix/ini-keep-lines
MagicBeanDev:claude/cranky-pike-7cf247
MagicBeanDev:perf/texture-answer-flat
MagicBeanDev:fix/stamp-test-modules
MagicBeanDev:fix/appimage-fonts
MagicBeanDev:fix/display-awake
MagicBeanDev:release/v2.0.12
MagicBeanDev:fix/discord-windows
MagicBeanDev:rc/v2.0.12-tests
MagicBeanDev:fix/dlss-keep-feature
MagicBeanDev:rc/v2.0.12
MagicBeanDev:button-icons
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
autorelease: pending
autorelease: tagged
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
question
Further information is requested
testing wanted
wontfix
This will not be worked on
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2755
Loading…
Reference in a new issue
No description provided.
Delete branch "github/pr/2755"
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?
On the Keyboard face the ocarina's notes (the songbook, a song's staff) and the white letters on black still show the Switch's A, L, R, X, Y, so a player on the keyboard has to work out which key each note is. #2435 left the textures as the Switch's; this gives the keyboard face textures of its own.
What it does
How
nx2/prompt_assets.py:button_layers: the notes' and the letters' layers, cut out offace_layersunchanged, so the pad faces and the keyboard draw them the same way.hand_made: the hand-made overrides, cut out the same way.Icons.keys: each key's icon from the font just built (KEY_BASE + key code, the keyboard face's own glyphs from #2435), for the 110 keysnx2/prompt_keys.pynames.keyboard_layers: those, for every key, intoprompts/keyboard/textures.bin, the key code in the entry's pad-input byte. The icons are drawn at the size of the game's own discs (KEYBOARD_SCALE): a key fills its square where a pad's round icon leaves the corners.textures.binare byte-identical to before (checked for Switch and Xbox).host/prompts.c: withprompts/keyboard/textures.binthere,texture_facekeeps the keyboard face's own textures andtexture_bindgives each Switch button its first key (bind[HOS_SW_N + b]), whichcurrent_bindsalready carries, so the live path needs no change.readme.md: the Button prompts entry.tests/test_prompt_skip.py: its stand-in generator writes the keyboard'stextures.binasgeneratenow does.prompts/keyboard/textures.binis 7.0 MB (Xbox's is 4.2 MB) and is made in about 6 s.Not in this PR: the ocarina's own note rows (#1930,
HOS_KEY_OC_NOTE_*). When a note has a key of its own, every face's prompts (the notes' textures, the ocarina hint, the icons in texts) still show the Switch button's control, as before. It's the same gap on every face, so it's better as its own change.Screenshots
The Song of Time in the songbook, the Keyboard face; the right one switched to Xbox with the songbook open. The "before" run had the default keys, the "after" runs the tester's own (I for A), so the letters differ.
Testing
In game, native Windows 11, RTX 5060 Ti, the v131072 game, a build of this branch on main (
4678050), driven with the control bridge (headless), a save in the Fire Temple:prompts: keyboard texturesat the start40 runs for this pad's controlsnow xbox textures: 2201 runs written, 40 put back)now keyboard textures: 40 runs written, 2201 put back)Tests:
test_prompt_skip,test_prompts_live,test_prompt_font_bind,test_prompt_auto_face,test_menu_hooks,test_prompt_guide_lines,test_appimage_prompt_fontsandtest_release_prompt_packagespass.tests/run_all.pyon this machine: 416 passed, 9 failed, 67 skipped. The 9 (nx2/test_nup_paths.py,test_builder_details_hitbox,test_builder_dlss_update,test_gpu_hang_watch,test_input_background,test_portable_archive,test_portable_builder_home,test_portable_builder_startup,test_updater_asset_digest) fail the same on main without this change: the builder's .NET, Windows symlinks and timing on this PC.The branch is rebased on main (
51da046) after the run; the files it touches didn't change there, and the tests above pass on it again. A row for the run is indocs/tested-configurations.md.🤖 Generated with Claude Code
I merged this into current main and ran test_prompt_skip, test_prompts_live, test_prompt_font_bind, test_prompt_auto_face, test_menu_hooks and test_release_prompt_packages. All pass. The appimage failure is the package-mirror timeout, not this change.
The host side is small and safe. host/prompts.c only picks the keyboard face's textures when prompts/keyboard/textures.bin exists. Without it, texture_face and texture_bind fall back to the Switch defaults as before, so an older build's output still works. first_key() already limits key codes to 1..0xFF, which fits the pad-input byte, and prompt_keys.KEYS runs 0x01..0xDE. prompt_keys.py is already in prompt_key(), so the #2698 skip key covers the new import. The test_prompt_skip change mirrors generate() rather than weakening the check.
Heads-up for the merge order: this and #2756 (and #2757) each add a row at the top of docs/tested-configurations.md, so whichever lands second needs a one-line rebase. The code in host/prompts.c merges cleanly with #2756, and I ran the prompt tests on the combination.