Say that the sprint button's B puts the weapon away when Link is not moving, not that it attacks.

This commit is contained in:
kendo
2026-11-13 00:35:30 +00:00
committed by chrg6
parent 54fa3bc0c7
commit aab082ff51
5 changed files with 8 additions and 8 deletions

View File

@@ -151,7 +151,7 @@ The log says which it is when a gamepad is taken: `input: HD rumble available fo
## Sprint button
On 1.1.1, `NX2NAVI_SPRINT_BUTTON` (`sprint_button`, the *Sprint button* row on the Controls tab, live) gives a button that makes Link sprint without rolling first: `l3` (the left stick's click, which has no other use), `b` (the game's B button, the bottom face button of the Nintendo layout), or `off` (the default). `NX2NAVI_SPRINT_MODE` (`sprint_mode`, the *Sprint mode* row) is `toggle` (the default: a press starts the sprint, the next press ends it) or `hold` (Link sprints while the button is held). Link sprints while his input flags hold the dash input; the set `sprint` of `recomp/patches-v111.txt` calls `runtime/sprint.c` after Link's movement update and the stance update that follows load those flags, and the host functions add the dash input while the sprint is on, so the game's own sprint runs with its speed, animation and camera. A toggled sprint goes on through jumps, slides and landings and ends when Link's state is anything else (an attack, a roll, an item, swimming, climbing, a cutscene), when ZL is held, or after four frames standing still (ninety after a press made while standing, before Link has moved). During play (Link's update ran within the last eight controller polls) the button is kept from the game, so it does not also fire its own action; B is kept only while Link moves, so it attacks as usual otherwise. In the settings menu, a menu of the game or a cutscene every button keeps its role. The set runs only while a button is chosen, so with the sprint button off its sites cost nothing. `NX2NAVI_SPRINT_PATCH=0` (or a mod whose code patches the same sites) keeps the patch set off and hides the rows.
On 1.1.1, `NX2NAVI_SPRINT_BUTTON` (`sprint_button`, the *Sprint button* row on the Controls tab, live) gives a button that makes Link sprint without rolling first: `l3` (the left stick's click, which has no other use), `b` (the game's B button, the bottom face button of the Nintendo layout), or `off` (the default). `NX2NAVI_SPRINT_MODE` (`sprint_mode`, the *Sprint mode* row) is `toggle` (the default: a press starts the sprint, the next press ends it) or `hold` (Link sprints while the button is held). Link sprints while his input flags hold the dash input; the set `sprint` of `recomp/patches-v111.txt` calls `runtime/sprint.c` after Link's movement update and the stance update that follows load those flags, and the host functions add the dash input while the sprint is on, so the game's own sprint runs with its speed, animation and camera. A toggled sprint goes on through jumps, slides and landings and ends when Link's state is anything else (an attack, a roll, an item, swimming, climbing, a cutscene), when ZL is held, or after four frames standing still (ninety after a press made while standing, before Link has moved). During play (Link's update ran within the last eight controller polls) the button is kept from the game, so it does not also fire its own action; B is kept only while Link moves, so it puts the weapon away as usual otherwise. In the settings menu, a menu of the game or a cutscene every button keeps its role. The set runs only while a button is chosen, so with the sprint button off its sites cost nothing. `NX2NAVI_SPRINT_PATCH=0` (or a mod whose code patches the same sites) keeps the patch set off and hides the rows.
## Nintendo Switch 2 controllers

View File

@@ -822,9 +822,9 @@
# rumble = 1
# Sprint button (game 1.1.1): Link sprints without rolling first. off (the default), l3 (the left stick's click, which
# has no other use) or b (the game's B button, the bottom one of the Nintendo layout: it sprints only while Link moves
# and attacks as usual otherwise). sprint_mode: toggle (press to sprint and again to stop; the sprint also ends when
# Link stops, attacks, rolls, targets, uses an item, swims or climbs) or hold. The Controls tab's Sprint rows set
# both; changes take effect at once.
# and puts the weapon away as usual otherwise). sprint_mode: toggle (press to sprint and again to stop; the sprint
# also ends when Link stops, attacks, rolls, targets, uses an item, swims or climbs) or hold. The Controls tab's
# Sprint rows set both; changes take effect at once.
# sprint_button = off
# sprint_mode = toggle
# Rumble strength in percent (0 to 300; 0 = off) and the exponent on the amplitude (0.2 to 1.5; lower = weak pulses

View File

@@ -7,7 +7,7 @@
// layout, or l3 the left stick's click, which has no other use); sprint_mode is toggle (a press starts the sprint, the
// next press or Link's state ends it) or hold (sprint while the button is held). During gameplay the button is kept
// from the game (sprint_pad, called by ov_input.c npad_states), so it does not also fire its own action. B is kept only
// while Link moves (Walk, Jump, Land, Fall, Clamber), so it attacks as usual otherwise.
// while Link moves (Walk, Jump, Land, Fall, Clamber), so it puts the weapon away as usual otherwise.
//
// Link's state: the id at [[[[Link +0x18] +0x270] +0x188] +0x1c0] +0x28 (+0x4c when that reads 0x11a, a state that
// wraps another), the same field main+0x4aed50 compares with 1 (Walk) before the game starts a sprint.

View File

@@ -329,7 +329,7 @@ static const char *const text_en[UI_TEXT_COUNT] = {
[UI_MENU_SPRINT_BUTTON] = "Sprint button",
[UI_MENU_SPRINT_BUTTON_DESC] = "A button that makes Link sprint without rolling first. L3, the left stick's "
"click, has no other use. The game's B button sprints only while Link moves and "
"attacks as usual otherwise.",
"puts the weapon away as usual otherwise.",
[UI_MENU_SPRINT_OFF] = "Off", [UI_MENU_SPRINT_B] = "Bottom button (Nintendo B)",
[UI_MENU_SPRINT_L3] = "L3 (left stick)",
[UI_MENU_SPRINT_MODE] = "Sprint mode",

View File

@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
assert(!dashing());
}
// toggle on the bottom button: a sword press while not moving reaches the game and starts nothing
// toggle on the bottom button: a press while not moving (put the weapon away) reaches the game and starts nothing
reset("b", "toggle");
assert(frame(BB, WAIT_ID, link) == BB && !dashing());
frame(0, WALK, link); // Link moves: from the next poll the button is the sprint's
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
frame(BB, WALK, link);
assert(!dashing() && poll_buttons == 0);
frame(0, ATTACK, link);
assert(frame(BB, ATTACK, link) == BB && !dashing()); // not moving: an attack as usual
assert(frame(BB, ATTACK, link) == BB && !dashing()); // not moving: the button keeps its own job
// hold on L3: sprint while held; L3 never reaches the game during play, other buttons do
reset("l3", "hold");