mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 11:49:59 -04:00
Give game 1.1.1 the direct mouse camera: two sites in the camera's input update take the raw mouse counts after the stick's dead zone and curve, and the Controls tab shows the mouse rows again.
The counts are divided by the frames the game steps and by the camera speed, as the game multiplies the processed stick by both, so a count turns the camera 0.08 degrees on both axes at every frame rate and stick camera speed. The 1.4.3 selectors stay off on 1.1.1. NX2NAVI_MOUSE_TRACE=1 logs the camera input updates and the camera's direction for measurements, and tests/mouse_direct_check.py checks the 1.1.1 hooks.
This commit is contained in:
@@ -1347,6 +1347,15 @@ static void restart_confirm(float scale) {
|
||||
|
||||
static void tab_controls(float scale) {
|
||||
opt_begin("##controls", scale);
|
||||
// The mouse camera first, where a player on keyboard and mouse looks for it; both rows are live. How the mouse
|
||||
// reaches the game, where the game version has the direct mode's patch set (mouse_direct.c; the values in their
|
||||
// cfg.c order, stick then direct), and its sensitivity. The slider stops short of 0, which nx2navi.ini takes to
|
||||
// switch the mouse camera and the cursor capture off.
|
||||
if (input_direct_mouse_available()) {
|
||||
static const UiTextId mouse_mode[] = {UI_MENU_MOUSE_STICK, UI_MENU_MOUSE_DIRECT};
|
||||
opt_choice("NX2NAVI_MOUSE_MODE", UI_MENU_MOUSE_MODE, mouse_mode, 2, UI_MENU_MOUSE_MODE_DESC);
|
||||
}
|
||||
opt_slider("NX2NAVI_MOUSE_SENS", UI_MENU_MOUSE_SENS, 0.05f, 10, UI_MENU_MOUSE_SENS_DESC, 0.05f, "%.2f");
|
||||
static const UiTextId layout[] = {UI_MENU_PAD_LAYOUT_AUTO, UI_MENU_PAD_LAYOUT_NINTENDO, UI_MENU_PAD_LAYOUT_XBOX,
|
||||
UI_MENU_PAD_LAYOUT_PLAYSTATION};
|
||||
opt_choice("NX2NAVI_PAD_LAYOUT", UI_MENU_PAD_LAYOUT, layout, 4, UI_MENU_PAD_LAYOUT_DESC, pad_layout_note());
|
||||
|
||||
Reference in New Issue
Block a user