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 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-06 11:33:06 -05:00
parent 618b9ba4e5
commit 9a5b1163f3
18 changed files with 385 additions and 174 deletions

View File

@@ -13,14 +13,20 @@
#define DIAGONAL 23170 // STICK_MAX / sqrt(2)
#define MOUSE_FULL_CPS 3000.0
// Ocarina's controls (its Basic Controls screen, LayoutMsg/PlusMenu_00 of the game's messages): A actions and, held,
// dash; B put away; X jump; Y the sword; ZL target; ZR the selected item; L and R quick-select items; the d-pad plays
// the ocarina (left), puts the accessory on (up), calls Navi (right) and changes boots (down); the right stick's press
// resets the camera. So E acts and Left Shift, held, dashes (both A); Space jumps; Left Ctrl and Backspace put away; the
// mouse buttons attack (left), target (right) and reset the camera (middle); O and N are the ocarina and Navi besides 1
// to 4. SHAKE (NX2navi's object shake) has no key: Ocarina has no use for it, and bind_shake still sets one.
#define DEFAULT_KEYS \
{KEY_W, B_SL_UP}, {KEY_A, B_SL_LEFT}, {KEY_S, B_SL_DOWN}, {KEY_D, B_SL_RIGHT}, /* move */ \
{KEY_UP, B_SR_UP}, {KEY_LEFT, B_SR_LEFT}, {KEY_DOWN, B_SR_DOWN}, {KEY_RIGHT, B_SR_RIGHT}, /* camera, second source */ \
{KEY_MOUSE_L, B_Y}, {KEY_MOUSE_R, B_ZL}, {KEY_Z, B_ZL}, {KEY_F, B_ZR}, {KEY_X, B_ZR}, \
{KEY_SPACE, B_X}, {KEY_LSHIFT, B_B}, {KEY_E, B_A}, {KEY_Q, B_L}, {KEY_R, B_R}, \
{KEY_LCTRL, B_STICK_L}, {KEY_C, B_STICK_R}, \
{KEY_1, B_LEFT}, {KEY_2, B_UP}, {KEY_3, B_RIGHT}, {KEY_4, B_DOWN}, \
{KEY_TAB, B_PLUS}, {KEY_M, B_MINUS}, {KEY_G, B_SHAKE}
{KEY_SPACE, B_X}, {KEY_E, B_A}, {KEY_LSHIFT, B_A}, {KEY_LCTRL, B_B}, {KEY_BACKSPACE, B_B}, {KEY_Q, B_L}, \
{KEY_R, B_R}, {KEY_V, B_STICK_L}, {KEY_C, B_STICK_R}, {KEY_MOUSE_M, B_STICK_R}, \
{KEY_1, B_LEFT}, {KEY_O, B_LEFT}, {KEY_2, B_UP}, {KEY_3, B_RIGHT}, {KEY_N, B_RIGHT}, {KEY_4, B_DOWN}, \
{KEY_TAB, B_PLUS}, {KEY_M, B_MINUS}
// By position: south is Switch B, east A, west Y, north X (Nintendo layout); the Xbox layout swaps A with B and X with Y
// (south A, as the Xbox labels; cross A on a PlayStation pad). The triggers are ZL and ZR.
@@ -31,7 +37,7 @@
{PAD_ZR, B_ZR}
#define NINTENDO_PADS DEFAULT_PADS(B_B, B_A, B_Y, B_X)
#define XBOX_PADS DEFAULT_PADS(B_A, B_B, B_X, B_Y)
enum { DEFAULT_KEY_COUNT = 27, DEFAULT_PAD_COUNT = 16 };
enum { DEFAULT_KEY_COUNT = 31, DEFAULT_PAD_COUNT = 16 };
_Static_assert(sizeof (Binding[]){DEFAULT_KEYS} / sizeof (Binding) == DEFAULT_KEY_COUNT, "DEFAULT_KEY_COUNT");
static const InputMap defaults = {{DEFAULT_KEYS}, DEFAULT_KEY_COUNT, {{NINTENDO_PADS}, {XBOX_PADS}},