Skip to content

Add HUD face button diamond layout customization (#321) - #574

Closed
jfpaardoo wants to merge 1 commit into
Revivedx:testfrom
jfpaardoo:feat/hud-button-layout
Closed

jfpaardoo wants to merge 1 commit into
Revivedx:testfrom
jfpaardoo:feat/hud-button-layout

Conversation

@jfpaardoo

Copy link
Copy Markdown

What this changes

Adds a HUD button layout (�utton_layout in savagewind.ini) option under Options > Controls to customize where the four Switch face buttons (A, B, X, Y) sit on the HUD action prompt diamond (PaDoCommandA/B/X/Y_00.bflyt):

  • Automatic (default): follows the player's controller face button bindings (g_bind_pad[BIND_A..BIND_Y], or the primary face actions Interact, Cancel, Jump, Attack when g_bind_pad is at default) whenever they form a permutation of the four diamond vertices (East, South, North, West), falling back to the Nintendo layout otherwise.
  • Nintendo: East = A, South = B, North = X, West = Y.
  • Swap A / B: South = A, East = B, North = X, West = Y.
  • Xbox: South = A, East = B, West = X, North = Y.
  • Swap X / Y: East = A, South = B, West = X, North = Y.
  • GameCube: South = A, West = B, East = X, North = Y.

In hud_letters_flyt() (
untime/services/fs.c), when the diamond layout differs from the default Nintendo positions, PaDoCommandA/B/X/Y_00.bflyt updates:

  • The three inactive xt1 prompt positions (T_A_00/T_A_01, T_B_00, T_X_00, T_Y_00).
  • The active button pane (N_Btn*), the diamond cutout base orientation and texture (P_Base*, Nt_KeyBtnSubBaseAL_00^s / Nt_KeyBtnSubBaseBL_00^s in xl1), and the callout / capture panes (W_Base*, T_Guide*, Nt_KeyTex*_01, N_Capture*, P_CaptureUse*) when a prompt moves to or from the West vertex.
  • Also updates glyphs_apply_layout() (
    untime/nvn/glyphs.c) so that ICONS_NINTENDO redraws the active layout icon (Nt_KeyTexA/B/X/Y_00) when a face button is remapped (copy != 0).
  • Includes menu translations across all 13
    untime/ui/i18n/*.inc files and a synthetic unit test (make test-hud-button-layout).

Fixes #321

How it was tested

  • Synthetic / unit tests:
    • make test-hud-button-layout: verifies glyphs_hud_positions() across Automatic (default, swapped g_bind_pad, swapped g_act_pad) and all explicit presets (Nintendo, Swap A / B, Xbox, Swap X / Y, GameCube), hud_letters_flyt() binary layout patching on synthetic PaDoCommandA/B/X/Y_00 BFLYT buffers (active/inactive positions, base cutout rotation/scale, and West vs. East/South/North callout alignment), and savagewind.ini �utton_layout save/load round-trip.
    • make test-bind-capture and make test-actions: PASS.
    • python3 tools/i18n_check.py: 787 entries, 0 missing, 0 unused across all 13 languages.
    • git show --check: clean.
  • Build:
    • make -j8 runtime-objs on Windows (MSYS2 UCRT64, clang): builds cleanly with 0 warnings/errors.

Checklist

  • Based on the latest est and opened against est
  • Built and run locally, and checked with unit tests (make test-hud-button-layout, make runtime-objs)
  • No game files, keys, firmware, generated game code or save files in the changes

Copilot AI balanced review requested due to automatic review settings November 8, 2026 12:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Revivedx added a commit that referenced this pull request Nov 8, 2026
New:
- Audio > Audio output: Stereo, Surround 5.1 or 3D Headphones. Stereo stays the default (#576).
- Audio > Shrine sensor volume, 0% to 100%, from the next start (#571, fixes #449). The sound is changed in memory
  only; the game files are not touched.
- Controls > HUD button layout: where A, B, X and Y sit on the HUD's diamond, from the next start. Automatic follows
  the controller bindings (#574, #321).

Tested by playing on Windows with headphones (Stereo and 3D Headphones), and with a hidden start, warp and teleport
run: no crash and no errors in the log. Surround 5.1 has not been tested on real 5.1 speakers, and the option says so.

Co-authored-by: jfpaardoo <juaparpar@alum.us.es>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Revivedx

Revivedx commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Thanks, this is in test as a04bafd. One change: I left out the round_label fallback in glyphs_apply_layout, so a Nintendo controller with swapped buttons keeps the game's own glyphs as before. Closing since test gets one clean commit per batch; you are credited as co-author.

@Revivedx Revivedx closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants