From 9a5b1163f3a66d03a96468c12387c51db62a25e3 Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 6 Nov 2026 11:33:06 -0500 Subject: [PATCH] Make every settings menu row work for Ocarina and give the controls Ocarina's actions and keys. The Screen tab hides Game resolution when the build has no output and scene patch sets, and the resolution code no longer grows the memory pool for it. FSR sharpness now also runs when the game image is shrunk to the window, which is always the case for Ocarina's 2560x1440 picture at 1920x1080, and the overlay drops NX2navi's fixed 3D scene size. A colour profile set in nx2navi.ini now applies without the menu. The Game tab hides the frame limit in builds without frame-rate patch sets and lists the game languages the RomFS ships, adding Polish and Brazilian Portuguese. 5.1 sound is reported to the game's virtual output device. The remap page describes each button as Ocarina's controls screen does, gives each D-pad direction its own description and drops NX2navi's shake row; the keyboard defaults follow Ocarina (Shift dashes on A, Ctrl puts away on B, O and N for the ocarina and Navi, middle mouse resets the camera). docs/controls.md is updated. Co-Authored-By: Claude Opus 5.5 --- docs/controls.md | 48 +++++---- runtime/audio_mixer.c | 5 +- runtime/cfg.c | 2 +- runtime/cfg_probe.c | 15 ++- runtime/frame_rate.c | 16 ++- runtime/gfx_present.c | 10 +- runtime/host.h | 2 + runtime/input_map.c | 16 ++- runtime/ov_system.c | 8 +- runtime/resolution.c | 15 ++- runtime/ui/binds_page.cpp | 7 +- runtime/ui/menu.cpp | 85 +++++++++++---- runtime/ui/menu.h | 3 +- runtime/ui_text.c | 213 +++++++++++++++++++++++--------------- runtime/ui_text.h | 12 ++- runtime/vk.h | 8 +- runtime/vk_color.c | 31 ++++-- runtime/vk_fsr.c | 63 +++++++++-- 18 files changed, 385 insertions(+), 174 deletions(-) diff --git a/docs/controls.md b/docs/controls.md index 3569604a..b4218192 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -8,31 +8,37 @@ Input comes from the first SDL3 gamepad, the keyboard and the mouse, merged into - `xbox`: south A, east B, west X, north Y, as an Xbox pad labels them; on a PlayStation pad cross is A, circle B, square X, triangle Y. - `auto` (default): `nintendo` for a pad whose east button SDL reports labelled A (Switch Pro Controller, Nintendo-layout pads), `xbox` for the others. -The log names the layout in effect (`input: gamepad layout ...`); the menu shows it under *Automatic*. Which controller's buttons the game's prompts show is `NX2NAVI_PROMPTS` (see Xbox button prompts below). 0.1.9's `pad_layout = xbox_prompts` is read as `pad_layout = nintendo` with `prompts = xbox`, and the menu writes it that way. +The log names the layout in effect (`input: gamepad layout ...`); the menu shows it under *Automatic*. Ocarina's prompts always show the Switch letters: the Xbox and PC prompt folders below are made from NX2navi's files and do not exist for Ocarina, so its menu has no *Button prompts* row. 0.1.9's `pad_layout = xbox_prompts` is read as `pad_layout = nintendo` with `prompts = xbox`, and the menu writes it that way. + +The actions are Ocarina's, as its own *Basic Controls* screen (Plus menu, System) names them: | Switch | Gamepad (by position, Nintendo layout) | Keyboard and mouse | Action in the world | |---|---|---|---| | Left stick | left stick | W A S D | move | | Right stick | right stick | mouse; arrow keys as a second source | camera | -| Y | west | left mouse button | attack | -| ZL | left trigger (over 50%) | right mouse button, Z | shield, lock on | -| ZR | right trigger (over 50%) | F, X | bow | +| A | east | E, Left Shift | actions (talk, open, pick up, climb, grab); held, dash | +| B | south | Left Ctrl, Backspace | put away, cancel, back | | X | north | Space | jump | -| B | south | Left Shift | run, cancel | -| A | east | E | interact, pick up | -| L | left shoulder | Q | abilities | -| R | right shoulder | R | throw weapon | -| Left stick click | left stick click | Left Ctrl | crouch | -| Right stick click | right stick click | C | first-person view | -| D-pad left, up, right, down | D-pad | 1 2 3 4 | quick-select | -| Plus | Start | Tab | menu, inventory | +| Y | west | left mouse button | attack with the sword | +| ZL | left trigger (over 50%) | right mouse button, Z | target (hold or toggle, the game's *Targeting Type* option) | +| ZR | right trigger (over 50%) | F, X | use the selected item (slingshot, bow, boomerang, hookshot, bombs, bottles) | +| L | left shoulder | Q | quick-select items; previous page in the game's menus | +| R | right shoulder | R | quick-select items; next page in the game's menus | +| Left stick click | left stick click | V | (not on the game's controls screen) | +| Right stick click | right stick click | C, middle mouse button | reset the camera behind Link | +| D-pad left | D-pad left | 1, O | play the ocarina | +| D-pad up | D-pad up | 2 | put the accessory on or take it off | +| D-pad right | D-pad right | 3, N | talk to Navi | +| D-pad down | D-pad down | 4 | change boots | +| Plus | Start | Tab | menu: items, equipment, collection, system | | Minus | Back | M | map | -| Right stick shaken left and right | shake the right stick | G | detach a fused part from what object holds | -Esc is unbound in the game; it opens the settings menu and releases the mouse cursor (see Mouse camera). Z and X duplicate ZL and ZR so menu pages turn with two neighbouring keys; the menu tabs (L, R) are Q and R. The mouse wheel is unbound. The bindings are the tables of `input_map` in `runtime/input_map.c`: the keys (platform-neutral key ids) and one gamepad table per layout (gamepad inputs by position); `runtime/input_win.c` translates Win32 virtual keys and SDL buttons. +The game's *Swap Jump Controls* option trades B and X (jump on B, put away on X); the bindings stay on the Switch buttons, so Space then puts away and Left Ctrl jumps. Left Shift is A, so holding it dashes; E presses A once for talking and opening. Esc is unbound in the game; it opens the settings menu and releases the mouse cursor (see Mouse camera). Z and X duplicate ZL and ZR on neighbouring keys. The mouse wheel is unbound. The right-stick shake (`bind_SHAKE`, NX2navi's object) has no default key and no row in Ocarina's menu. The bindings are the tables of `input_map` in `runtime/input_map.c`: the keys (platform-neutral key ids) and one gamepad table per layout (gamepad inputs by position); `runtime/input_win.c` translates Win32 virtual keys and SDL buttons. ## Xbox button prompts +NX2navi only: the folders are made from NX2navi's UI archive and fonts (`Font/Font*.Nin_NX_NVN.bfarc.zs`); Ocarina's are `Font2/*.Nin_Ounce_NVN2` and have no such folders. + `NX2NAVI_PROMPTS` (`prompts`, the *Button prompts* row on the Controls tab, read at start) picks the controller whose buttons the game's prompts show: `nintendo` (default) keeps the game's own, `xbox` shows an Xbox controller's, `pc` the keyboard and mouse (PC button prompts, below). - L, R, ZL, ZR, Plus and Minus become LB, RB, LT, RT, Menu and View, and the d-pad prompts a cross with an arrow for each direction meant. The letters on the keys are cut out in the game's own text font. @@ -59,6 +65,8 @@ The Switch prompts stay, with a note under *Button prompts* and a `RomFS overlay ## PC button prompts +NX2navi only, as the Xbox prompts above. + `prompts = pc` (*PC* on the *Button prompts* row) shows the key or mouse button the default keyboard bindings press each Switch button with, whatever the pad layout. The game loads `romfs-patches-pc` in place of `romfs-patches`, written by `tools/make_romfs_patches.py --prompts pc` (`button_icons.py`, `pc_icons`), which the setup runs next to the Xbox ones: | Switch | Prompt | @@ -87,9 +95,9 @@ The Minus+Plus combo never reaches the game. In the menu the arrow keys, the D-p ## Remapping -The *Controls* tab of the settings menu lists, under the button layout, every Switch button, the eight stick directions the keys drive (movement and camera) and the shake key, each with two key cells and a controller cell. Select a cell, press A or Enter, then press the new key, mouse button or controller button; Esc or five seconds without a press cancel, and a controller button cancels a key cell. Delete, Backspace or X clears the selected cell. A key another action has moves to the new one (the description names the action it left); a controller button swaps with the one it replaces. A remapped controller button is physical: from then on the face buttons (A B X Y) stay where they are in both layouts, until the buttons are put back as the layout in use has them or *Reset all buttons* is chosen. F1, F8, F10, F11 and Esc cannot be bound (the menu, the flight recorder and the window keep them). Punctuation keys are named by their place on a US keyboard; the menu shows the character the keyboard layout in use puts there. +The *Controls* tab of the settings menu lists, under the button layout, every Switch button and the eight stick directions the keys drive (movement and camera), each with two key cells and a controller cell. Each row's description says what the button does in Ocarina. Select a cell, press A or Enter, then press the new key, mouse button or controller button; Esc or five seconds without a press cancel, and a controller button cancels a key cell. Delete, Backspace or X clears the selected cell. A key another action has moves to the new one (the description names the action it left); a controller button swaps with the one it replaces. A remapped controller button is physical: from then on the face buttons (A B X Y) stay where they are in both layouts, until the buttons are put back as the layout in use has them or *Reset all buttons* is chosen. F1, F8, F10, F11 and Esc cannot be bound (the menu, the flight recorder and the window keep them). Punctuation keys are named by their place on a US keyboard; the menu shows the character the keyboard layout in use puts there. -The tab writes `nx2navi.ini` lines, one per Switch button or stick direction: `bind_