Files
NX2navi/runtime/sprint.h
chrg6 d64a9b689c Move the sprint button's stance host off the water ripples' patch page slot, and fix how presses and timings reach it.
The stance site called page +0xf50, which the 0.10.0 line gives the water ripples above 60 fps: the second
registration ends every 1.1.1 start with "registered twice", the sprint button off included. It calls +0xf30 now, and
the comments say which slots the other sets hold. The set's switch is NX2NAVI_SPRINT_BUTTON_PATCH, not a name another
open request uses for a set of its own.

The stand-still timings count 60 Hz frames (frame_step_frames), so a toggled sprint no longer ends on a short stop at
high frame rates. A press is decided at its start for its whole length: kept from the game and the sprint's when it
begins in gameplay (B: while Link moves), else the game's alone, so a held B is not handed to the game half way and a
B that closes the pause menu starts no sprint. A sprint switched off with the button setting does not come back by
itself, Link's state is read only where the memory is readable, and the row, nx2navi.ini.example and the controls
page say that B is the jump under the game's Swap Jump Controls and name the button without assuming the layout.
tests\sprint_check.py covers the press latch, the menu press, 240 fps and the switch-off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:57:56 -05:00

13 lines
764 B
C

// Sprint button (sprint.c): the patch set sprint's host functions and the button's input.
#pragma once
#include <stdint.h>
// Called with the buttons of every controller poll the game gets (ov_input.c npad_states): notes the sprint button's
// presses and keeps it from the game during gameplay.
void sprint_pad(uint64_t *buttons);
// One update of Link's sprint: kind is how his state treats it (sprint.c), button and hold the settings. 1 while on.
int sprint_step(int kind, int button, int hold);
// 1 when the game version has the patch set sprint and nothing keeps it off (NX2NAVI_SPRINT_BUTTON_PATCH=0, a mod patching
// its sites): the Controls tab shows the sprint rows then. The set itself runs only while a button is chosen.
int sprint_available(void);