Triforce v0.9.0

Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-30 20:55:14 -06:00
parent 8cb23131f9
commit 822ee913bc
86 changed files with 8128 additions and 438 deletions

View File

@@ -79,9 +79,18 @@ static void mouse_sens_save(void) {
/* The Insert menu keeps the sensitivity (its Mouse sensitivity row, option 7, in percent), read with each read; - and =
change it there. HOS_MOUSE_SENS still wins, and then - and = keep it in <user>/mouse_sens.txt as before. A value in
mouse_sens.txt from before is moved into the menu once, while the menu's is still its default; the file is renamed
mouse_sens.txt.moved then, so the menu's value is not replaced by it again at a later start */
mouse_sens.txt.moved then, so the menu's value is not replaced by it again at a later start.
((Triforce, 11-30) A key that is a control's (the Controls page's bindings, the walk key) is that control's alone and no
sensitivity key: bound to a control (- or Num - on A, say), every press of it took a fifth off the sensitivity, down to
its 0.1 floor, faster the more the control was pressed (talking to people). #bug-tracker 11-30, v0.8.5.2. Each change is
logged with the key that made it, sens_key_name) */
void rx_option_set(int id, int value);
static int sens_from_file; /* (mouse_setup: <user>/mouse_sens.txt was there) */
static int key_is_a_control(int vk); /* (below, beside bound_down: the binding table's) */
static int sens_key(int vk) { return !key_is_a_control(vk) && key(vk); }
static const char *sens_key_name(int vk) {
return vk == VK_OEM_MINUS ? "-" : vk == VK_SUBTRACT ? "Num -" : vk == VK_OEM_PLUS ? "=" : vk == VK_ADD ? "Num +" : "?";
}
static void mouse_sens_keys(void) {
static int prev_minus, prev_plus, from_env = -1;
if (from_env < 0) {
@@ -97,11 +106,16 @@ static void mouse_sens_keys(void) {
}
}
if (!from_env) hos_mouse_sens = rx_option(7, 100) / 100.0;
const int minus = key(VK_OEM_MINUS) || key(VK_SUBTRACT), plus = key(VK_OEM_PLUS) || key(VK_ADD);
const int minus_vk = sens_key(VK_OEM_MINUS) ? VK_OEM_MINUS : sens_key(VK_SUBTRACT) ? VK_SUBTRACT : 0;
const int plus_vk = sens_key(VK_OEM_PLUS) ? VK_OEM_PLUS : sens_key(VK_ADD) ? VK_ADD : 0;
const int minus = minus_vk != 0, plus = plus_vk != 0;
if ((minus && !prev_minus) || (plus && !prev_plus)) {
const double was = hos_mouse_sens;
hos_mouse_sens *= minus && !prev_minus ? 0.8 : 1.25;
if (hos_mouse_sens < 0.1) hos_mouse_sens = 0.1;
if (hos_mouse_sens > 5) hos_mouse_sens = 5;
hos_log("hid: mouse sensitivity %.2f -> %.2f (the %s key)", was, hos_mouse_sens,
sens_key_name(minus && !prev_minus ? minus_vk : plus_vk));
if (from_env) mouse_sens_save();
else rx_option_set(7, (int)lround(hos_mouse_sens * 100));
}
@@ -1270,6 +1284,16 @@ static int bound_down(int i, int mouse) {
}
return 0;
}
/* ((Triforce, 11-30) vk is a key some control has (any row of the binding table: the Switch's buttons, the stick's and the
camera's keys, the note rows, Toggle HUD) or the walk key: then no shortcut of the host's own takes it, mouse_sens_keys) */
static int key_is_a_control(int vk) {
if (vk <= 0) return 0;
if (vk == walk_vk) return 1;
for (int i = 0; i < HOS_KEY_N; i++)
for (int k = 0; k < 2; k++)
if ((int)key_bind[i][k] == vk) return 1;
return 0;
}
/* ((Triforce) The Controls page's Toggle HUD row: a press of its gamepad input or one of its keys hides the HUD in play, the
next shows it again (host/hos_wide_ui.c hos_gameplay_hud_toggle: for the session). readable: the player's input counts at
@@ -1455,6 +1479,47 @@ static uint64_t oc_pad_word(uint64_t buttons) {
return w;
}
/* ((Triforce, 11-30) The ReShade comparison asked for inside the pause menu's Options (gpu/vk/vk_menu.cpp, option
HOS_OPT_COMPARE_PLAY 1): the game is paused there and its scene draws nothing, the preset is laid on the gameplay picture
alone, so the comparison over those screens showed the Options and the pause menu and no change ("ReShade Compare not
taking you to gameplay screen", #bug-tracker 11-30). The menus are left as Back leaves them: B tapped on the Options
screen (as for one of our tabs left with Back, above), then B on the pause menu (its Back prompt's, host/oot_menu.c), each
once and once more if its screen still runs 1.5 s later (a press lost in its animation). Neither run for 300 ms: in play,
the renderer told 2 and the comparison opened over the game. Not there 4 s after the ask: 3, the comparison where it is */
int hos_oot_options_front(void); /* (host/oot_menu.c) */
int hos_oot_pause_front(void);
static void compare_to_play(int64_t now) {
static int64_t asked_ns, menus_ns, tap_ns[2];
static int taps[2];
if (rx_option(HOS_OPT_COMPARE_PLAY, 0) != 1) {
asked_ns = 0;
return;
}
if (!asked_ns) {
asked_ns = menus_ns = now, taps[0] = taps[1] = 0;
hos_log("hid: the ReShade comparison asked from the Options: leaving the game's menus for play");
}
const int options = hos_oot_options_front(), pause = !options && hos_oot_pause_front();
if (options || pause) {
const int i = options ? 0 : 1;
menus_ns = now;
if (!taps[i] || (taps[i] < 2 && now - tap_ns[i] >= 1500000000LL)) {
hos_hid_tap("0:B/80");
hos_log("hid: the ReShade comparison: B on the %s (%d)", i ? "pause menu" : "Options", ++taps[i]);
tap_ns[i] = now;
}
} else if (now - menus_ns >= 300000000LL) {
rx_option_set(HOS_OPT_COMPARE_PLAY, 2);
hos_log("hid: the ReShade comparison: in play after %.1f s", (now - asked_ns) / 1e9);
asked_ns = 0;
return;
}
if (now - asked_ns >= 4000000000LL) {
rx_option_set(HOS_OPT_COMPARE_PLAY, 3);
hos_log("hid: the ReShade comparison: the game's menus still up after 4 s; opened where it is");
asked_ns = 0;
}
}
static void read_input(uint64_t *buttons, int32_t stick[4]) {
*buttons = 0;
memset(stick, 0, 4 * sizeof *stick);
@@ -1544,6 +1609,7 @@ static void read_input(uint64_t *buttons, int32_t stick[4]) {
}
was_open = open;
}
compare_to_play(hos_now_ns()); /* ((Triforce, 11-30) the ReShade comparison asked from the pause menu's Options) */
uint64_t down = 0; /* (the pads' buttons and the bound keys down at this read) */
{ /* (hookshot) while the Insert menu is open the pads are its own, as the keyboard is (key()), and after it
closed each input it had waits until it is let go (the press that closed it never reaches the game); the