mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-21 04:55:56 +00:00
The free camera works on the keyboard and mouse: freecam_key switches it, the bound keys fly it and the mouse turns it
input.c freecam_gate also switches the free camera on a press of TOTK_FREECAM_KEY (f6 by default, none for no key). While it is on, ZL, ZR, L and R come from the merged Switch buttons, so the keys bound to them (Z, X, Q and R by default) go down, up and change the speed like the gamepad's; the keys' sticks already flew and turned it. The mouse's counts are taken in the poll and turn it at the game camera's rate (0.08 degrees a count times mouse_sens, through freecam_mouse), and input_direct_mouse_sample gives the game's mouse camera none meanwhile; in the stick emulation mode the mouse arrives in the right stick as before. The Controls tab gets a Free camera key row (off, F2 to F7, F9), with text in all four menu languages; docs/controls.md lists the keyboard column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
34b6b380ac
commit
5fa6db3c70
9 files changed
+106
-32
No files matched your search
+10
-4
@@ -944,9 +944,10 @@ static void row_quicksave_keys(void) {
|
||||
key_taken("TOTK_QUICKLOAD_KEY", note[1], sizeof note[1]));
|
||||
}
|
||||
|
||||
// The free camera combo (freecam.c): the trigger and shoulder pairs with a stick click, named as the open pad labels
|
||||
// its buttons, or none. totk.ini takes any combo of button positions, shown as written. Off on other game versions.
|
||||
static void row_freecam_pad(void) {
|
||||
// The free camera combo and key (freecam.c): the trigger and shoulder pairs with a stick click, named as the open pad
|
||||
// labels its buttons, or none. totk.ini takes any combo of button positions, shown as written. Off on other game
|
||||
// versions.
|
||||
static void rows_freecam(void) {
|
||||
static const char *const combos[] = {"zl+zr+lstick", "zl+zr+rstick", "l+r+lstick", "l+r+rstick", "none"};
|
||||
static const int pads[][3] = {{PAD_ZL, PAD_ZR, PAD_LSTICK}, {PAD_ZL, PAD_ZR, PAD_RSTICK},
|
||||
{PAD_L, PAD_R, PAD_LSTICK}, {PAD_L, PAD_R, PAD_RSTICK}};
|
||||
@@ -961,6 +962,11 @@ static void row_freecam_pad(void) {
|
||||
names[N - 1] = menu_text(UI_MENU_OFF);
|
||||
if (!freecam_available()) opt_disable_next(UI_MENU_FREECAM_PAD_V143);
|
||||
opt_choice_list("TOTK_FREECAM_PAD", UI_MENU_FREECAM_PAD, combos, names, N, UI_MENU_FREECAM_PAD_DESC);
|
||||
// The free camera key: keys no default binding uses ("none" rather than an empty value turns it off: unset is f6)
|
||||
static const char *const keys[] = {"none", "f2", "f3", "f4", "f5", "f6", "f7", "f9"};
|
||||
const char *key_names[] = {menu_text(UI_MENU_OFF), "F2", "F3", "F4", "F5", "F6", "F7", "F9"};
|
||||
if (!freecam_available()) opt_disable_next(UI_MENU_FREECAM_PAD_V143);
|
||||
opt_choice_list("TOTK_FREECAM_KEY", UI_MENU_FREECAM_KEY, keys, key_names, 8, UI_MENU_FREECAM_KEY_DESC);
|
||||
}
|
||||
|
||||
// The note under the prompts. The settings name a folder of prompts (input_prompts_folder: the prompts and the pad
|
||||
@@ -1103,7 +1109,7 @@ static void tab_controls(float scale) {
|
||||
row_quicksave_keys();
|
||||
row_walk_key();
|
||||
opt_slider("TOTK_WALK_SCALE", UI_MENU_WALK_SCALE, 0.2f, 0.9f, UI_MENU_WALK_SCALE_DESC, 0.01f, "%.2f");
|
||||
row_freecam_pad();
|
||||
rows_freecam();
|
||||
rows_gameplay_tweaks();
|
||||
// Analog sticks: one dead zone row per stick, falling back to TOTK_STICK_DEADZONE (both sticks) while unset. With
|
||||
// a gamepad connected each row shows its stick's deflection now, before the dead zone: a drifting stick's resting
|
||||
|
||||
Reference in new issue
Block a user